Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SistemaGestionAdministrativa
ModuloPersonalCliente
Commits
00165092
Commit
00165092
authored
Jun 28, 2016
by
Teodoro David Nina Mamani
Browse files
Vistas migracion de datos desde moodle
parent
39ea9ede
Changes
15
Hide whitespace changes
Inline
Side-by-side
client/app/app.scss
View file @
00165092
...
...
@@ -189,11 +189,13 @@ input[type=checkbox].with-font:checked ~ label:before {
@import
'cargos/cargos.scss'
;
@import
'cargosConvocatorias/cargosConvocatorias.scss'
;
@import
'comentarios/comentarios.scss'
;
@import
'contrataciones/contrataciones.scss'
;
@import
'convocatorias/convocatorias.scss'
;
@import
'datosPersonas/datosPersonas.scss'
;
@import
'entidades/entidades.scss'
;
@import
'gruposConvocatoria/gruposConvocatoria.scss'
;
@import
'main/main.scss'
;
@import
'migracionMoodle/migracionMoodle.scss'
;
@import
'personas/personas.scss'
;
@import
'postulaciones/postulaciones.scss'
;
@import
'relacionesLaborales/relacionesLaborales.scss'
;
...
...
client/app/migracionMoodle/migracionMoodle.categoria.html
0 → 100644
View file @
00165092
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-sm-3 col-md-3 col-xs-6"
>
<h4
class=
"color-primary"
>
Categorias Moodle
<small><span
class=
"label label-default"
>
{{vm.totalElementos}}
</span></small>
</h4>
</div>
</div>
<div
class=
"col-md-10"
>
<uib-alert
ng-repeat=
"alerta in vm.alertas"
type=
"{{alerta.tipo}}"
close=
"vm.alertas.splice($index,1)"
dismiss-on-timeout=
"3000"
>
{{alerta.mensaje}}
</uib-alert>
</div>
<div
class=
"row"
>
<div
class=
"table-responsive col-md-10"
>
<table
class=
"table table-striped"
>
<thead>
<tr>
<th><a
href=
""
>
id
</a></th>
<th><a
href=
""
ng-click=
"vm.ordenar('nombres')"
>
Nombre
</a></th>
<th
colspan=
"2"
class=
"text-center"
>
Opciones
</th>
</tr>
</thead>
<tbody>
<tr
ng-repeat=
"categoria in vm.categorias"
>
<td>
{{categoria.idCategoria}}
</td>
<td>
{{categoria.nombreCategoria}}
</td>
<td
class=
"text-center"
>
<div
class=
"btn-group"
role=
"group"
>
<a
class=
"btn btn-success-outline btn-xs"
href=
"#"
role=
"button"
ui-sref=
"migracionMoodle.curso({idCategoria:categoria.idCategoria})"
>
<i
class=
"fa fa-lg fa-clone"
></i>
Cursos
</a>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<uib-pagination
ng-hide=
"vm.totalElementos < 10"
total-items=
"vm.totalElementos"
items-per-page=
"10"
max-size=
"8"
force-ellipses=
"true"
ng-model=
"vm.paginaActual"
ng-change=
"vm.cambiarPagina()"
next-text=
"Siguiente"
previous-Text=
"Anterior"
></uib-pagination>
</div>
</div>
client/app/migracionMoodle/migracionMoodle.controller.js
0 → 100644
View file @
00165092
'
use strict
'
;
(()
=>
{
class
MigracionMoodleController
{
constructor
(
$stateParams
,
$uibModal
,
Modal
,
MigracionMoodleService
)
{
this
.
alertas
=
[];
this
.
modal
=
$uibModal
;
this
.
Modal
=
Modal
;
this
.
service
=
MigracionMoodleService
;
this
.
categorias
=
{};
// this.service.getWSCategoria()
this
.
service
.
getCategoriasMoodle
()
.
then
((
categorias
)
=>
{
this
.
categorias
=
categorias
;
this
.
totalElementos
=
categorias
.
length
;
})
}
}
angular
.
module
(
'
moduloPersonalApp
'
)
.
controller
(
'
MigracionMoodleCtrl
'
,
MigracionMoodleController
);
})
();
client/app/migracionMoodle/migracionMoodle.controller.spec.js
0 → 100644
View file @
00165092
'
use strict
'
;
describe
(
'
Controller: MigracionMoodleCtrl
'
,
function
()
{
// load the controller's module
beforeEach
(
module
(
'
moduloPersonalApp
'
));
var
MigracionMoodleCtrl
,
scope
;
// Initialize the controller and a mock scope
beforeEach
(
inject
(
function
(
$controller
,
$rootScope
)
{
scope
=
$rootScope
.
$new
();
MigracionMoodleCtrl
=
$controller
(
'
MigracionMoodleCtrl
'
,
{
$scope
:
scope
});
}));
it
(
'
should ...
'
,
function
()
{
expect
(
1
).
to
.
equal
(
1
);
});
});
client/app/migracionMoodle/migracionMoodle.curso.controller.js
0 → 100644
View file @
00165092
'
use strict
'
;
(()
=>
{
class
MigracionMoodleCursoController
{
constructor
(
$stateParams
,
$previousState
,
$uibModal
,
Modal
,
MigracionMoodleService
)
{
this
.
alertas
=
[];
this
.
modal
=
$uibModal
;
this
.
Modal
=
Modal
;
this
.
estadoAnterior
=
$previousState
;
this
.
service
=
MigracionMoodleService
;
this
.
cursos
=
{};
this
.
idCategoria
=
$stateParams
.
idCategoria
;
this
.
service
.
getCursosMoodle
({
id
:
this
.
idCategoria
})
.
then
((
cursos
)
=>
{
this
.
cursos
=
cursos
;
this
.
totalElementos
=
cursos
.
length
;
})
}
}
angular
.
module
(
'
moduloPersonalApp
'
)
.
controller
(
'
MigracionMoodleCursoCtrl
'
,
MigracionMoodleCursoController
);
})
();
client/app/migracionMoodle/migracionMoodle.curso.html
0 → 100644
View file @
00165092
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-sm-3 col-md-3 col-xs-6"
>
<h4
class=
"color-primary"
>
Cursos Moodle
<small><span
class=
"label label-default"
>
{{vm.totalElementos}}
</span></small>
</h4>
</div>
<div
class=
"col-sm-5 col-md-5 col-sm-offset-2"
>
<div
class=
"pull-right"
>
<a
class=
"btn btn-default header-button"
ng-click=
"vm.estadoAnterior.go()"
>
<i
class=
"fa fa-arrow-left"
></i>
Regresar
</a>
</div>
</div>
</div>
<div
class=
"col-md-10"
>
<uib-alert
ng-repeat=
"alerta in vm.alertas"
type=
"{{alerta.tipo}}"
close=
"vm.alertas.splice($index,1)"
dismiss-on-timeout=
"3000"
>
{{alerta.mensaje}}
</uib-alert>
</div>
<div
class=
"row"
>
<div
class=
"table-responsive col-md-10"
>
<table
class=
"table table-striped"
>
<thead>
<tr>
<th><a
href=
""
>
id
</a></th>
<th><a
href=
""
ng-click=
"vm.ordenar('nombres')"
>
Nombre
</a></th>
<th
colspan=
"2"
class=
"text-center"
>
Opciones
</th>
</tr>
</thead>
<tbody>
<tr
ng-repeat=
"curso in vm.cursos"
>
<td>
{{curso.idCurso}}
</td>
<td>
{{curso.nombreCurso}}
</td>
<td
class=
"text-center"
>
<div
class=
"btn-group"
role=
"group"
>
<a
class=
"btn btn-success-outline btn-xs"
href=
"#"
role=
"button"
ui-sref=
"migracionMoodle.examen({idCurso:curso.idCurso})"
>
<i
class=
"fa fa-lg fa-list-ul"
></i>
Examenes
</a>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<uib-pagination
ng-hide=
"vm.totalElementos < 10"
total-items=
"vm.totalElementos"
items-per-page=
"10"
max-size=
"8"
force-ellipses=
"true"
ng-model=
"vm.paginaActual"
ng-change=
"vm.cambiarPagina()"
next-text=
"Siguiente"
previous-Text=
"Anterior"
></uib-pagination>
</div>
</div>
client/app/migracionMoodle/migracionMoodle.examen.controller.js
0 → 100644
View file @
00165092
'
use strict
'
;
(()
=>
{
class
MigracionMoodleExamenController
{
constructor
(
$stateParams
,
$uibModal
,
Modal
,
MigracionMoodleService
)
{
this
.
alertas
=
[];
this
.
modal
=
$uibModal
;
this
.
Modal
=
Modal
;
this
.
service
=
MigracionMoodleService
;
this
.
cursos
=
{};
this
.
examenes
=
{};
this
.
idCurso
=
$stateParams
.
idCurso
;
this
.
service
.
getExamenesMoodle
({
id
:
this
.
idCurso
})
.
then
((
examenes
)
=>
{
this
.
examenes
=
examenes
;
this
.
totalElementos
=
examenes
.
length
;
})
}
migrarDatos
(
form
){
this
.
enviado
=
true
;
if
(
form
.
$valid
)
{
// console.log( this.examenes );
this
.
examenes
.
forEach
(
examen
=>
{
if
(
examen
.
checked
){
this
.
service
.
getNotasMoodle
({
id
:
examen
.
id
})
.
then
(
notas
=>
{
console
.
log
(
notas
);
})
}
})
}
}
}
angular
.
module
(
'
moduloPersonalApp
'
)
.
controller
(
'
MigracionMoodleExamenCtrl
'
,
MigracionMoodleExamenController
);
})
();
client/app/migracionMoodle/migracionMoodle.examen.html
0 → 100644
View file @
00165092
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-sm-3 col-md-3 col-xs-6"
>
<h4
class=
"color-primary"
>
Examenes Moodle
<small><span
class=
"label label-default"
>
{{vm.totalElementos}}
</span></small>
</h4>
</div>
<div
class=
"col-sm-7 col-md-5 col-sm-offset-2"
>
<div
class=
"pull-right btn-group"
>
<button
class=
"btn btn-default"
ui-sref=
"migracionMoodle.categoria"
type=
"button"
><i
class=
"fa fa-arrow-left"
></i>
Cancelar
</button>
</div>
</div>
</div>
<div
class=
"col-md-10"
>
<uib-alert
ng-repeat=
"alerta in vm.alertas"
type=
"{{alerta.tipo}}"
close=
"vm.alertas.splice($index,1)"
dismiss-on-timeout=
"3000"
>
{{alerta.mensaje}}
</uib-alert>
</div>
<div
class=
"row"
>
<form
class=
"form"
name=
"form"
ng-submit=
"vm.migrarDatos(form)"
novalidate
>
<div
class=
"table-responsive col-md-10"
>
<table
class=
"table table-striped"
>
<thead>
<tr>
<th>
id
</th>
<th>
Nombre
</th>
<th>
Introdución
</th>
<th
colspan=
"2"
class=
"text-center"
>
Opciones
</th>
</tr>
</thead>
<tbody>
<tr
ng-repeat=
"examen in vm.examenes"
>
<td>
{{examen.idExamen}}
</td>
<td>
{{examen.nombreExamen}}
</td>
<td
ng-bind-html=
"examen.introExamen"
>
{{examen.introExamen}}
</td>
<td
class=
"text-center"
>
<input
type=
"checkbox"
ng-model=
"examen.checked"
id=
"{{examen.idExamen}}"
name=
"seleccionado"
>
</td>
</tr>
</tbody>
</table>
</div>
<uib-pagination
ng-hide=
"vm.totalElementos < 1000"
total-items=
"vm.totalElementos"
items-per-page=
"10"
max-size=
"8"
force-ellipses=
"true"
ng-model=
"vm.paginaActual"
ng-change=
"vm.cambiarPagina()"
next-text=
"Siguiente"
previous-Text=
"Anterior"
></uib-pagination>
<div
class=
"col-md-10"
>
<div
class=
"pull-right"
>
<button
class=
"btn btn-primary-outline"
type=
"submit"
ng-disabled=
"!(examen.checked!=1)"
>
Migrar Datos
</button>
</div>
</div>
</form>
</div>
</div>
client/app/migracionMoodle/migracionMoodle.html
0 → 100644
View file @
00165092
<div
class=
"container"
>
<div
ui-view
></div>
</div>
client/app/migracionMoodle/migracionMoodle.js
0 → 100644
View file @
00165092
'
use strict
'
;
angular
.
module
(
'
moduloPersonalApp
'
)
.
config
(
function
(
$stateProvider
)
{
$stateProvider
.
state
(
'
migracionMoodle
'
,
{
abstract
:
true
,
url
:
'
/migracionMoodle
'
,
templateUrl
:
'
app/migracionMoodle/migracionMoodle.html
'
,
controller
:
'
MigracionMoodleCtrl
'
,
controllerAs
:
'
vm
'
})
.
state
(
'
migracionMoodle.categoria
'
,
{
url
:
''
,
templateUrl
:
'
app/migracionMoodle/migracionMoodle.categoria.html
'
})
.
state
(
'
migracionMoodle.curso
'
,
{
url
:
'
/cursosMoodle/:idCategoria
'
,
templateUrl
:
'
app/migracionMoodle/migracionMoodle.curso.html
'
,
controller
:
'
MigracionMoodleCursoCtrl
'
,
controllerAs
:
'
vm
'
})
.
state
(
'
migracionMoodle.examen
'
,
{
url
:
'
/examenesMoodle/:idCurso
'
,
templateUrl
:
'
app/migracionMoodle/migracionMoodle.examen.html
'
,
controller
:
'
MigracionMoodleExamenCtrl
'
,
controllerAs
:
'
vm
'
})
});
client/app/migracionMoodle/migracionMoodle.scss
0 → 100644
View file @
00165092
client/app/migracionMoodle/migracionMoodle.service.js
0 → 100644
View file @
00165092
'
use strict
'
;
(()
=>
{
class
MigracionMoodleService
{
constructor
(
$resource
,
appConfig
)
{
this
.
resource
=
$resource
(
appConfig
.
serverAddress
+
'
/api/migracionMoodle/:id
'
,
{
id
:
'
@_id
'
},
{
update
:
{
method
:
'
PUT
'
},
query
:
{
isArray
:
false
},
categoriasMoodle
:
{
isArray
:
true
,
method
:
'
GET
'
,
url
:
appConfig
.
serverAddress
+
'
/api/migracionMoodle/categoriasMoodle
'
},
cursosMoodle
:
{
isArray
:
true
,
method
:
'
GET
'
,
url
:
appConfig
.
serverAddress
+
'
/api/migracionMoodle/cursosMoodle/:id
'
},
examenesMoodle
:
{
isArray
:
true
,
method
:
'
GET
'
,
url
:
appConfig
.
serverAddress
+
'
/api/migracionMoodle/examenesMoodle/:id
'
},
wsCategoria
:
{
isArray
:
true
,
method
:
'
GET
'
,
url
:
appConfig
.
serverAddress
+
'
/api/migracionMoodle/wsCategoria
'
},
notasMoodle
:
{
isArray
:
true
,
method
:
'
GET
'
,
url
:
appConfig
.
serverAddress
+
'
/api/migracionMoodle/notasMoodle/:id
'
}
})
}
getCategoriasMoodle
()
{
return
this
.
resource
.
categoriasMoodle
().
$promise
;
}
getCursosMoodle
(
parametros
){
return
this
.
resource
.
cursosMoodle
(
parametros
).
$promise
;
}
getExamenesMoodle
(
parametros
){
return
this
.
resource
.
examenesMoodle
(
parametros
).
$promise
;
}
getWSCategoria
(){
return
this
.
resource
.
wsCategoria
().
$promise
;
}
getNotasMoodle
(
parametros
){
return
this
.
resource
.
notasMoodle
(
parametros
).
$promise
;
}
}
angular
.
module
(
'
moduloPersonalApp
'
)
.
service
(
'
MigracionMoodleService
'
,
MigracionMoodleService
);
})
();
client/app/migracionMoodle/migracionMoodle.service.spec.js
0 → 100644
View file @
00165092
'
use strict
'
;
describe
(
'
Service: migracionMoodle
'
,
function
()
{
// load the service's module
beforeEach
(
module
(
'
moduloPersonalApp
'
));
// instantiate service
var
migracionMoodle
;
beforeEach
(
inject
(
function
(
_migracionMoodle_
)
{
migracionMoodle
=
_migracionMoodle_
;
}));
it
(
'
should do something
'
,
function
()
{
expect
(
!!
migracionMoodle
).
to
.
be
.
true
;
});
});
client/components/navbar/navbar.controller.js
View file @
00165092
...
...
@@ -24,6 +24,10 @@ class NavbarController {
'
title
'
:
'
Tipos Entidad
'
,
'
state
'
:
'
tiposEntidad.lista
'
,
'
parentState
'
:
'
tiposEntidad
'
},{
'
title
'
:
'
Migracion Moodle
'
,
'
state
'
:
'
migracionMoodle.categoria
'
,
'
parentState
'
:
'
migracionMoodle
'
}];
isCollapsed
=
true
;
...
...
client/index.html
View file @
00165092
...
...
@@ -73,7 +73,7 @@
<script
src=
"components/autenticacion/autenticacion.module.js"
></script>
<script
src=
"components/modal/modal.module.js"
></script>
<script
src=
"components/util/util.module.js"
></script>
<script
src=
"app/oficinas/modals/oficina
s
.editar.modal.controller.js"
></script>
<script
src=
"app/oficinas/modals/oficina
.entidad
.editar.modal.controller.js"
></script>
<script
src=
"app/cargos/editar/cargos.editar.controller.js"
></script>
<script
src=
"app/cargos/modals/cargos.crear.modal.controller.js"
></script>
<script
src=
"app/cargos/modals/cargos.editar.modal.controller.js"
></script>
...
...
@@ -115,11 +115,16 @@
<script
src=
"app/gruposConvocatoria/modals/gruposConvocatoria.editar.modal.controller.js"
></script>
<script
src=
"app/main/main.controller.js"
></script>
<script
src=
"app/main/main.js"
></script>
<script
src=
"app/migracionMoodle/migracionMoodle.controller.js"
></script>
<script
src=
"app/migracionMoodle/migracionMoodle.curso.controller.js"
></script>
<script
src=
"app/migracionMoodle/migracionMoodle.examen.controller.js"
></script>
<script
src=
"app/migracionMoodle/migracionMoodle.js"
></script>
<script
src=
"app/migracionMoodle/migracionMoodle.service.js"
></script>
<script
src=
"app/oficinas/editar/oficinas.editar.controller.js"
></script>
<script
src=
"app/oficinas/modals/oficina.entidad.crear.modal.controller.js"
></script>
<script
src=
"app/oficinas/modals/oficina.entidad.editar.modal.controller.js"
></script>
<script
src=
"app/oficinas/modals/oficinas.crear.modal.controller.js"
></script>
<script
src=
"app/cargos/cargos.controller.js"
></script>
<script
src=
"app/oficinas/modals/oficinas.crear.modal.controller.js"
></script>
<script
src=
"app/oficinas/modals/oficinas.editar.modal.controller.js"
></script>
<script
src=
"app/oficinas/oficinas.service.js"
></script>
<script
src=
"app/oficinasUnidad/oficinasUnidad.service.js"
></script>
<script
src=
"app/personas/editar/personas.editar.controller.js"
></script>
...
...
Write
Preview
Supports
Markdown
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