Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ba56ada0
authored
Sep 05, 2017
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
solved default method and instruction names
parent
ad3a84b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
sails/src/api/models/Student.js
sails/src/assets/scripts/modules/student/controllers/setup.js
sails/src/api/models/Student.js
View file @
ba56ada0
...
...
@@ -120,10 +120,15 @@ module.exports = {
if
(
!
student
.
surname
||
student
.
surname
.
length
==
0
)
student
.
surname
=
sails
.
__
({
phrase
:
'no_surname'
,
locale
:
student
.
lang
});
student
.
attributes
=
Student
.
getValidAttributes
(
student
.
attributes
);
if
(
student
.
lastInstruction
&&
student
.
lastInstruction
[
0
])
{
student
.
current_method
=
student
.
lastInstruction
[
0
]
?
student
.
lastInstruction
[
0
].
met_name
:
"no_method"
;
student
.
current_instruction
=
student
.
lastInstruction
[
0
]
?
student
.
lastInstruction
[
0
].
ins_name
:
"no_instruction"
;
}
if
(
student
.
lastInstruction
&&
student
.
lastInstruction
[
0
]
&&
student
.
lastInstruction
[
0
].
met_name
)
{
student
.
current_method
=
student
.
lastInstruction
[
0
].
met_name
;
student
.
current_instruction
=
student
.
lastInstruction
[
0
].
ins_name
;
}
else
{
student
.
current_method
=
"no_method"
;
student
.
current_instruction
=
"no_instruction"
;
}
delete
student
.
password
;
return
student
;
},
...
...
sails/src/assets/scripts/modules/student/controllers/setup.js
View file @
ba56ada0
...
...
@@ -128,7 +128,9 @@ dashboardControllers.controller('StudentSetupCtrl', function StudentSetupCtrl(
$scope
.
formUser
.
country
=
data
.
country
;
$scope
.
formUser
.
gender
=
data
.
gender
;
$scope
.
formUser
.
lang
=
data
.
lang
;
$scope
.
formUser
.
name
=
data
.
name
;
$scope
.
formUser
.
name
=
data
.
name
;
$scope
.
studentData
.
name
=
data
.
name
;
$scope
.
studentData
.
surname
=
data
.
surname
;
$scope
.
formUser
.
notes
=
data
.
notes
;
$scope
.
formUser
.
surname
=
data
.
surname
;
$scope
.
formUser
.
username
=
data
.
username
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment