atomic_assessments_import 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a996e4ab49d42df22871a55ce475cbc6b95b21b5f34be95d83c2f65601ae3ee
|
4
|
+
data.tar.gz: 2b670a8b2fbbda6e4e958e69b9d889368cde69060a434eace3ca8a79ff65e14c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9f744c0833f6f9a9fca268021f94fa808228827c92dfe351798a2a03e8f8576d37c368c2e3ce1ea4f15ddbc717a9c96dc091292a139a525a297082d6fb6181e
|
7
|
+
data.tar.gz: b7a3bd471532d7c41b6e656ed01fe89008ec026a006cd0469d8ae90483ce9621772ece0e90db7dded82ef271a46747cbef928554a3cd93daa18e69ca0a17f72f
|
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "byebug"
|
4
3
|
require "csv"
|
5
4
|
require "active_support/core_ext/digest/uuid"
|
6
5
|
|
@@ -109,6 +108,11 @@ module AtomicAssessmentsImport
|
|
109
108
|
end
|
110
109
|
|
111
110
|
def convert_row(row)
|
111
|
+
source = "<p>CSV Import on #{Time.now.strftime('%Y-%m-%d')}</p>\n"
|
112
|
+
if row["question id"].present?
|
113
|
+
source += "<p>External id: #{row['question id']}</p>\n"
|
114
|
+
end
|
115
|
+
|
112
116
|
question = Questions::Question.load(row)
|
113
117
|
item = {
|
114
118
|
reference: SecureRandom.uuid,
|
@@ -124,6 +128,7 @@ module AtomicAssessmentsImport
|
|
124
128
|
alignment: alignment_urls(row),
|
125
129
|
}.compact,
|
126
130
|
},
|
131
|
+
source: source,
|
127
132
|
description: row["description"] || "",
|
128
133
|
questions: [
|
129
134
|
{
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atomic_assessments_import
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Collings
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-03-
|
12
|
+
date: 2025-03-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|