Skip to Content
Education SciencesEducation Sciences
  • Article
  • Open Access

27 August 2026

44 Pages

Learning Analytics of Students’ Interaction with ChatGPT in Programming Education: A Process-Oriented Analysis

,
,
,
,
and
1
Institute of Digital Sciences and Artificial Intelligence, L.N. Gumilyov Eurasian National University, Astana 010008, Kazakhstan
2
Department of Computer Science, Lublin University of Technology, 36B Nadbystrzycka str., 20-618 Lublin, Poland
*
Authors to whom correspondence should be addressed.

Abstract

Generative AI tools are now widely used in undergraduate programming, yet most evidence about how students use them comes from self-report rather than from observed behaviour. This study examined the sequential structure of students’ ChatGPT (GPT- 4o, OpenAI)-supported programming work and the cognitive complexity of their queries. Screen recordings of 363 second-year students completing an individual Python 3.12 data-visualisation assignment were coded into 3985 activity episodes and analysed using descriptive statistics, lag-1 sequential analysis, and cognitive network analysis; because recordings capture actions rather than cognition, the coded categories are treated as behavioural indicators interpreted within, rather than as measurements of, the Self-Regulated Learning framework. Programming activities accounted for 63% of coded actions and ChatGPT interactions for 20%. Behaviour was organised around a troubleshooting cycle, the strongest association being between submitting error messages and reviewing ChatGPT responses (PCM → RF, Yule’s Q = 0.84, a descriptive association measure, rather than a transition probability, whose stability across students was not tested). ChatGPT use was concentrated in activities indicative of monitoring and control and was largely absent from planning and reflection. High-achieving students produced a higher proportion of deep-level submissions (32.2% vs. 19.2%) and a lower proportion of surface-level submissions (23.2% vs. 38.4%) than low-achieving students; because submissions are nested within students, this difference is reported as a property of the observed distribution rather than as an inferential finding. Comparisons computed at the level of the student were tested inferentially and reached significance with small effect sizes; comparisons computed at the level of coded actions or query submissions are reported throughout as observed properties of the aggregate distributions rather than as inferentially established differences. These episode-level findings support instructional scaffolding that structures query formulation and reflection.

1. Introduction

The integration of generative artificial intelligence tools into higher education has accelerated considerably over recent years, with ChatGPT emerging as one of the most widely adopted systems among undergraduate students engaged in technical disciplines (Silva et al., 2024; Hartley et al., 2024; Yilmaz & Yilmaz, 2023). In programming instruction specifically, students have reported using ChatGPT for a broad range of purposes, including code generation, syntax explanation, error diagnosis, and step-by-step debugging support (Silva et al., 2024; Yang et al., 2025; H. Y. Lee et al., 2025). At the institutional level, the formal incorporation of AI tools into programming curricula reflects a broader pedagogical shift in which generative AI is positioned not as an external resource to be restricted, but as a permitted auxiliary instrument whose role in student learning requires empirical characterisation (Kasneci et al., 2023; Giannakos et al., 2025). Despite this rapid adoption, the cognitive processes and self-regulatory strategies that underlie students’ actual use of ChatGPT during programming tasks remain insufficiently understood. Programming is a cognitively demanding discipline that requires students to understand abstract concepts, apply formal syntax rules, and construct logical relationships between programme components (Boom et al., 2022; Chen & Chung, 2024). In this context, the availability of an AI-based conversational tool can substantially reshape how students organise their learning activities, approach error resolution, and regulate their engagement with the task—outcomes that cannot be fully captured through performance metrics alone.
A growing body of research has examined the effects of ChatGPT on students’ learning outcomes, self-efficacy, and motivation in programming courses (Wang et al., 2025; Y. F. Lee et al., 2025; Alanazi et al., 2025). However, the majority of these studies rely on self-report data collected through surveys and interviews, which capture students’ post hoc perceptions of AI tool use rather than their observable behaviour during task completion (Güner & Er, 2025; Sun et al., 2024). As a consequence, three specific gaps remain in the existing literature. First, while frequency-based and outcome-focused accounts of ChatGPT use have accumulated, the sequential structure of students’ interactions—how they transition between task analysis, code production, debugging, help-seeking, and response evaluation during authentic programming work—has received limited empirical attention. Second, there is insufficient evidence on how students with different levels of academic achievement differ in the self-regulatory strategies they apply when interacting with ChatGPT, beyond what can be inferred from performance comparisons. Third, little is known about the cognitive demands reflected in students’ ChatGPT queries—specifically, whether students predominantly seek surface-level code retrieval, engage in applied problem-solving, or demonstrate higher-order reasoning—and how these cognitive patterns relate to self-regulated learning phases during programming (Cheng et al., 2024; Alhazbi et al., 2024).
The present study addresses these gaps through a process-oriented learning analytics approach applied to screen recordings of 363 undergraduate students completing a Python programming assignment with ChatGPT available as a permitted tool. Lag sequential analysis was applied to reconstructed interaction logs to examine the temporal structure of students’ behavioural transitions, and cognitive network analysis was used to characterise the structural properties of their query patterns. Both methods were interpreted within the Self-Regulated Learning framework (Panadero, 2017), which conceptualises learning as a cyclical process involving planning, monitoring, control, and reflection. The study makes three contributions to the existing literature. It provides episode-level behavioural process evidence of how students integrate ChatGPT into self-regulated programming cycles across three stages of task completion. It identifies cognitive query patterns that distinguish high-, average-, and low-achieving students, extending prior outcome-based research with behavioural evidence. It proposes a theoretically grounded and explicitly interpretive mapping of observable ChatGPT interaction types onto SRL phases, offering an explicitly specified analytical framework, reliably applied within the present dataset, for future research on AI-supported learning in programming education (Fan et al., 2021; Alhazbi et al., 2024).

2. Literature Review

2.1. Generative AI and ChatGPT in Programming Education

The adoption of generative AI tools in programming education has expanded substantially since the public release of large language models capable of producing functional code in response to natural language prompts (Finnie-Ansley et al., 2022; Phung et al., 2023). ChatGPT has emerged as the most frequently used system in this context, with undergraduate students employing it across a range of task types including code generation, syntax explanation, error diagnosis, and conceptual clarification (Silva et al., 2024; Güner & Er, 2025). Silva et al. (2024) found that students in higher education programming courses regularly used ChatGPT to obtain code templates and interpret compiler errors, and reported reductions in task-completion time alongside improved confidence in handling unfamiliar syntax. Hartley et al. (2024) reported similar findings in an evaluative case study of ChatGPT-assisted coding learning, noting that AI-generated feedback reduced cognitive barriers associated with initial language acquisition while supporting students’ independent problem-solving attempts.
The reported benefits of ChatGPT use in programming instruction are, however, qualified by important methodological limitations in the existing evidence base. The majority of studies in this area have measured effects through post-task surveys, structured interviews, or pre- and post-test comparisons of performance outcomes (Wang et al., 2025; Y. F. Lee et al., 2025; Bhatt et al., 2025). While these approaches provide useful aggregate evidence, they do not capture how students actually engage with ChatGPT-generated responses during the task itself—whether they test and adapt generated code, submit it without modification, or use AI responses as a basis for further reasoning. Güner and Er (2025), in one of the few observational studies in this area, found that students’ ChatGPT use in a programming course was concentrated around debugging and error interpretation and showed limited engagement with higher-order cognitive functions such as solution design or reflective code evaluation. Sun et al. (2024) similarly observed that students in a prompt-based programming learning environment most frequently sought AI assistance reactively, in response to execution failures, rather than proactively, for task planning or conceptual elaboration. These findings suggest that the educational value of ChatGPT in programming instruction depends on the quality and strategic intent of students’ interactions with the system, rather than on access frequency alone—a distinction that outcome-based research designs are not well positioned to detect.

2.2. Learning Analytics and Process-Oriented Approaches to Programming

Learning analytics offers a methodological framework for examining the programming process itself rather than its outcomes in isolation (Fan et al., 2021; Alhazbi et al., 2024). By capturing behavioural traces—including activity sequences, error patterns, help-seeking events, and code revision cycles—process-oriented learning analytics makes it possible to identify how students approach problems, respond to difficulties, and regulate their engagement across the temporal course of a task (Fan et al., 2021). Alhazbi et al. (2024), in a systematic review of empirical studies using learning analytics to measure self-regulated learning in higher education, identified lag sequential analysis as among the most productive methods for detecting behavioural patterns associated with self-regulatory strategy use, noting its capacity to reveal the conditional probability structure of activity transitions rather than aggregate frequency distributions alone.
Process-oriented studies of programming behaviour have consistently demonstrated that students’ debugging strategies, error interpretation patterns, and use of external resources differ across achievement levels. Cheng et al. (2024) used eye-tracking and retrospective think-aloud data to show that high-performing programming students applied more deliberate monitoring strategies and sought explanatory understanding when encountering errors, while lower-performing students relied more heavily on trial-and-error approaches and were less likely to engage in structured reflection on their solutions. Shin and Song (2022) found that structured self-regulated learning support during programming instruction improved task performance and reduced cognitive load, with effects that were moderated by students’ initial competence levels. Boom et al. (2022) demonstrated that the quality of students’ programming processes—specifically, the extent to which they engaged in iterative testing and revision—was a stronger predictor of programme quality than prior computing experience.
A consistent limitation of the existing process-oriented research on programming is that it has been conducted primarily in environments without AI assistance, leaving it unclear how the availability of a generative AI tool reshapes students’ activity sequences, debugging cycles, and help-seeking behaviour. The integration of ChatGPT interaction data into learning analytics frameworks is therefore a methodologically underdeveloped area, and studies that examine how students transition between task analysis, code production, debugging, ChatGPT querying, response interpretation, and code revision in authentic instructional settings are largely absent from the literature.

2.3. Self-Regulated Learning in AI-Supported Programming

Self-Regulated Learning theory, as synthesised by Panadero (2017) in an integrative review of six prominent SRL models, conceptualises learning as a cyclical process involving four main phases: planning, in which students set goals and select strategies prior to task engagement; monitoring, in which they track their understanding and evaluate task progress; control, in which they adjust their strategies in response to feedback; and reflection, in which they evaluate outcomes and revise their approach for subsequent tasks. Applied to programming instruction, this framework implies that productive learning requires students not only to produce code, but to actively monitor errors, regulate debugging strategies, and reflect on the quality of their solutions in relation to task requirements (Cheng et al., 2024; Shin & Song, 2022).
ChatGPT can, in principle, support each phase of this cycle. It may assist planning by helping students decompose complex tasks into manageable subtasks; support monitoring by interpreting error messages and identifying the source of programme failures; facilitate control by suggesting corrective code and alternative implementation strategies; and encourage reflection by explaining the logic underlying a proposed solution. However, it may equally undermine self-regulation if students bypass these processes by copying AI-generated outputs without engagement, thereby reducing the cognitive demand of the task and circumventing the monitoring and control functions that SRL theory identifies as central to learning progress (Wang et al., 2025; Kasneci et al., 2023). Wang et al. (2025) found that students with lower self-efficacy were more likely to use ChatGPT reactively, seeking complete answers rather than partial guidance, while higher self-efficacy students used it more strategically to support specific steps in their problem-solving process. Alanazi et al. (2025), in a meta-analysis of AI tool effects on programming learning outcomes, reported that effect sizes were substantially larger when AI use was embedded in structured instructional conditions that required students to actively process and adapt AI-generated content, compared with unstructured access conditions.
The theoretical relationship between SRL phases and observable ChatGPT interaction types has not yet been operationalised in the form of a coding scheme with reported reliability evidence applied to episode-level behavioural data. Rahman and Watanobe (2022) and Shoufan (2023) identified the need for empirical frameworks that can connect students’ AI interactions to established learning theories, but neither study provided a systematic mapping of interaction categories onto SRL phases with corresponding reliability evidence. The present study addresses this gap directly.

2.4. Cognitive Complexity of Students’ ChatGPT Queries

The cognitive complexity of students’ queries to ChatGPT constitutes a distinct but underexamined dimension of AI-supported learning in programming contexts. Yilmaz and Yilmaz (2023) found that undergraduate students’ ChatGPT queries in programming settings were predominantly task-proximal and correction-oriented, with limited evidence of metacognitive or evaluative formulation. Hartley et al. (2024) similarly noted that students using ChatGPT to learn coding most frequently requested direct answers or code examples rather than conceptual explanations or comparative analysis of alternative approaches. Bhatt et al. (2025) reported that student perceptions of ChatGPT as a programming tutor were most positive when the tool provided immediate, specific guidance, suggesting a preference for surface-level responsiveness over deeper explanatory interaction.
These findings are consistent with a broader pattern identified in the learning sciences literature, in which lower-order cognitive activities—fact retrieval, direct imitation, and solution copying—predominate in conditions where AI-generated content is readily available without structural constraints on how it is processed (Giannakos et al., 2025; Chiu & Hwang, 2025). Chiu and Hwang (2025) demonstrated that the integration of mind-mapping scaffolds into generative AI-assisted creative tasks shifted students’ interactions toward higher-order cognitive engagement, indicating that cognitive query complexity is responsive to instructional design rather than being a fixed characteristic of AI tool use. H. Y. Lee et al. (2025) found that personalised reflection prompts embedded within ChatGPT-supported programming tasks increased students’ engagement with higher-order thinking skills. Taken together, this evidence suggests that the cognitive complexity of students’ ChatGPT queries is both empirically meaningful as an indicator of learning quality and practically tractable as a target for instructional intervention—but that it requires direct measurement through content analysis of interaction data rather than inference from performance outcomes.

2.5. Research Gaps

The reviewed literature points to three specific gaps that the present study addresses. Although ChatGPT is widely used in programming education and its effects on outcomes have been examined in multiple studies, students’ actual behavioural sequences during ChatGPT-supported programming task completion have received limited empirical investigation at the process level. While learning analytics methods including lag sequential analysis have been applied to study programming behaviour in non-AI contexts (Fan et al., 2021; Alhazbi et al., 2024), their combination with ChatGPT interaction data to examine how AI-supported help-seeking is embedded within broader cycles of code production, debugging, and revision represents a methodologically underdeveloped approach. Finally, while achievement-related differences in programming behaviour and self-regulated learning have been documented (Cheng et al., 2024; Wang et al., 2025), the cognitive complexity of students’ ChatGPT queries and the sequential structure of their interactions have not been examined comparatively across achievement groups in an authentic instructional context. These gaps are practically consequential: if students’ interaction patterns with ChatGPT reflect different levels of cognitive engagement and self-regulation, then process-level evidence is necessary to distinguish productive from unproductive forms of AI use in programming instruction and to develop evidence-based guidance for instructors and curriculum designers.

3. Research Aim

The present study investigates how undergraduate students interact with ChatGPT during the completion of a Python programming assignment, with a focus on the sequential structure of their learning activities, the self-regulatory strategies associated with different levels of academic achievement, and the cognitive complexity of their ChatGPT queries. The overall aim is to provide episode-level behavioural process evidence—approximately eleven coded episodes per student, as reported in Section 5.1—of the ways in which ChatGPT is integrated into students’ self-regulated learning cycles during programming tasks, and to identify patterns of interaction that are associated with more or less effective task engagement. It should be stated at the outset that the unit of observation is the externally visible action, not the cognitive state that produced it; all inferences about self-regulation reported below are therefore theory-guided interpretations of behavioural traces and are presented as such.
The study seeks to contribute both theoretically and methodologically to the literature on AI-supported learning in programming education. Theoretically, it extends the application of Self-Regulated Learning theory (Panadero, 2017) to the analysis of ChatGPT interaction data by proposing a systematic mapping of observable interaction types onto SRL phases and demonstrating that this mapping can be applied reliably by independent coders, without claiming that it has been validated against an external criterion. Methodologically, it demonstrates the applicability of lag sequential analysis and cognitive network analysis to ChatGPT interaction logs reconstructed from screen recordings in an authentic instructional context, providing an explicitly specified analytical framework for future process-oriented research in this area, whose independent replication remains to be demonstrated.
The study addresses the following three research questions.
RQ1: What self-regulated learning behaviour patterns do students exhibit when using ChatGPT during programming tasks?
RQ2: How do students with different levels of academic achievement differ in their self-regulatory strategies when interacting with ChatGPT?
RQ3: What cognitive needs are reflected in students’ ChatGPT queries, and how do these needs relate to the phases of planning, monitoring, control, and reflection during programming task completion?

4. Materials and Methods

4.1. Research Design

This study employed a process-oriented, observational research design to investigate undergraduate students’ interaction patterns with ChatGPT during a Python programming assignment. Rather than evaluating learning outcomes in isolation, the design prioritised the temporal and sequential structure of student behaviour—that is, the ordering, frequency, and co-occurrence of observable learning actions as they unfolded across task completion. The grain of this analysis requires specification at the outset. The unit of coding is the sustained activity episode rather than the discrete interface event: a continuous period during which a student was engaged in one identifiable activity type, bounded by an observable shift to a different activity. The term process-level is used throughout in this episode-level sense, denoting the macro-structure of how students moved between activity types across the task, and not the keystroke-, compilation-, or event-level resolution associated with instrumented logging environments. This approach is consistent with process-oriented research frameworks in educational technology, which treat learning as a dynamic, time-extended activity rather than a static product (Fan et al., 2021; Alhazbi et al., 2024).
Three levels of description are distinguished throughout the manuscript, and the distinction is maintained deliberately because each level carries a different evidential status. The first is the observed action: what is visible in the screen recording, such as text being typed into the editor, a programme being executed, a console message appearing, text being entered into the ChatGPT interface, or a response being displayed and scrolled. Actions at this level are recorded rather than interpreted, and two observers viewing the same recording would describe them identically. The second is the coded learning activity: one of the fourteen categories, assigned by a coder to a bounded segment of the recording. This level is not simply a description of the first. It involves two interpretive operations—deciding where one activity ends and the next begins, and deciding which single category best characterises a segment that may contain heterogeneous actions—and it is therefore an abstraction over the observed stream rather than a transcription of it. The evidence supporting this level is the inter-rater agreement reported in Section 4.4.3 (κ = 0.82), which establishes that trained coders applying the scheme converge, not that the categories carve the activity stream at its natural joints. The third is the inferred cognitive or self-regulatory state: the planning, monitoring, control, or reflection phase. Nothing at this level was observed or measured. It is derived from the second level by theoretical argument alone, and its evidential support is the coherence of that argument together with the internal consistency checks reported in Section 6.4.
A terminological convention follows from this and is applied consistently in the Results and Discussion. Statements about what students did—the frequency of coded activities, the transitions between them, and the differences between achievement groups—are assertions at the second level and are stated directly, since they follow from the coded record. Statements about planning, monitoring, control, and reflection are assertions at the third level; where phase names appear, they should be read as abbreviations for activities coded as indicative of that phase, and the accompanying verbs are chosen accordingly, so that findings are described as consistent with, compatible with, or interpretable within a self-regulatory account rather than as demonstrating, showing, or measuring self-regulation. The empirical contribution of the study resides at the second level, where the evidence is direct; the theoretical contribution resides at the third, where it is interpretive, and the two are reported separately so that a reader who rejects the interpretation can still evaluate the behavioural findings on their own terms.
The analytical framework integrated three complementary methods. Descriptive statistical analysis characterised the overall distribution of activity types across the sample. Lag sequential analysis (LSA) examined the conditional probability structure of behavioural transitions, identifying which activities systematically preceded or followed others within students’ interaction sequences. Cognitive network analysis (CNA) represented the co-occurrence and transitional structure of activity categories as directed weighted networks, enabling identification of dominant interaction pathways and structurally central activities.
A comparative dimension was incorporated by classifying participants into three achievement groups, permitting systematic examination of how interaction patterns varied as a function of academic performance. No experimental manipulation was introduced; the study was conducted under authentic instructional conditions without modification to the standard course environment.

4.2. Research Period and Study Context

Data collection was conducted during the 2024–2025 academic year at L.N. Gumilyov Eurasian National University (ENU), Astana, Kazakhstan. The study was embedded within a second-year undergraduate course on the fundamentals of object-oriented programming, offered to students enrolled in educational technology and information technology degree programmes. All data were collected during regularly scheduled laboratory sessions and supervised independent work periods across one full academic semester.
The use of ChatGPT was formally integrated into the course as a permitted auxiliary tool for solving programming problems, consistent with the established curriculum requirements of the department. This institutional context is relevant to the interpretation of findings, as it ensured that students’ ChatGPT interactions reflected pedagogically sanctioned behaviour rather than covert or ad hoc tool adoption.

4.3. Participants and Sampling Strategy

4.3.1. Participant Characteristics

The study involved 363 undergraduate students (205 male, 158 female) aged 18–22 years. All participants were second-year students who had previously completed an introductory Python programming course, providing a common baseline of foundational competencies that included familiarity with data types, control flow structures, and basic library usage. Gender distribution was approximately balanced across analytical subgroups and did not produce meaningful variation in primary outcome measures; gender was therefore not treated as an independent variable in the analyses.

4.3.2. Achievement Group Classification

Following task completion, participants were classified into three achievement groups on the basis of their final assignment scores, recorded on a 100-point standardised rubric. The score distribution was approximately normal (M = 82.4, SD = 8.1). Group boundaries were defined using cut-off points approximating ±1 standard deviation from the mean, producing three groups of comparable size with clearly differentiated performance levels, as presented in Table 1.
Table 1. Achievement Group Classification Based on Assignment Scores.
This classification maximised between-group discriminability while preserving adequate within-group sample sizes for sequential and network analyses. Categorisation was adopted for analytical rather than substantive reasons. Lag sequential analysis and cognitive network analysis estimate transition matrices and network structures over sets of sequences rather than over individual cases, and a mean individual sequence length of 10.98 actions is too short to support stable case-level estimation; comparison across levels of attainment therefore requires that sequences be pooled, which in turn requires a categorical grouping variable. Two consequences follow and are acknowledged here. Trichotomising a continuous score discards information and reduces statistical efficiency, so the group comparisons reported below are less sensitive than a continuous analysis of the same data would be. Group membership near the cut-off points is also sensitive to the placement of those cut-offs, so the three groups are best understood as overlapping regions of a continuous performance distribution rather than as qualitatively distinct types of learners. Because the groups were formed from performance on the same assignment from which the behavioural sequences were obtained, the comparisons are reported throughout as associations between interaction pattern and attainment on that task, and not as evidence of distinct learner profiles or of causal influence. The assignment was evaluated using a standardised rubric covering four criteria: correctness of implementation, functionality of the radial chart output, code structure and readability, and error handling.

4.4. Data Sources and Recording Procedure

4.4.1. Programming Assignment

The primary data source consisted of screen recordings of students’ individual programming sessions captured during task completion. The assignment required each student to develop a Python-based data visualisation in the form of a radial (spider) chart using the NumPy (version 1.26.4) and Matplotlib (version 3.8.4) libraries. The task was structured around four sequential subtasks: data preparation and array construction, calculation of angular coordinates, construction of the radial plot, and customisation of visual elements including axis labels, scaling parameters, and formatting. The assignment represented moderate cognitive complexity appropriate for students with prior introductory Python experience, requiring integration of library-specific knowledge, geometric reasoning, and debugging skills (Cheng et al., 2024).
Students completed the assignment individually within approximately 4–6 academic hours, distributed across laboratory sessions and additional supervised work periods. The use of ChatGPT was explicitly permitted for code generation, debugging assistance, and conceptual explanation. Students were required, however, to independently test, modify, and validate any AI-generated code prior to submission, in order to ensure active engagement with generated outputs rather than unreflective reproduction.
The overall sequence of research stages—from course design through assignment completion to analysis—is presented in Figure 1.
Figure 1. Sequence of research stages and data collection.

4.4.2. Screen Recording Protocol

Screen recordings were captured using standardised screen capture software installed on laboratory workstations. Each recording documented the complete duration of the student’s programming session and captured student actions within the PyCharm (version 2024.2) integrated development environment (IDE), including code editing, execution, and error encounters; interactions with ChatGPT via the standard web interface, including submitted queries, model responses, and follow-up exchanges; system-generated error messages and console outputs; and transitions between activity types, including incidental consultation of supplemental resources. No dedicated browser extension or API logging tool was employed; all interaction data were extracted from the screen recordings through structured behavioural coding.
Although supplemental resource use—including course materials, Python documentation, and Stack Overflow—was observable through the recordings and was captured under the coded category RAM (e.g., course materials, Python documentation, and Stack Overflow), it was not a primary analytical focus. The analysis centred on interactions within the programming environment and with ChatGPT. This approach preserved ecological validity by permitting natural tool use while maintaining sufficient observational control.

4.4.3. Behavioural Coding and Log Reconstruction

Screen recordings were reviewed and coded by two independent researchers using a structured behavioural coding protocol. Each recording was segmented into discrete, observable learning actions; coders recorded the start and end time of each segment alongside the corresponding activity code. Segmentation was performed at the level of the sustained activity episode: a new segment was opened when the student’s activity type changed and was maintained for the duration of continuous engagement in that activity, irrespective of the number of individual operations performed within it. Because students worked for approximately four to six academic hours and produced a mean of 10.98 coded actions each, a single coded segment corresponds on average to a period of roughly twenty to thirty minutes of task activity. The coding therefore captures the macro-sequence of activity phases rather than the fine-grained event stream within them, and the frequency counts reported in Section 5.1 should be read as counts of episodes, not of individual operations. The coding scheme comprised 14 mutually exclusive activity categories (Table 2), developed through iterative piloting of a preliminary recording subset and informed by established frameworks for analysing learning activities in AI-supported programming contexts (Fan et al., 2021; Sun et al., 2024).
Table 2. Classification of Students’ Learning Activities and Interactions with ChatGPT.
Inter-rater reliability was assessed on a randomly selected 20% subset of recordings. Cohen’s kappa was computed separately for the two coding schemes: for the 14 learning activity categories, κ = 0.82; for the cognitive query and feedback categories, κ = 0.80. Both values indicate substantial inter-rater agreement. Disagreements were resolved through structured discussion until consensus was reached; ambiguous queries were assigned the code corresponding to the primary cognitive intention of the query.
Microsoft Excel was used to organise coded segments and reconstruct interaction logs in a reproducible format.

4.5. Coding Schemes

4.5.1. Learning Activity Categories

The coding procedure was conducted in three stages. In the first stage, a dataset of queries was compiled from the 363 students completing the programming assignment, and open coding was applied to examine query content without a predetermined classification scheme. This approach is consistent with learning analytics methods aimed at identifying behavioural and cognitive characteristics of learning activities (Alhazbi et al., 2024; Fan et al., 2021). In the second stage, the results of open coding were systematised and grouped into broader categories based on similarities in semantic content. In the third stage, two independent coders applied the finalised scheme to all recordings, as described in Section 4.4.3.
Table 2 presents the 14 coded learning activity categories, organised by action group. The descriptions in Table 2 state what each category represents; they do not, on their own, specify what a coder must observe in order to assign it. To make the procedure replicable, each category was operationalised as a set of observable indicators—the specific on-screen evidence licensing the code, the rule determining where the corresponding segment opens and closes, and the codes from which it must be distinguished. These operational definitions are reported in full in Appendix A, Table A1. Two features of that specification are worth noting here. First, several categories are distinguished not by what the student does but by what precedes it: editing is coded CP when it produces new functionality and DP when it follows a failed execution, and the same keystrokes therefore receive different codes depending on the preceding state. Second, the ChatGPT-related codes are distinguished by the form of what is transferred into the input field—natural language for ANQ, console output for PCM, source code for PPC—which is directly observable in the recording and does not require a judgement about the student’s intention.

4.5.2. Cognitive Query and Feedback Categories

To enable more granular analysis of students’ cognitive engagement with ChatGPT, queries were additionally classified according to cognitive complexity, drawing on Bloom’s Revised Taxonomy and the SOLO Taxonomy. Surface-level queries (SKI) correspond to lower-order cognitive processes such as remembering and basic understanding, typified by requests for ready-made code. Intermediate-level queries (MKI) reflect processes of application and analysis, such as debugging requests and code modification. Deep-level queries (DKI) correspond to higher-order processes of evaluation and creation, in which students formulate structured requests with specified conditions and demonstrate independent reasoning. This three-level framework is consistent with approaches used to examine cognitive load and self-regulated learning in programming instruction (Cheng et al., 2024; Shin & Song, 2022).
During the coding comparison stage, disagreements between the two experts mainly concerned queries that could be interpreted as belonging to more than one category. Such cases were resolved through discussion, with the final code assigned according to the dominant cognitive intention of the query. The classification of cognitive queries and feedback-related responses is presented in Table 3.
Table 3. Classification of Cognitive Queries and Feedback-Related Responses.

4.5.3. Mapping of Activity Codes to Self-Regulated Learning Phases

To address the research question concerning self-regulated learning (SRL) behaviour patterns, the 14 coded activity categories were mapped onto SRL phases in accordance with Panadero’s (2017) integrative synthesis of SRL models, which conceptualises self-regulation as a cyclical process involving planning, monitoring, control, and reflection. This mapping is an interpretive, theory-driven layer applied to observable actions; it is not itself an empirical measurement. Screen recordings evidence what a student did, not what the student was thinking while doing it, and the relationship between the two is one-to-many: reading an error message (RCM) may accompany deliberate monitoring or merely perfunctory scanning, and integrating a ChatGPT-proposed solution (CPC) may follow evaluative comparison or uncritical copying. These alternatives are visually indistinguishable in the recordings. The point applies with particular force to the two most frequent ChatGPT-related codes. Reviewing a ChatGPT response (RF) may plausibly represent monitoring, reflection, information seeking, uncertainty reduction, or simple answer retrieval, and initiating a new query (ANQ) may represent planning, monitoring, or control. Which of these readings is warranted depends on the surrounding context—the student’s position in the task, the content of the preceding action, and the use subsequently made of the information obtained—and the coding scheme, which classifies actions by their observable form, does not resolve this ambiguity. The dual phase labels assigned to several codes in Table 4 record this indeterminacy but do not remove it. The Self-Regulated Learning framework is accordingly applied in this study as a theoretical lens for organising and interpreting behavioural observations, and not as an instrument for assessing students’ internal cognitive states. Accordingly, the SRL phase assigned in Table 4 denotes the self-regulatory function that the action is theoretically positioned to serve, not a verified cognitive state, and the reported inter-rater reliability (κ = 0.82) establishes only that coders agreed on the observable features of each action, not that the underlying cognitive process was correctly identified. Throughout the Results and Discussion, phase labels are therefore used as shorthand for ‘action coded as indicative of that phase’. Table 4 presents the hypothesised correspondence between coded activities and SRL phases, together with the theoretical rationale for each assignment. The ‘Theoretical rationale’ column should be read as the argument for the assignment rather than as evidence that the process occurred. Several codes admit further plausible readings that the table does not enumerate—RF, for instance, may also correspond to information seeking, uncertainty reduction, or answer retrieval—and the phase assignments should therefore be understood as the most defensible interpretation available from observable data, not as an exhaustive or verified account of the cognition involved.
Table 4. Correspondence Between Coded Learning Activities and Self-Regulated Learning Phases.
The derivation of this mapping and its current validation status should be stated plainly. The correspondences in Table 4 were derived deductively by the authors from Panadero’s (2017) integrative synthesis of six SRL models, and each was formulated by asking which phase of the cycle a given observable action is positioned to serve, given the functional definitions those models supply. Where prior process-oriented studies have coded comparable activities, the assignments were checked for consistency with them: the treatment of error interpretation and system feedback as monitoring, and of code revision and strategy adjustment as control, follows the usage established in learning analytics work on self-regulation in programming and related task environments (Fan et al., 2021; Alhazbi et al., 2024; Cheng et al., 2024), and the classification of AI help-seeking actions is consistent with the categories applied by Sun et al. (2024) and Güner and Er (2025) to ChatGPT-supported programming. The scheme is nonetheless author-constructed. Its validation status is therefore partial and can be specified precisely: content validity is argued from theory and from correspondence with prior schemes but has not been assessed by an independent expert panel; inter-rater reliability has been established empirically (κ = 0.82); construct validity is supported only by the internal consistency checks reported in Section 6.4 and has not been tested against an external criterion; and predictive validity has not been examined at all. The framework should accordingly be regarded as a theoretically motivated and reliably applicable coding instrument that is not yet a validated measure of self-regulation.
It should also be acknowledged that the SRL framework is not the only defensible lens for these data, and that several of the coded categories would be assigned differently under alternative theoretical commitments. Under an adaptive help-seeking account, the distinction that matters is between instrumental help-seeking, which requests the means to solve a problem, and executive help-seeking, which requests the solution itself; on that reading, PCM and CPC would be separated by the intent expressed in the request rather than grouped under monitoring and control. An information-seeking or information-foraging account would treat ANQ and RF as search and evaluation operations governed by the cost of obtaining information, without reference to regulatory phase at all. A cognitive load account would interpret the same troubleshooting cycle as a mechanism for reducing extraneous load during a demanding task, and would predict its intensity to vary with task difficulty rather than with regulatory competence. A co-regulation or socially shared regulation account would treat ChatGPT as an external regulating agent rather than a resource used by a self-regulating student, relocating part of the regulatory process outside the individual. A distributed cognition account would go further and read RF as cognitive offloading rather than as monitoring. Each of these frameworks is compatible with the observed behavioural sequences, and the present data do not adjudicate between them. SRL was retained because it is the framework in which the research questions were posed, because it supplies phase definitions specific enough to be operationalised at the level of observable action, and because it permits the derivation of testable predictions about temporal ordering that the other accounts do not yield as directly. That choice is a theoretical commitment rather than an empirical finding, and readers committed to a different framework may reasonably reinterpret the same coded sequences. The correspondence between the coded learning activities and the Self-Regulated Learning phases is presented in Table 4.

4.6. Data Analysis Methods

4.6.1. Descriptive Statistical Analysis

As the first analytical stage, descriptive statistics were computed to determine the frequency and relative proportions of each activity category across the full sample and within each achievement group. This provided a baseline characterisation of the distribution of programming activities, ChatGPT interactions, resource use, and off-task behaviour, and served as the foundation for subsequent sequential and network analyses. Effect sizes were reported alongside all inferential tests and were interpreted against the conventional benchmarks for the relevant statistic—Cramér’s V of approximately 0.07, 0.21, and 0.35 for small, medium, and large associations at two degrees of freedom, and epsilon-squared of approximately 0.01, 0.06, and 0.14 for small, medium, and large effects—on the understanding that these thresholds are heuristics rather than substantive criteria of educational importance.
Prior to sequential analysis, the distribution of coded actions per student was examined to evaluate the adequacy of individual activity logs for sequence-based interpretation. For each student, the total number of coded actions was calculated, and the minimum, maximum, mean, median, and standard deviation were reported. This step identified students with atypically short sequences and assessed whether such cases could disproportionately influence the sequential analysis results.
Students were additionally categorised by level of ChatGPT use, operationalised as the proportion of ChatGPT-related activities (ANQ, PCM, PPC, RF, CPC) relative to each student’s total coded actions. Students were assigned to low, medium, and high ChatGPT-use groups using tertile-based thresholds, ensuring balanced group sizes and comparability across students.

4.6.2. Lag Sequential Analysis

Lag sequential analysis (LSA) was applied to examine the temporal structure of students’ behavioural sequences—specifically, the conditional probability that a given activity (the consequent) follows another activity (the antecedent) at a specified lag in the behaviour stream. LSA was conducted in RStudio using the LagSeq package (version 1.0). A total of N = 41,268 sequential transitions were computed across lag levels 1 through 12, capturing both immediate and delayed behavioural dependencies. This figure aggregates transitions across all twelve lag levels and does not represent a set of independent observations; the number of adjacent (lag-1) transitions is necessarily smaller than the total number of coded actions. Because the mean sequence length was 10.98 actions, the higher lag levels were estimable only within the subset of students whose sequences were long enough to support them, and coefficients at lags approaching and exceeding the mean sequence length are correspondingly based on fewer students. Interpretation in the Results section is therefore concentrated on lag-1 transitions, for which every student sequence contributes data. The rationale for the lag specification is as follows. The upper bound of twelve was set to approximate the mean sequence length (10.98 actions), so that dependencies potentially spanning a complete troubleshooting cycle could be screened; lags above 1 were examined for exploratory screening purposes only. All reported transitions, and every sequential finding interpreted in the Results and Discussion, are lag-1 (immediately adjacent) transitions. The higher-order lags did not contribute materially to the conclusions and are consequently not reported, so that the analysis should be read as a lag-1 sequential analysis, to which the aggregate transition count is background documentation rather than an analytic input.
To address the assumption of statistical independence, transition matrices and Yule’s Q coefficients were first calculated separately for each individual student’s sequence of coded activities. The resulting student-level coefficients were then aggregated within each achievement group by computing mean Yule’s Q values for each pairwise transition. Group-level interpretations were based only on transitions appearing consistently across multiple students, reducing the risk of inflated transition frequencies associated with pooling sequences across individuals. Yule’s Q ranges from −1 to +1, with values near zero indicating the absence of sequential association. Yule’s Q is computed from the two-by-two contingency table formed by the presence or absence of the antecedent and of the consequent, and is therefore a standardised measure of the strength of sequential association. It is not a transition probability, and its magnitude does not indicate how frequently a consequent followed an antecedent on any given occasion. Q values are accordingly reported and interpreted throughout as association strengths; no conditional-probability interpretation is placed on them, and no argument in the paper depends on one.
Each transition was screened using adjusted residuals (z-values), which compare observed transition frequencies with expected frequencies under the independence assumption. Transitions with |z| > 1.96 were flagged at the 0.05 threshold, |z| > 2.58 at the 0.01 threshold, and |z| > 3.29 at the 0.001 threshold. A transition was retained for interpretation only when it yielded both a positive Yule’s Q coefficient and an adjusted residual exceeding the 1.96 threshold. Because the transition data are non-independent both across students and serially within them (Section 6.6), these residuals are applied here as a screening criterion for identifying recurrent transitions in the aggregate record and are not treated as valid significance tests; the transitions reported in Section 5.2 are accordingly descriptive rather than inferentially established.
To enable stage-based comparison of learning activities, each student’s behavioural sequence was divided into three proportional stages—initial, intermediate, and final—by partitioning the total number of coded actions into equal thirds. This proportional segmentation approach ensured comparability across students with different total sequence lengths and avoided bias associated with absolute time or task duration measures. Sankey diagrams and transition matrices were used to visualise differences in activity distributions and interaction patterns across stages and between achievement groups.

4.6.3. Cognitive Network Analysis

Cognitive network analysis (CNA) was employed to represent the structural properties of students’ learning activity sequences as directed weighted networks, in which nodes correspond to coded activity categories and edges represent transitions between consecutive activity categories within each student’s sequence. Edge weights were calculated as the frequency of observed transitions between activity types. To retain interpretable patterns, only edges with a minimum frequency of three observed transitions were included in the visualised networks.
To retain interpretable patterns, only edges with a minimum frequency of three observed transitions were included in the visualised networks. The networks are presented as descriptive visualisations of the coded transition structure. Quantitative topology metrics—degree and betweenness centrality, network density, and clustering coefficients—are not reported, and the cross-group comparison of network structure offered below is accordingly qualitative. The reasons for this, and its consequences for the strength of the associated claims, are set out in Section 6.6.

4.7. Ethical Compliance

The study was conducted in full accordance with the ethical principles set forth in the Declaration of Helsinki (World Medical Association, 2013) and with the institutional ethical guidelines of L.N. Gumilyov Eurasian National University. Ethical approval was obtained from the Ethics Committee of L.N. Gumilyov Eurasian National University prior to the commencement of data collection.
Written informed consent was obtained from all 363 participants before data collection commenced. Students were informed of the purpose of the study, the nature and scope of the screen recording procedure, the specific data to be captured, the anonymisation protocol to be applied prior to analysis, and their unconditional right to withdraw at any time without academic consequence. Participation was voluntary, and students were explicitly assured that the decision to participate or withdraw would have no bearing on their academic standing or course evaluation.
All data were anonymised before analysis and used exclusively for research purposes. Screen recordings were stored on password-protected institutional servers accessible only to the research team. No personally identifiable information was retained in the coded datasets used for analysis. These procedures ensured compliance with applicable data protection standards and with the ethical requirements governing research with human participants in educational settings.
The original screen recordings and the student-linked coded records derived from them are no longer available; the consequences of this for the analyses reported below are set out in Section 6.6 and in the Data Availability Statement.

5. Results

5.1. Distribution of Learning Activities

The results reported in this section are stated at the level of coded learning activities, as defined in Section 4.1. Phase names appearing in the interpretive passages denote activities coded as indicative of the phase in question and are not measurements of the corresponding cognitive states. Prior to the analysis of activity distributions, the number of coded actions per student was examined to assess the adequacy of individual sequences for subsequent sequential analysis. Across 363 students, a total of 3985 coded actions were identified. Table 5 presents the student-level descriptive indicators for coded action counts.
Table 5. Distribution of Coded Actions per Student.
The mean number of actions per student was 10.98 (3985 ÷ 363). Students with short sequences were retained in the descriptive analysis but were treated with caution in the sequential analysis, as brief logs provide limited information for estimating stable transition patterns. To reduce the influence of such cases, Yule’s Q coefficients were calculated at the individual-student level and subsequently aggregated across students. Transitions were interpreted only when they appeared consistently across multiple student sequences.
Table 6 presents the frequency distribution and relative proportions of all coded learning activities across the full sample.
Table 6. Frequency Distribution and Relative Proportions of Students’ Learning Activities.
Percentages are calculated based on the total number of coded actions, N = 3985. All transitions analysed and reported in Table 7 are lag-1 transitions; with 3985 coded actions distributed across 363 student sequences, the number of adjacent (lag-1) transitions is 3622.
Table 7. Transitions Between Learning Activities Meeting the Adjusted-Residual Screening Threshold, With Yule’s Q Coefficients.
As shown in Table 6, direct programming activities accounted for the largest proportion of all coded actions (63%), with code implementation (CP) representing the single most frequent category at 39%. Interactions with ChatGPT constituted 20% of total coded actions, with analysis of ChatGPT responses (RF) being the most frequent ChatGPT-related activity at 10%. Learning task and resource-related activities accounted for 8% of total actions, while other activities—including technical platform limitations (FC) and interruptions (IO)—accounted for 9%.
Among ChatGPT interaction types, formulating new queries (ANQ, 4%) and submitting error messages (PCM, 3%) were the most frequent query-initiating actions, while reviewing ChatGPT responses (RF, 10%) was the most frequent response-processing activity. Integration of ChatGPT-proposed code (CPC) occurred least frequently among ChatGPT-related activities, accounting for 1% of all coded actions.
The structure of students’ learning activities is further illustrated in Figure 2, which presents a model of the cognitive and behavioural processes observed during programming task completion with ChatGPT. The diagram depicts the sequence of activity phases, including task familiarisation, interaction with learning resources and ChatGPT, and iterative cycles of code production, debugging, and output refinement.
Figure 2. Model of students’ cognitive and behavioural processes when completing programming tasks using ChatGPT.

5.2. Sequential Patterns of Learning Behaviour

The sequential analysis identified 13 transitions between learning activity categories whose adjusted residuals exceeded the prespecified screening thresholds across the full sample. All reported transitions yielded positive Yule’s Q coefficients. Because the transition data are non-independent both across students and serially within them (Section 6.6), these residuals are used here as a screening criterion applied to the aggregate record rather than as valid significance tests. The results are presented in Table 7.
Yule’s Q coefficients indicate the strength and direction of sequential association between two learning activities. Transitions were screened using adjusted residuals (z-values) against the thresholds |z| > 1.96, |z| > 2.58, and |z| > 3.29. Because the transition data are nested within students and serially dependent, the associated probabilities are reported as screening values rather than as valid significance tests, and the coefficients in this table are descriptive summaries of the aggregate transition record.
The coefficients in Table 7 are means of student-level estimates, and their precision is limited by the length of the individual sequences from which they derive. Students contributed a mean of 10.98 coded episodes, with a minimum of five, so that a student-level 2 × 2 contingency table is constructed from at most ten adjacent transitions and frequently from fewer. A table of that size will often contain an empty cell, and an empty cell drives Yule’s Q to ±1 irrespective of the strength of the underlying dependency; no continuity correction was applied to the cell counts. The sensitivity of the reported means to this sparsity—whether, for example, they are stable when students with the shortest sequences are excluded—was not tested, and the proportion of student-level coefficients affected is not known. The values in Table 7 should therefore be read as descriptive summaries of the coded transition record rather than as precise estimates of sequential dependency.
The strongest sequential associations were observed in ChatGPT-supported troubleshooting sequences. Submitting program or compiler messages to ChatGPT was followed by reviewing the system response (PCM → RF, Q = 0.84, z = 14.59, p < 0.001), and asking ChatGPT a new question was followed by reviewing its response (ANQ → RF, Q = 0.82, z = 15.11, p < 0.001). The transition from reading system messages to submitting them to ChatGPT (RCM → PCM) also yielded a high Yule’s Q value (Q = 0.81, z = 10.01, p < 0.001).
The network model of the transitions meeting the screening threshold is presented in Figure 3. Nodes represent types of learning activities; directed edges indicate transitions whose adjusted residuals exceeded that threshold. The figure is a descriptive visualisation of the aggregate transition record.
Figure 3. Network model of transitions between types of students’ learning activities during interaction with ChatGPT.
Four sequential patterns were identified in the activity logs. The first pattern consisted of the sequence CPC → DP → RCM, in which copying ChatGPT-generated code was followed by debugging and reading of error messages (Q = 0.78 and Q = 0.73, respectively). The second pattern involved submission of students’ own code and error messages to ChatGPT, reflected in the transitions RCM → PCM (Q = 0.81) and PCM → RF (Q = 0.84). The third pattern was the sequence RF → CPC or RF → CP, in which reviewing ChatGPT responses was followed by either copying suggested code (Q = 0.76) or returning to code production (Q = 0.77). The fourth pattern involved the transition PCM → IO (Q = 0.74, z = 2.85, p = 0.004), in which submitting messages to ChatGPT was followed by interruption of learning activity.
From a self-regulated learning perspective, the observed transitions consisted primarily of actions coded as indicative of monitoring and control functions; the recordings evidence the behavioural sequence itself, and its assignment to these phases follows from the coding scheme set out in Section 4.5.3 rather than from independent evidence of the students’ cognitive states. Sequences involving debugging, interpretation of system messages, submission of error information to ChatGPT, and code revision were the most frequent. Planning-related activities appeared predominantly at the beginning of activity sequences, while reflection-related activities were less frequent and were primarily associated with output evaluation and analysis of ChatGPT responses.

5.3. Differences Across Achievement Groups

A comparative analysis of learning activity distributions was conducted across three proportional stages of programming task completion—initial, intermediate, and final—for each achievement group.
Two kinds of comparison are reported below, and they do not have the same inferential status. A chi-square statistic was computed for a 4 × 3 contingency table comprising four broad activity categories—learning resources, programming activities, ChatGPT interactions, and other activities—and three achievement groups. Because that table is constructed from coded actions nested within students, no valid significance test of it is available and no p-value is attached to it: the observed value was χ2(6) = 18.47, with Cramér’s V = 0.048, an association below the level conventionally described as small. This quantity summarises the aggregate table and is not evidence of a significant association between achievement level and activity type distribution. The Kruskal–Wallis tests reported next take the student as the unit of analysis and are inferentially valid for these data; they identified significant between-group differences in code production activities, H(2) = 9.62, p = 0.008, ε2 = 0.021, and in ChatGPT-related interactions, H(2) = 7.15, p = 0.028, ε2 = 0.014. No significant difference was found for interruption of learning activities, H(2) = 2.31, p = 0.315, ε2 = 0.001. These results are summarised in Table 8.
Table 8. Comparison of Learning Activities Across Achievement Groups.
One qualification applies to the chi-square test reported above and not to the Kruskal–Wallis tests, which are computed at the level of the student. The 4 × 3 contingency table is constructed from 3985 coded actions nested within 363 students, a mean of 10.98 actions per cluster, so the independence assumption underlying the test is not satisfied. Because the design effect for a clustered table is bounded by 1 + ( m ¯ − 1) × ICC, an intraclass correlation of approximately 0.05 would be sufficient to reduce the observed value below the conventional threshold, and no assumption-free bound is available at this cluster size. The χ2 statistic and Cramér’s V for the activity distribution are therefore reported here as descriptive summaries of the aggregate table and not as a test; the Kruskal–Wallis comparisons, which treat the student as the unit of analysis, are unaffected.
Post hoc pairwise comparisons were conducted using Dunn’s tests with Bonferroni correction. The results are presented in Table 9.
Table 9. Post hoc Pairwise Comparisons Between Achievement Groups.
As shown in Table 9, significant differences in code production activities were observed between the high- and low-achieving groups (p = 0.006) and between the high- and average-achieving groups (p = 0.041). For ChatGPT-related interactions, a significant difference was identified between the high- and low-achieving groups only (p = 0.021). No significant pairwise differences were found between the average- and low-achieving groups for either variable. The effect sizes for all significant comparisons were small.
At the initial stage of task completion, low-achieving students recorded higher frequencies of code-writing and ChatGPT interaction activities. Average-achieving students consulted course materials more frequently and engaged in a higher proportion of activities not directly related to problem-solving. High-achieving students concentrated their activity on task analysis and initial solution structuring.
At the intermediate stage, low-achieving students continued to register the highest overall activity frequency across most categories. Average-achieving students demonstrated the most intensive ChatGPT use at this stage, combining system queries with code refinement. High-achieving students used ChatGPT less frequently and directed their queries primarily toward clarification of specific solution aspects.
At the final stage, low-achieving students maintained elevated frequencies across multiple activity categories, including ChatGPT use, supplemental material consultation, and non-task-related actions. High- and average-achieving students demonstrated more concentrated activity patterns at this stage.
Figure 4 presents a Sankey diagram illustrating the distribution of students’ learning activities across the three task stages, grouped by level of ChatGPT use (low, medium, and high, based on tertile thresholds).
Figure 4. Distribution of students’ learning activities across stages of programming task completion by level of ChatGPT use.
Figure 5 presents the behavioural distribution of learning activities across programming stages for each of the three achievement groups.
Figure 5. Behavioural distribution of learning activities across programming stages for student groups with different levels of academic performance. (a) High-achieving group; (b) average-achieving group; (c) low-achieving group.
Figure 6 presents transition matrices of learning activities for each achievement group. These matrices are reproduced as descriptive visualisations only. Because the underlying edge weights are not available for statistical comparison and the transition data are nested within students, no comparative claim about the structure of these matrices across achievement groups is advanced (Section 6.6).
Figure 6. Transition matrices of students’ learning activities across academic achievement groups. (a) High-achieving group; (b) average-achieving group; (c) low-achieving group, shown from left to right. Cell values are row-wise relative frequencies of transition; the diagonal (self-transitions) is masked.

5.4. Cognitive Needs in ChatGPT Interaction

A total of 799 cognitive queries were identified and coded across the full sample. This figure exceeded the 323 query-submitting actions recorded in Table 6 (ANQ, PCM, and PPC combined: 146 + 115 + 62), as some action episodes contained multiple sequential text-based submissions. This discrepancy is itself a direct index of the compression introduced by episode-level coding: on average each coded query episode contained approximately 2.5 distinct textual submissions, so that the coded action stream systematically under-represents the volume of individual exchanges with the system. The cognitive query analysis reported in this section operates on the full set of 799 submissions and is therefore finer-grained than the sequential analysis, which operates on episodes. The distribution of cognitive query types across achievement groups is presented in Table 10.
Table 10. Distribution of Cognitive Query Types Across Achievement Groups.
As shown in Table 10, intermediate-level queries (MKI) were the most frequent category overall, accounting for 38.9% of all cognitive submissions. Surface-level queries (SKI) accounted for 31.5%, deep-level queries (DKI) for 24.2%, and task-unrelated queries (IKI) for 5.4%. High-achieving students produced the highest proportion of deep-level inquiries (32.2%), whereas low-achieving students recorded the highest proportions of surface-level (38.4%) and task-unrelated (7.2%) queries. The total number of queries also varied across groups: 233 in the high-achieving group, 274 in the average-achieving group, and 292 in the low-achieving group. The 799 submissions are nested within students, and in some cases several submissions occur within a single coded episode, so the independence assumption underlying a chi-square test of the distribution in Table 10 is not satisfied. The distribution is therefore reported descriptively. Across the full sample, the association between achievement group and query type corresponds to a Cramér’s V of 0.123, approximately two and a half times the value observed for the distribution of activity categories (V = 0.048); this is a property of the observed aggregate distribution and is not accompanied by a p-value, since no test valid for these data is available. The contrast is more pronounced when the comparison is restricted to the two extreme query types in the two extreme achievement groups: among high- and low-achieving students, the ratio of deep-level to surface-level submissions gives an odds ratio of 2.78 (V = 0.241). Both quantities are properties of the observed aggregate distribution. No p-value is attached to either, because no test valid for these clustered data is available, and the odds ratio is itself uncorrected for clustering, with no recoverable confidence interval. The difference between achievement groups in the balance of deep- and surface-level submissions is accordingly reported here as an observed feature of the coded query record; neither its statistical reliability nor its magnitude is established by the present analysis.
The cognitive query networks for each achievement group are presented as descriptive visualisations in Figure 7. In all three groups the visualised structure is dominated by surface- and intermediate-level submissions, with transitions involving deep-level submissions appearing less frequently and more dispersed. Because quantitative topology metrics are not reported (Section 4.6.3), these observations are made about the appearance of the thresholded figures and not about measured structural properties, and no comparative claim about network structure across achievement groups is advanced.
Figure 7. Cognitive networks of students’ cognitive queries during interaction with ChatGPT. Network nodes correspond to levels of cognitive activity; directed edges reflect the frequency of transitions between query types; edge thickness indicates the relative intensity of interactions.
High-achieving students initiated a higher proportion of independent query sequences whose textual content referred to solution logic and code structure; this classification rests on the wording of the submitted queries, which is directly observable, rather than on an inference about the students’ comprehension. The wording of submissions in the average- and low-achieving groups more often requested specific corrections to individual code fragments. This describes the coded content of the submissions, which is directly observable; it is not a claim about the sequential structure in which those submissions were embedded. Planning-related queries appeared primarily at the initial stage of task completion; reflection-related queries were the least frequent across all groups and stages.
The structure of transitions between learning activities is presented in Figure 8, which illustrates the full distribution of activity transitions across all students during programming task completion.
Figure 8. Distribution of transitions between learning activities during programming tasks among all students.
Students’ cognitive needs in ChatGPT interaction were distributed predominantly at the surface and intermediate levels, which together accounted for 70.4% of all coded submissions. The proportion of deep-level queries was highest in the high-achieving group (32.2%) and lowest in the low-achieving group (19.2%), while the proportion of surface-level queries showed the inverse pattern: 23.2% in the high-achieving group and 38.4% in the low-achieving group.

6. Discussion

6.1. Sequential Behaviour Patterns and Self-Regulated Learning Phases

The dominant activity sequences identified in this study—reading system error messages, submitting them to ChatGPT, reviewing the generated response, and returning to code revision—correspond to the monitoring and control phases of self-regulated learning as conceptualised by Panadero (2017). The strongest sequential associations were concentrated in ChatGPT-supported troubleshooting cycles, with the transitions PCM → RF (Q = 0.84) and ANQ → RF (Q = 0.82) representing the two strongest associations recorded in the coded transition data. These values describe a positive association between submitting error-related information to ChatGPT and subsequently reviewing the system’s response: the two actions followed one another considerably more often than would be expected were they sequentially independent. Because Yule’s Q quantifies the strength of that association rather than the probability of the consequent, the coefficient is not read here as an estimate of how often review followed submission. That students consult ChatGPT when they encounter errors is not in itself a surprising observation, and most instructors working in AI-permitted programming courses would anticipate it. The contribution of the sequential analysis is not the existence of this cycle but its measured properties. What the sequential coding adds is a description of where in the activity stream that consultation sits: the troubleshooting cycle is visible in the coded record as a recurrent ordering of episodes rather than as an aggregate co-occurrence. The stability of the associated coefficients across students was not tested, for the reasons given in Section 6.6, and no claim is made here about the magnitude of the dependency or about its use as a reference value against which departures might be detected. This finding suggests that ChatGPT functioned primarily as a reactive diagnostic instrument—activated at moments of difficulty—rather than as a proactively consulted planning resource.
This pattern is consistent with the account offered by Sun et al. (2024), who reported that students in prompt-based programming contexts most frequently sought AI assistance in response to execution failures rather than using it proactively to plan or structure their approach. Güner and Er (2025) similarly observed that ChatGPT use among undergraduate programming students was concentrated around debugging and error interpretation, with comparatively limited engagement in higher-order cognitive tasks such as solution design or reflective code evaluation. The present study corroborates and extends these findings by providing quantified sequential evidence—through Yule’s Q coefficients and adjusted residuals—of the specific transitions constituting this troubleshooting cycle, rather than relying solely on self-report or frequency data.
The iterative cycle identified here—CPC → DP → RCM → PCM → RF → CP—maps directly onto the monitoring and control phases of the SRL framework (Panadero, 2017). Within this cycle, students integrated ChatGPT-generated code, tested it through execution, interpreted resulting error messages, resubmitted diagnostic information to ChatGPT, reviewed the response, and proceeded to further coding. Within the coding framework applied here, each step in this sequence is positioned to serve a discrete self-regulatory function: monitoring of programme behaviour, evaluation of system feedback, control through strategy adjustment, and re-engagement with the task. Whether students actually performed these regulatory operations, or executed the same sequence as an automated routine with minimal cognitive investment, cannot be determined from the recordings alone. This correspondence is consistent with the proposition that ChatGPT, when embedded in structured programming tasks, can become functionally integrated into students’ problem-solving workflows, and by theoretical extension into their self-regulatory cycles, rather than operating as an isolated resource. The behavioural integration is directly evidenced; the self-regulatory interpretation is not.
Planning-related activities—including task familiarisation (UT) and initial solution structuring—appeared predominantly at the beginning of activity sequences, consistent with SRL theory’s characterisation of planning as a task-entry phase (Panadero, 2017). However, reflection-related activities were the least frequent across all stages and groups. The relative absence of reflection-oriented sequences warrants specific attention: it indicates that the iterative debugging cycles documented in this study, while productive for error resolution, did not consistently extend to evaluative thinking about code quality, architectural decisions, or alternative implementation approaches. Silva et al. (2024) noted a comparable pattern in their analysis of ChatGPT use in higher education programming contexts, observing that students predominantly engaged the tool for solution retrieval rather than for conceptual elaboration or critical reflection. The present findings provide episode-level behavioural process evidence consistent with this observation.

6.2. Achievement Group Differences in Self-Regulatory Strategies

The comparative analysis revealed differences in the structure of learning activity sequences across achievement groups that are interpretable within the SRL framework, while the small observed effect sizes require that these differences be characterised with appropriate qualification. The chi-square statistic computed for the activity-type distribution (χ2(6) = 18.47, Cramér’s V = 0.048) is a descriptive summary of the aggregate table rather than a test, for the reasons set out in Section 5.3, and is not read here as establishing a significant association between achievement level and activity type. The Kruskal–Wallis tests, which take the student as the unit of analysis, identified significant between-group differences in code production activities, H(2) = 9.62, p = 0.008, ε2 = 0.021, and in ChatGPT-related interactions, H(2) = 7.15, p = 0.028, ε2 = 0.014. These latter results are statistically detectable, but the effect sizes classify them as small, indicating that achievement group membership accounts for only a modest proportion of the observed variation in interaction patterns. The status of these comparisons requires explicit statement before they are interpreted. The design is observational, no variable was manipulated, and the achievement groups were formed post hoc by partitioning scores on the same assignment from which the behavioural record was obtained. The differences reported here are therefore associations between behaviour and outcome measured on a single task, and they cannot establish that particular interaction patterns produced particular levels of performance. At least three accounts remain compatible with the data and cannot be distinguished by this design. Interaction strategy may shape performance, if for example deep-level querying supports the construction of a more adequate solution. Prior competence may shape both, if students entering the task with stronger programming knowledge both regulate their work differently and score higher, in which case the behavioural difference is a marker of pre-existing skill rather than a mechanism. Or the developing state of the solution may shape both simultaneously, since a student whose code is failing will necessarily generate more error messages, more debugging episodes, and more diagnostic queries, while also finishing with a lower score—so that part of the between-group behavioural difference is a consequence of the same difficulty that the score records rather than an independent explanation of it. This last possibility deserves particular weight, because behaviour and outcome are not independent measurements here: the coded activity stream is partly constitutive of the performance it is being compared against. Accordingly, the group comparisons below are presented as descriptions of how interaction patterns co-vary with attainment, and the language of explanation, effect, and influence should not be read into them.
The magnitude of these differences merits separate consideration from their statistical reliability. Against conventional benchmarks, the association between achievement group and activity distribution (Cramér’s V = 0.048) falls below the threshold ordinarily described as small, and the two significant Kruskal–Wallis effects (ε2 = 0.021 and 0.014) correspond to roughly 2.1% and 1.4% of the variance in the respective activity counts. Statistical significance in this study is therefore not informative about importance: with 363 students and 3985 coded actions, the analyses are powered to detect associations far weaker than any that would be visible to an instructor, and the p-values chiefly record that the sample is large. The substantive reading is that students at all attainment levels distributed their activity across the same broad categories in broadly similar proportions, and that how much code students wrote or how often they consulted ChatGPT separates achievement groups only weakly. Within-group variation exceeded between-group variation on every measure examined.
Two further considerations qualify this picture rather than reversing it. The first is that the small effects are confined to the activity-frequency comparisons, and the study’s principal findings are not of that kind. The sequential regularities—PCM → RF at Q = 0.84, and the troubleshooting cycle it anchors—are descriptive summaries of association in the full sample rather than comparisons between groups, and they therefore do not inherit the small effect sizes reported here; as stated in Section 5.2, however, they are not estimates whose magnitude or whose stability across students has been established, and no claim about the size of the underlying dependency is advanced. The second is that the cognitive query measure behaves differently from the activity-frequency measures. The association between achievement group and query type (V = 0.123) is roughly two and a half times that for activity distribution, and the deep-to-surface ratio in the extreme-group contrast yields an odds ratio of 2.78, although, as stated in Section 5.4, both quantities are descriptive summaries of clustered query data rather than products of independent-observation inference. In practical terms this is the difference between a student whose queries are predominantly requests for working code and one whose queries specify conditions and ask for explanation—a distinction that is recognisable to an instructor reading a transcript and that is plausibly consequential for what the student takes from the task. The pattern across the two measures is coherent: what students did with ChatGPT differentiated achievement groups appreciably more than how often they did it, which is consistent with the conclusion drawn by Alanazi et al. (2025) that interaction quality rather than interaction frequency is the more reliable correlate of learning outcomes.
High-achieving students submitted fewer ChatGPT queries overall, and the wording of those queries more often sought clarification of specific solution aspects; no comparative claim about the structure of the groups’ transition networks is advanced here, for the reasons given in Section 6.6. This profile is consistent with the self-regulatory patterns described by Cheng et al. (2024), who found that high-performing programming students were more likely to engage in deliberate monitoring of their own understanding and to apply targeted debugging strategies rather than seeking complete solutions externally. In the present study, the post hoc comparisons confirmed that statistically significant differences in code production activities existed between the high- and low-achieving groups (p = 0.006) and between the high- and average-achieving groups (p = 0.041), while no significant difference was found between the average- and low-achieving groups (p = 0.118). This asymmetry indicates that the high-achieving group differed detectably from both other groups on this measure, whereas the difference between the average- and low-achieving groups did not reach significance. The latter result should not be read as evidence that these two groups are equivalent or behaviourally indistinguishable: a non-significant comparison establishes only that the available data were insufficient to detect a difference of the size present, and the effect sizes reported in Table 8 are small throughout.
Low-achieving students recorded the highest total frequency of coded actions across all stages of task completion. This pattern is counterintuitive from the perspective of effort-outcome models but is interpretable within the SRL framework as a pattern consistent with less efficient self-regulation, although the direction of this association cannot be determined from the present design. Rather than reflecting greater engagement, the elevated action frequency in the low-achieving group is more consistent with repeated cycling between help-seeking, code copying, and error resubmission without stable task progress; whether this cycling contributed to the lower scores, followed from the difficulties that the scores also register, or arose from both, cannot be resolved observationally. Wang et al. (2025) reported a structurally analogous pattern in their investigation of ChatGPT-enhanced self-regulated learning, finding that students with lower self-efficacy engaged in more frequent but less strategically differentiated AI interactions, oriented toward immediate problem resolution rather than the development of transferable problem-solving competencies. Alanazi et al. (2025), in a systematic review and meta-analysis of AI tools in programming education, similarly noted that the quality of student-AI interaction, rather than its frequency, was the more reliable predictor of learning outcomes.
Average-achieving students exhibited an intermediate profile, combining external support with independent refinement and demonstrating the most intensive ChatGPT use at the intermediate stage of task completion. This transitional profile—in which external regulation and self-regulation coexist within the same task phase—is consistent with the gradual internalisation of support described in SRL theory, whereby scaffolded assistance progressively yields to independent strategy use as students develop competence (Panadero, 2017). Shin and Song (2022) found that SRL support in programming instruction produced differential effects depending on students’ initial competence levels, with intermediate-level students showing the greatest responsiveness to external guidance structures. The present findings are compatible with this account, in that average-achieving students made their most intensive use of ChatGPT at the point in the task where cognitive demand and uncertainty would be expected to be highest. Whether this use conferred any benefit was not measured, and the observational design supports no inference about its effect.
The small effect sizes observed across all group comparisons indicate that achievement group membership alone does not fully account for the variation in ChatGPT interaction patterns, and that substantial individual differences in strategy use exist within each group. This finding has implications for how learning analytics data derived from interaction logs should be interpreted: group-level tendencies provide a useful descriptive frame but should not be applied as deterministic predictions of individual behaviour. Future studies should consider person-centred analytical approaches—such as cluster analysis, latent profile analysis, or sequence clustering—to identify finer-grained profiles of ChatGPT use that cut across achievement group boundaries.

6.3. Cognitive Demands in ChatGPT Queries

The distribution of cognitive query types across the full sample—intermediate-level queries (38.9%), surface-level queries (31.5%), deep-level queries (24.2%), and task-unrelated queries (5.4%)—indicates that students predominantly used ChatGPT for applied, context-specific problem-solving rather than for either basic information retrieval or higher-order reasoning. This overall distribution is consistent with findings reported by Hartley et al. (2024), who found that students learning to code with ChatGPT primarily formulated queries aimed at resolving immediate programming obstacles rather than deepening conceptual understanding. Yilmaz and Yilmaz (2023) similarly observed that undergraduate students’ ChatGPT queries in programming contexts were predominantly task-proximal and correction-oriented, with limited evidence of metacognitive or evaluative query formulation.
The between-group differences in query complexity are interpretable within the theoretical frameworks applied in this study. High-achieving students produced the highest proportion of deep-level queries (32.2%) and the lowest proportion of surface-level queries (23.2%), while the inverse pattern was observed in the low-achieving group (19.2% deep-level, 38.4% surface-level). Deep-level queries, as defined in this study, are characterised by independent reasoning, specification of task conditions, and requests for structural or logical explanation. These characteristics align with the evaluation and creation levels of Bloom’s revised taxonomy and with the extended abstract level of the SOLO taxonomy. The higher frequency of such queries among high-achieving students is consistent with the interpretation that these students used ChatGPT for elaboration and synthesis rather than for answer extraction, although query formulation is an artefact of the interaction and does not on its own establish the depth of processing that accompanied it. Cheng et al. (2024) reported a convergent finding in a study of eye-tracking and retrospective think-aloud data from programming students, observing that high-performing students were more likely to seek explanatory understanding when encountering errors, whereas lower-performing students more frequently sought direct corrections.
The cognitive network analysis further revealed a structural distinction between the query patterns of high-achieving and lower-achieving students. This reactive pattern is consistent with what may be characterised as prompt-driven dependency: a mode of interaction in which the structure and content of AI-generated responses appears to shape the student’s subsequent actions rather than the student directing the inquiry according to an internally generated learning goal. The construct is defined here at the level of the observable interaction sequence, and no claim is made that the students’ internal goal structures were themselves measured.
From the perspective of self-regulated learning, the query-level findings are consistent with the activity-level results: monitoring- and control-oriented queries were substantially more frequent than planning- or reflection-oriented queries across all groups. Planning-related queries—requesting guidance on how to approach the task—were concentrated at the initial stage of task completion. Reflection-related queries—requesting evaluation of solution quality, comparison of alternative approaches, or explanation of broader programming logic—were the least frequent across all stages and groups. This distribution indicates that, in the instructional context examined, ChatGPT was integrated primarily into the monitoring and control phases of self-regulated learning and was not consistently used to support either the planning or reflection phases. Giannakos et al. (2025) identified the underutilisation of generative AI for reflective and metacognitive purposes as one of the principal educational challenges associated with the current generation of large language model tools, and the present data provide empirical support for this observation in a specific programming instruction context.

6.4. Beyond the Expected Pattern: What the Sequential and Network Analyses Add

The troubleshooting cycle documented in Section 6.1 conforms broadly to what practitioners would predict of students working with an available AI assistant. Three further findings do not, and each is accessible only through sequential or network-level analysis rather than through frequency counts, performance outcomes, or self-report.
The first concerns the structure of the self-regulated learning cycle itself. ChatGPT was extensively integrated into the monitoring and control phases—error interpretation, diagnostic submission, response review, and code revision accounted for the great majority of AI-related transitions—while planning-oriented use was confined to the opening stage of the task and reflection-oriented use was the least frequent category in every group and at every stage. The theoretically significant point is not that reflection was rare in absolute terms, which prior work has also reported, but that its rarity persisted within a workflow in which ChatGPT had otherwise become tightly coupled to students’ regulatory activity. SRL theory conceptualises the four phases as a cycle in which reflection feeds forward into subsequent planning (Panadero, 2017); the present data describe a cycle that is heavily reinforced across two adjacent phases and effectively truncated at the point where it would close. This suggests that generative AI does not augment self-regulation uniformly but selectively, strengthening precisely those phases that generate immediate, externally verifiable feedback—a running programme, a resolved error—while leaving unsupported those phases whose value is deferred and internally adjudicated. Framed as a testable proposition, the availability of a generative AI assistant may increase the local efficiency of the monitoring-control loop while reducing the probability that a student exits that loop into evaluative reflection, because the loop itself resolves the proximal difficulty that would otherwise prompt reflective reconsideration. This proposition is consistent with the present data but was not tested by them, and it identifies a specific target for experimental work.
The third finding concerns the form of the between-group differences. A graded relationship between achievement and self-regulatory strategy use would be predicted by the accounts on which the present study draws, in which strategy quality varies continuously with competence (Cheng et al., 2024; Shin & Song, 2022). The post hoc comparisons do not follow this form. The high-achieving group differed significantly from both other groups in code production activity (p = 0.006 and p = 0.041) and from the low-achieving group in ChatGPT-related interaction (p = 0.021), whereas the average- and low-achieving groups did not differ significantly on either measure (p = 0.118 and p = 0.184). The distribution is discontinuous rather than graded, which suggests that the behavioural profile associated with high achievement may be better modelled as a threshold that is crossed than as a position on a continuum. The concurrent finding that low-achieving students recorded the highest total action frequency across all task stages is consistent with this reading and runs contrary to effort-based expectations: in this context, a higher volume of activity co-occurred with repeated circulation through the help-seeking loop rather than with greater progress, a distinction that cannot be drawn from activity counts alone and that the sequential structure makes visible; the ordering of cause and consequence between the two, however, remains undetermined.
A fourth observation follows from the effect sizes rather than from any single transition. The associations between achievement group and activity distribution were statistically reliable but small (Cramér’s V = 0.048; ε2 = 0.021 and 0.014), indicating that group membership accounts for only a modest share of the variation in interaction patterns and that within-group heterogeneity substantially exceeds between-group difference. For learning analytics practice this is a substantive result rather than a null one: it implies that interventions targeted at achievement-defined student segments are poorly matched to the structure of the underlying variation, and that indicators defined on the ordering of activities rather than on their frequency are more defensible triggers for support than group membership. Taken together, these findings locate the study’s contribution not in the documentation of AI-assisted help-seeking, which is well-established, but in the demonstration that it maps only weakly onto the achievement categories through which such behaviour is conventionally interpreted.
A final observation concerns the SRL mapping itself, which is author-constructed and which the sequential data permit to be examined rather than merely assumed. Three predictions follow from the mapping if the phase assignments are theoretically appropriate, and each is falsifiable against the present data. The first is temporal: SRL theory positions planning as a task-entry phase, so activities coded as planning should be concentrated at the beginning of sequences rather than distributed uniformly across them. They were—task familiarisation and initial solution structuring occurred predominantly in the opening stage in all three groups. The second is ordinal: monitoring is theorised to precede control, since strategy adjustment is a response to detected discrepancy. The significant transitions follow this ordering, with monitoring-coded actions preceding control-coded actions in the dominant cycle (DP → RCM → PCM → RF → CP) and the reverse ordering absent from the set of significant transitions. The third is differential: SRL accounts predict that more competent learners engage in more deliberate monitoring and rely less on external solution provision. In the observed distribution, high-achieving students submitted fewer queries overall and produced a higher proportion of deep-level queries; the transition-network component of this prediction could not be examined, since no comparative network claim is supported by these data. None of these checks constitutes external validation, since all three are internal to the same coded dataset and each could be satisfied by a mapping that is nonetheless cognitively inaccurate; a scheme that assigned phases arbitrarily, however, would not be expected to satisfy all three. They therefore establish internal consistency between the coding scheme and the theory from which it was derived and constitute the strongest evidence for the mapping that the present design can supply.

6.5. Practical Implications

The findings carry several implications for the design of programming instruction in contexts where AI tools are formally permitted. The predominance of surface- and intermediate-level queries across the cohort, together with the higher observed proportion of surface-level queries among lower-achieving students, indicates that unrestricted access to ChatGPT was not, in this setting, accompanied by higher-order cognitive engagement across the student population. Instructional scaffolding that structures students’ ChatGPT use—for example, by requiring annotation of AI-generated code, identification of the purpose of each suggested function, or comparison of alternative solutions prior to implementation—may help redirect interaction toward elaborative reasoning. Since the present design is observational and identifies associations rather than mechanisms, this and the recommendations that follow are advanced as hypotheses that the findings motivate and that experimental designs would be required to test, not as implications that the data establish. H. Y. Lee et al. (2025) found that structured reflection prompts embedded within ChatGPT-supported programming tasks produced improvements in students’ self-efficacy and higher-order thinking, and the present findings identify the specific interaction patterns—surface-level querying—that such prompts may most usefully target.
The magnitude of the observed differences carries an instructional implication of its own, and one that runs contrary to a common use of learning analytics. Because achievement group accounts for only one to two percent of the variance in activity distribution, and because within-group heterogeneity exceeded between-group difference throughout, targeting support at students identified by attainment band is poorly matched to the structure of the variation: the majority of students displaying the interaction patterns of concern will not be in the low-achieving group, and the majority of low-achieving students will not display them. Differentiated instruction keyed to achievement level would therefore be expected to reach the wrong students in both directions. Two alternatives are better supported by these data. The first is universal rather than targeted scaffolding: since the concentration of interaction in the monitoring and control phases was general across all three groups, requirements that structure ChatGPT use—annotation, comparison of alternatives, articulation of the link between error and correction—address a pattern that characterises the cohort rather than a deficit specific to weaker students. The second is indicator-based rather than group-based identification: recurrent CPC → DP sequences without subsequent revision are observable at the individual level and are not proxied by attainment band. The one measure that did differentiate groups appreciably—the cognitive complexity of queries, at a descriptive odds ratio of 2.78 between the extreme groups—is also the measure most directly amenable to instructional influence, since query formulation can be taught, modelled, and required, whereas the volume of activity cannot usefully be prescribed. Query quality is accordingly the more defensible target for intervention, though the observational design establishes its association with attainment and not its instructional tractability, which would require experimental confirmation.
The sequential patterns identified through lag sequential analysis provide a potential empirical basis for the development of early warning indicators in learning analytics systems. Recurrent occurrences of transitions such as CPC → DP → RCM → PCM without subsequent code modification may be detectable in real-time interaction logs and could flag students who are cycling through unproductive help-seeking routines before cumulative difficulty affects task completion. Fan et al. (2021) and Alhazbi et al. (2024) have each demonstrated the feasibility of using learning analytics derived from process data to identify self-regulatory difficulties in higher education students; the present findings suggest that ChatGPT interaction sequences constitute a viable additional data source for such systems. These indicators should, however, be treated as signals for formative dialogue rather than as direct assessments of student ability or learning progress.

6.6. Limitations

The present study has several methodological limitations that should be considered when interpreting the findings. Each limitation is discussed together with its implications for the reliability of the results and directions for methodological refinement in subsequent research.
The most consequential limitation concerns the inferential distance between observable behaviour and cognitive process. Screen recordings provide direct evidence of actions—code writing, debugging, reading system messages, submitting queries, reviewing responses, and modifying code—but the self-regulatory processes that the SRL framework describes are internal and were not measured directly. The mapping of actions onto planning, monitoring, control, and reflection is therefore an interpretation supported by theory and by the observable properties of each action, not an empirically verified correspondence. Stated directly: the SRL account offered in this paper is a theoretical lens applied to behavioural observations, not a direct assessment of students’ internal cognitive states, and the behavioural findings—activity distributions, transition structures, and between-group differences—stand independently of it. The same observable action may arise from qualitatively different cognitive states: a pause before coding may indicate strategic planning or disorientation; reviewing a ChatGPT response may represent monitoring, reflection, information seeking, uncertainty reduction, or the retrieval of a ready answer; initiating a new query may represent planning, monitoring, or control; the integration of AI-generated code may follow evaluative comparison or uncritical acceptance; and reflection, being largely non-behavioural, may occur without producing any visible trace and is consequently likely to be underrepresented in the present data. This asymmetry means that the low frequency of reflection-coded actions reported here should be read as a limitation of behavioural observation as much as a finding about students. Future research should triangulate behavioural traces with concurrent think-aloud protocols, retrospective stimulated-recall interviews, or targeted self-report instruments administered at defined points in the task, so that the correspondence between action categories and cognitive states can be tested empirically rather than assumed. Validation of the mapping itself requires a separate and specifiable programme: assessment of content validity by an independent panel of SRL and computing-education researchers, using a content validity index or a Delphi procedure; assessment of construct validity by triangulating coded phases against concurrent verbal protocols in a subsample; and assessment of predictive validity by testing whether phase-level indicators forecast learning outcomes beyond what activity frequencies alone predict. Until these are undertaken, the mapping should be cited as a proposed instrument rather than a validated one.
A second limitation concerns the granularity of the behavioural coding and the consequent resolution of the analysis. The 3985 coded actions represent a mean of 10.98 segments per student across a task requiring four to six academic hours, which means that extended periods of programming activity were compressed into a comparatively small number of coded states. What this coding preserves is the macro-structure of the session: the order in which students moved between task analysis, code production, debugging, error interpretation, ChatGPT consultation, response review, and revision, and the conditional dependencies between these activity types. It is this macro-structure that the sequential and network analyses characterise, and the reported transitions should be understood as dependencies between activity episodes rather than between individual operations. What is lost is correspondingly specific. Within-episode structure is not represented: a single code-implementation segment may contain numerous edit-run-inspect cycles that the coding renders as one state, and the discrepancy between the 799 coded queries and the 323 query-submitting episodes demonstrates this compression directly. Duration is not carried into the sequential analysis, so a forty-minute debugging episode and a three-minute one enter the transition matrices with equal weight. Brief but potentially consequential actions—a momentary return to the task specification, a short comparison of two candidate solutions, a rapid glance at a previous ChatGPT response while typing—fall below the segmentation threshold and are absorbed into the surrounding episode, and such actions are plausibly those most closely associated with reflective and evaluative processing, which compounds the underrepresentation of reflection discussed above. The term process-level analysis should therefore be read as denoting episode-level process structure and not the event-level behavioural resolution obtainable from instrumented environments. Studies requiring the finer resolution should combine screen-based episode coding with keystroke logging, IDE telemetry, or API-level interaction records, which would permit the within-episode structure to be recovered and the stability of the episode-level transitions reported here to be tested against a denser behavioural record.
A third limitation concerns the inferences that the design supports about the relationship between behaviour and attainment. The study is observational and cross-sectional, no aspect of the learning environment was manipulated, and the achievement groups were constituted after the fact by partitioning scores on the same assignment during which the behavioural data were recorded. Two consequences follow. The first is that no causal claim about the effect of interaction patterns on performance is licensed, and the between-group comparisons should be read throughout as associations. The second is more specific to this design and constrains interpretation more tightly: because the behavioural record and the outcome measure derive from a single task episode, they are not independent observations. A student whose implementation is failing will generate additional error messages, debugging episodes, and diagnostic queries as a direct consequence of that failure, and will also receive a lower score for it, so that some portion of the behavioural difference between groups is an expression of the same underlying difficulty that the score records rather than an independent correlate of it. The observed association is thus partly structural, and its magnitude cannot be estimated from these data. Designs capable of separating these components would measure prior programming competence independently of the focal task, record interaction patterns on one task and attainment on another, or manipulate the availability and structuring of AI support experimentally; longitudinal designs tracking the same students across successive tasks would additionally establish whether the interaction profiles observed here are stable individual tendencies or task-specific responses.
A fourth limitation concerns the scope of the study context. The data were collected at a single university, within a single programming course, and during one academic year. The generalisability of the findings to other institutional settings, programming languages, AI tools, student populations, or task types cannot be assumed. The specific assignment used—a radial chart visualisation task implemented in Python using NumPy and Matplotlib—represents a particular category of moderately complex structured programming problem. Interaction patterns may differ substantially in tasks that require open-ended architectural design, collaborative programming, or iterative creative implementation over longer timeframes.
A fifth limitation pertains to the data collection procedure. Interaction logs were reconstructed from screen recordings through structured behavioural coding rather than collected through API-based timestamped logging systems. Although the inter-rater reliability indicators support the consistency of the coding procedure (κ = 0.82 for learning activity categories and κ = 0.80 for cognitive query categories), the temporal precision of reconstructed logs is inherently lower than that achievable with automated logging. In rapidly alternating activity sequences, the possibility of residual coding ambiguity cannot be fully excluded. Future studies should combine screen-based observation with API-level interaction data to improve temporal granularity and reduce reliance on manual reconstruction.
A sixth limitation concerns the network analysis. The networks presented in Figure 3 and Figure 7 are thresholded visualisations, constructed with a minimum edge frequency of three observed transitions. Two consequences follow. The threshold may have excluded rare but meaningful transitions, particularly those involving deep-level submissions, which occurred less frequently in all groups; and the effect of that choice cannot be assessed, because the sensitivity of the visualised structure to alternative thresholds was not tested and the underlying edge weights are not available for such a test to be performed now (see the Data Availability Statement). Quantitative topology metrics are likewise not reported. Any structural reading of these figures is therefore qualitative, and the comparisons between group networks that earlier drafts of this paper advanced have been withdrawn.
A seventh limitation relates to the operationalisation of ChatGPT use levels. Students were categorised into low, medium, and high ChatGPT-use groups using tertile-based thresholds calculated from the relative proportion of ChatGPT-related activities within each student’s total coded sequence. This approach ensured balanced group sizes but was not grounded in theoretically or empirically predefined cut-off values. Alternative classification strategies—including absolute frequency thresholds or data-driven clustering methods—may yield different group compositions and should be explored in future research.
An eighth limitation concerns variation in the length of individual activity sequences. Although the full dataset comprised 3985 coded actions from 363 students, the mean number of coded actions per student was 10.98 (SD = 4.3), and the minimum recorded sequence length was five actions. Students with very short sequences provide limited information for estimating stable transition patterns, and their inclusion in the sequential analysis may reduce the precision of individual-level Yule’s Q estimates. Although this issue was partially mitigated by aggregating student-level coefficients within groups and interpreting only transitions that appeared consistently across multiple students, future studies should establish minimum sequence-length criteria or conduct sensitivity analyses that systematically exclude very short sequences to assess their influence on the aggregate results.
A ninth limitation concerns the nested structure of the data and the analyses that would be required to accommodate it. The 799 cognitive submissions are nested within students and, in some cases, within single coded episodes; the activity sequences are similarly non-independent, both across students and serially within them; and the 4 × 3 activity table analysed in Section 5.3 is constructed from 3985 actions nested within 363 students. The appropriate treatments are well specified—a mixed-effects multinomial model with a random intercept for student for the query data, and multilevel sequential models, minimum-sequence-length restrictions or permutation testing for the transition data—and this study does not report them. The reason is not that they were judged unnecessary but that the student-linked coded records required to fit them are not available (see the Data Availability Statement). The consequence is stated plainly: the group-level comparisons of query complexity in Section 5.4, the activity-distribution chi-square in Section 5.3, and the sequential coefficients in Table 7 are descriptive summaries of the coded record, and no inferential claim is advanced about any of them. The only inferentially valid group comparisons reported in this study are the Kruskal–Wallis and Dunn tests in Section 5.3, which take the student as the unit of analysis.
A tenth limitation concerns the stage-based segmentation of the programming process. The division of each student’s activity sequence into initial, intermediate, and final stages was operationalised through proportional segmentation into equal thirds based on total coded action count. Although this approach ensures comparability across students with sequences of different lengths, it does not capture qualitatively distinct task phases—such as problem decomposition, prototype construction, or final validation—that may have different durations and cognitive demands across students. Future research should explore the integration of task-based process milestones with sequence-based segmentation, drawing on process mining techniques, to obtain a more differentiated account of how interaction patterns shift across functionally defined phases of complex programming tasks.
An eleventh limitation concerns two features of the measurement that constrain specific conclusions. The first is the categorisation of a continuous achievement score into three groups. This was necessary in order to obtain sequence sets large enough for stable transition-matrix and network estimation, but it discards information, reduces statistical power, and renders group membership near the boundaries sensitive to the placement of the cut-offs; conclusions about differences between high-, average-, and low-achieving students should accordingly be read as statements about regions of a continuous distribution that was itself defined post hoc from performance on the same task from which the behavioural sequences were drawn. The second is the small number of observations underlying the PCM → IO transition. Thirteen IO episodes were recorded across the entire dataset, and IO is defined by the absence of observable task-related behaviour for at least 240 s rather than by any positive indicator of disengagement. Any interpretation of this transition is therefore provisional, and its investigation requires designs in which intervals of non-activity can be characterised directly, such as instrumented logging combined with concurrent verbal report.
A twelfth limitation concerns reproducibility. The aggregate coded output underlying Table 6, Table 7, Table 8, Table 9 and Table 10 is retained, but the student-linked coded sequences and query records from which it was derived are no longer retained. The analyses reported in Section 5.2, Section 5.3 and Section 5.4 therefore cannot be re-executed on the original data by the authors or by others, and the sensitivity analyses that would ordinarily accompany them cannot be performed. The coding instrument is deposited publicly, and the procedure can be applied to new recordings, so the study is replicable in the sense that its method can be repeated; it is not reproducible in the sense that its reported computations can be re-run. We report this distinction explicitly because the two are frequently conflated, and because the strength of several claims in this paper depends on which of them is meant.

7. Conclusions and Suggestions for Practical Use

7.1. Summary of Main Findings

This study examined undergraduate students’ learning behaviour during ChatGPT-supported programming task completion through a process-oriented learning analytics approach. Drawing on screen recordings and reconstructed interaction logs from 363 students, the study applied descriptive statistical analysis, lag sequential analysis, cognitive network analysis, and the Self-Regulated Learning framework to examine the observable activity patterns that were interpreted, within that framework, as behavioural indicators of planning, monitoring, control, and reflection during programming work in which ChatGPT was available as a permitted auxiliary tool. As throughout the preceding sections, phase names denote activities coded as indicative of those phases and not directly measured cognitive processes.
The results show that, at the level of observable action, ChatGPT was used primarily as a diagnostic and corrective instrument—for error interpretation, code clarification, and programming support—rather than as a substitute for independent coding activity. Students’ activity sequences were organised around recurring cycles of code production, debugging, error-message interpretation, ChatGPT-supported help-seeking, response analysis, and code revision. The strongest sequential associations in the full sample were concentrated in troubleshooting transitions: PCM → RF (Q = 0.84) and ANQ → RF (Q = 0.82), describing a pattern in which submitting error information to ChatGPT and reviewing its response occurred as adjacent episodes considerably more often than would be expected were they sequentially independent. Yule’s Q is a descriptive measure of association rather than a transition probability, and the stability of these coefficients across students was not tested; the troubleshooting cycle is therefore reported as an observed regularity in the coded record and not as an inferentially established dependency. Planning-related activities appeared predominantly at the onset of task completion, and reflection-related activities were the least frequent across all stages and groups.
Achievement groups showed small but statistically detectable differences in the frequency of certain activity types, together with descriptive differences in the composition of their ChatGPT queries. In the observed distribution, high-achieving students submitted fewer ChatGPT queries overall and produced a higher proportion of deep-level cognitive queries (32.2%), whose wording referred to solution logic and code structure. Low-achieving students recorded higher total action frequencies across all task stages and a higher proportion of surface-level queries (38.4%), more often requesting specific corrections to individual code fragments. Because query submissions are nested within students, these differences in query composition are reported as properties of the observed distribution and not as inferentially established differences, and no comparative claim about the structure of the groups’ transition networks is advanced. Average-achieving students demonstrated an intermediate profile, with the most intensive ChatGPT use occurring at the intermediate task stage. Although statistically significant between-group differences were identified, at the level of the student, for code production activities and ChatGPT-related interactions, the corresponding effect sizes were small (ε2 = 0.021 and 0.014); the descriptive association for the activity-type distribution was weaker still (Cramér’s V = 0.048), and within-group heterogeneity exceeded between-group difference throughout, indicating that achievement group membership accounts for only a small proportion of the variation in interaction patterns and that the groups are better described as overlapping distributions than as distinct behavioural types. Because the achievement groups were defined by outcomes on the same task from which the behavioural record was drawn, these differences are reported as associations between interaction pattern and attainment and not as explanations of performance.

7.2. Theoretical Contributions

The study contributes to the theoretical literature on AI-supported learning by extending the application of Self-Regulated Learning theory to the analysis of ChatGPT interaction patterns in programming education. The findings demonstrate that students’ observable interactions with ChatGPT—including query formulation, error submission, response review, and code integration—can be systematically and reliably coded, and that the resulting categories can be interpreted as candidate behavioural indicators of planning, monitoring, control, and reflection within the SRL cycle (Panadero, 2017). The contribution is thus a coding and interpretation framework whose cognitive validity remains to be established through triangulation with process-tracing methods; the present study demonstrates its behavioural reliability, not its cognitive validity. The framework’s value lies in making the interpretive step explicit and inspectable—each action category, its assigned phase, and the alternative readings it admits are stated openly—so that subsequent studies can test the mapping rather than inherit it. Separating the three levels of description—observed action, coded activity, and inferred regulatory phase—is itself part of this contribution. Process-oriented research on AI-supported learning frequently collapses them, reporting behavioural traces in the vocabulary of cognition and thereby making the interpretive step invisible and untestable. Holding the levels apart establishes which findings survive independently of the theoretical commitment: the activity distributions, the observed sequential regularities, and the descriptive group differences reported here stand whether or not the SRL interpretation is accepted, while the account of a selectively reinforced and structurally incomplete regulatory cycle is offered as an interpretation that the behavioural evidence motivates and that further research is required to test. This interpretive mapping, operationalised through a 14-category behavioural coding scheme that was reliably coded and applied by two independent raters in the present dataset (κ = 0.82 for learning activities; κ = 0.80 for cognitive queries), provides an explicitly specified methodological framework for episode-level analysis of student-AI interaction data. Reliability of application is not validity, and consistency within a single dataset is not replication: the content, construct, and predictive validity of the mapping remain to be established through the programme set out in Section 6.6, and its replicability remains to be demonstrated through independent application to other cohorts, tasks, and instructional contexts.
The distinction between proactive and reactive query content, identified through the coding of the submissions themselves, represents a contribution to the emerging empirical literature on differential ChatGPT use in programming education. The observation that the queries of high-achieving students more often referred to solution logic and code structure, while those of lower-achieving students more often requested corrections to individual code fragments, is consistent with the qualitative accounts of this distinction reported by Cheng et al. (2024) and Yang et al. (2025). It is offered here as a descriptive property of the coded query content and not as sequential or network-level evidence, which the present data cannot supply. The distinction nonetheless has theoretical implications for how prompt-driven dependency might be conceptualised: not merely as a usage-frequency phenomenon, but as a feature of the content of the interaction that episode-level coding can render visible and that appropriately specified multilevel designs would be required to test.

7.3. Scientific Novelty

The substantive originality of this study consists of two findings that depart from what would be anticipated of AI-assisted programming work. First, ChatGPT was found to be integrated into the monitoring and control phases of the self-regulated learning cycle while remaining largely absent from planning and reflection, describing a cycle that is selectively reinforced and structurally incomplete rather than uniformly augmented—a result that reframes generative AI in SRL terms as a phase-specific rather than a general amplifier of self-regulation. Second, the differences between achievement groups were not graded: the high-achieving group differed significantly from both other groups on the measures tested, whereas the comparison between the average- and low-achieving groups did not reach significance, which is not the same as showing the two to be equivalent. Given the small effect sizes involved, this pattern suggests that achievement band is at best a weak proxy for interaction strategy. The methodological originality lies in the systematic integration of lag sequential analysis and cognitive network analysis within a Self-Regulated Learning framework applied to reconstructed ChatGPT interaction logs in a real programming instruction context, which is what made these findings observable. Unlike prior studies that examined ChatGPT use through self-report instruments or aggregate performance metrics, this study provides episode-level, sequence-based behavioural evidence of how students of varying achievement levels organise their interactions with ChatGPT across the temporal course of a programming task. The identification of a recurrent troubleshooting cycle in the coded record and the operationalisation of a 14-category SRL-based coding scheme constitute methodological contributions specified in sufficient detail to be applied in future research, although their replicability has yet to be demonstrated through independent application. The value of describing an anticipated pattern in quantitative terms lies in the baseline it makes available: a transition summarised at Q = 0.84 in this dataset indicates the kind of reference structure against which individual, temporal, and between-group departures could be assessed, and against which automated indicators could be calibrated, once its stability across students has been established in data that permit such a test.

7.4. Suggestions for Practical Use

The findings suggest several directions for the pedagogical integration of ChatGPT in programming instruction. The concentration of interaction at the monitoring and control phases of the SRL cycle, and the relative absence of reflection-oriented query patterns, indicate that unrestricted access to ChatGPT does not in itself support the full range of self-regulatory processes. Instructors should design programming assignments that embed explicit reflection requirements within the task workflow—for example, by requiring students to annotate AI-generated code, document their testing procedures, compare alternative implementations before selection, or articulate the causal relationship between an identified error and its correction. Such structural requirements redirect ChatGPT use from reactive answer-seeking toward elaborative reasoning, which is more consistent with deep-level cognitive engagement (H. Y. Lee et al., 2025).

7.5. Directions for Future Research

Future research should address the contextual and methodological limitations of this study by extending the investigation across multiple institutions, programming languages, and course levels to assess the generalisability of the identified patterns. Longitudinal study designs that track students’ ChatGPT interaction strategies across multiple courses and semesters would make it possible to examine whether the reactive and surface-level interaction patterns observed among lower-achieving students are stable behavioural tendencies or whether they evolve with increasing experience of AI-assisted programming. Experimental and quasi-experimental designs that systematically vary the instructional scaffolding surrounding ChatGPT use—including prompt structuring, reflection requirements, and access constraints—would allow causal inference about the conditions under which ChatGPT use supports, rather than substitutes for, self-regulated learning in programming contexts.

Author Contributions

Conceptualization, A.O., M.M., G.B. and Y.R.; methodology, A.O., M.M. and A.N.; software, Y.R. and A.N.; validation, G.B. and Z.L.; formal analysis, A.O. and A.N.; investigation, A.O., G.B., Y.R. and Z.L.; resources, M.M. and G.B.; data curation, Y.R. and A.N.; writing—original draft preparation, A.N. and Z.L.; writing—review and editing, A.O., M.M. and G.B.; visualization, A.N.; supervision, M.M. and G.B.; project administration, A.O.; funding acquisition, M.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Committee of Science of the Ministry of Science and Higher Education of the Republic of Kazakhstan, Grant No. BR28713531 (“Intelligent digital system of higher and postgraduate education organizations Smart.EDU”).

Institutional Review Board Statement

The study was conducted in accordance with the Declaration of Helsinki and was approved by the Ethics Committee of L.N. Gumilyov Eurasian National University for studies involving humans. All participants provided written informed consent prior to data collection, participation was voluntary, and all data were anonymised before analysis.

Data Availability Statement

The aggregate coded data underlying Table 6, Table 7, Table 8, Table 9 and Table 10 are available from the corresponding author upon reasonable request. The student-linked coded sequences and query records from which those aggregates were derived are no longer retained, and the analyses reported in Section 5.2, Section 5.3 and Section 5.4 cannot therefore be independently re-executed on the original data. The original screen recordings are also no longer available; consequently, re-derivation of the student-level coded sequences and query records is not possible. The coding instrument is openly available: the complete coding manual, the operational indicator table reproduced in abridged form as Table A1, the cognitive query classification scheme, the mapping of activity codes to Self-Regulated Learning phases, and a worked example of a coded session are deposited in a public repository under a CC BY 4.0 licence (https://github.com/AyzhanNaz/chatgpt-programming-coding-scheme (accessed on 22 August 2026)). The repository permits the coding procedure to be inspected and applied to new recordings; it does not permit the analyses reported here to be reproduced.

Conflicts of Interest

The authors declare no conflicts of interest. The funders had no role in the design of the study, in the collection, analysis, or interpretation of data, in the writing of the manuscript, or in the decision to publish the results.

Appendix A. Operational Indicators for the Learning Activity Codes

Table A1 specifies, for each of the fourteen codes in Table 2, the observable indicator that licenses the code, the rule determining where the corresponding segment opens and closes, and the codes from which it must be distinguished. The table is the abridged form of the coding manual used by both coders; the full manual, including worked examples drawn from the pilot recordings and the resolution rules applied to disagreements, is available in the repository cited in the Data Availability Statement.
Table A1. Operational indicators, segment boundary rules, and code disambiguation for the fourteen learning activity categories.
Where two indicators were simultaneously present, the code was assigned according to the activity occupying the larger share of the segment; where this was not determinable, the segment was flagged and resolved through discussion between the coders.

References

  1. Alanazi, M., Soh, B., Samra, H., & Li, A. (2025). The influence of artificial intelligence tools on learning outcomes in computer programming: A systematic review and meta-analysis. Computers, 14(5), 185. [Google Scholar] [CrossRef] [Scilit]
  2. Alhazbi, S., Al-ali, A., Tabassum, A., Al-Ali, A., Al-Emadi, A., Khattab, T., & Hasan, M. A. (2024). Using learning analytics to measure self-regulated learning: A systematic review of empirical studies in higher education. Journal of Computer Assisted Learning, 40(4), 1658–1674. [Google Scholar] [CrossRef] [Scilit]
  3. Bhatt, V., Yu, Z., Hou, Y., & Jin, J. (2025). ChatGPT as a programming tutor: Student perceptions, effectiveness, and challenges. In 2025 IEEE Global Engineering Education Conference (EDUCON) (pp. 1–10). IEEE. [Google Scholar] [CrossRef] [Scilit]
  4. Boom, K. D., Bower, M., Siemon, J., Arguel, A., & Vlachopoulos, P. (2022). Relationships between computational thinking and the quality of computer programs. Education and Information Technologies, 27, 8289–8310. [Google Scholar] [CrossRef] [Scilit]
  5. Chen, C.-H., & Chung, H.-Y. (2024). Fostering computational thinking and problem-solving in programming: Integrating concept maps into robot block-based programming. Journal of Educational Computing Research, 62(1), 186–207. [Google Scholar] [CrossRef] [Scilit]
  6. Cheng, G., Zou, D., Xie, H., & Wang, F. L. (2024). Exploring differences in self-regulated learning strategy use between high- and low-performing students in introductory programming: An analysis of eye-tracking and retrospective think-aloud data from program comprehension. Computers & Education, 208, 104948. [Google Scholar] [CrossRef] [Scilit]
  7. Chiu, M. C., & Hwang, G. J. (2025). Enhancing student creative and critical thinking in generative AI-empowered creation: A mind-mapping approach. Interactive Learning Environments, 34(2), 869–890. [Google Scholar] [CrossRef] [Scilit]
  8. Fan, Y., Matcha, W., Uzir, N. A., Wang, Q., Jovanović, J., Pardo, A., & Gašević, D. (2021). Learning analytics to reveal links between learning design and self-regulated learning. International Journal of Artificial Intelligence in Education, 31, 980–1021. [Google Scholar] [CrossRef] [Scilit]
  9. Finnie-Ansley, J., Denny, P., Becker, B. A., Luxton-Reilly, A., & Prather, J. (2022). The robots are coming: Exploring the implications of OpenAI Codex on introductory programming. In Proceedings of the 24th Australasian Computing Education Conference (pp. 10–19). Association for Computing Machinery. [Google Scholar] [CrossRef] [Scilit]
  10. Giannakos, M., Azevedo, R., Brusilovsky, P., Cukurova, M., Dimitriadis, Y., Hernandez-Leo, D., Järvelä, S., Mavrikis, M., & Rienties, B. (2025). The promise and challenges of generative AI in education. Behaviour & Information Technology, 44(11), 2518–2544. [Google Scholar] [CrossRef] [Scilit]
  11. Güner, H., & Er, E. (2025). AI in the classroom: Exploring students’ interaction with ChatGPT in programming learning. Education and Information Technologies, 30, 12681–12707. [Google Scholar] [CrossRef] [Scilit]
  12. Hartley, K., Hayak, M., & Ko, U. H. (2024). Artificial intelligence supporting independent student learning: An evaluative case study of ChatGPT and learning to code. Education Sciences, 14(2), 120. [Google Scholar] [CrossRef] [Scilit]
  13. Kasneci, E., Sessler, K., Küchemann, S., Bannert, M., Dementieva, D., Fischer, F., Gasser, U., Groh, G., Günnemann, S., Hüllermeier, E., Krusche, S., Kutyniok, G., Michaeli, T., Nerdel, C., Pfeffer, J., Poquet, O., Sailer, M., Schmidt, A., Seidel, T., & Kasneci, G. (2023). ChatGPT for good? On opportunities and challenges of large language models for education. Learning and Individual Differences, 103, 102274. [Google Scholar] [CrossRef] [Scilit]
  14. Lee, H. Y., Chen, P. H., & Lin, C. J. (2025). Leveraging ChatGPT for personalized reflective learning in programming education: Effects on self-efficacy, higher-order thinking, and project implementation skills. Education and Information Technologies, 30, 24815–24854. [Google Scholar] [CrossRef] [Scilit]
  15. Lee, Y. F., Hwang, G. J., & Cheng, L. C. (2025). Impacts of a ChatGPT-supported concept mapping approach on students’ database programming achievement and their problem-solving and critical thinking awareness. Interactive Learning Environments, 34(3), 1467–1486. [Google Scholar] [CrossRef] [Scilit]
  16. Panadero, E. (2017). A review of self-regulated learning: Six models and four directions for research. Frontiers in Psychology, 8, 422. [Google Scholar] [CrossRef] [Scilit]
  17. Phung, T., Pădurean, V.-A., Cambronero, J., Gulwani, S., Kohn, T., Majumdar, R., Singla, A., & Soares, G. (2023). Generative AI for programming education: Benchmarking ChatGPT, GPT-4, and human tutors. In Proceedings of the 2023 ACM conference on international computing education research (Vol. 2, pp. 41–42). Association for Computing Machinery. [Google Scholar] [CrossRef] [Scilit]
  18. Rahman, M. M., & Watanobe, Y. (2022). ChatGPT for education and research: Opportunities, threats, and strategies. Applied Sciences, 13(9), 5783. [Google Scholar] [CrossRef] [Scilit]
  19. Shin, Y., & Song, D. (2022). The effects of self-regulated learning support on learners’ task performance and cognitive load in computer programming. Journal of Educational Computing Research, 60(6), 1490–1513. [Google Scholar] [CrossRef] [Scilit]
  20. Shoufan, A. (2023). Exploring students’ perceptions of ChatGPT: Thematic analysis and follow-up survey. IEEE Access, 11, 38805–38818. [Google Scholar] [CrossRef] [Scilit]
  21. Silva, C. A. G., Ramos, F. N., De Moraes, R. V., & dos Santos, E. L. (2024). ChatGPT: Challenges and benefits in software programming for higher education. Sustainability, 16(3), 1245. [Google Scholar] [CrossRef] [Scilit]
  22. Sun, D., Boudouaia, A., Yang, J., & Xu, J. (2024). Investigating students’ programming behaviors, interaction qualities and perceptions through prompt-based learning in ChatGPT. Humanities and Social Sciences Communications, 11(1), 1447. [Google Scholar] [CrossRef] [Scilit]
  23. Wang, Z., Zou, D., Zhang, R., Lee, L. K., Xie, H., & Wang, F. L. (2025). ChatGPT-enhanced self-regulated learning in programming education: Impacts on motivation, self-efficacy, and learning outcomes. Interactive Learning Environments, 34(5), 3041–3066. [Google Scholar] [CrossRef] [Scilit]
  24. World Medical Association. (2013). World medical association declaration of Helsinki: Ethical principles for medical research involving human subjects. JAMA, 310(20), 2191–2194. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  25. Yang, T. C., Hsu, Y. C., & Wu, J. Y. (2025). The effectiveness of ChatGPT in assisting high school students in programming learning: Evidence from a quasi-experimental research. Interactive Learning Environments, 33(6), 3726–3743. [Google Scholar] [CrossRef] [Scilit]
  26. Yilmaz, R., & Yilmaz, F. G. K. (2023). Augmented intelligence in programming learning: Examining student views on the use of ChatGPT for programming learning. Computers in Human Behavior: Artificial Humans, 1(2), 100005. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.