Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Fetch value lists from EDDI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AU - Web og Digital
Fetch value lists from EDDI
Commits
e13b6e66
Commit
e13b6e66
authored
9 years ago
by
Søren Madsen
Browse files
Options
Downloads
Patches
Plain Diff
[TASK] Fix sorting value
parent
95a3bc6b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
getvaluefromEDDI.js
+5
-2
5 additions, 2 deletions
getvaluefromEDDI.js
with
5 additions
and
2 deletions
getvaluefromEDDI.js
+
5
−
2
View file @
e13b6e66
...
@@ -5,7 +5,7 @@ var ObjectID = require("mongodb").ObjectID;
...
@@ -5,7 +5,7 @@ var ObjectID = require("mongodb").ObjectID;
var
mongoUrl
=
"
mongodb://localhost:3001/meteor
"
;
var
mongoUrl
=
"
mongodb://localhost:3001/meteor
"
;
var
params
=
[
"
programme
"
,
"
period
"
,
"
ects
"
,
"
year
"
,
"
location
"
,
"
courseLanguage
"
,
"
courseType
"
];
var
params
=
[
"
programme
"
,
"
period
"
,
"
year
"
,
"
ects
"
,
"
location
"
,
"
courseLanguage
"
,
"
courseType
"
];
var
lang
=
[
"
da
"
,
"
en
"
];
var
lang
=
[
"
da
"
,
"
en
"
];
mongo
.
connect
(
mongoUrl
,
function
(
err
,
db
)
{
mongo
.
connect
(
mongoUrl
,
function
(
err
,
db
)
{
...
@@ -34,6 +34,9 @@ var getData = function (lang, param, sortCounter) {
...
@@ -34,6 +34,9 @@ var getData = function (lang, param, sortCounter) {
json
.
listItems
.
forEach
(
function
(
item
)
{
json
.
listItems
.
forEach
(
function
(
item
)
{
arr
.
push
({
id
:
item
.
id
,
name
:
item
[
json
.
listName
]});
arr
.
push
({
id
:
item
.
id
,
name
:
item
[
json
.
listName
]});
});
});
if
(
param
==
"
courseLanguage
"
)
{
json
.
listName
=
"
instructionLanguage
"
}
obj
[
"
name
"
]
=
json
.
listName
;
obj
[
"
name
"
]
=
json
.
listName
;
obj
[
"
lang
"
]
=
lang
;
obj
[
"
lang
"
]
=
lang
;
obj
[
"
list
"
]
=
arr
;
obj
[
"
list
"
]
=
arr
;
...
@@ -57,7 +60,7 @@ lang.forEach(function (lang) {
...
@@ -57,7 +60,7 @@ lang.forEach(function (lang) {
getData
(
lang
,
param
,
sortCounter
);
getData
(
lang
,
param
,
sortCounter
);
sortCounter
=
sortCounter
+
10
;
sortCounter
=
sortCounter
+
10
;
console
.
log
(
param
,
sortCounter
,
lang
);
//
console.log(param, sortCounter, lang);
});
});
});
});
console
.
timeEnd
(
"
Process
"
);
console
.
timeEnd
(
"
Process
"
);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment